dacapo.experiments.tasks.evaluators.instance_evaluator

Module Contents

Classes

InstanceEvaluator

Base class of all evaluators.

Functions

relabel(array[, return_backwards_map, inplace])

Relabel array, such that IDs are consecutive. Excludes 0.

voi(truth, test)

Attributes

logger

dacapo.experiments.tasks.evaluators.instance_evaluator.logger
dacapo.experiments.tasks.evaluators.instance_evaluator.relabel(array, return_backwards_map=False, inplace=False)

Relabel array, such that IDs are consecutive. Excludes 0.

Parameters:
  • array (ndarray) – The array to relabel.

  • return_backwards_map (bool, optional) – If True, return an ndarray that maps new labels (indices in the array) to old labels.

  • inplace (bool, optional) – Perform the replacement in-place on array.

Returns:

A tuple (relabelled, n), where relabelled is the relabelled array and n the number of unique labels found.

If return_backwards_map is True, returns (relabelled, n, backwards_map).

class dacapo.experiments.tasks.evaluators.instance_evaluator.InstanceEvaluator

Base class of all evaluators.

An evaluator takes a post-processor’s output and compares it against ground-truth.

property score: dacapo.experiments.tasks.evaluators.instance_evaluation_scores.InstanceEvaluationScores
criteria: List[str] = ['voi_merge', 'voi_split', 'voi']
evaluate(output_array_identifier, evaluation_array)

Compares and evaluates the output array against the evaluation array.

Parameters:
  • output_array_identifier (Array) – The output data array to evaluate

  • evaluation_array (Array) – The evaluation data array to compare with the output

Returns:

The detailed evaluation scores after the comparison.

Return type:

EvaluationScores

dacapo.experiments.tasks.evaluators.instance_evaluator.voi(truth, test)