AIMA.Core.Learning.Inductive.DecisionTree.getStumpFor C# (CSharp) Method

getStumpFor() public static method

public static getStumpFor ( DataSet ds, String attributeName, String attributeValue, String returnValueIfMatched, List unmatchedValues, String returnValueIfUnmatched ) : DecisionTree
ds AIMA.Core.Learning.Framework.DataSet
attributeName String
attributeValue String
returnValueIfMatched String
unmatchedValues List
returnValueIfUnmatched String
return DecisionTree
        public static DecisionTree getStumpFor(DataSet ds, String attributeName,
                String attributeValue, String returnValueIfMatched,
                List<String> unmatchedValues, String returnValueIfUnmatched)
        {
            DecisionTree dt = new DecisionTree(attributeName);
            dt.addLeaf(attributeValue, returnValueIfMatched);
            foreach (String unmatchedValue in unmatchedValues)
            {
                dt.addLeaf(unmatchedValue, returnValueIfUnmatched);
            }
            return dt;
        }