Skip to main content

hanzo_client/models/
risk_label_coverage.rs

1/*
2 * Hanzo Cloud API
3 *
4 * 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/.
5 *
6 * The version of the OpenAPI document: v1
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct RiskLabelCoverage {
16    /// Contested is how many matured events have two visible assertions that disagree. It is the number that says whether the precedence rule is load-bearing or decorative, and it is the one to watch after wiring a new source.
17    #[serde(rename = "contested", skip_serializing_if = "Option::is_none")]
18    pub contested: Option<i32>,
19    /// Events is how many DISTINCT judged events those assertions name, keyed on (kind, subject, at). It counts only events something was ASSERTED about: what share of the whole event stream carries a label is a question about the feature plane's denominator and is not answerable here. Matured + Unmatured is Events.
20    #[serde(rename = "events", skip_serializing_if = "Option::is_none")]
21    pub events: Option<i32>,
22    /// Explore is the share of judged events whose winning assertion came from the below-the-line sample. A blocked transaction never produces a chargeback, so a training set with no exploration in it is a description of the incumbent block list rather than of the world — and a champion measured on it is measured on whether it agrees with the incumbent.
23    #[serde(rename = "explore", skip_serializing_if = "Option::is_none")]
24    pub explore: Option<f64>,
25    /// Facts is how many assertions the window holds; Events is how many distinct judged events they cover. The two differ by exactly the corroboration and the conflict in the plane.
26    #[serde(rename = "facts", skip_serializing_if = "Option::is_none")]
27    pub facts: Option<i32>,
28    /// From is the INCLUSIVE start of the EVENT window these counts were folded over, RFC 3339, echoed with the defaults filled in — the caller's, or 90 days before To. An assertion is in the window when its event time satisfies at >= From.
29    #[serde(rename = "from", skip_serializing_if = "Option::is_none")]
30    pub from: Option<String>,
31    /// Horizon is the maturity horizon these counts were measured under, IN DAYS — the caller's, or 120. It decides Matured (an event is matured when its `at` plus this many days is not after now), it sets each event's own as-of and so which assertions were visible to it, and when the caller bounds nothing it also places the default window's end.
32    #[serde(rename = "horizon", skip_serializing_if = "Option::is_none")]
33    pub horizon: Option<i32>,
34    /// Judged is how many MATURED events resolve, at their own as-of, to something other than unjudged.
35    #[serde(rename = "judged", skip_serializing_if = "Option::is_none")]
36    pub judged: Option<i32>,
37    /// Matured is how many of those events have aged past the horizon and may therefore be admitted to a supervised set at all. It counts every matured event, judged or not — it is the DENOMINATOR an operator divides Judged by, and a denominator that excluded the unjudged would read 1.0 on a plane with one label in it.
38    #[serde(rename = "matured", skip_serializing_if = "Option::is_none")]
39    pub matured: Option<i32>,
40    /// Pending is how many of this tenant's assertions the DERIVED columnar copy is not known to hold yet. Every count above is folded from the record, so they are right regardless — but a materialiser that joins in the warehouse while this is non-zero is joining against an incomplete answer key, and a missing fraud label is indistinguishable from an honest customer. It is reported at the training gate because that is where somebody is deciding whether the ground truth is good enough to fit on. Counted under a cap, so it saturates rather than costing a full scan on every read.
41    #[serde(rename = "pending", skip_serializing_if = "Option::is_none")]
42    pub pending: Option<i32>,
43    /// Productive is how many matured events resolve, at their own as-of, to a WINNING assertion of `productive` — the event led somewhere: escalated, reported, charged back. It is the positive class a supervised fit would train on, and a near-zero count is the number that says the fit is not worth running.
44    #[serde(rename = "productive", skip_serializing_if = "Option::is_none")]
45    pub productive: Option<i32>,
46    /// Sources breaks the judged events down by the source that WON, so a plane that looks labelled because one noisy source dominates is visible as such.
47    #[serde(rename = "sources", skip_serializing_if = "Option::is_none")]
48    pub sources: Option<Vec<models::RiskSourceCoverage>>,
49    /// To is the EXCLUSIVE end of that window (at < To). Unstated it is one horizon before now, never now: a window running to now under a maturity horizon can hold no matured event at all, so every count below would read zero however much ground truth the tenant held.
50    #[serde(rename = "to", skip_serializing_if = "Option::is_none")]
51    pub to: Option<String>,
52    /// Unlabelled is how many MATURED events had no assertion knowable by their own as-of — including every assertion that arrived after that instant. It is the field that says WHY judged is low: a tenant whose ground truth was filed long after the events it judges reads matured=n, judged=0, unlabelled=n, which is diagnosable, rather than a bare zero, which is not.
53    #[serde(rename = "unlabelled", skip_serializing_if = "Option::is_none")]
54    pub unlabelled: Option<i32>,
55    /// Unmatured is how many events in the window have NOT aged past the horizon. They are not unlabelled — they are not yet askable, and a supervised set must exclude them rather than treat them as negatives. Matured + Unmatured is Events.
56    #[serde(rename = "unmatured", skip_serializing_if = "Option::is_none")]
57    pub unmatured: Option<i32>,
58    /// Unproductive is every OTHER judged event: the winner claimed `unproductive`, judged not suspicious. Productive + Unproductive is Judged exactly, because a winner of the explicit unjudged is counted in neither — it is a matured event somebody looked at and could not conclude about, and rolling it into the negatives would hand a model a claim nobody made.
59    #[serde(rename = "unproductive", skip_serializing_if = "Option::is_none")]
60    pub unproductive: Option<i32>,
61}
62
63impl RiskLabelCoverage {
64    pub fn new() -> RiskLabelCoverage {
65        RiskLabelCoverage {
66            contested: None,
67            events: None,
68            explore: None,
69            facts: None,
70            from: None,
71            horizon: None,
72            judged: None,
73            matured: None,
74            pending: None,
75            productive: None,
76            sources: None,
77            to: None,
78            unlabelled: None,
79            unmatured: None,
80            unproductive: None,
81        }
82    }
83}
84