probinet.model_selection.dyncrep_cross_validation#

This module contains the DynCRepCrossValidation class, which is used for cross-validation of the DynCRep algorithm.

Classes

DynCRepCrossValidation(algorithm, ...[, ...])

Class for cross-validation of the DynCRep algorithm.

class probinet.model_selection.dyncrep_cross_validation.DynCRepCrossValidation(algorithm, parameters, input_cv_params, numerical_parameters=None)[source]#

Class for cross-validation of the DynCRep algorithm.

  • Hold-out the data at the latest time snapshot (at time T);

  • Infer parameters on the observed data (data up to time T-1);

  • Calculate performance measures in the hidden set (AUC).

calculate_performance_and_prepare_comparison(outputs, _mask, fold, algorithm_object)[source]#

Calculate performance results and prepare comparison.

extract_mask(fold)[source]#

Extract the mask for the current fold.

prepare_and_run(t)[source]#

Prepare the data for training and run the algorithm.

Parameters:

mask (np.ndarray) – The mask to apply on the data.

Returns:

  • tuple – The outputs of the algorithm.

  • object – The algorithm object.

run_single_iteration()[source]#

Run the cross-validation procedure.