Issue
scikit-learn has two logistic regression functions:
- sklearn.linear_model.LogisticRegression
- sklearn.linear_model.LogisticRegressionCV
I'm just curious what the CV stands for in the second one. The only acronym I know in ML that matches "CV" is cross-validation, but I'm guessing that's not it, since that would be achieved in scikit-learn with a wrapper function, not as part of the logistic regression function itself (I think).
Solution
You are right in guessing that the latter allows the user to perform cross validation. The user can pass the number of folds as an argument cv
of the function to perform k-fold cross-validation (default is 10 folds with StratifiedKFold).
I would recommend reading the documentation for the functions LogisticRegression and LogisticRegressionCV
Answered By - Sanyam Mehra
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.