### Question:
ScoreUtils { public static double infoGain(Instances parent, List<Instances> children) { final EntropyFunction doubleFunction = ScoreUtils::infoScore; return gain(parent, children, doubleFunction); }  static void main(String[] args); static double giniImpurity(double[] distribution); static double giniImpurity(int[] distribution); static double giniImpurity(Instances data); static double giniImpurity(List<Instances> data); static double giniScore(double[] distribution); static void checkEntropyInputs(double[] distribution); static double giniScore(Instances data); static double infoScore(Instances data); static double infoEntropy(double[] distribution); static double infoEntropy(int[] distribution); static double infoEntropy(Instances data); static double infoEntropy(List<Instances> data); static double infoScore(double[] distribution); static double infoScore(List<Instances> children); static double entropySum(List<Instances> children, EntropyFunction entropyFunction); static double giniScore(List<Instances> children); static double giniGain(Instances parent, List<Instances> children); static double gain(Instances parent, List<Instances> children, EntropyFunction entropyFunction); static double gain(double[] parentClassCounts, double[][] childrenClassCounts,
            EntropyFunction entropyFunction); static double infoGain(Instances parent, List<Instances> children); static double giniScore(int[] classCounts); static double infoScore(int[] classCounts); static double giniGain(int[] parentClassCounts, int[][] childrenClassCounts); static double giniGain(double[] parentClassCounts, double[][] childrenClassCounts); static double infoGain(int[] parentClassCounts, int[][] childrenClassCounts); static double infoGain(double[] parentClassCounts, double[][] childrenClassCounts); static double chiSquared(final double[] parentClassCounts, final double[][] childrenClassCounts); static double chiSquared(int[] parentClassCounts, int[][] childClassCounts); static double chiSquared(Instances parent, List<Instances> children);  }### Answer:
@Test public void testGiniGainPure() { double v = ScoreUtils.infoGain(new int[] {8, 4}, new int[][] { {8, 0}, {0, 4}, }); Assert.assertEquals(0.9182958340544896, v, 0.0); }
@Test public void testGiniGainImpure() { double v = ScoreUtils.infoGain(new int[] {8, 4}, new int[][] { {4, 2}, {2, 4}, }); Assert.assertEquals(0, v, 0.0); }
@Test public void testInfoGainPure() { double v = ScoreUtils.infoGain(new int[] {8, 4}, new int[][] { {8, 0}, {0, 4}, }); Assert.assertEquals(0.9182958340544896, v, 0.0); }
@Test public void testInfoGainImpure() { double v = ScoreUtils.infoGain(new int[] {8, 4}, new int[][] { {4, 2}, {2, 4}, }); Assert.assertEquals(0, v, 0.0); }
@Test public void testInfoGainA() { double v = ScoreUtils.infoGain(new int[] {8, 4}, new int[][] { {7, 3}, {1, 1}, }); Assert.assertEquals(v, 0.01722008469557898, 0.0000000000000001); }
@Test public void testInfoGainB() { double v = ScoreUtils.infoGain(new int[] {8, 4}, new int[][] { {7, 1}, {1, 3}, }); Assert.assertEquals(0.28549349710171434, v, 0.0); }