mirror of
https://github.com/hanzoai/swift-sdk.git
synced 2026-10-30 18:20:19 +00:00
The projection these were generated from predated the compute migration, so they described /v1/visor — which the API serves at zero paths now. No /v1/visor path survives here.
101 lines
7.4 KiB
Swift
101 lines
7.4 KiB
Swift
//
|
|
// RiskLabelCoverage.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct RiskLabelCoverage: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
/** 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. */
|
|
public var contested: Int64?
|
|
/** 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. */
|
|
public var events: Int64?
|
|
/** 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. */
|
|
public var explore: Double?
|
|
/** 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. */
|
|
public var facts: Int64?
|
|
/** 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. */
|
|
public var from: String?
|
|
/** 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. */
|
|
public var horizon: Int64?
|
|
/** Judged is how many MATURED events resolve, at their own as-of, to something other than unjudged. */
|
|
public var judged: Int64?
|
|
/** 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. */
|
|
public var matured: Int64?
|
|
/** 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. */
|
|
public var pending: Int64?
|
|
/** 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. */
|
|
public var productive: Int64?
|
|
/** 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. */
|
|
public var sources: [RiskSourceCoverage]?
|
|
/** 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. */
|
|
public var to: String?
|
|
/** 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. */
|
|
public var unlabelled: Int64?
|
|
/** 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. */
|
|
public var unmatured: Int64?
|
|
/** 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. */
|
|
public var unproductive: Int64?
|
|
|
|
public init(contested: Int64? = nil, events: Int64? = nil, explore: Double? = nil, facts: Int64? = nil, from: String? = nil, horizon: Int64? = nil, judged: Int64? = nil, matured: Int64? = nil, pending: Int64? = nil, productive: Int64? = nil, sources: [RiskSourceCoverage]? = nil, to: String? = nil, unlabelled: Int64? = nil, unmatured: Int64? = nil, unproductive: Int64? = nil) {
|
|
self.contested = contested
|
|
self.events = events
|
|
self.explore = explore
|
|
self.facts = facts
|
|
self.from = from
|
|
self.horizon = horizon
|
|
self.judged = judged
|
|
self.matured = matured
|
|
self.pending = pending
|
|
self.productive = productive
|
|
self.sources = sources
|
|
self.to = to
|
|
self.unlabelled = unlabelled
|
|
self.unmatured = unmatured
|
|
self.unproductive = unproductive
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case contested
|
|
case events
|
|
case explore
|
|
case facts
|
|
case from
|
|
case horizon
|
|
case judged
|
|
case matured
|
|
case pending
|
|
case productive
|
|
case sources
|
|
case to
|
|
case unlabelled
|
|
case unmatured
|
|
case unproductive
|
|
}
|
|
|
|
// Encodable protocol methods
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encodeIfPresent(contested, forKey: .contested)
|
|
try container.encodeIfPresent(events, forKey: .events)
|
|
try container.encodeIfPresent(explore, forKey: .explore)
|
|
try container.encodeIfPresent(facts, forKey: .facts)
|
|
try container.encodeIfPresent(from, forKey: .from)
|
|
try container.encodeIfPresent(horizon, forKey: .horizon)
|
|
try container.encodeIfPresent(judged, forKey: .judged)
|
|
try container.encodeIfPresent(matured, forKey: .matured)
|
|
try container.encodeIfPresent(pending, forKey: .pending)
|
|
try container.encodeIfPresent(productive, forKey: .productive)
|
|
try container.encodeIfPresent(sources, forKey: .sources)
|
|
try container.encodeIfPresent(to, forKey: .to)
|
|
try container.encodeIfPresent(unlabelled, forKey: .unlabelled)
|
|
try container.encodeIfPresent(unmatured, forKey: .unmatured)
|
|
try container.encodeIfPresent(unproductive, forKey: .unproductive)
|
|
}
|
|
}
|
|
|