Ensemble
- class survivors.ensemble.base_ensemble.BaseEnsemble(size_sample=0.7, n_estimators=10, aggreg=True, ens_metric_name='roc', bootstrap=True, tolerance=True, aggreg_func='mean', **tree_kwargs)
Base ensemble of survival decision tree.
Attributes
- size_samplefloat
Size of generated subsample
- n_estimatorsint
Number of base models
- ens_metric_namestr
Metric defines quantitative of ensemble
- descend_metrboolean
Flag of descend for ens_metric_name
- bootstrapboolean
Flag for using bootstrap sampling (with return)
- toleranceboolean
Flag for fitting full ensemble and choosing best submodels
- aggregboolean
Flag of aggregating base responses
- aggreg_funcstr
Function of aggregating (if aggreg)
- tree_kwargsdict
Parameters for building base models
- modelslist
Base models of ensemble (for example, CRAID)
- ooblist
Out of bag sample for each model
- ens_metrarray-like
Values of ens_metric_name for ensemble with i models
- list_pred_ooblist
Predictions of ensemble models[:i+1]
Methods
update_params : attributes preparation fit : build ensemble with X, y data (abstract) add_model : updating ensemble with new model and oob select_model : remaining fixed models tolerance_find_best : iterative method of selecting best sub ensemble
predict : return values of features, rules or schemes (look at CRAID) predict_at_times : return survival or hazard function
score_oob : calculate metric “ens_metric_name” for ensemble
- class survivors.ensemble.base_ensemble.FastBaseEnsemble(size_sample=0.7, n_estimators=10, aggreg=True, ens_metric_name='roc', bootstrap=True, tolerance=True, aggreg_func='mean', **tree_kwargs)
- class survivors.ensemble.bootstrap.BootstrapCRAID(**kwargs)
Bootstrap aggregation (Bagging) ensemble of survival decision tree. On each iteration probabilities of observations change by scheme.
Attributes
- kwargsdict
Parameters for building base ensemble (look at BaseEnsemble)
Methods
fit : build ensemble with X, y data