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.
71 lines
3.7 KiB
Swift
71 lines
3.7 KiB
Swift
//
|
|
// RiskDatasetSpec.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct RiskDatasetSpec: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
/** Cuts are the two RFC 3339 instants dividing train | val | test. Omit them to take 70% and 85% of the window by time. Splitting is TEMPORAL and then grouped by subject — a random split puts one device on both sides of the line and the model memorises the entity instead of the behaviour. */
|
|
public var cuts: [String]?
|
|
/** Dims are the coordinates to carry, by published name. Empty takes the whole surface. They are stored in the plane's own order, never the order given, so two requests naming the same dims produce identical rows. */
|
|
public var dims: [String]?
|
|
/** From is where the event window opens, RFC 3339, INCLUSIVE. The window may not be longer than the source's own retention: past that, its older half is already gone and the dataset would silently be shorter than it says. */
|
|
public var from: String?
|
|
/** Horizon is how many days a row must have aged before it may be admitted. It is what keeps a fact that was not yet knowable at scoring time out of a training set: a chargeback lands 30 to 120 days after the transaction it condemns, so 120 for the payment lane and 14 for signup abuse. Zero admits the whole window and is honest only where the outcome is immediate. */
|
|
public var horizon: Int64?
|
|
/** Kind narrows to one subject kind — person, session or account. Empty takes every kind. */
|
|
public var kind: String?
|
|
/** Name identifies the dataset across its versions: lower-case letters, digits and hyphens, starting with a letter. */
|
|
public var name: String?
|
|
/** Rows caps the materialisation. Zero takes the plane's own bound. */
|
|
public var rows: Int64?
|
|
/** Seed decides WHICH subjects are admitted when the window holds more rows than the cap allows. It is recorded on the version, so a capped dataset is reproducible rather than being whichever rows the store returned first. Omit it to seed from the dataset's name. */
|
|
public var seed: String?
|
|
/** To is where the window ends, EXCLUSIVE, so two datasets meeting at one instant share no row. A materialisation reads less than this — the end is pulled back by Horizon, and the lineage reports the window it actually read. */
|
|
public var to: String?
|
|
|
|
public init(cuts: [String]? = nil, dims: [String]? = nil, from: String? = nil, horizon: Int64? = nil, kind: String? = nil, name: String? = nil, rows: Int64? = nil, seed: String? = nil, to: String? = nil) {
|
|
self.cuts = cuts
|
|
self.dims = dims
|
|
self.from = from
|
|
self.horizon = horizon
|
|
self.kind = kind
|
|
self.name = name
|
|
self.rows = rows
|
|
self.seed = seed
|
|
self.to = to
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case cuts
|
|
case dims
|
|
case from
|
|
case horizon
|
|
case kind
|
|
case name
|
|
case rows
|
|
case seed
|
|
case to
|
|
}
|
|
|
|
// Encodable protocol methods
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encodeIfPresent(cuts, forKey: .cuts)
|
|
try container.encodeIfPresent(dims, forKey: .dims)
|
|
try container.encodeIfPresent(from, forKey: .from)
|
|
try container.encodeIfPresent(horizon, forKey: .horizon)
|
|
try container.encodeIfPresent(kind, forKey: .kind)
|
|
try container.encodeIfPresent(name, forKey: .name)
|
|
try container.encodeIfPresent(rows, forKey: .rows)
|
|
try container.encodeIfPresent(seed, forKey: .seed)
|
|
try container.encodeIfPresent(to, forKey: .to)
|
|
}
|
|
}
|
|
|