Data Science, Python, Machine Learning, Dimensionality Reduction.
= ['species', 'island', 'sex'] scaler = StandardScaler() X = df[cols_num] X = scaler.fit_transform(X) y = df['species'].astype('category').cat.codes After loading the dataset to a pandas dataframe, we also create the X and y variables, i.e. the features and class label. In addition, we converted