Skip to content

Commit

Permalink
added support for Model Selection
Browse files Browse the repository at this point in the history
  • Loading branch information
alessandrolulli committed Jul 25, 2017
1 parent 9ff6eca commit 47f19ee
Show file tree
Hide file tree
Showing 9 changed files with 5 additions and 4 deletions.
Binary file modified resources/package/reforest-1.0-SNAPSHOT-jar-with-dependencies.jar
Binary file not shown.
Binary file not shown.
Binary file modified resources/package/reforest-1.0-SNAPSHOT-reforest-project-maven.zip
Binary file not shown.
Binary file modified resources/package/reforest-1.0-SNAPSHOT-reforest.tar.gz
Binary file not shown.
Binary file modified resources/package/reforest-1.0-SNAPSHOT-reforest.zip
Binary file not shown.
Binary file modified resources/package/reforest-1.0-SNAPSHOT.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion src/main/scala/reforest/example/ReForeSt.scala
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ object ReForeSt {
.addParameter(RFParameterType.SparkPartition, 4 * 4)
.addParameter(RFParameterType.SparkExecutorMemory, "1096m")
.addParameter(RFParameterType.SparkExecutorInstances, 1)
.addParameter(RFParameterType.SLCActive, false)
.addParameter(RFParameterType.SLCActive, true)
.build

val sc = CCUtil.getSparkContext(property)
Expand Down
5 changes: 3 additions & 2 deletions src/main/scala/reforest/example/ReForeStModelSelection.scala
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ object ReForeStModelSelection {
.addParameter(RFParameterType.NumFeatures, 794)
.addParameter(RFParameterType.NumClasses, 10)
.addParameter(RFParameterType.ModelSelectionEpsilon, 0.001)
.addParameter(RFParameterType.ModelSelectionEpsilonRemove, 0.02)
.addParameter(RFParameterType.NumTrees, Array(50, 80, 100))
.addParameter(RFParameterType.Depth, Array(5, 10))
.addParameter(RFParameterType.FeatureMultiplierPerNode, Array(1d, 2d))
Expand All @@ -46,8 +47,8 @@ object ReForeStModelSelection {
.addParameter(RFParameterType.SparkExecutorInstances, 1)
.addParameter(RFParameterType.SLCActive, true)
.addParameter(RFParameterType.ModelSelection, true)
// .addParameter(RFParameterType.TestAll, true)
// .addParameter(RFParameterType.LogStat, true)
.addParameter(RFParameterType.TestAll, true)
.addParameter(RFParameterType.LogStat, true)
.addStrategyFeature(new RFStrategyFeatureSQRT(794))
.build

Expand Down
2 changes: 1 addition & 1 deletion src/main/scala/reforest/rf/parameter/RFParameterType.scala
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ object RFParameterType extends Enumeration {

case object OutputTree extends RFParameterTypeBoolean(false)

case object SLCActive extends RFParameterTypeBoolean(false)
case object SLCActive extends RFParameterTypeBoolean(true)

case object SLCActiveForce extends RFParameterTypeBoolean(false)

Expand Down

0 comments on commit 47f19ee

Please sign in to comment.