Preprocessing data
In this section, we will be working in the preprocessing.ipynb
notebook before we return to the notebooks we used for EDA. We will begin with our imports and read in the data:
>>> import numpy as np >>> import pandas as pd >>> planets = pd.read_csv('data/planets.csv') >>> red_wine = pd.read_csv('data/winequality-red.csv') >>> wine = pd.concat([ ... pd.read_csv( ... 'data/winequality-white.csv', sep=';' ... ).assign(kind='white'), ... red_wine.assign(kind='red') ... ])
Machine learning models follow the garbage in, garbage out principle. We have to make sure that we train our models (have them learn) on the best possible version of the data. What this means will depend on the model we choose. For instance, models that...