Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Aprende 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

Tarea

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.

Solución

¿Todo estuvo claro?

¿Cómo podemos mejorarlo?

¡Gracias por tus comentarios!

Sección 1. Capítulo 4
single

single

Pregunte a AI

expand

Pregunte a AI

ChatGPT

Pregunte lo que quiera o pruebe una de las preguntas sugeridas para comenzar nuestra charla

close

bookChallenge: Apply the Estimator API

Desliza para mostrar el menú

Tarea

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.

Solución

Switch to desktopCambia al escritorio para practicar en el mundo realContinúe desde donde se encuentra utilizando una de las siguientes opciones
¿Todo estuvo claro?

¿Cómo podemos mejorarlo?

¡Gracias por tus comentarios!

Sección 1. Capítulo 4
single

single

some-alt