niftynet.evaluation.base_evaluations module¶
This module defines basic interfaces for NiftyNet evaluations
-
class
BaseEvaluation
(reader, app_param, eval_param)[source]¶ Bases:
niftynet.layer.base_layer.Layer
Minimal interface for a NiftyNet evaluation
-
get_aggregations
()[source]¶ Returns aggregations to compute for the metric. Each aggregation is a callable that computes a list of DataFrames from a dictionary of metric dataframes (index by the DataFrame index). See BaseEvaluator.ScalarAggregator for an example.
Returns: list of aggregation callables
-
-
class
CachedSubanalysisEvaluation
(reader, app_param, eval_param)[source]¶ Bases:
niftynet.evaluation.base_evaluations.BaseEvaluation
Interface for NiftyNet evaluations used with CachedSubanalysisEvaluator so that evaluations are run in a way that is friendly for caching intermediate computations. Each evaluation defines sub-analyses to run, and all subanalysis are run at the same time then the cache is cleared
-
subanalyses
(subject_id, data)[source]¶ This function defines the sub-analyses to run. All evaluations with matching sub-analyses will be run in sequence, before clearing the cache :param subject_id: subject identifier string :param data: a data dictionary as built by ImageReader :return: list of dictionaries, each containing information specifyng the analysis to run. Elements will be passed to layer_op one at a time in a cache friendly order
-