src/core/metrics/RegressionMetric.java
public void update(Matrix predicted, Matrix actual) throws MatrixException, DynamicParamException {
        predictions.put(errorCount, predicted);
        actuals.put(errorCount, actual);
        Matrix absoluteError = getAbsoluteError(predicted, actual);
        absoluteErrors.put(errorCount, absoluteError);
        if (cumulativeAbsoluteError == null) cumulativeAbsoluteError = absoluteError;
        else cumulativeAbsoluteError.add(absoluteError, cumulativeAbsoluteError);
        Matrix squaredError = getSquaredError(absoluteError);
        squaredErrors.put(errorCount, squaredError);
        if (cumulativeSquaredError == null) cumulativeSquaredError = squaredError;
        else cumulativeAbsoluteError.add(squaredError, cumulativeSquaredError);
        errorCount++;
    }
/**
     * Updates regression error for single predicted / actual sample pair.<br>
     *
     * @param predicted predicted sample.
     * @param actual actual (true) sample.
     * @throws MatrixException throws exception if matrix operation fails.
     * @throws DynamicParamException throws exception if parameter (params) setting fails.
     */
Updates regression error for single predicted / actual sample pair.

@param predicted predicted sample.
@param actual actual (true) sample.
@throws MatrixException throws exception if matrix operation fails.
@throws DynamicParamException throws exception if parameter (params) setting fails.
Updates regression error for single predicted / actual sample pair . @param predicted predicted sample . @param actual actual ( true ) sample . @throws MatrixException throws exception if matrix operation fails . @throws DynamicParamException throws exception if parameter ( params ) setting fails .
public void update(Matrix predicted, Matrix actual) throws MatrixException, DynamicParamException {
        predictions.put(errorCount, predicted);
        actuals.put(errorCount, actual);
        Matrix absoluteError = getAbsoluteError(predicted, actual);
        absoluteErrors.put(errorCount, absoluteError);
        if (cumulativeAbsoluteError == null) cumulativeAbsoluteError = absoluteError;
        else cumulativeAbsoluteError.add(absoluteError, cumulativeAbsoluteError);
        Matrix squaredError = getSquaredError(absoluteError);
        squaredErrors.put(errorCount, squaredError);
        if (cumulativeSquaredError == null) cumulativeSquaredError = squaredError;
        else cumulativeAbsoluteError.add(squaredError, cumulativeSquaredError);
        errorCount++;
    }
public void update ( Matrix predicted , Matrix actual ) throws MatrixException , DynamicParamException { predictions . put ( errorCount , predicted ) ; actuals . put ( errorCount , actual ) ; Matrix absoluteError = getAbsoluteError ( predicted , actual ) ; absoluteErrors . put ( errorCount , absoluteError ) ; if ( cumulativeAbsoluteError == null ) cumulativeAbsoluteError = absoluteError ; else cumulativeAbsoluteError . add ( absoluteError , cumulativeAbsoluteError ) ; Matrix squaredError = getSquaredError ( absoluteError ) ; squaredErrors . put ( errorCount , squaredError ) ; if ( cumulativeSquaredError == null ) cumulativeSquaredError = squaredError ; else cumulativeAbsoluteError . add ( squaredError , cumulativeSquaredError ) ; errorCount ++ ; }
Updates regression error for single predicted / actual sample pair.<br>
Updates regression error for single predicted / actual sample pair . <br >