2

I read https://www.researchgate.net/post/How_to_compute_impurity_using_Gini_Index

I understand why choosing smallest gini index, but how do I come up with different candidate splits in the first place? How does R come up with the splits? Take the iris data as an instance:

plot(iris$Sepal.Length, col=iris$Species, pch=20)

enter image description here

How do I determine where I want to draw the horizontal line to separate each class? I can draw infinitely amount of lines and then compare their gini index, but practically, it will not work.

Leo Jiang
  • 21
  • 1

0 Answers0