ClassificationMetric

class ClassificationMetric[source]

Bases: pykeen.metrics.utils.Metric

A base class for classification metrics.

Attributes Summary

binarize

whether the metric needs binarized scores

key

Return the key for use in metric result dictionaries.

synonyms

synonyms for this metric

Methods Summary

get_description()

Get the description.

get_link()

Get the link from the docdata.

get_range()

Get the math notation for the range of this metric.

score(y_true, y_score)

Run the scoring function.

Attributes Documentation

binarize: ClassVar[Optional[bool]] = None

whether the metric needs binarized scores

key

Return the key for use in metric result dictionaries.

Return type

str

synonyms: ClassVar[Collection[str]] = ()

synonyms for this metric

Methods Documentation

classmethod get_description()[source]

Get the description.

Return type

str

Get the link from the docdata.

Return type

str

classmethod get_range()

Get the math notation for the range of this metric.

Return type

str

classmethod score(y_true, y_score)[source]

Run the scoring function.

Return type

float