Sklearn logistic regression¶
Path | pimlico.modules.sklearn.logistic_regression |
Executable | yes |
Provides an interface to Scikit-Learn’s simple logistic regression trainer.
You may also want to consider using:
- LogisticRegressionCV: LR with cross-validation to choose regularization strength
- SGDClassifier: general gradient-descent training for classifiers, which includes logistic regression. A better choice for training on a large dataset.
Inputs¶
Name | Type(s) |
---|---|
features | scored_real_feature_sets |
Outputs¶
Name | Type(s) |
---|---|
model | sklearn_model |
Options¶
Name | Description | Type |
---|---|---|
options | Options to pass into the constructor of LogisticRegression, formatted as a JSON dictionary (potentially without the {}s). E.g.: ‘“C”:1.5, “penalty”:”l2”’ | JSON dict |
Example config¶
This is an example of how this module can be used in a pipeline config file.
[my_sklearn_log_reg_module]
type=pimlico.modules.sklearn.logistic_regression
input_features=module_a.some_output
This example usage includes more options.
[my_sklearn_log_reg_module]
type=pimlico.modules.sklearn.logistic_regression
input_features=module_a.some_output
options="C":1.5, "penalty":"l2"