Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Lernen Challenge: Creating a Complete ML Pipeline | Pipelines
ML Introduction with scikit-learn
course content

Kursinhalt

ML Introduction with scikit-learn

ML Introduction with scikit-learn

1. Machine Learning Concepts
2. Preprocessing Data with Scikit-learn
3. Pipelines
4. Modeling

book
Challenge: Creating a Complete ML Pipeline

Now let's create a proper pipeline with the final estimator. As a result, we will get a trained prediction pipeline that can be used for predicting new instances simply by calling the .predict() method.

To train a predictor (model), you need y to be encoded. This is done separately from the pipeline we build for X. Remember that LabelEncoder is used for encoding the target.

Aufgabe

Swipe to start coding

You have the same penguins dataset. The task is to build a pipeline with KNeighborsClassifier as a final estimator, train it, and predict values for the X itself.

  1. Encode the y variable.
  2. Create a pipeline containing ct, SimpleImputer, StandardScaler, and KNeighborsClassifier.
  3. Train the pipe object using the features X and the target y.

Lösung

Switch to desktopWechseln Sie zum Desktop, um in der realen Welt zu übenFahren Sie dort fort, wo Sie sind, indem Sie eine der folgenden Optionen verwenden
War alles klar?

Wie können wir es verbessern?

Danke für Ihr Feedback!

Abschnitt 3. Kapitel 6
toggle bottom row

book
Challenge: Creating a Complete ML Pipeline

Now let's create a proper pipeline with the final estimator. As a result, we will get a trained prediction pipeline that can be used for predicting new instances simply by calling the .predict() method.

To train a predictor (model), you need y to be encoded. This is done separately from the pipeline we build for X. Remember that LabelEncoder is used for encoding the target.

Aufgabe

Swipe to start coding

You have the same penguins dataset. The task is to build a pipeline with KNeighborsClassifier as a final estimator, train it, and predict values for the X itself.

  1. Encode the y variable.
  2. Create a pipeline containing ct, SimpleImputer, StandardScaler, and KNeighborsClassifier.
  3. Train the pipe object using the features X and the target y.

Lösung

Switch to desktopWechseln Sie zum Desktop, um in der realen Welt zu übenFahren Sie dort fort, wo Sie sind, indem Sie eine der folgenden Optionen verwenden
War alles klar?

Wie können wir es verbessern?

Danke für Ihr Feedback!

Abschnitt 3. Kapitel 6
Switch to desktopWechseln Sie zum Desktop, um in der realen Welt zu übenFahren Sie dort fort, wo Sie sind, indem Sie eine der folgenden Optionen verwenden
We're sorry to hear that something went wrong. What happened?
some-alt