protected double regressionPrediction(Instance transformedInstance,boolean[] selectedAttributes,double[] coefficients) throws Exception {
  double result=0;
  int column=0;
  for (int j=0; j < transformedInstance.numAttributes(); j++) {
    if ((m_ClassIndex != j) && (selectedAttributes[j])) {
      result+=coefficients[column] * transformedInstance.value(j);
      column++;
    }
  }
  result+=coefficients[column];
  return result;
}

protected double regressionPrediction ( Instance transformedInstance , boolean [ ] selectedAttributes , double [ ] coefficients ) throws Exception { double result = 0 ; int column = 0 ; for ( int j = 0 ; j < transformedInstance . numAttributes ( ) ; j ++ ) { if ( ( m_ClassIndex != j ) && ( selectedAttributes [ j ] ) ) { result += coefficients [ column ] * transformedInstance . value ( j ) ; column ++ ; } } result += coefficients [ column ] ; return result ; }
calculate the dependent value for a given instance for a given regression model .
