scikit-learn
Contents
scikit-learn¶
Models and Model Selection¶
Import |
Function |
Section |
Description |
---|---|---|---|
|
Modeling and Estimation |
Returns two random subsets of each array passed in, with 0.8 of the array in the first subset and 0.2 in the second subset |
|
|
Modeling and Estimation |
Returns an ordinary least squares Linear Regression model |
|
|
Modeling and Estimation |
Returns a Lasso (L1 Regularization) linear model with picking the best model by cross validation |
|
|
Modeling and Estimation |
Returns a Ridge (L2 Regularization) linear model with picking the best model by cross validation |
|
|
Modeling and Estimation |
Returns a ElasticNet (L1 and L2 Regularization) linear model with picking the best model by cross validation |
|
|
Modeling and Estimation |
Returns a Logistic Regression classifier |
|
|
Modeling and Estimation |
Returns a Logistic Regression classifier with picking the best model by cross validation |
Working with a Model¶
Assuming you have a model
variable that is a scikit-learn
object:
Function |
Section |
Description |
---|---|---|
|
Modeling and Estimation |
Fits the model with the X and y passed in |
|
Modeling and Estimation |
Returns predictions on the X passed in according to the model |
|
Modeling and Estimation |
Returns the accuracy of X predictions based on the corect values (y) |