trw.train.metrics

Module Contents

Classes

Metric

A metric base class

MetricLoss

Extract the loss from the outputs

MetricClassificationError

Calculate the accuracy using the output_truth and output

MetricClassificationSensitivitySpecificity

Calculate the sensitivity and specificity for a binary classification using the output_truth and output

Functions

default_classification_metrics()

"

default_regression_metrics()

"

default_segmentation_metrics()

"

class trw.train.metrics.Metric

A metric base class

Calculate interesting metric

__call__(self, outputs)

Calculate a metric from the outputs :param outputs: the data required to calculate the metric from :return: a tuple (metric name, metric value) or None

class trw.train.metrics.MetricLoss

Bases: Metric

Extract the loss from the outputs

__call__(self, outputs)

Calculate a metric from the outputs :param outputs: the data required to calculate the metric from :return: a tuple (metric name, metric value) or None

class trw.train.metrics.MetricClassificationError

Bases: Metric

Calculate the accuracy using the output_truth and output

__call__(self, outputs)

Calculate a metric from the outputs :param outputs: the data required to calculate the metric from :return: a tuple (metric name, metric value) or None

class trw.train.metrics.MetricClassificationSensitivitySpecificity

Bases: Metric

Calculate the sensitivity and specificity for a binary classification using the output_truth and output

__call__(self, outputs)

Calculate a metric from the outputs :param outputs: the data required to calculate the metric from :return: a tuple (metric name, metric value) or None

trw.train.metrics.default_classification_metrics()

” Default list of metrics used for classification

trw.train.metrics.default_regression_metrics()

” Default list of metrics used for classification

trw.train.metrics.default_segmentation_metrics()

” Default list of metrics used for classification