public void testNumerizesAndDeNumerizesIrisDataSetExample3() { DataSet ds = DataSetFactory.getIrisDataSet(); Example first = ds.getExample(100); INumerizer n = new IrisDataSetNumerizer(); Pair <ICollection <double>, ICollection <double> > io = n.Numerize(first); Assert.AreEqual(CollectionFactory.CreateQueue <double>(new[] { 6.3, 3.3, 6.0, 2.5 }), io.GetFirst()); Assert.AreEqual(CollectionFactory.CreateQueue <double>(new[] { 1.0, 0.0, 0.0 }), io.getSecond()); string plant_category = n.Denumerize(CollectionFactory.CreateQueue <double>(new[] { 1.0, 0.0, 0.0 })); Assert.AreEqual("virginica", plant_category); }
public void testNumerizesAndDeNumerizesIrisDataSetExample2() { DataSet ds = DataSetFactory.getIrisDataSet(); Example first = ds.getExample(51); INumerizer n = new IrisDataSetNumerizer(); Pair <ICollection <double>, ICollection <double> > io = n.Numerize(first); Assert.AreEqual(CollectionFactory.CreateQueue <double>(new[] { 6.4, 3.2, 4.5, 1.5 }), io.GetFirst()); Assert.AreEqual(CollectionFactory.CreateQueue <double>(new[] { 0.0, 1.0, 0.0 }), io.getSecond()); string plant_category = n.Denumerize(CollectionFactory.CreateQueue <double>(new[] { 0.0, 1.0, 0.0 })); Assert.AreEqual("versicolor", plant_category); }