Skip to content

Commit

Permalink
Sorting of the randomly selected axes.
Browse files Browse the repository at this point in the history
  • Loading branch information
antononcube committed Jul 21, 2013
1 parent 4051af5 commit 1e2b9d3
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions AVCDecisionTreeForest.m
Original file line number Diff line number Diff line change
Expand Up @@ -322,12 +322,14 @@ Mathematica is (C) Copyright 1988-2012 Wolfram Research, Inc.

Clear[RandomAxes]
RandomAxes[nDimensions_] :=
Which[
nDimensions > 10, RandomSample[Range[nDimensions], 5],
nDimensions > 5, RandomSample[Range[nDimensions], 3],
nDimensions > 2, RandomSample[Range[nDimensions], 2],
True, Range[nDimensions]
];
Sort[
Which[
nDimensions > 10, RandomSample[Range[nDimensions], 5],
nDimensions > 5, RandomSample[Range[nDimensions], 3],
nDimensions > 2, RandomSample[Range[nDimensions], 2],
True, Range[nDimensions]
]
];

Clear[BuildDecisionTree]
Options[BuildDecisionTree] = {"RandomAxes" -> False,
Expand Down

0 comments on commit 1e2b9d3

Please sign in to comment.