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
/*
* 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 RiskDatasetSpec {
/// 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.
#[serde(rename = "cuts", skip_serializing_if = "Option::is_none")]
pub cuts: Option<Vec<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.
#[serde(rename = "dims", skip_serializing_if = "Option::is_none")]
pub dims: Option<Vec<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.
#[serde(rename = "from", skip_serializing_if = "Option::is_none")]
pub from: Option<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.
#[serde(rename = "horizon", skip_serializing_if = "Option::is_none")]
pub horizon: Option<i32>,
/// Kind narrows to one subject kind — person, session or account. Empty takes every kind.
#[serde(rename = "kind", skip_serializing_if = "Option::is_none")]
pub kind: Option<String>,
/// Name identifies the dataset across its versions: lower-case letters, digits and hyphens, starting with a letter.
#[serde(rename = "name", skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
/// Rows caps the materialisation. Zero takes the plane's own bound.
#[serde(rename = "rows", skip_serializing_if = "Option::is_none")]
pub rows: Option<i32>,
/// 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.
#[serde(rename = "seed", skip_serializing_if = "Option::is_none")]
pub seed: Option<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.
#[serde(rename = "to", skip_serializing_if = "Option::is_none")]
pub to: Option<String>,
}
impl RiskDatasetSpec {
pub fn new() -> RiskDatasetSpec {
RiskDatasetSpec {
cuts: None,
dims: None,
from: None,
horizon: None,
kind: None,
name: None,
rows: None,
seed: None,
to: None,
}
}
}