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øsning
Tak for dine kommentarer!
single
Spørg AI
Spørg AI
Spørg om hvad som helst eller prøv et af de foreslåede spørgsmål for at starte vores chat
Can you explain this in simpler terms?
What are the main benefits or drawbacks?
Can you give me a real-world example?
Fantastisk!
Completion rate forbedret til 5.26
Challenge: Apply the Estimator API
Stryg for at vise menuen
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øsning
Tak for dine kommentarer!
single