SklearnMetricResults

class SklearnMetricResults(roc_auc_score, average_precision_score)[source]

Bases: pykeen.evaluation.evaluator.MetricResults

Results from computing metrics.

Methods Summary

from_dict(kvs, *[, infer_missing])

rtype

~A

from_json(s, *[, parse_float, parse_int, …])

rtype

~A

from_scores(y_true, y_score)

Return an instance of these metrics from a given set of true and scores.

get_metric(name)

Get the given metric from the results.

schema(*[, infer_missing, only, exclude, …])

rtype

SchemaF[~A]

to_dict([encode_json])

rtype

Dict[str, Union[dict, list, str, int, float, bool, None]]

to_json(*[, skipkeys, ensure_ascii, …])

rtype

str

Methods Documentation

classmethod from_dict(kvs, *, infer_missing=False)
Return type

~A

classmethod from_json(s, *, parse_float=None, parse_int=None, parse_constant=None, infer_missing=False, **kw)
Return type

~A

classmethod from_scores(y_true, y_score)[source]

Return an instance of these metrics from a given set of true and scores.

get_metric(name)[source]

Get the given metric from the results.

Parameters

name (str) – The name of the metric

Return type

float

Returns

The value for the metric

classmethod schema(*, infer_missing=False, only=None, exclude=(), many=False, context=None, load_only=(), dump_only=(), partial=False, unknown=None)
Return type

SchemaF[~A]

to_dict(encode_json=False)
Return type

Dict[str, Union[dict, list, str, int, float, bool, None]]

to_json(*, skipkeys=False, ensure_ascii=True, check_circular=True, allow_nan=True, indent=None, separators=None, default=None, sort_keys=False, **kw)
Return type

str