using DataFrames, RDatasets
vn = dataset("Ecdat","VietNamI")
days_ill = vn[:Illdays]
delete!(vn,:Illdays)
# Pkg.add("DecisionTree")
using DecisionTree
signals = convert(Array,days_ill)
features = convert(Array,vn);
methods(build_forest)
signals _array of the signal we want to calculate
features the corresponding feature array that indicates those signals
festures used the number features for the each split or branch of the tree
number of trees trees in the forrest, larger takes longer, but could be more accurate.
sampling rate number lowered from 1.0 to favor minority signals
model = build_forest(signals,features,int(sqrt(length(features[1,:]))),10,.9)
predictions = apply_forest(model,features)
confusion_matrix(signals,predictions)