def prepare_learning(self):
        """Pre-process data for the learning needs, build network + trainer."""
        print 'Separating inputs and outputs...'
        self.inputs, self.outputs = extract_samples(self.matches,
                                                    self.input_features,
                                                    self.output_feature)

        print 'Normalizing data...'
        self.normalizer, self.inputs = normalize(self.inputs)

        print 'Separating train and test sets...'
        self.train_inputs, self.train_outputs, self.test_inputs, self.test_outputs = split_samples(self.inputs, self.outputs)

        print 'Building neural network...'
        self.network = buildNetwork(len(self.input_features),
                                    2 * len(self.input_features),
                                    1,
                                    outclass=SigmoidLayer,
                                    bias=True)

        print 'Building and filling pybrain train set object...'
        self.train_set = ClassificationDataSet(len(self.input_features))

        for i, input_line in enumerate(self.train_inputs):
            self.train_set.addSample(self.train_inputs[i],
                                     [self.train_outputs[i] - 1])

        self.trainer = BackpropTrainer(self.network, dataset=self.train_set,
                                       momentum=0.5, weightdecay=0.0)

        self.train_set.assignClasses()
dataset/ETHPy150Open fisadev/afa_cup_learning/learn.py/CrystalBall.prepare_learning/original