ctapipe is not stable yet, so expect large and rapid changes to structure and functionality as we explore various design choices before the 1.0 release.

CrossValidator#

class ctapipe.reco.CrossValidator(**kwargs: Any)[source]#

Bases: Component

Class to train sklearn based reconstructors in a cross validation.

Attributes Summary

n_cross_validations

Number of cross validation iterations.

output_path

Output path for the cross validation results.

rng_seed

Random seed for splitting the training data.

Methods Summary

__call__(telescope_type, table)

Perform cross validation for the given model.

close()

Close the output hdf5 file, if self.output_path is given.

Attributes Documentation

n_cross_validations#

Number of cross validation iterations.

output_path#

Output path for the cross validation results. This is a hdf5 file containing labels and predictions for the events used in the cross validation which can be used to create performance plots.

rng_seed#

Random seed for splitting the training data.

Methods Documentation

__call__(telescope_type, table)[source]#

Perform cross validation for the given model.

close()[source]#

Close the output hdf5 file, if self.output_path is given.