For example, we have the following data mentioned below;

**How can we calculate the split point?**

Income | Class |

18 | YES |

45 | NO |

18 | NO |

25 | YES |

28 | YES |

28 | NO |

34 | NO |

**Solution:**

**Step 1:** Sort the data in ascending order.

Income | Class |

18 | YES |

18 | NO |

25 | YES |

28 | YES |

28 | NO |

34 | NO |

45 | NO |

**Step 2:** Find the midpoint of first two numbers and calculate the information gain

Split point = (18+25) / 2 = 21

Infoage<21(D) = 2/7(I(1,1)) + 5/7(I(2,3))

= 2/7(-1/2(log2(1/2)) – 1/2(log2(1/2))+5/7(-2/5(log2(2/5)) – 3/5(log2(3/5)))

= 0.98

[quads id=1]