AIMA.Core.Learning.Framework.DataSetSpecification.defineStringAttribute C# (CSharp) Method

defineStringAttribute() public method

public defineStringAttribute ( String name, String attributeValues ) : void
name String
attributeValues String
return void
        public void defineStringAttribute(String name, String[] attributeValues)
        {
            attributeSpecifications.Add(new StringAttributeSpecification(name,
                    attributeValues));
            setTarget(name);// target defaults to last column added
        }

Usage Example

Example #1
0
        public static DataSetSpecification createIrisDataSetSpec()
        {
            DataSetSpecification dss = new DataSetSpecification();

            dss.defineNumericAttribute("sepal_length");
            dss.defineNumericAttribute("sepal_width");
            dss.defineNumericAttribute("petal_length");
            dss.defineNumericAttribute("petal_width");
            dss.defineStringAttribute("plant_category", new String[] { "setosa",
                                                                       "versicolor", "virginica" });
            return(dss);
        }
All Usage Examples Of AIMA.Core.Learning.Framework.DataSetSpecification::defineStringAttribute