Model performance
You're now going to evaluate the model from the previous lesson against the test-data.
Evaluating data against new, unseen data is important, as it proves the ability of the model to correctly estimate data it has never encountered before.
All necessary modules have been imported, and the data is available as X_train and y_train, and X_test and y_test respectively.
この演習はコースの一部です
Analyzing IoT Data in Python
演習の手順
- Create a
LogisticRegressionmodel. - Fit the model to
X_trainandy_train. - Score the model using
X_trainandy_train. - Score the model using
X_testandy_test.
実践的なインタラクティブ演習
このサンプルコードを完成させて、この演習に挑戦してみましょう。
# Create LogisticRegression model
logreg = ____()
# Fit the model
logreg.____(____, ____)
# Score the model
print(logreg.____(____, ____))
print(____)