Skip to content

Commit

Permalink
minor fix: remove empty lines
Browse files Browse the repository at this point in the history
  • Loading branch information
qiping.lqp committed Sep 9, 2014
1 parent bb465ca commit 6728fad
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -747,7 +747,6 @@ object DecisionTree extends Serializable with Logging {

val totalCount = leftCount + rightCount


// impurity of parent node
val impurity = if (level > 0) {
topImpurity
Expand Down Expand Up @@ -836,7 +835,7 @@ object DecisionTree extends Serializable with Logging {
calculateGainForSplit(leftChildStats, rightChildStats, nodeImpurity, level, metadata)
(splitIdx, gainStats)
}.maxBy(_._2.gain)
if (bestFeatureGainStats.gain < metadata.minInfoGain) {
if (bestFeatureGainStats.gain == metadata.minInfoGain) {
(Split.noSplit, InformationGainStats.invalidInformationGainStats)
} else {
(splits(featureIndex)(bestFeatureSplitIndex), bestFeatureGainStats)
Expand Down

0 comments on commit 6728fad

Please sign in to comment.