private void computeResponses(double[] incomingInst,double[] incomingParamVector,double[] responses) throws Exception {
  for (int i=0; i < responses.length; i++) {
    for (int j=0; j < m_parameterList.size(); j++) {
      PCell p=m_paramMatrix[i][j];
      if (p == null) {
        responses[i]+=0.0 * incomingParamVector[j];
      }
 else {
        responses[i]+=incomingParamVector[j] * p.m_beta;
      }
    }
  }
switch (m_modelType) {
case MULTINOMIALLOGISTIC:
    computeProbabilitiesMultinomialLogistic(responses);
  break;
case REGRESSION:
break;
case GENERALLINEAR:
case GENERALIZEDLINEAR:
if (m_linkFunction != LinkFunction.NONE) {
computeResponseGeneralizedLinear(incomingInst,responses);
}
 else {
throw new Exception("[GeneralRegression] no link function specified!");
}
break;
case ORDINALMULTINOMIAL:
if (m_cumulativeLinkFunction != CumulativeLinkFunction.NONE) {
computeResponseOrdinalMultinomial(incomingInst,responses);
}
 else {
throw new Exception("[GeneralRegression] no cumulative link function specified!");
}
break;
default :
throw new Exception("[GeneralRegression] unknown model type");
}
}

private void computeResponses ( double [ ] incomingInst , double [ ] incomingParamVector , double [ ] responses ) throws Exception { for ( int i = 0 ; i < responses . length ; i ++ ) { for ( int j = 0 ; j < m_parameterList . size ( ) ; j ++ ) { PCell p = m_paramMatrix [ i ] [ j ] ; if ( p == null ) { responses [ i ] += 0.0 * incomingParamVector [ j ] ; } else { responses [ i ] += incomingParamVector [ j ] * p . m_beta ; } } } switch ( m_modelType ) { case MULTINOMIALLOGISTIC : computeProbabilitiesMultinomialLogistic ( responses ) ; break ; case REGRESSION : break ; case GENERALLINEAR : case GENERALIZEDLINEAR : if ( m_linkFunction != LinkFunction . NONE ) { computeResponseGeneralizedLinear ( incomingInst , responses ) ; } else { throw new Exception ( "[GeneralRegression] no link function specified!" ) ; } break ; case ORDINALMULTINOMIAL : if ( m_cumulativeLinkFunction != CumulativeLinkFunction . NONE ) { computeResponseOrdinalMultinomial ( incomingInst , responses ) ; } else { throw new Exception ( "[GeneralRegression] no cumulative link function specified!" ) ; } break ; default : throw new Exception ( "[GeneralRegression] unknown model type" ) ; } }
compute the responses for the function given the parameter values corresponding to the current incoming instance .
