Py) 실기시험 대비 정리 노트 - 00

Py) 실기시험 대비 정리 노트 - 00

각종 데이터 분석 실기시험 대비에 도움이 되는 파이썬 라이브러리와 그 함수목록을 모아보았다.

기본

1
2
3
import os
import pandas as pd
import numpy as np

전처리

1
2
3
# normalization
from sklearn.preprocessing import MinMaxScaler
from sklearn.preprocessing import StandardScaler

통계

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# correlation
from scipy.stats import pearsonr # pearson
from scipy.stats import spearmanr # spearman
from scipy.stats import kendalltau # kendall

# independent test
from scipy.stats import chi2_contingency

# t-test
from scipy.stats import ttest_1samp
from scipy.stats import ttest_rel
from scipy.stats import ttest_ind

# variance
from scipy.stats import bartlett
from scipy.stats import levene
from scipy.stats import f.cdf # F-test(cumulative distrubution function of F distribution)

# ANOVA
from scipy.stats import f_oneway
from statsmodels.formula.api import ols
from statsmodels.stats.anova import anova_lm
from statsmodels.stats.multicomp import pairwise_tukeyhsd # post-process of ANOVA

머신러닝

데이터 분할

1
from sklearn.model_selection import train_test_split

모델링

1
2
3
4
5
6
7
8
9
10
11
from sklearn.neighbors import KNeighborsClassifier # k-NN
from sklearn.neighbors import KNeighborsRegressor # k-NN
from sklearn.cluster import AgglomerativeClustering # 계층적 준집 분석
from sklearn.cluster import KMeans # K-means
from statsmodels.formula.api import ols # 선형회귀
from sklearn.linear_model import LinearRegression # 선형회귀
from statsmodels.api import Logit # 로지스틱 회귀
from sklearn.linear_model import LogisticRegression # 로지스틱 회귀
from sklearn.tree import DecisionTreeClassifier # Decision Tree
from sklearn.tree import DecisionTreeRegressor # Decision Tree
from sklearn.naive_bayes import GaussianNB # Naive Bayes

평가 - 회귀

1
2
3
4
from sklearn.metrics import mean_absolute_error # MAE
from sklearn.metrics import mean_absolute_percentage_error # MAPE
from sklearn.metrics import mean_squared_error # MSE
mean_squared_error() ** 0.5 ## RMSE

평가 - 분류

1
2
3
4
5
6
from sklearn.metrics import roc_auc_score # AUC

from sklearn.metrics import accuracy_score
from sklearn.metrics import precision_score
from sklearn.metrics import recall_score
from sklearn.metrics import f1_score

<실기시험 대비 시리즈 - Python>
Python 실기시험 대비 정리 노트 - 00
Python 실기시험 대비 정리 노트 - 01
Python 실기시험 대비 정리 노트 - 02
Python 실기시험 대비 정리 노트 - 03
Python 실기시험 대비 정리 노트 - 04

Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×