class

RinhaDeBackend::Vectorizer

Inherits Reference < Object

Maps a parsed FraudScoreRequest to its 14-dim feature vector following docs/en/DETECTION_RULES.md. Indices 5 and 6 carry the -1 sentinel when last_transaction is null; everything else is clamped to [0.0, 1.0].

Constants

DIMS = 14

Constructors

new(mcc_risk : MccRisk)
Source

Instance methods

vectorize(buf : Bytes, parsed : ParsedRequest) : StaticArray(Float32, 14)

Hot-path entrypoint. Consumes the raw request buffer plus the primitives extracted by JsonParser; produces the same 14-dim vector as the FraudScoreRequest path with no per-request heap allocation.

Source
vectorize(req : FraudScoreRequest) : StaticArray(Float32, 14)
Source