statistics.kendallTau
The Kendall tau-b of two lists (Kendall, 1938). The value is from -1 to 1. A pair with a tie in both lists does not count. When the lists have fewer than 2 values, or no pair counts, the value is 1. Above `KENDALL_EXACT` values, a seeded sample of 200 000 pairs gives an estimate. It is equal to the copy in highways.
CLI- Package
- @procedures/statistics · README
- Path
["statistics","kendallTau"]- CLI
mark statistics kendallTau --a <number[]> --b <number[]>- As data
{"$proc":["statistics","kendallTau"],"input":{}}
Use it
In TypeScript
import { Client, LocalTransport, PROCEDURE_REGISTRY } from "@procedures/client";
import "@procedures/statistics/register"; // registers its procedures
const client = new Client(new LocalTransport({ registry: PROCEDURE_REGISTRY }));
const result = await client.exec(["statistics","kendallTau"], { a: [], b: [] });
console.log(JSON.stringify(result));From the command line
$ mark statistics kendallTau --a <number[]> --b <number[]>
As data, in a program
{ "$proc": ["statistics", "kendallTau"], "input": { "a": [], "b": [] } }Input
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
a | number[] | yes | ||
b | number[] | yes | ||
seed | string | number | no |
Output
The schema does not list fields (number).
JSON Schemas
{
"input": {
"type": "object",
"properties": {
"a": {
"type": "array",
"items": {
"type": "number"
}
},
"b": {
"type": "array",
"items": {
"type": "number"
}
},
"seed": {
"type": [
"string",
"number"
]
}
},
"required": [
"a",
"b"
],
"additionalProperties": false
},
"output": {
"type": "number"
}
}