

def testOnClassData(self, dataset=None, verbose=False, return_targets=False):
    'Return winner-takes-all classification output on a given dataset.\n\n        If no dataset is given, the dataset passed during Trainer\n        initialization is used. If return_targets is set, also return\n        corresponding target classes.\n        '
    if (dataset == None):
        dataset = self.ds
    dataset.reset()
    out = []
    targ = []
    for seq in dataset._provideSequences():
        self.module.reset()
        for (input, target) in seq:
            res = self.module.activate(dataset)
            out.append(argmax(res))
            targ.append(argmax(target))
    if return_targets:
        return (out, targ)
    else:
        return out

dataset/ETHPy150Open pybrain/pybrain/pybrain/supervised/trainers/backprop.py BackpropTrainer.testOnClassData/VarMisuse@94/189 `input`->`dataset`