public void L2Test() { const double lambda = 1.0; var reg = new L2(); var mat = new Matrix(10, 10); mat.InRandomize(); Assert.IsTrue(Math.Abs(mat.FrobeniusNorm() * lambda - reg.CalculateNorm(mat)) < 0.1, reg.Type().ToString() + " Regularization."); }