@classmethod
    def MSE(cls, output, target, importance=None):
        # assert equal shapes
        output = array(output)
        target = array(target)
        assert output.shape == target.shape
        if importance is not None:
            assert importance.shape == target.shape
            importance = importance.flatten()

        # flatten structures
        output = output.flatten()
        target = target.flatten()

        if importance is None:
            importance = ones(len(output))


        # calculate mse
        squared_error = (output - target) ** 2
        mse = dot(squared_error, importance) / sum(importance)


        return mse
Returns the mean squared error. The multidimensional arrays will get
dataset/ETHPy150Open pybrain/pybrain/pybrain/tools/validation.py/Validator.MSE