RiskModelState class

Constructors

RiskModelState({RiskAggregates? aggregates, Map<String, int> blind = const {}, num? cut, String? descends, int? disposed, int? learned, bool? live, int? policy, num? realised, Map<String, int> refused = const {}, num? sample, bool? saturated, String? shape, num? stated, RiskSurface? surface, String? tenant, List<RiskModelValue> values = const [], bool? warm})
Returns a new RiskModelState instance.

Properties

aggregates ↔ RiskAggregates?
Aggregates reports the pressure on this organisation's own sliding aggregates, and whether they have started forgetting subjects to stay inside their bound.
getter/setter pair
blind ↔ Map<String, int>
Blind counts, per feature, how often it took its neutral value for want of data. A feature blind on most traffic is not contributing whatever the inventory claims for it.
getter/setter pair
cut ↔ num?
Cut is the threshold in force, derived from Stated as a quantile of the scores actually observed.
getter/setter pair
descends ↔ String?
Descends is the published value the working model grew out of: the newest one whose mass count it has reached or passed. Empty when nothing has been published yet. It is DERIVED from the count and never stored, so an instant rollback is right for free — adopting an older value moves the count backward and this answers with that older value, where a stored pointer would be a second fact to keep in step. Read with Learned it is also the DRIFT: this model is Descends plus however many events the two counts differ by.
getter/setter pair
disposed ↔ int?
Disposed is how many published values retention has taken. It is DERIVED from the lowest surviving sequence, so it cannot drift from what it describes, and it is reported because a retention that binds is a fact an operator must be able to read rather than a silence.
getter/setter pair
hashCode → int
The hash code for this object.
no setteroverride
learned ↔ int?
Learned is how many events the model has learned from.
getter/setter pair
live ↔ bool?
Live is false while the model is in shadow — scoring, learning and recording what it WOULD have alerted on, and changing no outcome. Shadow is the default for a new tenant.
getter/setter pair
policy ↔ int?
Policy is the version of the decision regime this model is deciding under, from your organisation's own policy history (GET /v1/risk/policy). Every score cites it, so it is the join between a past decision and the appetite that produced its threshold. Zero means no regime has ever been stated and the default posture — shadow — is in force.
getter/setter pair
realised ↔ num?
Realised is the share that actually was. Reading it beside Stated is what makes the appetite a measured commitment rather than an intention.
getter/setter pair
refused ↔ Map<String, int>
Refused counts events the model would not score, by reason. None of them was examined; a refusal is counted, never silent.
getter/setter pair
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
sample ↔ num?
Sample is the share of below-the-line events retained for review, which is how the miss rate is measured rather than assumed.
getter/setter pair
saturated ↔ bool?
Saturated means no threshold can honour the stated appetite because too much of the stream scores in the top bucket, so the model is alerting on nothing — the one state that must never be mistaken for quiet.
getter/setter pair
shape ↔ String?
Shape is the model's identity, as <family>:<digest>: the KIND of model, and that family's own digest over the inventory in order and the detector's geometry parameters. It is what an auditor pins an alert to, because learned state is only meaningful against the space that produced it — and the family leads it because two families' masses are not fitted differently, they are different kinds of number.
getter/setter pair
stated ↔ num?
Stated is the share of the stream this organisation said may be examined.
getter/setter pair
surface ↔ RiskSurface?
Surface reports what of the tenant's OWN event surface has been folded in.
getter/setter pair
tenant ↔ String?
Tenant is the qualified key the model is held under — the brand whose issuer vouched for the caller and the organisation it acts for. It is echoed so a reader can see the answer is its own and not a parameter it passed.
getter/setter pair
values ↔ List<RiskModelValue>
Values is your organisation's own published model values, newest first — every state it deliberately named, each addressed by its own content and immutable. This is what PUT /v1/risk/state/model names, so it is reported HERE rather than behind an address of its own: they are part of what a review of one model reads, and a list of names is a few hundred bytes. Compare each one's shape with the shape above: equal means adopting it restores masses into the space this model already runs, and different means adopting it REPLANTS the model into the space that value describes — which is how the shape a search found becomes the shape you are running. The working model is NOT in it. Publication is a boundary somebody marked; the state between two boundaries is in-process counters, and calling those a value would be a claim about reproducibility that nothing could honour.
getter/setter pair
warm ↔ bool?
Warm is whether that is enough for the model to have an opinion at all. Below it the model declines to score, which is an ordinary state and is not a clean bill of health.
getter/setter pair

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
toString() → String
A string representation of this object.
override

Operators

operator ==(Object other) → bool
The equality operator.
override

Static Methods

fromJson(dynamic value) → RiskModelState?
Returns a new RiskModelState instance and imports its values from value if it's a Map, null otherwise.
listFromJson(dynamic json, {bool growable = false}) → List<RiskModelState>
mapFromJson(dynamic json) → Map<String, RiskModelState>
mapListFromJson(dynamic json, {bool growable = false}) → Map<String, List<RiskModelState>>

Constants

requiredKeys → const Set<String>
The list of required keys that must be present in a JSON.