rail.evaluation.evaluator module
” Abstract base class defining an Evaluator
The key feature is that the evaluate method.
- class rail.evaluation.evaluator.Evaluator(args, comm=None)[source]
Bases:
RailStageEvaluate the performance of a photo-Z estimator
- config_options = {'do_cde': <ceci.config.StageParameter object>, 'nzbins': <ceci.config.StageParameter object>, 'output_mode': <ceci.config.StageParameter object>, 'pit_metrics': <ceci.config.StageParameter object>, 'point_metrics': <ceci.config.StageParameter object>, 'zmax': <ceci.config.StageParameter object>, 'zmin': <ceci.config.StageParameter object>}
- evaluate(data, truth)[source]
Evaluate the performance of an estimator
This will attach the input data and truth to this Evaluator (for introspection and provenance tracking).
Then it will call the run() and finalize() methods, which need to be implemented by the sub-classes.
The run() method will need to register the data that it creates to this Estimator by using self.add_data(‘output’, output_data).
- Parameters:
data (qp.Ensemble) – The sample to evaluate
truth (Table-like) – Table with the truth information
- Returns:
output – The evaluation metrics
- Return type:
Table-like
- inputs = [('input', <class 'rail.core.data.QPHandle'>), ('truth', <class 'rail.core.data.Hdf5Handle'>)]
- name = 'Evaluator'
- outputs = [('output', <class 'rail.core.data.Hdf5Handle'>)]