private void Button_Click_1(object sender, RoutedEventArgs e) { Settings.SetSettings_MNISTMyOutput(); MnistParser parser = new MnistParser( @"D:\Dropbox\DP\data\train-images.bin", @"D:\Dropbox\DP\data\train-labels.bin", @"D:\Dropbox\DP\data\test-images.bin", @"D:\Dropbox\DP\data\test-labels.bin"); parser.ParseData(60000); parser.ParseDataTest(10000); ihdr = new IHDR(); List<MNISTParserLib.Sample> mnistSamples = parser.Samples; foreach (var item in mnistSamples) { ihdr.AddSample(item.GetAttributesArray(), (double)item.Label); } foreach (var item in parser.SamplesTest) { ihdr.AddTestingSample(item.GetAttributesArray(), (double)item.Label); } }
private void Button_Click_10(object sender, RoutedEventArgs e) { S.SyntheticDataGenerator generator = new S.SyntheticDataGenerator(70, 50); generator.GenerateSyntheticData(); generator.GenerateSyntheticDataTest(); ihdr = new IHDR(); foreach (var item in generator.samples) { ihdr.AddSample(item.Attributes.ToArray(), item.AttributesY.ToArray(), item.Label); } foreach (var item in generator.samplesTest) { ihdr.AddTestingSample(item.Attributes.ToArray(), (double)item.Label); } ihdr.BuildTree_Synthetic(); ihdr.EvaluateClustersLabels(); ihdr.SaveLeafClustersToPicture(); }
private void Button_Click_8(object sender, RoutedEventArgs e) { GisetteParser parser = new GisetteParser( @"D:\Dropbox\DP\datasets\Gisette\gisette_train.data", @"D:\Dropbox\DP\datasets\Gisette\gisette_train.labels", @"D:\Dropbox\DP\datasets\Gisette\gisette_valid.data", @"D:\Dropbox\DP\datasets\Gisette\gisette_valid.labels"); parser.ParseData(); parser.ParseDataTest(); ihdr = new IHDR(); List<GisetteParserLib.Sample> arceneSamples = parser.Samples; foreach (var item in arceneSamples) { ihdr.AddSample(item.GetAttributesArray(), (double)item.Label); } foreach (var item in parser.SamplesTest) { ihdr.AddTestingSample(item.GetAttributesArray(), (double)item.Label); } }
private void Button_Click_6(object sender, RoutedEventArgs e) { IFormatter formatter = new BinaryFormatter(); FileStream s = new FileStream(@"C:\IHDRSerializedTree.txt", FileMode.Open); ihdr = (IHDR)formatter.Deserialize(s); }
private void Button_Click_16(object sender, RoutedEventArgs e) { Faces2Parser parser = new Faces2Parser( @"D:\Dropbox\DP\datasets\Faces2\"); parser.ParseData(); parser.ParseDataTest(); ihdr = new IHDR(); foreach (var item in parser.Samples) { ihdr.AddSample(item.GetAttributesArray(), (double)item.Label); } foreach (var item in parser.SamplesTest) { ihdr.AddTestingSample(item.GetAttributesArray(), (double)item.Label); } }
private void Button_Click_14(object sender, RoutedEventArgs e) { FacesParser parser = new FacesParser( @"D:\Dropbox\DP\datasets\Faces\train\face\", @"D:\Dropbox\DP\datasets\Faces\train\non-face\", @"D:\Dropbox\DP\datasets\Faces\test\face\", @"D:\Dropbox\DP\datasets\Faces\test\non-face\"); parser.ParseData(); parser.ParseDataTest(); ihdr = new IHDR(); List<FacesParserLib.Sample> mnistSamples = parser.Samples; foreach (var item in mnistSamples) { ihdr.AddSample(item.GetAttributesArray(), (double)item.Label); } foreach (var item in parser.SamplesTest) { ihdr.AddTestingSample(item.GetAttributesArray(), (double)item.Label); } }
private void Button_Click_11(object sender, RoutedEventArgs e) { S.SyntheticDataGenerator generator = new S.SyntheticDataGenerator(100, 100); generator.GenerateSyntheticData(); generator.GenerateSyntheticDataTest(); ihdr = new IHDR(); foreach (var item in generator.samples) { ihdr.AddSample(item.Attributes.ToArray(), item.AttributesY.ToArray(), item.Label); } foreach (var item in generator.samplesTest) { ihdr.AddTestingSample(item.Attributes.ToArray(), (double)item.Label); } ihdr.BuildTree_Synthetic(); ihdr.EvaluateAllClustersLabels(); ihdr.EvaluateDepth(); ihdr.SaveLayersToBmp(@"D:\Levels"); }