calculates the root mean square error of the fit using the l2 norm . concode_field_sep SimpleMatrix a concode_elem_sep int nCol concode_elem_sep SimpleVector b concode_elem_sep double lambda concode_elem_sep SimpleVector x concode_elem_sep int nRow concode_field_sep double getLambda concode_elem_sep void solve concode_elem_sep double[] getSolution concode_elem_sep void setLambda
double function ( ) { SimpleVector loc0 = new SimpleVector ( b . getLen ( ) ) ; for ( int loc1 = 0 ; loc1 < nCol ; loc1 ++ ) { loc0 . add ( a . getCol ( loc1 ) . multipliedBy ( x . getElement ( loc1 ) ) ) ; } loc0 . subtract ( b ) ; return loc0 . normL2 ( ) / loc0 . getLen ( ) ; }