1. What is Scikit-Learn?
Scikit-learn(Sklearn) is the most useful and robust library for machine learning in Python. It provides a selection of efficient tools for machine learning and statistical modeling including classification, regression, clustering and dimensionality reduction via a consistence interface in Python. This library, which is largely written in Python, is build upon Numpy, Scipy and Matplotlib.
2. Most used modules in sklearn
# Preprocessing modules
# Scalers
from sklearn.preprocessing import MinMaxScaler, RobustScaler, StandardScaler
# Encoders
from sklearn.preprocessing import LabelEncoder, OneHotEncoder
# Model selection
# Train-Test split
from sklearn.model_selection import KFold, StratifiedKFold, train_test_split
# Hyperparameter tuning
from sklearn.model_selection import GridSearchCV
# Model learning
# Ensemble models
from sklearn.ensemble import AdaBoostClassifier, GradientBoostingClassifier, RandomForestClassifier, RandomForestRegressor
# Linear models
from sklearn.linear_model import LogisticRegression, RidgeCalssifier
# Neighbors
from sklearn.neighbors import KNeighborsClassifier
# Support Vector Machines
from sklearn.svm import SVC, SVR
# Tree models
from sklearn.tree import DecisionTreeClassifier, DecisionTreeRegressor, ExtraTreeClassifier, ExtraTreeRegressor
# Model Evaluation
# Metrics : Regression problems
from sklearn.metrics import accuracy_score, mean_absolute_error, mean_squared_error, r2_score
# Metrics : Classification problems
from sklearn.metrics import classification_report, confusion_matrix, f1_score, log_loss, roc_auc_score
# We can evaluate model using built in methods in each model
# model.predict() and model.predict_proba()
# Final Ensemble
from sklearn.ensemble import StackingClassifier, StackingRegressor, VotingClassifier, VotingRegressor
Source from :
'Data Science > Scikit-Learn' 카테고리의 다른 글
[Sklearn] Scalers (0) | 2022.09.20 |
---|---|
[Sklearn] Feature Engineering Skills (0) | 2022.09.20 |
[Sklearn] Dealing Categorical Variables : Encoders (0) | 2022.09.20 |
[Sklearn] Dealing Missing Values : Imputers (0) | 2022.09.20 |
[Sklearn] Cross Validation (0) | 2022.09.20 |