Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Apprendre Challenge: Apply the Estimator API | Core scikit-learn API Patterns
Practice
Projects
Quizzes & Challenges
Quizzes
Challenges
/
Mastering scikit-learn API and Workflows

bookChallenge: 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.

  1. Create a LogisticRegression estimator with random_state=42.
  2. Fit the estimator using the provided training data:
    • X_train;
    • y_train.
  3. Use the fitted estimator to generate predictions for X_test.
  4. Store the predictions in the variable y_pred.

Solution

Tout était clair ?

Comment pouvons-nous l'améliorer ?

Merci pour vos commentaires !

Section 1. Chapitre 4
single

single

Demandez à l'IA

expand

Demandez à l'IA

ChatGPT

Posez n'importe quelle question ou essayez l'une des questions suggérées pour commencer notre discussion

close

bookChallenge: 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.

  1. Create a LogisticRegression estimator with random_state=42.
  2. Fit the estimator using the provided training data:
    • X_train;
    • y_train.
  3. Use the fitted estimator to generate predictions for X_test.
  4. Store the predictions in the variable y_pred.

Solution

Switch to desktopPassez à un bureau pour une pratique réelleContinuez d'où vous êtes en utilisant l'une des options ci-dessous
Tout était clair ?

Comment pouvons-nous l'améliorer ?

Merci pour vos commentaires !

Section 1. Chapitre 4
single

single

some-alt