Python — From Basics to Advanced · scikit-learn — Classical ML
Estimator API — fit, predict, transform
scikit-learn — Classical ML
Introduction
scikit-learn is popular not because its algorithms are the fastest, but because it has ONE API for all of them. RandomForest, SVM, KMeans, PCA, StandardScaler — each is trained via .fit(X, y) or .fit(X), and you get results via .predict(X) (predictors) or .transform(X) (transformers). This lesson systematises the estimator contract: when to use fit_transform vs fit().transform(), why a scaler MUST be fit only on the training set, how predict_proba differs from predict, how random_state ensures reproducibility. After it you will understand why you can use a new sklearn algorithm from the docs in 30 seconds — the API is always the same.