public void normal_conorm() { T_Norm norm = new margin(); Assert.AreEqual(0.8, Math.Round(norm.conorm(0.3, 0.5), 5), "1"); Assert.AreEqual(0.9, Math.Round(norm.conorm(0.5, 0.4), 5), "2"); }
public void boundries_conorm() { T_Norm norm = new margin(); Assert.Throws<ArgumentException>(delegate{ norm.conorm(1.3, 0.5);}, "1"); Assert.Throws<ArgumentException>(delegate{norm.conorm(1.0, 1.4);}, "2"); Assert.Throws<ArgumentException>(delegate{norm.conorm(1.1, 1.4);}, "3"); }
public void normal_norm() { T_Norm norm = new margin(); Assert.AreEqual(0.2, Math.Round(norm.norm(0.7, 0.5), 5), "1"); Assert.AreEqual(0.3, Math.Round(norm.norm(0.5, 0.8), 5), "2"); }
public void boundries_norm() { T_Norm norm = new margin(); Assert.Throws<ArgumentException>(delegate{norm.norm(-0.3, 0.5);}, "1"); Assert.Throws<ArgumentException>(delegate{norm.norm(0.0, -0.4);}, "2"); Assert.Throws<ArgumentException>(delegate{norm.norm(-0.1, -0.4);}, "3"); }