-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating

Machine Learning Algorithms

Even if we haven't analyzed in detail the internal dynamics of LSTM cells, we want to present a simple example of a time-series forecast using this kind of model. For this task, we have chosen a dataset of average Earth temperature anomalies (collected every month) provided by the Global Component of Climate at a Glance (GCAG) and available through DataHub (https://datahub.io).
It is possible to download the CSV files directly from https://datahub.io/core/global-temp; however, I suggest installing the Python package through the pip -U install datapackage
command and using the API (as shown in the example) to get all the available datasets.
The first step is downloading and preparing the dataset:
from datapackage import Package package = Package('https://datahub.io/core/global-temp/datapackage.json') for resource in package.resources: if resource.descriptor['datahub']['type'] == 'derived/csv': data = resource.read() data_gcag = data...