class_docstr: Cox regression learner, using the partial Cox likelihood for
  proportional risks, with many choices of penalization.
  
  Note that this learner does not have predict functions
  
  Parameters
  ----------
  C : `float`, default=1e3
      Level of penalization
  
  penalty : {'none', 'l1', 'l2', 'elasticnet', 'tv', 'binarsity'}, default='l2'
      The penalization to use. Default is 'l2', namely Ridge penalization
  
  solver : {'gd', 'agd'}, default='agd'
      The name of the solver to use.
  
  warm_start : `bool`, default=False
      If true, learning will start from the last reached solution
  
  step : `float`, default=None
      Initial step size used for learning. Used when solver is 'gd' or
      'agd'.
  
  tol : `float`, default=1e-5
      The tolerance of the solver (iterations stop when the stopping
      criterion is below it). By default the solver does ``max_iter``
      iterations
  
  max_iter : `int`, default=100
      Maximum number of iterations of the solver
  
  verbose : `bool`, default=True
      If `True`, we verbose things, otherwise the solver does not
      print anything (but records information in history anyway)
  
  print_every : `int`, default=10
      Print history information when ``n_iter`` (iteration number) is
      a multiple of ``print_every``
  
  record_every : `int`, default=10
      Record history information when ``n_iter`` (iteration number) is
      a multiple of ``record_every``
  
  Other Parameters
  ----------------
  elastic_net_ratio : `float`, default=0.95
      Ratio of elastic net mixing parameter with 0 <= ratio <= 1.
      For ratio = 0 this is ridge (L2 squared) regularization
      For ratio = 1 this is lasso (L1) regularization
      For 0 < ratio < 1, the regularization is a linear combination
      of L1 and L2.
      Used in 'elasticnet' penalty
  
  random_state : int seed, RandomState instance, or None (default)
      The seed that will be used by stochastic solvers. Used in 'sgd',
      'svrg', and 'sdca' solvers
  
  blocks_start : `numpy.array`, shape=(n_features,), default=None
      The indices of the first column of each binarized feature blocks. It
      corresponds to the ``feature_indices`` property of the
      ``FeaturesBinarizer`` preprocessing.
      Used in 'binarsity' penalty
  
  blocks_length : `numpy.array`, shape=(n_features,), default=None
      The length of each binarized feature blocks. It corresponds to the
      ``n_values`` property of the ``FeaturesBinarizer`` preprocessing.
      Used in 'binarsity' penalty
  
  Attributes
  ----------
  coeffs : np.array, shape=(n_features,)
      The learned coefficients of the model
docstr: Returns the negative log-likelihood of the model, using the current
  fitted coefficients on the passed data.
  If no data is passed, the negative log-likelihood is computed using the
  data used for training.
  
  Parameters
  ----------
  features : `None` or `numpy.ndarray`, shape=(n_samples, n_features)
      The features matrix
  
  times : `None` or `numpy.array`, shape = (n_samples,)
      Observed times
  
  censoring : `None` or `numpy.array`, shape = (n_samples,)
      Indicator of censoring of each sample.
      ``True`` means true failure, namely non-censored time.
      dtype must be unsigned short
  
  Returns
  -------
  output : `float`
      The value of the negative log-likelihood
code: def score(self, features=None, times=None, censoring=None):
      """Returns the negative log-likelihood of the model, using the current
      fitted coefficients on the passed data.
      If no data is passed, the negative log-likelihood is computed using the
      data used for training.
  
      Parameters
      ----------
      features : `None` or `numpy.ndarray`, shape=(n_samples, n_features)
          The features matrix
  
      times : `None` or `numpy.array`, shape = (n_samples,)
          Observed times
  
      censoring : `None` or `numpy.array`, shape = (n_samples,)
          Indicator of censoring of each sample.
          ``True`` means true failure, namely non-censored time.
          dtype must be unsigned short
  
      Returns
      -------
      output : `float`
          The value of the negative log-likelihood
      """
      if self._fitted:
          all_none = all(
              e is None for e in [features, times, censoring]
          )
          if all_none:
              return self._model_obj.loss(self.coeffs)
          else:
              if features is None:
                  raise ValueError("Passed ``features`` is None")
              elif times is None:
                  raise ValueError("Passed ``times`` is None")
              elif censoring is None:
                  raise ValueError("Passed ``censoring`` is None")
              else:
                  features, times, censoring = self._all_safe(
                      features, times, censoring
                  )
                  model = ModelCoxRegPartialLik().fit(
                      features, times, censoring
                  )
                  return model.loss(self.coeffs)
      else:
          raise RuntimeError("You must fit the model first")
  
file_path: tick/tick/survival/cox_regression.py
imports: import numpy
  from tick.base import actual_kwargs
  from tick.preprocessing.utils import safe_array
  from .model_coxreg_partial_lik import ModelCoxRegPartialLik
  from tick.base.learner import LearnerOptim
label_desc: Use image node_id 5 for calling the CoxRegression obj's underlying member method code with example usage: obj.score(features, times, censoring) and returns: self, model