KnnArmResult
@Serializable
@SerialName(value = "KnnArmResult")
Per-arm snapshot for KnnContextualBandit: the retained history of (context, reward, weight) triples plus the cumulative observation weight.
The arrays are parallel (same length, indexed by sample). Merging is append-then-trim: foreign samples are concatenated to the local history and the oldest entries roll off if the result exceeds maxHistoryPerArm.
Constructors
Link copied to clipboard
constructor(contexts: List<DoubleArray>, rewards: DoubleArray, weights: DoubleArray, totalWeight: Double)
Properties
Link copied to clipboard
Retained contexts (each a copy of the submitted VectorView).
Link copied to clipboard
Per-sample rewards, parallel to contexts.
Link copied to clipboard
Cumulative observation weight folded into this arm.
Link copied to clipboard
Per-sample weights, parallel to contexts.
KnnArmResult
constructor(contexts: List<DoubleArray>, rewards: DoubleArray, weights: DoubleArray, totalWeight: Double)(source)
contexts
Retained contexts (each a copy of the submitted VectorView).
rewards
Per-sample rewards, parallel to contexts.
totalWeight
Cumulative observation weight folded into this arm.
weights
Per-sample weights, parallel to contexts.