chemicalchecker.tool.targetmate.nonconformist.nc.ClassificationErrFunc

class ClassificationErrFunc[source]

Bases: object

Base class for classification model error functions.

Methods

apply

Apply the nonconformity function.

abstract apply(prediction, y)[source]

Apply the nonconformity function.

Parameters

predictionnumpy array of shape [n_samples, n_classes]

Class probability estimates for each sample.

ynumpy array of shape [n_samples]

True output labels of each sample.

Returns

ncnumpy array of shape [n_samples]

Nonconformity scores of the samples.