Beispiel #1
0
        public static DecisionTree getStumpFor(DataSet ds, string attributeName,
                                               string attributeValue, string returnValueIfMatched,
                                               ICollection <string> unmatchedValues, string returnValueIfUnmatched)
        {
            DecisionTree dt = new DecisionTree(attributeName);

            dt.addLeaf(attributeValue, returnValueIfMatched);
            foreach (string unmatchedValue in unmatchedValues)
            {
                dt.addLeaf(unmatchedValue, returnValueIfUnmatched);
            }
            return(dt);
        }