Skip to content

Commit 34ee7b9

Browse files
committed
minor: code style
1 parent 237762d commit 34ee7b9

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -230,10 +230,10 @@ object DecisionTree extends Serializable with Logging {
230230
* @return a DecisionTreeModel that can be used for prediction
231231
*/
232232
def train(
233-
input: RDD[LabeledPoint],
234-
algo: Algo,
235-
impurity: Impurity,
236-
maxDepth: Int): DecisionTreeModel = {
233+
input: RDD[LabeledPoint],
234+
algo: Algo,
235+
impurity: Impurity,
236+
maxDepth: Int): DecisionTreeModel = {
237237
val strategy = new Strategy(algo, impurity, maxDepth)
238238
// Converting from standard instance format to weighted input format for tree training
239239
val weightedInput = input.map(x => WeightedLabeledPoint(x.label, x.features))
@@ -279,10 +279,10 @@ object DecisionTree extends Serializable with Logging {
279279
* @param impurity impurity criterion used for information gain calculation
280280
* @param maxDepth maxDepth maximum depth of the tree
281281
* @param numClassesForClassification number of classes for classification. Default value of 2.
282-
* @param labelWeights A map storing weights applied to each label for handling unbalanced
282+
* @param labelWeights A map storing weights for each label to handle unbalanced
283283
* datasets. For example, an entry (n -> k) implies the a weight of k is
284284
* applied to an instance with label n. It's important to note that labels
285-
* are zero-index and take values 0, 1, 2, ... , numClasses.
285+
* are zero-index and take values 0, 1, 2, ... , numClasses - 1.
286286
* @return a DecisionTreeModel that can be used for prediction
287287
*/
288288
def train(
@@ -316,7 +316,7 @@ object DecisionTree extends Serializable with Logging {
316316
* @param labelWeights A map storing weights applied to each label for handling unbalanced
317317
* datasets. For example, an entry (n -> k) implies the a weight of k is
318318
* applied to an instance with label n. It's important to note that labels
319-
* are zero-index and take values 0, 1, 2, ... , numClasses.
319+
* are zero-index and take values 0, 1, 2, ... , numClasses - 1.
320320
* @param maxBins maximum number of bins used for splitting features
321321
* @param quantileCalculationStrategy algorithm for calculating quantiles
322322
* @param categoricalFeaturesInfo A map storing information about the categorical variables and

0 commit comments

Comments
 (0)