@Test
public void testImpurityLeftPart() {

    // Test on left part [1, 2, 2, 1, 1, 1].
    MSEImpurityMeasure impurity = new MSEImpurityMeasure(8, 12, 6, 0, 0, 0);
    assertEquals(1.333, impurity.impurity(), 1e-3);
}