dacapo.experiments.tasks.predictors.dummy_predictor

Classes

DummyPredictor

A dummy predictor class that inherits from the base Predictor class.

Module Contents

class dacapo.experiments.tasks.predictors.dummy_predictor.DummyPredictor(embedding_dims)

A dummy predictor class that inherits from the base Predictor class.

embedding_dims

The number of embedding dimensions.

Type:

int

__init__(self, embedding_dims

int): Initializes a new instance of the DummyPredictor class.

create_model(self, architecture)

Creates a model using the given architecture.

create_target(self, gt)

Creates a target based on the ground truth.

create_weight(self, gt, target, mask, moving_class_counts=None)

Creates a weight based on the ground truth, target, and mask.

output_array_type()

Gets the output array type.

Notes

This is a subclass of Predictor.

embedding_dims
create_model(architecture)

Creates a model using the given architecture.

Parameters:

architecture – The architecture to use for creating the model.

Returns:

The created model.

Return type:

Model

Raises:

NotImplementedError – This method is not implemented.

Examples

>>> model = predictor.create_model(architecture)
create_target(gt)

Creates a target based on the ground truth.

Parameters:

gt – The ground truth.

Returns:

The created target.

Return type:

NumpyArray

Raises:

NotImplementedError – This method is not implemented.

Examples

>>> predictor.create_target(gt)
create_weight(gt, target, mask, moving_class_counts=None)

Creates a weight based on the ground truth, target, and mask.

Parameters:
  • gt – The ground truth.

  • target – The target.

  • mask – The mask.

  • moving_class_counts – The moving class counts.

Returns:

The created weight and None.

Return type:

Tuple[NumpyArray, None]

Raises:

NotImplementedError – This method is not implemented.

Examples

>>> predictor.create_weight(gt, target, mask, moving_class_counts)
property output_array_type
Gets the output array type.
Returns:

The output array type.

Return type:

EmbeddingArray

Raises:

NotImplementedError – This method is not implemented.

Examples

>>> predictor.output_array_type