double margin = weightsVector.dot(featuresVector);
double labelAsDouble = label ? 1.0 : -1.0;
if (margin * labelAsDouble < 1) {
double confidence = featuresVector.dot(featuresVector.mmul(varianceMatrix));
double beta = 1 / (confidence + this.r);
double alpha = Math.max(0, beta * (1 - labelAsDouble * margin));
DoubleMatrix delta = featuresVector.mmul(varianceMatrix).mul(alpha * labelAsDouble);