class_docstr: This class fits the regression model:
  
  .. math::  h(t|x)  = b_0(t) + b_1(t) x_1 + ... + b_N(t) x_N
  
  that is, the hazard rate is a linear function of the covariates with time-varying coefficients.
  This implementation assumes non-time-varying covariates, see ``TODO: name``
  
  Note
  -----
  
  This class was rewritten in lifelines 0.17.0 to focus solely on static datasets.
  There is no guarantee of backwards compatibility.
  
  Parameters
  -----------
  fit_intercept: bool, optional (default: True)
    If False, do not attach an intercept (column of ones) to the covariate matrix. The
    intercept, :math:`b_0(t)` acts as a baseline hazard.
  alpha: float, optional (default=0.05)
    the level in the confidence intervals.
  coef_penalizer: float, optional (default: 0)
    Attach a L2 penalizer to the size of the coefficients during regression. This improves
    stability of the estimates and controls for high correlation between covariates.
    For example, this shrinks the magnitude of :math:`c_{i,t}`.
  smoothing_penalizer: float, optional (default: 0)
    Attach a L2 penalizer to difference between adjacent (over time) coefficients. For
    example, this shrinks the magnitude of :math:`c_{i,t} - c_{i,t+1}`.
  
  Attributes
  ----------
  cumulative_hazards_ : DataFrame
      The estimated cumulative hazard
  hazards_ : DataFrame
      The estimated hazards
  confidence_intervals_ : DataFrame
      The lower and upper confidence intervals for the cumulative hazard
  durations: array
      The durations provided
  event_observed: array
      The event_observed variable provided
  weights: array
      The event_observed variable provided
class_docstr_tok: ["This","class","fits","the","regression","model",":","..","math",":",":","h","(","t|x",")","=","b_0","(","t",")","+","b_1","(","t",")","x_1","+","...","+","b_N","(","t",")","x_N","that","is",",","the","hazard","rate","is","a","linear","function","of","the","covariates","with","time-varying","coefficients",".","This","implementation","assumes","non-time-varying","covariates",",","see","``","TODO",":","name","``","Note","--","--","-","This","class","was","rewritten","in","lifelines","0.17.0","to","focus","solely","on","static","datasets",".","There","is","no","guarantee","of","backwards","compatibility",".","Parameters","--","--","--","--","--","-","fit_intercept",":","bool",",","optional","(","default",":","True",")","If","False",",","do","not","attach","an","intercept","(","column","of","ones",")","to","the","covariate","matrix",".","The","intercept",",",":","math",":","`","b_0","(","t",")","`","acts","as","a","baseline","hazard",".","alpha",":","float",",","optional","(","default=0.05",")","the","level","in","the","confidence","intervals",".","coef_penalizer",":","float",",","optional","(","default",":","0",")","Attach","a","L2","penalizer","to","the","size","of","the","coefficients","during","regression",".","This","improves","stability","of","the","estimates","and","controls","for","high","correlation","between","covariates",".","For","example",",","this","shrinks","the","magnitude","of",":","math",":","`","c_","{","i",",","t","}","`",".","smoothing_penalizer",":","float",",","optional","(","default",":","0",")","Attach","a","L2","penalizer","to","difference","between","adjacent","(","over","time",")","coefficients",".","For","example",",","this","shrinks","the","magnitude","of",":","math",":","`","c_","{","i",",","t","}","-","c_","{","i",",","t+1","}","`",".","Attributes","--","--","--","--","--","cumulative_hazards_",":","DataFrame","The","estimated","cumulative","hazard","hazards_",":","DataFrame","The","estimated","hazards","confidence_intervals_",":","DataFrame","The","lower","and","upper","confidence","intervals","for","the","cumulative","hazard","durations",":","array","The","durations","provided","event_observed",":","array","The","event_observed","variable","provided","weights",":","array","The","event_observed","variable","provided"]
docstr: "
  A wrapper around plotting. Matplotlib plot arguments can be passed in, plus:
  
  Parameters
  -----------
  columns: string or list-like, optional
    If not empty, plot a subset of columns from the ``cumulative_hazards_``. Default all.
  loc:
  
  iloc: slice, optional
    specify a location-based subsection of the curves to plot, ex:
           ``.plot(iloc=slice(0,10))`` will plot the first 10 time points.
