public String toString() {

    if (m_Instances == null) {
      return "Bayesian logistic regression: No model built yet.";
    }

    StringBuffer buf = new StringBuffer();
    String text = "";

    switch (HyperparameterSelection) {
    case 1:
      text = "Norm-Based Hyperparameter Selection: ";

      break;

    case 2:
      text = "Cross-Validation Based Hyperparameter Selection: ";

      break;

    case 3:
      text = "Specified Hyperparameter: ";

      break;
    }

    buf.append(text).append(HyperparameterValue).append("\n\n");

    buf.append("Regression Coefficients\n");
    buf.append("=========================\n\n");

    for (int j = 0; j < m_Instances.numAttributes(); j++) {
      if (j != ClassIndex) {
        if (BetaVector[j] != 0.0) {
          buf.append(m_Instances.attribute(j).name()).append(" : ")
             .append(BetaVector[j]).append("\n");
        }
      }
    }

    buf.append("===========================\n\n");
    buf.append("Likelihood: " + m_PriorUpdate.getLoglikelihood() + "\n\n");
    buf.append("Penalty: " + m_PriorUpdate.getPenalty() + "\n\n");
    buf.append("Regularized Log Posterior: " + m_PriorUpdate.getLogPosterior() +
      "\n");
    buf.append("===========================\n\n");

    return buf.toString();
  }