Skip to content

Commit

Permalink
minor: code style
Browse files Browse the repository at this point in the history
  • Loading branch information
manishamde committed May 26, 2014
1 parent 237762d commit 34ee7b9
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -230,10 +230,10 @@ object DecisionTree extends Serializable with Logging {
* @return a DecisionTreeModel that can be used for prediction
*/
def train(
input: RDD[LabeledPoint],
algo: Algo,
impurity: Impurity,
maxDepth: Int): DecisionTreeModel = {
input: RDD[LabeledPoint],
algo: Algo,
impurity: Impurity,
maxDepth: Int): DecisionTreeModel = {
val strategy = new Strategy(algo, impurity, maxDepth)
// Converting from standard instance format to weighted input format for tree training
val weightedInput = input.map(x => WeightedLabeledPoint(x.label, x.features))
Expand Down Expand Up @@ -279,10 +279,10 @@ object DecisionTree extends Serializable with Logging {
* @param impurity impurity criterion used for information gain calculation
* @param maxDepth maxDepth maximum depth of the tree
* @param numClassesForClassification number of classes for classification. Default value of 2.
* @param labelWeights A map storing weights applied to each label for handling unbalanced
* @param labelWeights A map storing weights for each label to handle unbalanced
* datasets. For example, an entry (n -> k) implies the a weight of k is
* applied to an instance with label n. It's important to note that labels
* are zero-index and take values 0, 1, 2, ... , numClasses.
* are zero-index and take values 0, 1, 2, ... , numClasses - 1.
* @return a DecisionTreeModel that can be used for prediction
*/
def train(
Expand Down Expand Up @@ -316,7 +316,7 @@ object DecisionTree extends Serializable with Logging {
* @param labelWeights A map storing weights applied to each label for handling unbalanced
* datasets. For example, an entry (n -> k) implies the a weight of k is
* applied to an instance with label n. It's important to note that labels
* are zero-index and take values 0, 1, 2, ... , numClasses.
* are zero-index and take values 0, 1, 2, ... , numClasses - 1.
* @param maxBins maximum number of bins used for splitting features
* @param quantileCalculationStrategy algorithm for calculating quantiles
* @param categoricalFeaturesInfo A map storing information about the categorical variables and
Expand Down

0 comments on commit 34ee7b9

Please sign in to comment.