630.00 a

Description: scikit-learn basic functions. Representatively ML library not DL, this is defacto.

#600#ML_Libraries_and_Implementation#630#Machine_Learning_Frameworks#630.00#scikit-learn#630.00 a#scikit-learn_functions

#sklearn

train_test_split

from sklearn.model_selection import train_test_split

X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.3, random_state=42)

test_size ratio
random_state like seed

accuracy_score

from sklearn.metrics import accuracy_score


tree

from sklearn.tree import DecisionTreeClassifier
clf = DecisionTreeClassifier(random_state=0)


Random Forest

from sklearn.ensemble import RandomForestClassifier
X = [[0, 0], [1, 1]]
Y = [0, 1]
clf = RandomForestClassifier(n_estimators=10)
clf = clf.fit(X, Y)

Gradient Boosting

from sklearn.ensemble import GradientBoostingClassifier

model = GradientBoostingClassifier(random_state=42)
model​

Performance Improvements
Data Sampling
Model Hyperparameterization
Feature Engineering

IQR = Q3 - Q1
Q3 + 1.5IQR
Q1 - 1.5IQR

box_plot

make_column_transformer