ReferenceTrainer
object ReferenceTrainer
The local training step in pure Kotlin: one gradient-descent step of linear regression (y ≈ w·x + b) over a batch, mean-squared-error loss. This is the oracle the wasm kernel (fedavg_train.wasm) is proven bit-for-bit equal to (see FedAvgKernelEquivalenceTest).
Dimension is fixed at D = 2 (one feature + bias) to match the v1 kernel; step's weight vector is [featureWeight, bias].