synthcity.plugins.core.models.time_series_survival.benchmarks module

evaluate_ts_classification(estimator: Any, static: numpy.ndarray, temporal: numpy.ndarray, observation_times: numpy.ndarray, Y: numpy.ndarray, n_folds: int = 3, metrics: List[str] = ['aucroc'], random_state: int = 0, pretrained: bool = False) Dict
evaluate_ts_survival_model(estimator: Any, static: numpy.ndarray, temporal: numpy.ndarray, observation_times: numpy.ndarray, T: numpy.ndarray, Y: numpy.ndarray, time_horizons: List, n_folds: int = 3, metrics: List[str] = ['c_index', 'brier_score'], random_state: int = 0, pretrained: bool = False) Dict

Helper for evaluating survival analysis tasks.

Parameters
  • model_name – str The model to evaluate

  • model_args – dict The model args to use

  • static – np.ndarray The static covariates

  • temporal – np.ndarray The temporal covariates

  • observation_times – np.ndarray The temporal points

  • T – np.ndarray time to event

  • Y – np.ndarray event or censored

  • time_horizons – list Horizons where to evaluate the performance.

  • n_folds – int Number of folds for cross validation

  • metrics – list Available metrics: “c_index”, “brier_score”

  • random_state – int Random random_state

  • pretrained – bool If the estimator was trained or not

search_hyperparams(estimator: Any, static: numpy.ndarray, temporal: numpy.ndarray, observation_times: numpy.ndarray, T: numpy.ndarray, Y: numpy.ndarray, time_horizons: List, n_folds: int = 3, metrics: List[str] = ['c_index', 'brier_score'], random_state: int = 0, pretrained: bool = False, n_trials: int = 50, timeout: int = 100) dict