pipelinex.extras.ops.ignite.metrics package

Submodules

pipelinex.extras.ops.ignite.metrics.cohen_kappa_score module

class pipelinex.extras.ops.ignite.metrics.cohen_kappa_score.CohenKappaScore(*args, **kwargs)[source]

Bases: ignite.metrics.metric.Metric

Calculates the cohen kappa score. - update must receive output of the form (y_pred, y) or {‘y_pred’: y_pred, ‘y’: y}.

__init__(*args, **kwargs)[source]

Initialize self. See help(type(self)) for accurate signature.

compute()[source]

Computes the metric based on it’s accumulated state.

By default, this is called at the end of each epoch.

Returns

the actual quantity of interest. However, if a Mapping is returned, it will be (shallow) flattened into engine.state.metrics when completed() is called.

Return type

Any

Raises

NotComputableError – raised when the metric cannot be computed.

reset()[source]

Resets the metric to it’s initial state.

By default, this is called at the start of each epoch.

Return type

None

update(output)[source]

Updates the metric’s state using the passed batch output.

By default, this is called once for each batch.

Parameters

output (Sequence[Tensor]) – the is the output from the engine’s process function.

Return type

None

pipelinex.extras.ops.ignite.metrics.fbeta_score module

class pipelinex.extras.ops.ignite.metrics.fbeta_score.FbetaScore(beta=1, output_transform=<function FbetaScore.<lambda>>, average='macro', is_multilabel=False, device=None)[source]

Bases: ignite.metrics.metric.Metric

__init__(beta=1, output_transform=<function FbetaScore.<lambda>>, average='macro', is_multilabel=False, device=None)[source]

Initialize self. See help(type(self)) for accurate signature.

compute()[source]

Computes the metric based on it’s accumulated state.

By default, this is called at the end of each epoch.

Returns

the actual quantity of interest. However, if a Mapping is returned, it will be (shallow) flattened into engine.state.metrics when completed() is called.

Return type

Any

Raises

NotComputableError – raised when the metric cannot be computed.

reset()[source]

Resets the metric to it’s initial state.

By default, this is called at the start of each epoch.

Return type

None

update(output)[source]

Updates the metric’s state using the passed batch output.

By default, this is called once for each batch.

Parameters

output (Sequence[Tensor]) – the is the output from the engine’s process function.

Return type

None

pipelinex.extras.ops.ignite.metrics.utils module

class pipelinex.extras.ops.ignite.metrics.utils.ClassificationOutputTransform(num_classes=None)[source]

Bases: object

__init__(num_classes=None)[source]

Initialize self. See help(type(self)) for accurate signature.