1 |
Use ColumnTransformer to apply different preprocessing to different columns |
![Watch video](https://raw.githubusercontent.com/Muhanned/scikit-learn-tips/master/icons/yt.svg) |
2 |
Seven ways to select columns using ColumnTransformer |
![Watch video](https://raw.githubusercontent.com/Muhanned/scikit-learn-tips/master/icons/yt.svg) |
3 |
What is the difference between "fit" and "transform"? |
![Watch video](https://raw.githubusercontent.com/Muhanned/scikit-learn-tips/master/icons/yt.svg) |
4 |
Use "fit_transform" on training data, but "transform" (only) on testing/new data |
![Watch video](https://raw.githubusercontent.com/Muhanned/scikit-learn-tips/master/icons/yt.svg) |
5 |
Four reasons to use scikit-learn (not pandas) for ML preprocessing |
![Watch video](https://raw.githubusercontent.com/Muhanned/scikit-learn-tips/master/icons/yt.svg) |
6 |
Encode categorical features using OneHotEncoder or OrdinalEncoder |
![Watch video](https://raw.githubusercontent.com/Muhanned/scikit-learn-tips/master/icons/yt.svg) |
7 |
Handle unknown categories with OneHotEncoder by encoding them as zeros |
![Watch video](https://raw.githubusercontent.com/Muhanned/scikit-learn-tips/master/icons/yt.svg) |
8 |
Use Pipeline to chain together multiple steps |
![Watch video](https://raw.githubusercontent.com/Muhanned/scikit-learn-tips/master/icons/yt.svg) |
9 |
Add a missing indicator to encode "missingness" as a feature |
![Watch video](https://raw.githubusercontent.com/Muhanned/scikit-learn-tips/master/icons/yt.svg) |
10 |
Set a "random_state" to make your code reproducible |
![Watch video](https://raw.githubusercontent.com/Muhanned/scikit-learn-tips/master/icons/yt.svg) |
11 |
Impute missing values using KNNImputer or IterativeImputer |
![Watch video](https://raw.githubusercontent.com/Muhanned/scikit-learn-tips/master/icons/yt.svg) |
12 |
What is the difference between Pipeline and make_pipeline ? |
![Watch video](https://raw.githubusercontent.com/Muhanned/scikit-learn-tips/master/icons/yt.svg) |
13 |
Examine the intermediate steps in a Pipeline |
![Watch video](https://raw.githubusercontent.com/Muhanned/scikit-learn-tips/master/icons/yt.svg) |
14 |
HistGradientBoostingClassifier natively supports missing values |
![Watch video](https://raw.githubusercontent.com/Muhanned/scikit-learn-tips/master/icons/yt.svg) |
15 |
Three reasons not to use drop='first' with OneHotEncoder |
![Watch video](https://raw.githubusercontent.com/Muhanned/scikit-learn-tips/master/icons/yt.svg) |
16 |
Use cross_val_score and GridSearchCV on a Pipeline |
![Watch video](https://raw.githubusercontent.com/Muhanned/scikit-learn-tips/master/icons/yt.svg) |
17 |
Try RandomizedSearchCV if GridSearchCV is taking too long |
![Watch video](https://raw.githubusercontent.com/Muhanned/scikit-learn-tips/master/icons/yt.svg) |
18 |
Display GridSearchCV or RandomizedSearchCV results in a DataFrame |
![Watch video](https://raw.githubusercontent.com/Muhanned/scikit-learn-tips/master/icons/yt.svg) |
19 |
Important tuning parameters for LogisticRegression |
![Watch video](https://raw.githubusercontent.com/Muhanned/scikit-learn-tips/master/icons/yt.svg) |
20 |
Plot a confusion matrix |
![Watch video](https://raw.githubusercontent.com/Muhanned/scikit-learn-tips/master/icons/yt.svg) |
21 |
Compare multiple ROC curves in a single plot |
![Watch video](https://raw.githubusercontent.com/Muhanned/scikit-learn-tips/master/icons/yt.svg) |
22 |
Use the correct methods for each type of Pipeline |
![Watch video](https://raw.githubusercontent.com/Muhanned/scikit-learn-tips/master/icons/yt.svg) |
23 |
Display the intercept and coefficients for a linear model |
![Watch video](https://raw.githubusercontent.com/Muhanned/scikit-learn-tips/master/icons/yt.svg) |
24 |
Visualize a decision tree two different ways |
![Watch video](https://raw.githubusercontent.com/Muhanned/scikit-learn-tips/master/icons/yt.svg) |
25 |
Prune a decision tree to avoid overfitting |
![Watch video](https://raw.githubusercontent.com/Muhanned/scikit-learn-tips/master/icons/yt.svg) |
26 |
Use stratified sampling with train_test_split |
![Watch video](https://raw.githubusercontent.com/Muhanned/scikit-learn-tips/master/icons/yt.svg) |
27 |
Two ways to impute missing values for a categorical feature |
![Watch video](https://raw.githubusercontent.com/Muhanned/scikit-learn-tips/master/icons/yt.svg) |
28 |
Save a model or Pipeline using joblib |
![Watch video](https://raw.githubusercontent.com/Muhanned/scikit-learn-tips/master/icons/yt.svg) |
29 |
Vectorize two text columns in a ColumnTransformer |
![Watch video](https://raw.githubusercontent.com/Muhanned/scikit-learn-tips/master/icons/yt.svg) |
30 |
Four ways to examine the steps of a Pipeline |
![Watch video](https://raw.githubusercontent.com/Muhanned/scikit-learn-tips/master/icons/yt.svg) |
31 |
Shuffle your dataset when using cross_val_score |
![Watch video](https://raw.githubusercontent.com/Muhanned/scikit-learn-tips/master/icons/yt.svg) |
32 |
Use AUC to evaluate multiclass problems |
![Watch video](https://raw.githubusercontent.com/Muhanned/scikit-learn-tips/master/icons/yt.svg) |
33 |
Use FunctionTransformer to convert functions into transformers |
![Watch video](https://raw.githubusercontent.com/Muhanned/scikit-learn-tips/master/icons/yt.svg) |
34 |
Add feature selection to a Pipeline |
![Watch video](https://raw.githubusercontent.com/Muhanned/scikit-learn-tips/master/icons/yt.svg) |
35 |
Don't use .values when passing a pandas object to scikit-learn |
![Watch video](https://raw.githubusercontent.com/Muhanned/scikit-learn-tips/master/icons/yt.svg) |
36 |
Most parameters should be passed as keyword arguments |
![Watch video](https://raw.githubusercontent.com/Muhanned/scikit-learn-tips/master/icons/yt.svg) |
37 |
Create an interactive diagram of a Pipeline in Jupyter |
![Watch video](https://raw.githubusercontent.com/Muhanned/scikit-learn-tips/master/icons/yt.svg) |
38 |
Get the feature names output by a ColumnTransformer |
![Watch video](https://raw.githubusercontent.com/Muhanned/scikit-learn-tips/master/icons/yt.svg) |
39 |
Load a toy dataset into a DataFrame |
![Watch video](https://raw.githubusercontent.com/Muhanned/scikit-learn-tips/master/icons/yt.svg) |
40 |
Estimators only print parameters that have been changed |
![Watch video](https://raw.githubusercontent.com/Muhanned/scikit-learn-tips/master/icons/yt.svg) |
41 |
Drop the first category from binary features (only) with OneHotEncoder |
![Watch video](https://raw.githubusercontent.com/Muhanned/scikit-learn-tips/master/icons/yt.svg) |
42 |
Passthrough some columns and drop others in a ColumnTransformer |
![Watch video](https://raw.githubusercontent.com/Muhanned/scikit-learn-tips/master/icons/yt.svg) |
43 |
Use OrdinalEncoder instead of OneHotEncoder with tree-based models |
![Watch video](https://raw.githubusercontent.com/Muhanned/scikit-learn-tips/master/icons/yt.svg) |
44 |
Speed up GridSearchCV using parallel processing |
![Watch video](https://raw.githubusercontent.com/Muhanned/scikit-learn-tips/master/icons/yt.svg) |
45 |
Create feature interactions using PolynomialFeatures |
![Watch video](https://raw.githubusercontent.com/Muhanned/scikit-learn-tips/master/icons/yt.svg) |
46 |
Ensemble multiple models using VotingClassifer or VotingRegressor |
![Watch video](https://raw.githubusercontent.com/Muhanned/scikit-learn-tips/master/icons/yt.svg) |
47 |
Tune the parameters of a VotingClassifer or VotingRegressor |
![Watch video](https://raw.githubusercontent.com/Muhanned/scikit-learn-tips/master/icons/yt.svg) |
48 |
Access part of a Pipeline using slicing |
![Watch video](https://raw.githubusercontent.com/Muhanned/scikit-learn-tips/master/icons/yt.svg) |
49 |
Tune multiple models simultaneously with GridSearchCV |
![Watch video](https://raw.githubusercontent.com/Muhanned/scikit-learn-tips/master/icons/yt.svg) |
50 |
Adapt this pattern to solve many Machine Learning problems |
![Watch video](https://raw.githubusercontent.com/Muhanned/scikit-learn-tips/master/icons/yt.svg) |