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.
Soluzione
Grazie per i tuoi commenti!
single
Chieda ad AI
Chieda ad AI
Chieda pure quello che desidera o provi una delle domande suggerite per iniziare la nostra conversazione
Can you explain this in simpler terms?
What are the main benefits or drawbacks?
Can you give me a real-world example?
Fantastico!
Completion tasso migliorato a 5.26
Challenge: Apply the Estimator API
Scorri per mostrare il menu
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.
Soluzione
Grazie per i tuoi commenti!
single