public void initialize() throws Exception {
    int numOfAttributes;
    int numOfInstances;
    int i;
    int j;

    Change = 0.0;

    //Manipulate Data
    if (NormalizeData) {
      m_Filter = new Normalize();
      m_Filter.setInputFormat(m_Instances);
      m_Instances = Filter.useFilter(m_Instances, m_Filter);
    }

    //Set the intecept coefficient.
    Attribute att = new Attribute("(intercept)");
    Instance instance;

    m_Instances.insertAttributeAt(att, 0);

    for (i = 0; i < m_Instances.numInstances(); i++) {
      instance = m_Instances.instance(i);
      instance.setValue(0, 1.0);
    }

    //Get the number of attributes
    numOfAttributes = m_Instances.numAttributes();
    numOfInstances = m_Instances.numInstances();
    ClassIndex = m_Instances.classIndex();
    iterationCounter = 0;

    //Initialize Arrays.
    switch (HyperparameterSelection) {
    case 1:
      HyperparameterValue = normBasedHyperParameter();

      if (debug) {
        System.out.println("Norm-based Hyperparameter: " + HyperparameterValue);
      }

      break;

    case 2:
      HyperparameterValue = CVBasedHyperparameter();

      if (debug) {
        System.out.println("CV-based Hyperparameter: " + HyperparameterValue);
      }

      break;
    }

    BetaVector = new double[numOfAttributes];
    Delta = new double[numOfAttributes];
    DeltaBeta = new double[numOfAttributes];
    Hyperparameters = new double[numOfAttributes];
    DeltaUpdate = new double[numOfAttributes];

    for (j = 0; j < numOfAttributes; j++) {
      BetaVector[j] = 0.0;
      Delta[j] = 1.0;
      DeltaBeta[j] = 0.0;
      DeltaUpdate[j] = 0.0;

      //TODO: Change the way it takes values.
      Hyperparameters[j] = HyperparameterValue;
    }

    DeltaR = new double[numOfInstances];
    R = new double[numOfInstances];

    for (i = 0; i < numOfInstances; i++) {
      DeltaR[i] = 0.0;
      R[i] = 0.0;
    }

    //Set the Prior interface to the appropriate prior implementation.
    if (PriorClass == GAUSSIAN) {
      m_PriorUpdate = new GaussianPriorImpl();
    } else {
      m_PriorUpdate = new LaplacePriorImpl();
    }
  }