public void TestDeltas() { double[] absolutes = new double[] { 1, 3, 4, 2 }; double[] deltas = parser.GetDeltas(absolutes); Assert.AreEqual(absolutes.Length - 1, deltas.Length); Assert.AreEqual(deltas, new double[] { 2, 1, -2 }); }
private void buttonLoadData_Click(object sender, EventArgs e) { openDataFile.ShowDialog(); if (radioRelative.Checked) { data = parser.GetDeltas( parser.ParseFile(openDataFile.FileName) ); } else { data = parser.ParseFile(openDataFile.FileName); } normalizer = is_sigmoid ? DataNormalizer.SigmoidNormalizer(data) : DataNormalizer.HyperbolicNormalizer(data); data = normalizer.GetValues(); groupTraining.Enabled = true; }