/**
         * <summary> The createChildrenForDiscrete method creates an List of values, a partition with respect to attributes and an List
         * of DecisionNodes as children.</summary>
         *
         * <param name="attributeIndex">Index of the attribute.</param>
         * <param name="parameter">     RandomForestParameter like seed, ensembleSize, attributeSubsetSize.</param>
         * <param name="isStump">       Refers to decision trees with only 1 splitting rule.</param>
         */
        private void CreateChildrenForDiscrete(int attributeIndex, RandomForestParameter parameter, bool isStump)
        {
            var valueList    = _data.GetAttributeValueList(attributeIndex);
            var childrenData = _data.DivideWithRespectToAttribute(attributeIndex);

            _children = new List <DecisionNode>();
            for (var i = 0; i < valueList.Count; i++)
            {
                _children.Add(new DecisionNode(childrenData.Get(i),
                                               new DecisionCondition(attributeIndex, new DiscreteAttribute(valueList[i])), parameter,
                                               isStump));
            }
        }