github.com/pachyderm/pachyderm@v1.13.4/examples/ml/iris/julia/iris-train-julia-tree/train.jl (about) 1 using DataFrames 2 using DecisionTree 3 using JLD 4 5 # Read the iris data set. 6 df = readtable(ARGS[1], header = false) 7 8 # Get the features and labels. 9 features = convert(Array, df[:, 1:4]) 10 labels = convert(Array, df[:, 5]) 11 12 # Train decision tree classifier. 13 model = DecisionTreeClassifier(pruning_purity_threshold=0.9, maxdepth=6) 14 DecisionTree.fit!(model, features, labels) 15 16 # Save the model. 17 save(ARGS[2], "model", model) 18