Skip to content
LearnPY
scikit-learn

scikit-learn

Follow the same fit, predict, and evaluate loop used across scikit-learn. Cover preprocessing, regression, classification, clustering, and model selection.

What you'll practice

  • Estimators
  • Preprocessing
  • Regression
  • Classification
  • Metrics

Lessons

9 lessons, in order

  1. 01Start with the scikit-learn APILearn the fit, predict, and score rhythm that every estimator shares, then protect the test set with a pipeline.
  2. 02Prepare features without leakageHandle missing values, scale numeric columns, encode categories, and combine those steps with ColumnTransformer.
  3. 03Predict a number with regressionFit a continuous target, read coefficients carefully, and evaluate predictions in the target's own units.
  4. 04Evaluate with validationGo beyond one train/test split with baselines, cross-validation, and honest comparisons that separate signal from noise.
  5. 05Classify with probabilitiesTrain a binary classifier, read predicted probabilities, and choose a threshold that matches the cost of mistakes.
  6. 06Choose the right classification metricRead a confusion matrix, balance precision and recall, and use ranking metrics when the threshold is not fixed.
  7. 07Find structure with clusteringGroup unlabeled rows with K-means, scale the features, and judge the result with inertia and silhouette scores.
  8. 08Reduce dimensions with PCAProject many correlated features onto a few directions of variance, and read explained variance before trusting the picture.
  9. 09Search for better settingsTune hyperparameters with cross-validated grid search, keep the test set untouched, and evaluate the winning pipeline once.