def initializePhase(self, features, targets):
    """
    Step 1: Initialization phase
    :param features feature matrix with dimension (numSamples, numInputs)
    :param targets target matrix with dimension (numSamples, numOutputs)
    """
    assert features.shape[0] == targets.shape[0]
    assert features.shape[1] == self.inputs
    assert targets.shape[1] == self.outputs

    # randomly initialize the input->hidden connections
    self.inputWeights = np.random.random((self.numHiddenNeurons, self.inputs))
    self.inputWeights = self.inputWeights * 2 - 1

    if self.activationFunction is "sig":
      self.bias = np.random.random((1, self.numHiddenNeurons)) * 2 - 1
    else:
      print " Unknown activation function type"
      raise NotImplementedError

    H0 = self.calculateHiddenLayerActivation(features)
    self.M = pinv(np.dot(np.transpose(H0), H0))
    self.beta = np.dot(pinv(H0), targets)
Step 1: Initialization phase
    :param features feature matrix with dimension (numSamples, numInputs)
    :param targets target matrix with dimension (numSamples, numOutputs)