github.com/pachyderm/pachyderm@v1.13.4/examples/ml/iris/julia/iris-train-julia-forest/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 = RandomForestClassifier(ntrees=3, partialsampling=0.7) 14 DecisionTree.fit!(model, features, labels) 15 16 # Save the model. 17 save(ARGS[2], "model", model) 18