SK Learn Models Guide
SK Learn Models Guide
Introduction
This comprehensive guide covers all 207 estimators available in scikit-learn, categorized into Classification (44),
Regression (55), Clustering (12), and Preprocessing/Transformation (84) models. Each section provides detailed
hyperparameter information with ideal tuning ranges.
Classification Models
Tree-Based Classifiers
Maximum tree
max_depth 3-30, None None 10-20 often optimal
depth
Minimum samples
min_samples_split 2-20 2 5-10 works well
to split
Minimum samples
min_samples_leaf 1-10 1 1-5 typical range
at leaf
Ensemble Classifiers
AdaBoost Classifier
Hyperparameter Description Typical Range Default Notes
'SAMME',
algorithm Boosting algorithm 'SAMME.R' SAMME.R generally better
'SAMME.R'
Gradient Boosting Classifier
Typical
Hyperparameter Description Default Notes
Range
Number of boosting
n_estimators 100-500 100 Use early stopping
stages
Similar to
learning_rate Boosting learning rate 0.01-0.3 0.1
GradientBoosting
Maximum boosting
max_iter 100-500 100 Replaces n_estimators
iterations
Linear Classifiers
Logistic Regression
Hyperparameter Description Typical Range Default Notes
penalty Regularization type 'l1', 'l2', 'elasticnet', None 'l2' 'l1' for feature selection
Increase if convergence
max_iter Maximum iterations 100-10000 100
issues
Ridge Classifier
Hyperparameter Description Typical Range Default Notes
Deprecated, use
normalize Normalize features True/False False
preprocessing
SGD Classifier
Hyperparameter Description Typical Range Default Notes
'hinge', 'log_loss',
'hinge' for SVM, 'log_loss' for
loss Loss function 'squared_hinge', 'hinge'
logistic
'perceptron'
gamma Kernel coefficient 'scale', 'auto', 0.001-10 'scale' Only for rbf, poly, sigmoid
Linear SVC
Hyperparameter Description Typical Range Default Notes
Regularization
C 0.01-100 1.0 Log scale tuning
parameter
penalty Regularization norm 'l1', 'l2' 'l2' 'l1' for feature selection
Kernel-specific
gamma Kernel coefficient 'scale', 'auto', 0.001-10 'scale'
parameter
Gaussian NB
Hyperparameter Description Typical Range Default Notes
priors Prior probabilities array-like, None None If None, adjusted from data
Multinomial NB
Hyperparameter Description Typical Range Default Notes
array-like,
class_prior Prior probabilities None If None, uniform priors
None
Bernoulli NB
Hyperparameter Description Typical Range Default Notes
binarize Threshold for binarizing 0.0-1.0, None 0.0 None if data already binary
fit_prior Learn class priors True/False True False for uniform priors
Complement NB
Hyperparameter Description Typical Range Default Notes
MLP Classifier
Hyperparameter Description Typical Range Default Notes
'relu', 'tanh',
activation Activation function 'relu' 'relu' most common
'logistic'
K-Nearest Neighbors
KNeighbors Classifier
Hyperparameter Description Typical Range Default Notes
Radius of Dataset
radius 0.1-10.0 1.0
neighborhood dependent
More restarts =
Number of
n_restarts_optimizer 0-10 0 better
restarts
optimization
Maximum
For approximation
max_iter_predict iterations in 50-500 100
methods
Newton's method
Regression Models
Linear Regression
Hyperparameter Description Typical Range Default Notes
n_jobs Number of parallel jobs -1, 1-n_cores None -1 uses all cores
Ridge Regression
Hyperparameter Description Typical Range Default Notes
Calculate
fit_intercept True/False True Usually True
intercept
alpha Regularization strength 0.001-100 1.0 Start with [0.001, 0.01, 0.1, 1, 10]
Elastic Net
Hyperparameter Description Typical Range Default Notes
Bayesian Ridge
Hyperparameter Description Typical Range Default Notes
alpha_1 Gamma prior parameter 1e-8 to 1e-2 1e-6 Shape parameter for alpha
alpha_2 Gamma prior parameter 1e-8 to 1e-2 1e-6 Rate parameter for alpha
lambda_1 Gamma prior parameter 1e-8 to 1e-2 1e-6 Shape parameter for lambda
lambda_2 Gamma prior parameter 1e-8 to 1e-2 1e-6 Rate parameter for lambda
Tree-Based Regression
Minimum samples
min_samples_leaf 1-10 1 1-5 optimal range
at leaf
criterion Split quality function 'mse', 'mae' 'mse' 'mae' for outlier robustness
max_depth Maximum tree depth 3-30, None None 10-20 often good
Minimum samples to
min_samples_split 2-20 2 5-10 works well
split
criterion Split criterion 'mse', 'mae' 'mse' Less critical than Random Forest
Ensemble Regression
AdaBoost Regressor
Hyperparameter Description Typical Range Default Notes
'linear', 'square',
loss Loss function 'linear' 'linear' most robust
'exponential'
Gradient Boosting Regressor
Hyperparameter Description Typical Range Default Notes
Number of boosting
n_estimators 100-1000 100 Use early stopping
stages
Epsilon in epsilon-
epsilon 0.01-1.0 0.1 Width of epsilon-tube
SVR
gamma Kernel coefficient 'scale', 'auto', 0.001-10 'scale' For rbf, poly, sigmoid
Linear SVR
Hyperparameter Description Typical Range Default Notes
Epsilon
epsilon 0.01-1.0 0.1 Tube width
parameter
'epsilon_insensitive', Standard
loss Loss function 'epsilon_insensitive'
'squared_epsilon_insensitive' SVR loss
False when
Dual or primal
dual True/False True n_samples >
optimization
n_features
Nu-SVR
Hyperparameter Description Typical Range Default Notes
Regularization
C 0.1-1000 1.0 Used with nu
parameter
MLP Regressor
Hyperparameter Description Typical Range Default Notes
hidden_layer_sizes Hidden layer sizes (50,), (100,), (100,50) (100,) Start simple
'relu', 'tanh',
activation Activation function 'relu' 'relu' most common
'logistic'
Additional Regressors
Huber Regressor
Hyperparameter Description Typical Range Default Notes
RANSAC Regressor
Hyperparameter Description Typical Range Default Notes
Number of random
max_trials Maximum iterations 100-1000 100
selections
Hyperparameter Description Typical Range Default Notes
Theil-Sen Regressor
Typical
Hyperparameter Description Default Notes
Range
Maximum
max_subpopulation 1000-10000 10000 Computational limit
subpopulation
Clustering Models
Density-Based Clustering
DBSCAN
Hyperparameter Description Typical Range Default Notes
Most important
Maximum distance
eps 0.1-10.0 0.5 parameter, dataset
between samples
dependent
Samples in
Higher values = fewer,
min_samples neighborhood for core 3-20 5
denser clusters
point
'euclidean',
Choose based on data
metric Distance metric 'manhattan', 'euclidean'
type
'cosine'
OPTICS
Hyperparameter Description Typical Range Default Notes
Samples in
min_samples 3-20 5 Similar to DBSCAN
neighborhood
'euclidean',
metric Distance metric 'euclidean' Same as DBSCAN
'manhattan', 'cosine'
For cluster
xi Steepness threshold 0.01-0.1 0.05
extraction
HDBSCAN
Hyperparameter Description Typical Range Default Notes
'euclidean',
Various metrics
metric Distance metric 'manhattan', 'euclidean'
supported
'cosine'
Centroid-Based Clustering
K-Means
Hyperparameter Description Typical Range Default Notes
Tolerance for
tol 1e-6 to 1e-2 1e-4 Relative tolerance
convergence
Number of random
n_init 1-10 3 Fewer than K-Means
initializations
Bisecting K-Means
Hyperparameter Description Typical Range Default Notes
Maximum
For each
max_iter iterations per 100-1000 300
bisection
split
Hierarchical Clustering
Agglomerative Clustering
Hyperparameter Description Typical Range Default Notes
Number of
n_clusters 2-20+ 2 Target number of clusters
clusters
Affinity Propagation
Hyperparameter Description Typical Range Default Notes
Iterations without
convergence_iter 10-50 15 Before stopping
change
Spectral Clustering
Hyperparameter Description Typical Range Default Notes
Mean Shift
Hyperparameter Description Typical Range Default Notes
None, array-
seeds Initial kernel locations None If None, uses all points
like
Discretize initial
bin_seeding True/False False Can speed up algorithm
locations
Minimum bin
min_bin_freq 1-10 1 For bin seeding
frequency
Birch
Hyperparameter Description Typical Range Default Notes
Feature Scaling
Standard Scaler
Hyperparameter Description Typical Range Default Notes
copy Copy data or in-place True/False True False modifies original data
with_mean Center data to zero mean True/False True False for sparse data
with_std Scale to unit variance True/False True False keeps original variance
MinMax Scaler
Hyperparameter Description Typical Range Default Notes
feature_range Target range (0,1), (-1,1), etc. (0,1) Desired min/max values
Robust Scaler
Hyperparameter Description Typical Range Default Notes
Memory
copy Copy data True/False True
consideration
Normalizer
Hyperparameter Description Typical Range Default Notes
Dimensionality Reduction
Incremental PCA
Hyperparameter Description Typical Range Default Notes
batch_size Batch size for fitting 100-1000 None For large datasets
Kernel PCA
Hyperparameter Description Typical Range Default Notes
Number of
n_components 2-n_samples None None keeps all
components
Truncated SVD
Hyperparameter Description Typical Range Default Notes
Feature Selection
Variance Threshold
Hyperparameter Description Typical Range Default Notes
Select K Best
Hyperparameter Description Typical Range Default Notes
Number of features
k 1-n_features, 'all' 10 Top k features
to select
Select Percentile
Hyperparameter Description Typical Range Default Notes
1-n_features,
n_features_to_select Features to select None If None, selects half
None
With coef_ or
estimator Base estimator Any sklearn estimator None
feature_importances_
Features to
step 1-n_features, 0.0-1.0 1 Per iteration
remove
int, cross-validation
cv Cross-validation None Determines CV strategy
generator
Feature Engineering
Polynomial Features
Typical
Hyperparameter Description Default Notes
Range
Only interaction
interaction_only True/False False No powers, only products
features
K-Bins Discretizer
Hyperparameter Description Typical Range Default Notes
strategy Binning strategy 'uniform', 'quantile', 'kmeans' 'quantile' How to define bins
One Hot Encoder
Hyperparameter Description Typical Range Default Notes
categories Categories per feature 'auto', list of arrays 'auto' Known categories
Ordinal Encoder
Hyperparameter Description Typical Range Default Notes
Categories
categories 'auto', list of arrays 'auto' Known categories
per feature
Unknown
'error',
handle_unknown category 'error' For new categories
'use_encoded_value'
handling
Text Processing
TF-IDF Transformer
Typical
Hyperparameter Description Default Notes
Range
Count Vectorizer
Hyperparameter Description Typical Range Default Notes
max_df Maximum document frequency 0.5-1.0, int 1.0 Ignore common terms
ngram_range N-gram range (1,1), (1,2), (1,3) (1,1) Unigrams, bigrams, etc.
Hyperparameter Description Typical Range Default Notes
stop_words Stop word removal None, 'english', list None Common word filtering
Simple Imputer
Hyperparameter Description Typical Range Default Notes
KNN Imputer
Hyperparameter Description Typical Range Default Notes
Grid Search CV
Parameter Description Typical Values Notes
Performance Considerations
Parallel Processing: Use n_jobs=-1 for faster searches
Early Stopping: Implement for iterative algorithms
Validation Strategy: Choose appropriate CV based on dataset size and problem
Memory Management: Consider memory usage for large parameter grids