kumulant

KnnContextualSpec

@Serializable
@SerialName(value = "KnnContextual")
data class KnnContextualSpec(val nbrArms: Int, val k: Int = 5, val maxHistoryPerArm: Int = 1024, val coldStartScore: Double = 1.0, val exploration: Double = 1.0, val distance: String = "squaredL2") : ContextualBanditSpec(source)

Spec for KnnContextualBandit. distance is a named lookup against a small built-in registry; currently "squaredL2" is the only stock entry.

Constructors

KnnContextualSpec

constructor(nbrArms: Int, k: Int = 5, maxHistoryPerArm: Int = 1024, coldStartScore: Double = 1.0, exploration: Double = 1.0, distance: String = "squaredL2")(source)

Properties

coldStartScore

Score assigned to arms with no history yet.

distance

Name of the distance function in the factory's registry.

exploration

UCB-style exploration scale.

k

val k: Int(source)

Neighbourhood size used for scoring.

maxHistoryPerArm

Maximum observations retained per arm before FIFO eviction.

nbrArms

Number of arms in the population.