Skip to main content

Module learner

Module learner 

Source
Expand description

Nuisance learners: the Regressor / Classifier traits and the built-in implementations.

Structs§

GradientBoostingClassifier
Gradient boosting for 0/1 classification (log loss). Defaults match scikit-learn’s GradientBoostingClassifier.
GradientBoostingRegressor
Gradient boosting for regression (squared error). Defaults match scikit-learn’s GradientBoostingRegressor: 100 stages, learning rate 0.1, depth-3 trees.
GridSearchClassifier
Grid search over classifiers, scored by the log loss of the held-out folds (probabilities clipped to [1e-15, 1 − 1e-15]).
GridSearchRegressor
Grid search over regression learners, scored by the mean squared error of the held-out folds.
Lasso
Lasso regression with an unpenalised intercept, fitted by cyclic coordinate descent.
LassoCV
Lasso with the penalty chosen by K-fold cross-validation, as scikit-learn’s LassoCV.
LogisticRegression
L2-penalised logistic regression with an unpenalised intercept, fitted by Newton’s method with backtracking line search.
LogisticRegressionCV
L2-penalised logistic regression with C chosen by stratified K-fold cross-validation, as scikit-learn’s LogisticRegressionCV.
Ols
Ordinary least squares with an intercept and optional ridge penalty.
RandomForestClassifier
Random forest classifier for 0/1 labels; predict_proba averages the class-1 frequency of the leaves.
RandomForestRegressor
Random forest regressor (squared-error CART trees on bootstrap samples).

Enums§

CvScoring
Criterion for choosing C in LogisticRegressionCV.
MaxFeatures
Number of features considered at each split.

Traits§

Classifier
A classification learner returning P(label = 1 | X), used for propensity scores in models with a binary treatment such as Irm.
Regressor
A regression learner for nuisance functions such as E[Y | X] or E[D | X].