synthcity.plugins.core.models.time_to_event.metrics module
- c_index(T: pandas.core.series.Series, E: pandas.core.series.Series, pred_T: pandas.core.series.Series) float
Returns the cindex.
- expected_time_error(T: pandas.core.series.Series, E: pandas.core.series.Series, pred_T: pandas.core.series.Series, nc_weight: int = 10, c_weight: int = 1, metric: str = 'l1') float
Returns an evaluation error for both observed and censored measurements.
- Errors:
For lab measurements(E == 1): distance(predicted, T)
For censored measurements(E == 0): distance(predicted, T), if predicted < T.
- expected_time_error_l1(T: pandas.core.series.Series, E: pandas.core.series.Series, pred_T: pandas.core.series.Series, nc_weight: int = 10, c_weight: int = 1) float
Returns an evaluation error for both observed and censored measurements.
- Errors:
For lab measurements(E == 1): L1(predicted, T)
For censored measurements(E == 0): L1(predicted, T), if predicted < T.
- ranking_error(T: pandas.core.series.Series, E: pandas.core.series.Series, pred_T: pandas.core.series.Series) float
Returns an error for the out-of-order predictions.
- Errors:
For every value t in T, we check if T[E == 1] < t and pred_T[E == 1] < t have the same indexes.
- rush_error(T: pandas.core.series.Series, pred_T: pandas.core.series.Series) float
Returns the proportions of time-to-event predictions before the actual observed/censoring time.