Schalen en transformaties

Feature engineering voor Machine Learning in Python

Robert O'Callaghan

Data Scientist

Data schalen

Feature engineering voor Machine Learning in Python

Min-max-scaling

Min-max krimp

Feature engineering voor Machine Learning in Python

Min-max-scaling

Feature engineering voor Machine Learning in Python

Min-max-scaling in Python

from sklearn.preprocessing import MinMaxScaler

scaler = MinMaxScaler()

scaler.fit(df[['Age']])

df['normalized_age'] = scaler.transform(df[['Age']])
Feature engineering voor Machine Learning in Python

Standaardisatie

Feature engineering voor Machine Learning in Python

Standaardiseren in Python

from sklearn.preprocessing import StandardScaler

scaler = StandardScaler()

scaler.fit(df[['Age']])

df['standardized_col'] = scaler\
                        .transform(df[['Age']])
Feature engineering voor Machine Learning in Python

Logtransformatie

logafname afbeelding

Feature engineering voor Machine Learning in Python

Logtransformatie in Python

from sklearn.preprocessing import PowerTransformer

log = PowerTransformer()

log.fit(df[['ConvertedSalary']])

df['log_ConvertedSalary'] = 
     log.transform(df[['ConvertedSalary']])
Feature engineering voor Machine Learning in Python

Laatste slide

Feature engineering voor Machine Learning in Python

Preparing Video For Download...