diff --git a/AVCDecisionTreeForest.m b/AVCDecisionTreeForest.m index 014070c3..e89699a3 100644 --- a/AVCDecisionTreeForest.m +++ b/AVCDecisionTreeForest.m @@ -1,7 +1,7 @@ (* Decision tree and random forest implementations in Mathematica - Copyright (C) 2013 Anton Antonov + Copyright (C) 2013-2015 Anton Antonov This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -17,8 +17,7 @@ along with this program. If not, see . Written by Anton Antonov, - antononcube@gmail.com, - 7320 Colbury Ave, + antononcube@gmail.com, Windermere, Florida, USA. *) @@ -628,9 +627,10 @@ Mathematica is (C) Copyright 1988-2012 Wolfram Research, Inc. Clear[DecisionTreeToRules] DecisionTreeToRules[tree_] := - Block[{}, + Block[{dtree, k=0}, + dtree = tree /. ({m_, v_, cInd_Integer, s_, n_} :> {m, v, cInd, s, n, "node "<>ToString[k++]}); MakeIDGenerator[]; - TreeToRulesRecStep[tree] + TreeToRulesRecStep[dtree] ] /. {{r_Rule, edge_String} :> {r, Style[StandardForm[edge], Background -> White, FontSlant -> Plain]}};