@classmethod
    def validate(cls, valfunc, module, dataset):
        target = dataset.getField('target')
        output = ModuleValidator.calculateModuleOutput(module, dataset)

        if isinstance(dataset, ImportanceDataSet):
            importance = dataset.getField('importance')
            return valfunc(output, target, importance)
        else:
            return valfunc(output, target)
Abstract validate function, that is heavily used by this class.
dataset/ETHPy150Open pybrain/pybrain/pybrain/tools/validation.py/ModuleValidator.validate