πŸ“Œ Quick StartΒΆ

βœ… Feature SelectionΒΆ

An example to quickly run a Feature Selection pipeline with embedded Cross-Validation and Feature-Importance visualization:

from slickml.feautre_selection import XGBoostFeatureSelector
xfs = XGBoostFeatureSelector()
xfs.fit(X, y)

selection

xfs.plot_cv_results()

xfscv

xfs.plot_frequency()

frequency

βœ… Hyper-parameter TuningΒΆ

An example to quickly find the tuned hyper-parameter with Bayesian Optimization:

from slickml.optimization import XGBoostBayesianOptimizer
xbo = XGBoostBayesianOptimizer()
xbo.fit(X_train, y_train)

clfbo

best_params = xbo.get_best_params()
best_params

{"colsample_bytree": 0.8213916662259918,
 "gamma": 1.0,
 "learning_rate": 0.23148232373451072,
 "max_depth": 4,
 "min_child_weight": 5.632602921054691,
 "reg_alpha": 1.0,
 "reg_lambda": 0.39468801734425263,
 "subsample": 1.0
 }

βœ… Classification via XGBoostΒΆ

An example to quickly train/validate a XGBoostCVClassifier with Cross-Validation, Feature-Importance, and Shap visualizations:

from slickml.classification import XGBoostCVClassifier
clf = XGBoostCVClassifier(params=best_params)
clf.fit(X_train, y_train)
y_pred_proba = clf.predict_proba(X_test)

clf.plot_cv_results()

clfcv

clf.plot_feature_importance()

clfimp

clf.plot_shap_summary(plot_type="violin")

clfshap

clf.plot_shap_summary(plot_type="layered_violin", layered_violin_max_num_bins=5)

clfshaplv

clf.plot_shap_waterfall()

clfshapwf

βœ… Classification via GLMNetΒΆ

An example to train/validate a GLMNetCVClassifier with Cross-Validation and Coefficients visualizations:

from slickml.classification import GLMNetCVClassifier
clf = GLMNetCVClassifier(alpha=0.3, n_splits=4, metric="auc")
clf.fit(X_train, y_train)
y_pred_proba = clf.predict_proba(X_test)

clf.plot_cv_results()

clfglmnetcv

clf.plot_coeff_path()

clfglmnetpath

βœ… Classification MetricsΒΆ

An example to quickly visualize the binary classification metrics based on multiple thresholds:

from slickml.metrics import BinaryClassificationMetrics
clf_metrics = BinaryClassificationMetrics(y_test, y_pred_proba)
clf_metrics.plot()

clfmetrics

βœ… Regression MetricsΒΆ

An example to quickly visualize some regression metrics:

from slickml.metrics import RegressionMetrics
reg_metrics = RegressionMetrics(y_test, y_pred)
reg_metrics.plot()

regmetrics