Skip to content

Commit

Permalink
update tree API annotation
Browse files Browse the repository at this point in the history
  • Loading branch information
mengxr committed Apr 8, 2014
1 parent 0b674fa commit 00ffbcc
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1026,7 +1026,7 @@ object DecisionTree extends Serializable with Logging {
}
}

val usage = """
private val usage = """
Usage: DecisionTreeRunner <master>[slices] --algo <Classification,
Regression> --trainDataDir path --testDataDir path --maxDepth num [--impurity <Gini,Entropy,
Variance>] [--maxBins num]
Expand Down Expand Up @@ -1115,7 +1115,7 @@ object DecisionTree extends Serializable with Logging {
* @return An RDD of LabeledPoint. Each labeled point has two elements: the first element is
* the label, and the second element represents the feature values (an array of Double).
*/
def loadLabeledData(sc: SparkContext, dir: String): RDD[LabeledPoint] = {
private def loadLabeledData(sc: SparkContext, dir: String): RDD[LabeledPoint] = {
sc.textFile(dir).map { line =>
val parts = line.trim().split(",")
val label = parts(0).toDouble
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
package org.apache.spark.mllib.tree.configuration

/**
* <span class="badge" style="float: right; background-color: #257080;">EXPERIMENTAL</span>
*
* Enum to select the algorithm for the decision tree
*/
object Algo extends Enumeration {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
package org.apache.spark.mllib.tree.configuration

/**
* <span class="badge" style="float: right; background-color: #257080;">EXPERIMENTAL</span>
*
* Enum to describe whether a feature is "continuous" or "categorical"
*/
object FeatureType extends Enumeration {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
package org.apache.spark.mllib.tree.configuration

/**
* <span class="badge" style="float: right; background-color: #257080;">EXPERIMENTAL</span>
*
* Enum for selecting the quantile calculation strategy
*/
object QuantileStrategy extends Enumeration {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ import org.apache.spark.mllib.tree.configuration.Algo._
import org.apache.spark.mllib.tree.configuration.QuantileStrategy._

/**
* <span class="badge" style="float: right; background-color: #257080;">EXPERIMENTAL</span>
*
* Stores all the configuration options for tree construction
* @param algo classification or regression
* @param impurity criterion used for information gain calculation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import org.apache.spark.mllib.tree.configuration.FeatureType._
import org.apache.spark.mllib.linalg.Vector

/**
* <span class="badge" style="float: right; background-color: #44751E;">DEVELOPER API</span>
* <span class="badge badge-red" style="float: right;">DEVELOPER API</span>
*
* Node in a decision tree
* @param id integer node id
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ package org.apache.spark.mllib.tree.model
import org.apache.spark.mllib.tree.configuration.FeatureType.FeatureType

/**
* <span class="badge badge-red" style="float: right;">DEVELOPER API</span>
*
* Split applied to a feature
* @param feature feature index
* @param threshold threshold for continuous feature
Expand Down

0 comments on commit 00ffbcc

Please sign in to comment.