rail.evaluation.single_evaluator module

“ Abstract base class defining an Evaluator

The key feature is that the evaluate method.

class rail.evaluation.single_evaluator.SingleEvaluator

Bases: Evaluator

Evaluate the performance of a photo-Z estimator

Parameters:
  • output_mode ([str] default=default) – What to do with the outputs. The options are ‘default’, where outputs will be written to files and some returned, and ‘return’, where outputs will only be returned and not written.

  • metrics ([list] default=[]) – The metrics you want to evaluate.

  • exclude_metrics ([list] default=[]) – List of metrics to exclude

  • metric_config ([dict] default={}) – configuration of individual_metrics

  • chunk_size ([int] default=10000) – Number of objects per chunk for parallel processing or to evalute per loop in single node processing

  • seed ([float] default=None) – Random seed value to use for reproducible results.

  • force_exact ([bool] default=False) – Force the exact calculation. This will not allow parallelization

  • point_estimates ([list] default=[]) – List of point estimates to use

  • truth_point_estimates ([list] default=[]) – List of true point values to use

  • hdf5_groupname ([str] default=photometry) – name of hdf5 group for data, if None, then set to ‘’

  • input (QPOrTableHandle (INPUT))

  • truth (QPOrTableHandle (INPUT))

  • output (Hdf5Handle (OUTPUT))

  • summary (Hdf5Handle (OUTPUT))

  • single_distribution_summary (QPDictHandle (OUTPUT))

__init__(args, **kwargs)

Initialize Evaluator

Parameters:
  • args (Any)

  • kwargs (Any)

Return type:

None

entrypoint_function: str | None = 'evaluate'
inputs: list[tuple[str, type[DataHandle]]] = [('input', <class 'rail.core.data.QPOrTableHandle'>), ('truth', <class 'rail.core.data.QPOrTableHandle'>)]
interactive_function: str | None = 'single_evaluator'
metric_base_class

alias of BaseMetric

name = 'SingleEvaluator'
run()

Run method

Evaluate all the metrics and put them into a table

Notes

Get the input data from the data store under this stages ‘input’ tag Get the truth data from the data store under this stages ‘truth’ tag Puts the data into the data store under this stages ‘output’ tag

Return type:

None