Login using Social Account
     Continue with GoogleLogin using your credentials
Now we will train a LogisticRegression model on the dataset, and see how it performs.
Import LogisticRegression
and cross_val_score
from Scikit-learn's linear_model
and model_selection
respectively:
from sklearn.linear_model import << your code goes here >>
from sklearn.<< your code goes here>> import cross_val_score
Next, let's train the LogisticRegression
model:
log_clf = << your code goes here >>(solver="lbfgs", random_state=42)
Finally, let us calculate the cross validation score, and the mean score:
score = << your code goes here >>(log_clf, X_train_transformed, y_train, cv=3, verbose=3)
score.mean()
Taking you to the next exercise in seconds...
Want to create exercises like this yourself? Click here.
Loading comments...