#NEWLINE# def fit( self , durations , event_observed = None , timeline = None , entry = None , label = 'NA_estimate' , alpha = None , ci_labels = None ) : #NEWLINE# #INDENT# "\n        Parameters:\n          duration: an array, or pd.Series, of length n -- duration subject was observed for\n          timeline: return the best estimate at the values in timelines (postively increasing)\n          event_observed: an array, or pd.Series, of length n -- True if the the death was observed, False if the event\n             was lost (right-censored). Defaults all True if event_observed==None\n          entry: an array, or pd.Series, of length n -- relative time when a subject entered the study. This is\n             useful for left-truncated observations, i.e the birth event was not observed.\n             If None, defaults to all 0 (all birth events observed.)\n          label: a string to name the column of the estimate.\n          alpha: the alpha value in the confidence intervals. Overrides the initializing\n             alpha for this call to fit only.\n          ci_labels: add custom column names to the generated confidence intervals\n                as a length-2 list: [<lower-bound name>, <upper-bound name>]. Default: <label>_lower_<alpha>\n\n        Returns:\n          self, with new properties like 'cumulative_hazard_'.\n\n        " #NEWLINE# v = _preprocess_inputs ( durations , event_observed , timeline , entry ) #NEWLINE# ( self . durations , self . event_observed , self . timeline , self . entry , self . event_table ) = v #NEWLINE# ( cumulative_hazard_ , cumulative_sq_ ) = _additive_estimate ( self . event_table , self . timeline , event_observed . _additive_f , self . _variance_f , False ) #NEWLINE# self . _label = label #NEWLINE# self . cumulative_hazard_ = pd . DataFrame ( cumulative_hazard_ , columns = [ self . _label ] ) #NEWLINE# self . confidence_interval_ = self . _bounds ( cumulative_sq_ [ : , None ] , ( alpha if alpha else self . alpha ) , ci_labels ) #NEWLINE# self . _cumulative_sq = cumulative_sq_ #NEWLINE# self . predict = self . _predict ( 'cumulative_hazard_' , self . _label ) #NEWLINE# self . subtract = self . _subtract ( 'cumulative_hazard_' ) #NEWLINE# self . divide = self . _divide ( 'cumulative_hazard_' ) #NEWLINE# self . plot = self . _plot_estimate ( 'cumulative_hazard_' ) #NEWLINE# self . plot_cumulative_hazard = self . plot #NEWLINE# self . plot_hazard = self . _plot_estimate ( 'hazard_' ) #NEWLINE# return self