mipcandy.evaluation#

Module Contents#

Classes#

API#

class mipcandy.evaluation.EvalCase[source]#

Bases: object

metrics: dict[str, float] = None#
output: torch.Tensor = None#
label: torch.Tensor = None#
image: torch.Tensor | None = None#
filename: str | None = None#
class mipcandy.evaluation.EvalResult(metrics: dict[str, list[float]], outputs: list[torch.Tensor], labels: list[torch.Tensor], *, images: list[torch.Tensor] | None = None, filenames: list[str] | None = None)[source]#

Bases: typing.Sequence[mipcandy.evaluation.EvalCase]

__len__() int[source]#
__getitem__(item: int) mipcandy.evaluation.EvalCase[source]#
_select(metric: str, n: int, descending: bool) Generator[mipcandy.evaluation.EvalCase, None, None][source]#
min(metric: str) mipcandy.evaluation.EvalCase[source]#
min_n(metric: str, n: int) tuple[mipcandy.evaluation.EvalCase, ...][source]#
max(metric: str) mipcandy.evaluation.EvalCase[source]#
max_n(metric: str, n: int) tuple[mipcandy.evaluation.EvalCase, ...][source]#
class mipcandy.evaluation.Evaluator(*metrics: Callable[[torch.Tensor, torch.Tensor], torch.Tensor])[source]#

Bases: object

Initialization

_evaluate_dataset(x: mipcandy.data.SupervisedDataset, *, prefilled_outputs: list[torch.Tensor] | None = None, prefilled_labels: list[torch.Tensor] | None = None) mipcandy.evaluation.EvalResult[source]#
evaluate_dataset(x: mipcandy.data.SupervisedDataset) mipcandy.evaluation.EvalResult[source]#
evaluate(outputs: mipcandy.types.SupportedPredictant, labels: mipcandy.types.SupportedPredictant) mipcandy.evaluation.EvalResult[source]#
predict_and_evaluate(x: mipcandy.types.SupportedPredictant, labels: mipcandy.types.SupportedPredictant, predictor: mipcandy.inference.Predictor) mipcandy.evaluation.EvalResult[source]#