Chapter 31
3.10 Training logistic regression with Scikit-Learn
3.10 Training logistic regression with Scikit-Learn
![]()
Notes
This video was about training a logistic regression model with Scikit-Learn, applying it to the validation dataset, and calculating its accuracy.
Classes, functions, and methods:
LogisticRegression().fit(x)- Scikit-Learn class for training the logistic regression model.LogisticRegression().coef_[0]- return the coefficients or weights of the LR modelLogisticRegression().intercept_[0]- return the bias or intercept of the LR modelLogisticRegression().predict[x]- make predictions on the x datasetLogisticRegression().predict_proba[x]- make predictions on the x dataset by returning two columns with their probabilities for the two categories - soft predictions
The entire code of this project is available in this jupyter notebook.
