Challenge: Apply the Estimator API
Tâche
Swipe to start coding
You are working with the scikit-learn Estimator API, which follows a consistent pattern across models.
Your goal is to apply the Estimator workflow by fitting a model and generating predictions using the standard fit and predict methods.
- Create a
LogisticRegressionestimator withrandom_state=42. - Fit the estimator using the provided training data:
X_train;y_train.
- Use the fitted estimator to generate predictions for
X_test. - Store the predictions in the variable
y_pred.
Solution
Tout était clair ?
Merci pour vos commentaires !
Section 1. Chapitre 4
single
Demandez à l'IA
Demandez à l'IA
Posez n'importe quelle question ou essayez l'une des questions suggérées pour commencer notre discussion
Génial!
Completion taux amélioré à 5.26
Challenge: Apply the Estimator API
Glissez pour afficher le menu
Tâche
Swipe to start coding
You are working with the scikit-learn Estimator API, which follows a consistent pattern across models.
Your goal is to apply the Estimator workflow by fitting a model and generating predictions using the standard fit and predict methods.
- Create a
LogisticRegressionestimator withrandom_state=42. - Fit the estimator using the provided training data:
X_train;y_train.
- Use the fitted estimator to generate predictions for
X_test. - Store the predictions in the variable
y_pred.
Solution
Tout était clair ?
Merci pour vos commentaires !
Section 1. Chapitre 4
single