statistics.glicko2Replay
The Glicko-2 ratings of `items` items after each pick of `comparisons`, in the order of the list. Each pick is one rating period of its two items. Each item of a pick gets `glicko2Update` against the rating of the other item before the pick. An item that is not in a pick does not change in that period. The order of the picks changes the result.
CLI- Package
- @procedures/statistics · README
- Path
["statistics","glicko2Replay"]- CLI
mark statistics glicko2Replay --items <number> --comparisons <object[]>- As data
{"$proc":["statistics","glicko2Replay"],"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","glicko2Replay"], { items: 1, comparisons: [] });
console.log(JSON.stringify(result));From the command line
$ mark statistics glicko2Replay --items <number> --comparisons <object[]>
As data, in a program
{
"$proc": ["statistics", "glicko2Replay"],
"input": { "items": 1, "comparisons": [] }
}Input
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
items | number | yes | ||
comparisons | object[] | yes | ||
options | object | no |
Output
The schema does not list fields (object[]).
JSON Schemas
{
"input": {
"type": "object",
"properties": {
"items": {
"type": "number"
},
"comparisons": {
"type": "array",
"items": {
"type": "object",
"properties": {
"a": {
"type": "number"
},
"b": {
"type": "number"
},
"outcome": {
"type": "string",
"enum": [
"a",
"b",
"tie"
]
},
"weight": {
"type": "number",
"description": "The weight of the comparison. The default is 1. A weight of 2 counts as two equal comparisons."
}
},
"required": [
"a",
"b",
"outcome"
],
"additionalProperties": {}
}
},
"options": {
"type": "object",
"properties": {
"start": {
"type": "object",
"properties": {
"rating": {
"type": "number"
},
"rd": {
"type": "number",
"description": "The rating deviation, in rating points. It is above 0."
},
"volatility": {
"type": "number",
"description": "The volatility: the expected size of a change of the true strength in one rating period. It is above 0."
}
},
"required": [
"rating",
"rd",
"volatility"
],
"additionalProperties": {},
"description": "The rating of each item before its first pick. The default is the rating 1500, the RD 350 and the volatility 0.06."
},
"tau": {
"type": "number",
"description": "The constraint on the change of the volatility over time (tau). The default is 0.5. Glickman uses 0.3 to 1.2."
},
"tolerance": {
"type": "number",
"description": "The tolerance of the iteration for the new volatility (epsilon). The default is 0.000001, as in the paper."
}
},
"additionalProperties": {}
}
},
"required": [
"items",
"comparisons"
],
"additionalProperties": false
},
"output": {
"type": "array",
"items": {
"type": "object",
"properties": {
"rating": {
"type": "number"
},
"rd": {
"type": "number",
"description": "The rating deviation, in rating points. It is above 0."
},
"volatility": {
"type": "number",
"description": "The volatility: the expected size of a change of the true strength in one rating period. It is above 0."
}
},
"required": [
"rating",
"rd",
"volatility"
],
"additionalProperties": {}
}
}
}