Skip to content

Commit 00ffbcc

Browse files
committed
update tree API annotation
1 parent 0b674fa commit 00ffbcc

File tree

7 files changed

+13
-3
lines changed

7 files changed

+13
-3
lines changed

mllib/src/main/scala/org/apache/spark/mllib/tree/DecisionTree.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1026,7 +1026,7 @@ object DecisionTree extends Serializable with Logging {
10261026
}
10271027
}
10281028

1029-
val usage = """
1029+
private val usage = """
10301030
Usage: DecisionTreeRunner <master>[slices] --algo <Classification,
10311031
Regression> --trainDataDir path --testDataDir path --maxDepth num [--impurity <Gini,Entropy,
10321032
Variance>] [--maxBins num]
@@ -1115,7 +1115,7 @@ object DecisionTree extends Serializable with Logging {
11151115
* @return An RDD of LabeledPoint. Each labeled point has two elements: the first element is
11161116
* the label, and the second element represents the feature values (an array of Double).
11171117
*/
1118-
def loadLabeledData(sc: SparkContext, dir: String): RDD[LabeledPoint] = {
1118+
private def loadLabeledData(sc: SparkContext, dir: String): RDD[LabeledPoint] = {
11191119
sc.textFile(dir).map { line =>
11201120
val parts = line.trim().split(",")
11211121
val label = parts(0).toDouble

mllib/src/main/scala/org/apache/spark/mllib/tree/configuration/Algo.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
package org.apache.spark.mllib.tree.configuration
1919

2020
/**
21+
* <span class="badge" style="float: right; background-color: #257080;">EXPERIMENTAL</span>
22+
*
2123
* Enum to select the algorithm for the decision tree
2224
*/
2325
object Algo extends Enumeration {

mllib/src/main/scala/org/apache/spark/mllib/tree/configuration/FeatureType.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
package org.apache.spark.mllib.tree.configuration
1919

2020
/**
21+
* <span class="badge" style="float: right; background-color: #257080;">EXPERIMENTAL</span>
22+
*
2123
* Enum to describe whether a feature is "continuous" or "categorical"
2224
*/
2325
object FeatureType extends Enumeration {

mllib/src/main/scala/org/apache/spark/mllib/tree/configuration/QuantileStrategy.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
package org.apache.spark.mllib.tree.configuration
1919

2020
/**
21+
* <span class="badge" style="float: right; background-color: #257080;">EXPERIMENTAL</span>
22+
*
2123
* Enum for selecting the quantile calculation strategy
2224
*/
2325
object QuantileStrategy extends Enumeration {

mllib/src/main/scala/org/apache/spark/mllib/tree/configuration/Strategy.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ import org.apache.spark.mllib.tree.configuration.Algo._
2222
import org.apache.spark.mllib.tree.configuration.QuantileStrategy._
2323

2424
/**
25+
* <span class="badge" style="float: right; background-color: #257080;">EXPERIMENTAL</span>
26+
*
2527
* Stores all the configuration options for tree construction
2628
* @param algo classification or regression
2729
* @param impurity criterion used for information gain calculation

mllib/src/main/scala/org/apache/spark/mllib/tree/model/Node.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import org.apache.spark.mllib.tree.configuration.FeatureType._
2222
import org.apache.spark.mllib.linalg.Vector
2323

2424
/**
25-
* <span class="badge" style="float: right; background-color: #44751E;">DEVELOPER API</span>
25+
* <span class="badge badge-red" style="float: right;">DEVELOPER API</span>
2626
*
2727
* Node in a decision tree
2828
* @param id integer node id

mllib/src/main/scala/org/apache/spark/mllib/tree/model/Split.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ package org.apache.spark.mllib.tree.model
2020
import org.apache.spark.mllib.tree.configuration.FeatureType.FeatureType
2121

2222
/**
23+
* <span class="badge badge-red" style="float: right;">DEVELOPER API</span>
24+
*
2325
* Split applied to a feature
2426
* @param feature feature index
2527
* @param threshold threshold for continuous feature

0 commit comments

Comments
 (0)