Skip to content

Commit d593ec7

Browse files
committed
fix docs and change minInstancesPerNode to 1
1 parent efcc736 commit d593ec7

File tree

1 file changed

+3
-3
lines changed
  • mllib/src/main/scala/org/apache/spark/mllib/tree/configuration

1 file changed

+3
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ import org.apache.spark.mllib.tree.configuration.QuantileStrategy._
4949
* k) implies the feature n is categorical with k categories 0,
5050
* 1, 2, ... , k-1. It's important to note that features are
5151
* zero-indexed.
52-
* @param minInstancesPerNode Minimum number of nodes each child must have after split.
53-
* Default value is 0. If a split cause left or right child
52+
* @param minInstancesPerNode Minimum number of instances each child must have after split.
53+
* Default value is 1. If a split cause left or right child
5454
* to have less than minInstancesPerNode,
5555
* this split will not be considered as a valid split.
5656
* @param minInfoGain Minimum information gain a split must get. Default value is 0.0.
@@ -68,7 +68,7 @@ class Strategy (
6868
val maxBins: Int = 32,
6969
val quantileCalculationStrategy: QuantileStrategy = Sort,
7070
val categoricalFeaturesInfo: Map[Int, Int] = Map[Int, Int](),
71-
val minInstancesPerNode: Int = 0,
71+
val minInstancesPerNode: Int = 1,
7272
val minInfoGain: Double = 0.0,
7373
val maxMemoryInMB: Int = 256) extends Serializable {
7474

0 commit comments

Comments
 (0)