Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
manishamde committed May 6, 2014
1 parent 5e82202 commit 4731cda
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,8 @@ object DecisionTree extends Serializable with Logging {
private val InvalidBinIndex = -1

/**
* Returns an array of optimal splits for all nodes at a given level
* Returns an array of optimal splits for all nodes at a given level. Splits the tasks into
* multiple groups if the level-wise training tasks could lead to memory overflow.
*
* @param input RDD of [[org.apache.spark.mllib.regression.LabeledPoint]] used as training data
* for DecisionTree
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -405,8 +405,8 @@ class DecisionTreeSuite extends FunSuite with BeforeAndAfterAll {
assert(splits(0).length === 99)
assert(bins(0).length === 100)

val leftFilter = Filter(new Split(0,400,FeatureType.Continuous,List()),-1)
val rightFilter = Filter(new Split(0,400,FeatureType.Continuous,List()),1)
val leftFilter = Filter(new Split(0, 400, FeatureType.Continuous,List()), -1)
val rightFilter = Filter(new Split(0, 400, FeatureType.Continuous,List()) ,1)
val filters = Array[List[Filter]](List(),List(leftFilter),List(rightFilter))
val parentImpurities = Array(0.5, 0.5, 0.5)

Expand Down Expand Up @@ -444,7 +444,7 @@ object DecisionTreeSuite {

def generateOrderedLabeledPointsWithLabel0(): Array[LabeledPoint] = {
val arr = new Array[LabeledPoint](1000)
for (i <- 0 until 1000){
for (i <- 0 until 1000) {
val lp = new LabeledPoint(0.0, Vectors.dense(i.toDouble, 1000.0 - i))
arr(i) = lp
}
Expand All @@ -453,7 +453,7 @@ object DecisionTreeSuite {

def generateOrderedLabeledPointsWithLabel1(): Array[LabeledPoint] = {
val arr = new Array[LabeledPoint](1000)
for (i <- 0 until 1000){
for (i <- 0 until 1000) {
val lp = new LabeledPoint(1.0, Vectors.dense(i.toDouble, 999.0 - i))
arr(i) = lp
}
Expand All @@ -462,7 +462,7 @@ object DecisionTreeSuite {

def generateOrderedLabeledPoints(): Array[LabeledPoint] = {
val arr = new Array[LabeledPoint](1000)
for (i <- 0 until 1000){
for (i <- 0 until 1000) {
if (i < 600){
val lp = new LabeledPoint(0.0, Vectors.dense(i.toDouble, 1000.0 - i))
arr(i) = lp
Expand All @@ -476,7 +476,7 @@ object DecisionTreeSuite {

def generateCategoricalDataPoints(): Array[LabeledPoint] = {
val arr = new Array[LabeledPoint](1000)
for (i <- 0 until 1000){
for (i <- 0 until 1000) {
if (i < 600){
arr(i) = new LabeledPoint(1.0, Vectors.dense(0.0, 1.0))
} else {
Expand Down

0 comments on commit 4731cda

Please sign in to comment.