public void UpdateInfGain(double entropyForClassificationFactor, int[] afterClassificationVlaues, int amountOfExamplesUsed, int[][] diferentOutcomesafterClassValues) { //TODO: complete the method this.InfGain = DecisionTreeCreator.calculateInformationGain(entropyForClassificationFactor, afterClassificationVlaues, amountOfExamplesUsed, diferentOutcomesafterClassValues); }
static void Main(string[] args) { // var examples = DataReader.ReturnAllExamplesFromFile("../../TrainingData/DataExamples.txt"); // Console.WriteLine(examples); DecisionTreeCreator treeCreator = new DecisionTreeCreator(); treeCreator.StartBuilding(); Console.WriteLine(treeCreator); ITreeExporter exporter = new JSONTreeExporter(); DateTime dateTime = DateTime.Now; // Add this option in configuration String resultsPathFile = "../../Results/Tree-" + dateTime.ToString().Replace("/", "-") + ".txt"; exporter.exportTree(resultsPathFile, treeCreator.RootNode); }
public void UpdateEntropy(int[] arrayWithAmountsOfDifferentClassificationValues, int amountOfTrainingExamples) { this.Entropy = DecisionTreeCreator.calculateEntropy(arrayWithAmountsOfDifferentClassificationValues, amountOfTrainingExamples); }