1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
/*
* Hanzo Cloud API
*
* The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
*
* The version of the OpenAPI document: v1
*
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct Pairing {
/// A is the first model id.
#[serde(rename = "a", skip_serializing_if = "Option::is_none")]
pub a: Option<String>,
/// ACorrect is how many of those common items A got right.
#[serde(rename = "a_correct", skip_serializing_if = "Option::is_none")]
pub a_correct: Option<i32>,
/// B is the second model id.
#[serde(rename = "b", skip_serializing_if = "Option::is_none")]
pub b: Option<String>,
/// BCorrect is how many of those common items B got right.
#[serde(rename = "b_correct", skip_serializing_if = "Option::is_none")]
pub b_correct: Option<i32>,
/// Benchmark is the catalog id the two arms were compared on.
#[serde(rename = "benchmark", skip_serializing_if = "Option::is_none")]
pub benchmark: Option<String>,
/// McnemarP is the two-sided exact binomial p on the discordant pairs. It is 1 when nothing is discordant, which is \"no evidence of a difference\", not an error.
#[serde(rename = "mcnemar_p", skip_serializing_if = "Option::is_none")]
pub mcnemar_p: Option<f64>,
/// NCommon is how many items BOTH arms completed. It is the denominator, and the reason this comparison is valid where a raw accuracy difference is not.
#[serde(rename = "n_common", skip_serializing_if = "Option::is_none")]
pub n_common: Option<i32>,
/// NetAMinusB is the two rescue counts subtracted — A's advantage in items.
#[serde(rename = "net_a_minus_b", skip_serializing_if = "Option::is_none")]
pub net_a_minus_b: Option<i32>,
/// RescueAOverB is how many items A got right and B got wrong.
#[serde(rename = "rescue_a_over_b", skip_serializing_if = "Option::is_none")]
pub rescue_a_over_b: Option<i32>,
/// RescueBOverA is how many items B got right and A got wrong.
#[serde(rename = "rescue_b_over_a", skip_serializing_if = "Option::is_none")]
pub rescue_b_over_a: Option<i32>,
}
impl Pairing {
pub fn new() -> Pairing {
Pairing {
a: None,
a_correct: None,
b: None,
b_correct: None,
benchmark: None,
mcnemar_p: None,
n_common: None,
net_a_minus_b: None,
rescue_a_over_b: None,
rescue_b_over_a: None,
}
}
}