@Test
public void testImpurityRightPart() {

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