code: def _objective_function_subject(self, data_align, data_sup, labels, w, s,
                                      theta, bias):
          
          # Compute the SRM  loss
          f_val = 0.0
          samples = data_align.shape[1]
          f_val += (1 - self.alpha) * (0.5 / samples) \
              * np.linalg.norm(data_align - w.dot(s), 'fro')**2
  
          # Compute the MLR loss
          f_val += self._loss_lr_subject(data_sup, labels, w, theta, bias)
  
          return f_val
docs: Compute the objective function for one subject.
  
          .. math:: (1-C)*Loss_{SRM}_i(W_i,S;X_i)
          .. math:: + C/\\gamma * Loss_{MLR_i}(\\theta, bias; {(W_i^T*Z_i, y_i})
          .. math:: + R(\\theta)
  
          Parameters
          ----------
  
          data_align : 2D array, shape=[voxels_i, samples_align]
              Contains the fMRI data for alignment of subject i.
  
          data_sup : 2D array, shape=[voxels_i, samples_i]
              Contains the fMRI data of one subject for the classification task.
  
          labels : array of int, shape=[samples_i]
              The labels for the data samples in data_sup.
  
          w : array, shape=[voxels_i, features]
              The orthogonal transform (mapping) :math:`W_i` for subject i.
  
          s : array, shape=[features, samples]
              The shared response.
  
          theta : array, shape=[classes, features]
              The MLR class plane parameters.
  
          bias : array, shape=[classes]
              The MLR class biases.
  
  
          Returns
          -------
  
          f_val : float
              The SS-SRM objective function for subject i evaluated on the
              parameters to this function.