commons-statistics-regression/src/main/java/org/apache/commons/statistics/regression/stored/data_input/RegressionDataLoader.java
/**
     * <p>
     * Loads new Y and X data as double arrays and hasIntercept which should be true
     * if sample data already contains intercept; column of 1's.
     * </p>
     *
     * @param y            data vector double 1D array
     * @param x            data matrix double 2D array
     * @param hasIntercept boolean true if intercept is included in input data
     */

Loads new Y and X data as double arrays and hasIntercept which should be true
if sample data already contains intercept; column of 1's.

@param y            data vector double 1D array
@param x            data matrix double 2D array
@param hasIntercept boolean true if intercept is included in input data
Loads new Y and X data as double arrays and hasIntercept which should be true if sample data already contains intercept ; column of 1 ' s . @param y data vector double 1D array @param x data matrix double 2D array @param hasIntercept boolean true if intercept is included in input data
public void inputNewSampleData(double[] y, double[][] x, boolean hasIntercept) {
        validateSampleData(y, x);
        if (inputData == null) {
            inputData = new RegressionRawData();
        }
        inputData.setHasIntercept(hasIntercept);
        inputNewYSampleData(y);
        inputNewXSampleData(x);
    }
public void inputNewSampleData ( double [ ] y , double [ ] [ ] x , boolean hasIntercept ) { validateSampleData ( y , x ) ; if ( inputData == null ) { inputData = new RegressionRawData ( ) ; } inputData . setHasIntercept ( hasIntercept ) ; inputNewYSampleData ( y ) ; inputNewXSampleData ( x ) ; }
<p>
 Loads new Y and X data as double arrays and hasIntercept which should be true
 if sample data already contains intercept; column of 1's.
<p > Loads new Y and X data as double arrays and hasIntercept which should be true if sample data already contains intercept ; column of 1 ' s .