April 2016
Beginner to intermediate
384 pages
8h 36m
English
Neural networks are really powerful regressors, capable of fitting almost any arbitrary data. In this example, however, we will use a simple model to fit the data as we already know our data exerts a linear relationship.
To execute this recipe, you will need pandas and PyBrain. No other prerequisites are required.
We specify the fitANN(...) method in a very similar way as we did in Chapter 3, Classification Techniques (the regression_ann.py file). For brevity, some of the import statements have been removed:
import pybrain.structure as st import pybrain.supervised.trainers as tr import pybrain.tools.shortcuts as pb @hlp.timeit def fitANN(data): ''' Build a ...