class_docstr: This class implements a Log-Normal AFT model. The model has parameterized
  form, with :math:`\mu(x) = a_0 + a_1x_1 + ... + a_n x_n`,
  and optionally, :math:`\sigma(y) = \exp\left(b_0 + b_1 y_1 + ... + b_m y_m \right)`,
  
  The cumulative hazard rate is
  
  .. math:: H(t; x, y) = -\log\left(1 - \Phi\left(\frac{\log(T) - \mu(x)}{\sigma(y)}\right)\right)
  
  After calling the ``.fit`` method, you have access to properties like:
  ``params_``, ``print_summary()``. A summary of the fit is available with the method ``print_summary()``.
  
  
  Parameters
  -----------
  alpha: float, optional (default=0.05)
      the level in the confidence intervals.
  
  fit_intercept: bool, optional (default=True)
      Allow lifelines to add an intercept column of 1s to df, and ancillary if applicable.
  
  penalizer: float or array, optional (default=0.0)
      the penalizer coefficient to the size of the coefficients. See `l1_ratio`. Must be equal to or greater than 0.
      Alternatively, penalizer is an array equal in size to the number of parameters, with penalty coefficients for specific variables. For
      example, `penalizer=0.01 * np.ones(p)` is the same as `penalizer=0.01`
  
  l1_ratio: float, optional (default=0.0)
      how much of the penalizer should be attributed to an l1 penalty (otherwise an l2 penalty). The penalty function looks like
      ``penalizer * l1_ratio * ||w||_1 + 0.5 * penalizer * (1 - l1_ratio) * ||w||^2_2``
  
  model_ancillary: optional (default=False)
      set the model instance to always model the ancillary parameter with the supplied DataFrame.
      This is useful for grid-search optimization.
  
  Attributes
  ----------
  params_ : DataFrame
      The estimated coefficients
  confidence_intervals_ : DataFrame
      The lower and upper confidence intervals for the coefficients
  durations: Series
      The event_observed variable provided
  event_observed: Series
      The event_observed variable provided
  weights: Series
      The event_observed variable provided
  variance_matrix_ : DataFrame
      The variance matrix of the coefficients
  standard_errors_: Series
      the standard errors of the estimates
  score_: float
      the concordance index of the model.
class_docstr_tok: ["This","class","implements","a","Log-Normal","AFT","model",".","The","model","has","parameterized","form",",","with",":","math",":","`","\\mu","(","x",")","=","a_0","+","a_1x_1","+","...","+","a_n","x_n","`",",","and","optionally",",",":","math",":","`","\\sigma","(","y",")","=","\\exp\\left","(","b_0","+","b_1","y_1","+","...","+","b_m","y_m","\\right",")","`",",","The","cumulative","hazard","rate","is","..","math",":",":","H","(","t",";","x",",","y",")","=","-\\log\\left","(","1","-","\\Phi\\left","(","\\frac","{","\\log","(","T",")","-","\\mu","(","x",")","}","{","\\sigma","(","y",")","}","\\right",")","\\right",")","After","calling","the","``",".fit","``","method",",","you","have","access","to","properties","like",":","``","params_","``",",","``","print_summary","(",")","``",".","A","summary","of","the","fit","is","available","with","the","method","``","print_summary","(",")","``",".","Parameters","--","--","--","--","--","-","alpha",":","float",",","optional","(","default=0.05",")","the","level","in","the","confidence","intervals",".","fit_intercept",":","bool",",","optional","(","default=True",")","Allow","lifelines","to","add","an","intercept","column","of","1s","to","df",",","and","ancillary","if","applicable",".","penalizer",":","float","or","array",",","optional","(","default=0.0",")","the","penalizer","coefficient","to","the","size","of","the","coefficients",".","See","`","l1_ratio","`",".","Must","be","equal","to","or","greater","than","0",".","Alternatively",",","penalizer","is","an","array","equal","in","size","to","the","number","of","parameters",",","with","penalty","coefficients","for","specific","variables",".","For","example",",","`","penalizer=0.01","*","np.ones","(","p",")","`","is","the","same","as","`","penalizer=0.01","`","l1_ratio",":","float",",","optional","(","default=0.0",")","how","much","of","the","penalizer","should","be","attributed","to","an","l1","penalty","(","otherwise","an","l2","penalty",")",".","The","penalty","function","looks","like","``","penalizer","*","l1_ratio","*","||w||_1","+","0.5","*","penalizer","*","(","1","-","l1_ratio",")","*","||w||^2_2","``","model_ancillary",":","optional","(","default=False",")","set","the","model","instance","to","always","model","the","ancillary","parameter","with","the","supplied","DataFrame",".","This","is","useful","for","grid-search","optimization",".","Attributes","--","--","--","--","--","params_",":","DataFrame","The","estimated","coefficients","confidence_intervals_",":","DataFrame","The","lower","and","upper","confidence","intervals","for","the","coefficients","durations",":","Series","The","event_observed","variable","provided","event_observed",":","Series","The","event_observed","variable","provided","weights",":","Series","The","event_observed","variable","provided","variance_matrix_",":","DataFrame","The","variance","matrix","of","the","coefficients","standard_errors_",":","Series","the","standard","errors","of","the","estimates","score_",":","float","the","concordance","index","of","the","model","."]
code: def _log_hazard(
      self,
      params: DictBox,
      T: Union[float, ndarray],
      Xs: DataframeSlicer,
  ) -> ArrayBox:
      mu_params = params["mu_"]
      mu_ = np.dot(Xs["mu_"], mu_params)
  
      sigma_params = params["sigma_"]
  
      log_sigma_ = np.dot(Xs["sigma_"], sigma_params)
      sigma_ = safe_exp(log_sigma_)
      Z = (np.log(T) - mu_) / sigma_
  
      return norm.logpdf(Z) - log_sigma_ - np.log(T) - norm.logsf(Z)
  
file_path: lifelines/lifelines/fitters/log_normal_aft_fitter.py
imports: from autograd import numpy
  from autograd.scipy.stats import norm
  from scipy.special import erfinv
  import pandas
  from lifelines.utils import _get_index
  from lifelines.fitters import ParametericAFTRegressionFitter
  from lifelines.utils.safe_exp import safe_exp
  from autograd.builtins import DictBox
  from autograd.numpy.numpy_boxes import ArrayBox
  from lifelines.utils import DataframeSlicer
  from numpy import ndarray
  from typing import Dict, List, Optional, Union
label_desc: Use image node_id 3 for calling the LogNormalAFTFitter obj's underlying member method code with example usage: obj._log_hazard(params, T, Xs) and returns: unknown