MLP for time series regression
We have seen examples of classification for image data; now let's look at regression for time series data. We shall build and use MLP for a smaller univariate time series dataset known as the international airline passengers dataset. This dataset contains the total number of passengers over the years. The dataset is available at the following links:
Let us start by preparing our dataset.
- First, load the dataset using the following code:
filename = os.path.join(datasetslib.datasets_root, 'ts-data', 'international-airline-passengers-cleaned.csv') dataframe = pd.read_csv(filename,usecols=[1],header=0) dataset = dataframe.values dataset = dataset.astype('float32')
- With a utility function from the
datasetslib
, we split the dataset into...