docstr_tok: ["``","A","wrapper","around","plotting",".","Matplotlib","plot","arguments","can","be","passed","in",",","plus",":","Parameters","--","--","--","--","--","-","columns",":","string","or","list-like",",","optional","If","not","empty",",","plot","a","subset","of","columns","from","the","``","cumulative_hazards_","``",".","Default","all",".","loc",":","iloc",":","slice",",","optional","specify","a","location-based","subsection","of","the","curves","to","plot",",","ex",":","``",".plot","(","iloc=slice","(","0,10",")",")","``","will","plot","the","first","10","time","points","."]
code: def plot(self, columns=None, loc=None, iloc=None, ax=None, **kwargs):
      """ "
      A wrapper around plotting. Matplotlib plot arguments can be passed in, plus:
  
      Parameters
      -----------
      columns: string or list-like, optional
        If not empty, plot a subset of columns from the ``cumulative_hazards_``. Default all.
      loc:
  
      iloc: slice, optional
        specify a location-based subsection of the curves to plot, ex:
               ``.plot(iloc=slice(0,10))`` will plot the first 10 time points.
      """
      from matplotlib import pyplot as plt
  
      assert (
          loc is None or iloc is None
      ), "Cannot set both loc and iloc in call to .plot"
  
      def shaded_plot(ax, x, y, y_upper, y_lower, **kwargs):
          (base_line,) = ax.plot(x, y, drawstyle="steps-post", **kwargs)
          ax.fill_between(
              x,
              y_lower,
              y2=y_upper,
              alpha=0.25,
              color=base_line.get_color(),
              linewidth=1.0,
              step="post",
          )
  
      def create_df_slicer(loc, iloc):
          get_method = "loc" if loc is not None else "iloc"
  
          if iloc is None and loc is None:
              user_submitted_ix = slice(0, None)
          else:
              user_submitted_ix = loc if loc is not None else iloc
  
          return lambda df: getattr(df, get_method)[user_submitted_ix]
  
      subset_df = create_df_slicer(loc, iloc)
  
      if not columns:
          columns = self.cumulative_hazards_.columns
      else:
          columns = _to_list(columns)
  
      if ax is None:
          ax = plt.gca()
  
      x = subset_df(self.cumulative_hazards_).index.values.astype(float)
  
      for column in columns:
          ci = (1 - self.alpha) * 100
          y = subset_df(self.cumulative_hazards_[column]).values
          index = subset_df(self.cumulative_hazards_[column]).index
          y_upper = subset_df(
              self.confidence_intervals_[column].loc[
                  "%g%% upper-bound" % ci
              ]
          ).values
          y_lower = subset_df(
              self.confidence_intervals_[column].loc[
                  "%g%% lower-bound" % ci
              ]
          ).values
          shaded_plot(
              ax, x, y, y_upper, y_lower, label=column, **kwargs
          )
  
      plt.hlines(
          0,
          index.min() - 1,
          index.max(),
          color="k",
          linestyles="--",
          alpha=0.5,
      )
  
      ax.legend()
      return ax
  
imports: import warnings
  from datetime import datetime
  import time
  import numpy
  import pandas
  from numpy.linalg import LinAlgError
  from scipy.integrate import trapz
  from lifelines.fitters import RegressionFitter
  from lifelines.utils.printer import Printer
  from lifelines.exceptions import StatisticalWarning, ConvergenceWarning
  from lifelines import utils
  from lifelines.utils import _get_index, inv_normal_cdf, epanechnikov_kernel, ridge_regression, qth_survival_times, check_for_numeric_dtypes_or_raise, concordance_index, check_nans_or_infs, normalize, string_rjustify, _to_list, format_floats, format_p_value, format_exp_floats, survival_table_from_events, CensoringType
label_desc: Use image node_id 13 for calling the AalenAdditiveFitter obj's underlying member method code with example usage: obj.plot(columns, loc, iloc, ax) and returns: ax, function