Skip to content

Commit

Permalink
some doc improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
CamDavidsonPilon committed Jul 6, 2019
1 parent e2dda34 commit b1f29d4
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 8 deletions.
34 changes: 27 additions & 7 deletions lifelines/fitters/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,12 @@ def fit(*args, **kwargs):

@CensoringType.right_censoring
def fit_right_censoring(self, *args, **kwargs):
""" Alias for ``fit``
See Also
---------
``fit``
"""
return self.fit(*args, **kwargs)


Expand Down Expand Up @@ -144,7 +150,11 @@ def subtract(self, other):
Parameters
----------
other: an {1} fitted instance.
other: same object as self
Returns
--------
DataFrame
"""
self_estimate = getattr(self, self._estimate_name)
other_estimate = getattr(other, other._estimate_name)
Expand All @@ -163,7 +173,11 @@ def divide(self, other):
Parameters
----------
other: an {1} fitted instance.
other: same object as self
Returns
--------
DataFrame
"""
self_estimate = getattr(self, self._estimate_name)
Expand Down Expand Up @@ -1205,6 +1219,16 @@ def _log_likelihood_interval_censoring(self, params, Ts, E, W, entries, Xs):
ll = ll / anp.sum(W)
return ll

@CensoringType.right_censoring
def fit_left_censoring():
# TODO
pass

@CensoringType.interval_censoring
def fit_interval_censoring():
# TODO
pass

@CensoringType.right_censoring
def fit(
self,
Expand Down Expand Up @@ -1263,7 +1287,6 @@ def fit(
Returns
-------
self:
self with additional new properties: ``print_summary``, ``params_``, ``confidence_intervals_`` and more
Expand Down Expand Up @@ -2032,8 +2055,7 @@ def fit(
Returns
-------
self:
self with additional new properties: ``print_summary``, ``params_``, ``confidence_intervals_`` and more
self with additional new properties: ``print_summary``, ``params_``, ``confidence_intervals_`` and more
Examples
Expand Down Expand Up @@ -2176,7 +2198,6 @@ def fit_interval_censoring(
Returns
-------
self:
self with additional new properties: ``print_summary``, ``params_``, ``confidence_intervals_`` and more
Expand Down Expand Up @@ -2330,7 +2351,6 @@ def fit_left_censoring(
Returns
-------
self:
self with additional new properties: ``print_summary``, ``params_``, ``confidence_intervals_`` and more
Expand Down
2 changes: 1 addition & 1 deletion lifelines/fitters/log_logistic_aft_fitter.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class LogLogisticAFTFitter(ParametericAFTRegressionFitter):
The cumulative hazard rate is
.. math:: H(t; x , y) = \log\left(1 + \left(\frac{t}{\alpha(x)}\right)^ \beta(y)\right)
.. math:: H(t; x , y) = \log\left(1 + \left(\frac{t}{\alpha(x)}\right)^{\beta(y)}\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()``.
Expand Down

0 comments on commit b1f29d4

Please sign in to comment.