class_docstr: return a logistic regression problem
  
  There is a dataset consisting of features (vectors of norm <=1)
  and labels (+1,-1), represented as a numpy array.
  There is also an L2 regularizer.
docstr: Initialize the data and the regularizer.
  
  X = n x d numpy array representing features
  y = n x 1 numpy array representing labels
  reg = L2 regularizing coefficient (to ensure solution is finite)
  
  Data will be rescaled so that ||X[i,:]|| * |y[i]| <= 1 for all i.
code: def __init__(self, input_vecs, labels, reg=1e-8):
      """Initialize the data and the regularizer.
  
      X = n x d numpy array representing features
      y = n x 1 numpy array representing labels
      reg = L2 regularizing coefficient (to ensure solution is finite)
  
      Data will be rescaled so that ||X[i,:]|| * |y[i]| <= 1 for all i.
      """
      self.reg = float(reg)
      input_vecs = np.array(input_vecs)
      labels = np.array(labels)
      assert len(input_vecs.shape) == 2
      assert len(labels.shape) == 1
      self.input_vecs = input_vecs
      self.labels = labels
      self.num_samples, self.dim = input_vecs.shape
      assert labels.shape[0] == self.num_samples
      signed_data = input_vecs * labels[:, np.newaxis]
      norm = np.linalg.norm(signed_data, axis=1)
      scale = np.maximum(norm, np.ones_like(norm))
      self.data = (1 / scale[:, None]) * signed_data
  
file_path: privacy/research/dp_newton/src/my_logistic_regression.py
imports: import numpy
label_desc: Use image node_id 1 to create a new MyLogisticRegression object  with example: obj = MyLogisticRegression(input_vecs, labels, reg)