Module: tfr.keras.metrics
Stay organized with collections
Save and categorize content based on your preferences.
Keras metrics in TF-Ranking.
Note: For metrics that compute a ranking, ties are broken randomly. This means
that metrics may be stochastic if items with equal scores are provided. Warning: Some metrics (e.g. Recall or MRR) are not well-defined when there are
no relevant items (e.g. if y_true
has a row of only zeroes). For these cases,
the TF-Ranking metrics will evaluate to 0
.
Classes
class ARPMetric
: Average relevance position (ARP).
class AlphaDCGMetric
: Alpha discounted cumulative gain (alphaDCG).
class DCGMetric
: Discounted cumulative gain (DCG).
class HitsMetric
: Hits@k metric.
class MRRMetric
: Mean reciprocal rank (MRR).
class MeanAveragePrecisionMetric
: Mean average precision (MAP).
class NDCGMetric
: Normalized discounted cumulative gain (NDCG).
class OPAMetric
: Ordered pair accuracy (OPA).
class PrecisionIAMetric
: Precision-IA@k (Pre-IA@k).
class PrecisionMetric
: Precision@k (P@k).
class RankingMetricKey
: Ranking metric key strings.
class RecallMetric
: Recall@k (R@k).
Functions
default_keras_metrics(...)
: Returns a list of ranking metrics.
get(...)
: Factory method to get a list of ranking metrics.
Other Members
absolute_import
Instance of __future__._Feature
division
Instance of __future__._Feature
print_function
Instance of __future__._Feature
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2023-08-18 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2023-08-18 UTC."],[],[]]