/** * Scales the feature vector produced by the extractor by the learning rate and subtracts it * from the weight vector. * * @param exampleFeatures The example's array of feature indices. * @param exampleValues The example's array of feature values. * @param rate The learning rate at which the weights are updated. **/ public void demote(int[] exampleFeatures, double[] exampleValues, double rate) { if (!nearlyEqualTo(rate, 0.0)) { super.demote(exampleFeatures, exampleValues, rate); } }