/**
         * <summary> The createChildrenForDiscreteIndexed method creates an List of DecisionNodes as children and a partition with respect to
         * indexed attribute.</summary>
         *
         * <param name="attributeIndex">Index of the attribute.</param>
         * <param name="attributeValue">Value 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 CreateChildrenForDiscreteIndexed(int attributeIndex, int attributeValue,
                                                      RandomForestParameter parameter, bool isStump)
        {
            var childrenData = _data.DivideWithRespectToIndexedAttribute(attributeIndex, attributeValue);

            _children = new List <DecisionNode>
            {
                new DecisionNode(childrenData.Get(0),
                                 new DecisionCondition(attributeIndex,
                                                       new DiscreteIndexedAttribute("", attributeValue,
                                                                                    ((DiscreteIndexedAttribute)_data.Get(0).GetAttribute(attributeIndex)).GetMaxIndex())),
                                 parameter, isStump),
                new DecisionNode(childrenData.Get(1),
                                 new DecisionCondition(attributeIndex,
                                                       new DiscreteIndexedAttribute("", -1,
                                                                                    ((DiscreteIndexedAttribute)_data.Get(0).GetAttribute(attributeIndex)).GetMaxIndex())),
                                 parameter, isStump)
            };
        }