/src/main/java/net/finmath/montecarlo/conditionalexpectation/LinearRegression.java
final double x = value.mult( basisFunctions[0]).getAverage( ) ;final double covariance = basisFunctions[i].mult( value).getAverage( ) ;
final double covariance = basisFunctions[i].mult ( value ) .getAverage ( ) ;
BTB[i][j] = covariance; BTB[j][i] = covariance; } } final double[] BTX = new double[basisFunctions.length]; for(int i=0; i<basisFunctions.length; i++) { <extra_id_0> BTX[i] = covariance; } return LinearAlgebra.solveLinearEquationLeastSquare(BTB, BTX); } }