Decision Tree from CSV files - clumsyspeedboat/Decision-Tree-Neo4j GitHub Wiki

Steps :

  1. Run Decision Tree procedure - map two sets of CSV file paths for training and testing respectively

Create the Gain Ratio decision tree.

RETURN main.createTreeGRcsv("trainPath","testPath","targetAttribute","prune","max_depth")

Procedure to create the Gain Ratio DT based on the dataset from the CSV file. "training_file_path", "testing_file_path" are the paths of the training and testing dataset. After running the procedure, it will create the DT in Neo4j and also display the prediction time, generate time, confusion matrix and accuracy.

"prune": "True" if you want to prune the tree and "False" otherwise.

"max_depth": "depth level" when you want to prune and "0" otherwise. For example "3" for a depth level of 3.

Create the Information Gain decision tree.

RETURN main.createTreeIGcsv("trainPath","testPath","targetAttribute","prune","max_depth")

Procedure to create the Information Gain DT based on the dataset from the CSV file. "training_file_path", "testing_file_path" are the paths of the training and testing dataset. After running the procedure, it will create the DT in Neo4j and also display the prediction time, generate time, confusion matrix and accuracy.

"prune": "True" if you want to prune the tree and "False" otherwise.

"max_depth": "depth level" when you want to prune and "0" otherwise. For example "3" for a depth level of 3.

Create the Gini Index decision tree.

RETURN main.createTreeGIcsv("trainPath","testPath","targetAttribute","prune","max_depth")

Procedure to create the Gini Index DT based on the dataset from the CSV file. "training_file_path", "testing_file_path" are the paths of the training and testing dataset. After running the procedure, it will create the DT in Neo4j and also display the prediction time, generate time, confusion matrix and accuracy.

"prune": "True" if you want to prune the tree and "False" otherwise.

"max_depth": "depth level" when you want to prune and "0" otherwise. For example "3" for a depth level of 3.