tfp.substrates.numpy.stats.kendalls_tau
Stay organized with collections
Save and categorize content based on your preferences.
Computes Kendall's Tau for two ordered lists.
tfp.substrates.numpy.stats.kendalls_tau(
y_true, y_pred, name=None
)
Kendall's Tau measures the correlation between ordinal rankings.
The provided values may be of any type that is sortable, with the
argsort indices indicating the true or proposed ordinal sequence.
Args |
y_true
|
a Tensor of shape [n] containing the true ordinal ranking.
|
y_pred
|
a Tensor of shape [n] containing the predicted ordering of the
same N items.
|
name
|
Optional Python str name for ops created by this method.
Default value: None (i.e., 'kendalls_tau').
|
Returns |
kendalls_tau
|
Kendall's Tau, the 1945 tau-b formulation that ignores
ordering of ties, as a float32 scalar Tensor.
|
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-11-21 UTC.
[null,null,["Last updated 2023-11-21 UTC."],[],[],null,["# tfp.substrates.numpy.stats.kendalls_tau\n\n\u003cbr /\u003e\n\n|--------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [View source on GitHub](https://github.com/tensorflow/probability/blob/v0.23.0/tensorflow_probability/substrates/numpy/stats/kendalls_tau.py#L56-L102) |\n\nComputes Kendall's Tau for two ordered lists.\n\n#### View aliases\n\n\n**Main aliases**\n\n[`tfp.experimental.substrates.numpy.stats.kendalls_tau`](https://www.tensorflow.org/probability/api_docs/python/tfp/substrates/numpy/stats/kendalls_tau)\n\n\u003cbr /\u003e\n\n tfp.substrates.numpy.stats.kendalls_tau(\n y_true, y_pred, name=None\n )\n\nKendall's Tau measures the correlation between ordinal rankings.\nThe provided values may be of any type that is sortable, with the\nargsort indices indicating the true or proposed ordinal sequence.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Args ---- ||\n|----------|----------------------------------------------------------------------------------------------------------|\n| `y_true` | a `Tensor` of shape `[n]` containing the true ordinal ranking. |\n| `y_pred` | a `Tensor` of shape `[n]` containing the predicted ordering of the same N items. |\n| `name` | Optional Python `str` name for ops created by this method. Default value: `None` (i.e., 'kendalls_tau'). |\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Returns ------- ||\n|----------------|--------------------------------------------------------------------------------------------------------|\n| `kendalls_tau` | Kendall's Tau, the 1945 tau-b formulation that ignores ordering of ties, as a `float32` scalar Tensor. |\n\n\u003cbr /\u003e"]]