Course Content
ML Introduction with scikit-learn
ML Introduction with scikit-learn
1. Machine Learning Concepts
2. Preprocessing Data with Scikit-learn
Challenge: Scaling the Features
In this challenge, you need to scale the features using StandardScaler
. The data is the penguins dataset (encoded and with no missing values).
import pandas as pd df = pd.read_csv('https://codefinity-content-media.s3.eu-west-1.amazonaws.com/a65bbc96-309e-4df9-a790-a1eb8c815a1c/penguins_imputed_encoded.csv') print(df)
Here is a little reminder of the StandardScaler
class.
Task
Swipe to begin your solution
- Import the class that standardizes features by making the mean equal to 0 and the variance equal to 1.
- Initialize the scaler.
- Scale the
X
matrix of features.
Solution
Switch to desktop for real-world practiceContinue from where you are using one of the options below
Everything was clear?
Thanks for your feedback!
Section 2. Chapter 11
Challenge: Scaling the Features
In this challenge, you need to scale the features using StandardScaler
. The data is the penguins dataset (encoded and with no missing values).
import pandas as pd df = pd.read_csv('https://codefinity-content-media.s3.eu-west-1.amazonaws.com/a65bbc96-309e-4df9-a790-a1eb8c815a1c/penguins_imputed_encoded.csv') print(df)
Here is a little reminder of the StandardScaler
class.
Task
Swipe to begin your solution
- Import the class that standardizes features by making the mean equal to 0 and the variance equal to 1.
- Initialize the scaler.
- Scale the
X
matrix of features.
Solution
Switch to desktop for real-world practiceContinue from where you are using one of the options below
Everything was clear?
Thanks for your feedback!
Section 2. Chapter 11
Switch to desktop for real-world practiceContinue from where you are using one of the options below