Challenge: Apply the Estimator API
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.
Lösung
Danke für Ihr Feedback!
single
Fragen Sie AI
Fragen Sie AI
Fragen Sie alles oder probieren Sie eine der vorgeschlagenen Fragen, um unser Gespräch zu beginnen
Can you explain this in simpler terms?
What are the main benefits or drawbacks?
Can you give me a real-world example?
Großartig!
Completion Rate verbessert auf 5.26
Challenge: Apply the Estimator API
Swipe um das Menü anzuzeigen
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.
Lösung
Danke für Ihr Feedback!
single