private static void DiscretizeClassTrainingSet(int numberOfBins) { _ew.Load(GetFullPath("ClassTrainingSet_2319_17022018.csv")); LOCClass = new DiscretizedData(_ew.Discretize <int>(1, numberOfBins, 1153)); TCC = new DiscretizedData(_ew.Discretize <double>(3, numberOfBins, 0.25)); WMC = new DiscretizedData(_ew.Discretize <int>(4, numberOfBins, 16.92)); ATFDClass = new DiscretizedData(_ew.Discretize <int>(5, numberOfBins, 83.05)); ClassDataset = _ew.GetDiscreteDataSet(); _ew.WriteToCsv(GetFullPath("ClassTrainingSet_2319_17022018_discretized.csv")); _ew.WriteBinsToCsv(GetFullPath("ClassTrainingSet_2319_17022018_bins.csv")); }
private static void DiscretizeMethodTrainingSet(int numberOfBins) { _ew.Load(GetFullPath("MethodTrainingSet_2319_17022018.csv")); LOC = new DiscretizedData(_ew.Discretize <int>(1, numberOfBins, 84.42)); CYCLO = new DiscretizedData(_ew.Discretize <int>(2, numberOfBins, 21.58)); ATFD = new DiscretizedData(_ew.Discretize <int>(6, numberOfBins, 22.0)); FDP = new DiscretizedData(_ew.Discretize <int>(7, numberOfBins, 8.13)); LAA = new DiscretizedData(_ew.Discretize <double>(8, numberOfBins, 29.5)); MAXNESTING = new DiscretizedData(_ew.Discretize <int>(9, numberOfBins, 7.95)); NOAV = new DiscretizedData(_ew.Discretize <int>(10, numberOfBins, 39.2)); MethodDataset = _ew.GetDiscreteDataSet(); _ew.WriteToCsv(GetFullPath("MethodTrainingSet_2319_17022018_discretized.csv")); _ew.WriteBinsToCsv(GetFullPath("MethodTrainingSet_2319_17022018_bins.csv")); }