Skip to content

Commit

Permalink
Copy-and-paste bug fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
antononcube committed Jul 21, 2013
1 parent 5bd80f3 commit 6bb0709
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions AVCDecisionTreeForest.m
Original file line number Diff line number Diff line change
Expand Up @@ -496,10 +496,10 @@ Mathematica is (C) Copyright 1988-2012 Wolfram Research, Inc.

(* Classify by forest *)
Clear[DecisionForestClassify]
Options[DecisionForestClassify] = {"Weighted" -> False};
Options[DecisionForestClassify] = {"Weighted" -> True};
DecisionForestClassify[forest_, record_, opts : OptionsPattern[]] :=
Block[{res, weightedQ = OptionValue[DecisionForestClassify, "Weighted"]},
res = TreeClassify[#, record] & /@ forest;
res = DecisionTreeClassify[#, record] & /@ forest;
res = Flatten[res, 1];
If[TrueQ[weightedQ],
res = GatherBy[res, #[[2]] &];
Expand All @@ -514,7 +514,7 @@ Mathematica is (C) Copyright 1988-2012 Wolfram Research, Inc.
Options[ParallelDecisionForestClassify] = {"Weighted" -> False};
ParallelDecisionForestClassify[forest_, record_] :=
Block[{res, weightedQ = OptionValue[ParallelDecisionForestClassify, "Weighted"]},
res = ParallelMap[TreeClassify[#, record] &, forest, Method -> "CoarsestGrained", DistributedContexts -> Automatic];
res = ParallelMap[DecisionTreeClassify[#, record] &, forest, Method -> "CoarsestGrained", DistributedContexts -> Automatic];
res = Flatten[res, 1];
If[TrueQ[weightedQ],
res = GatherBy[res, #[[2]] &];
Expand Down

0 comments on commit 6bb0709

Please sign in to comment.