defineStringAttribute() public méthode

public defineStringAttribute ( String name, String attributeValues ) : void
name String
attributeValues String
Résultat void
Exemple #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);
        }
Exemple #2
0
        public static DataSetSpecification createRestaurantDataSetSpec()
        {
            DataSetSpecification dss = new DataSetSpecification();

            dss.defineStringAttribute("alternate", Util.yesno());
            dss.defineStringAttribute("bar", Util.yesno());
            dss.defineStringAttribute("fri/sat", Util.yesno());
            dss.defineStringAttribute("hungry", Util.yesno());
            dss.defineStringAttribute("patrons", new String[] { "None", "Some",
                                                                "Full" });
            dss.defineStringAttribute("price", new String[] { "$", "$$", "$$$" });
            dss.defineStringAttribute("raining", Util.yesno());
            dss.defineStringAttribute("reservation", Util.yesno());
            dss.defineStringAttribute("type", new String[] { "French", "Italian",
                                                             "Thai", "Burger" });
            dss.defineStringAttribute("wait_estimate", new String[] { "0-10",
                                                                      "10-30", "30-60", ">60" });
            dss.defineStringAttribute("will_wait", Util.yesno());
            // last attribute is the target attribute unless the target is
            // explicitly reset with dss.setTarget(name)

            return(dss);
        }
	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;
	}
	public static DataSetSpecification createRestaurantDataSetSpec() {
		DataSetSpecification dss = new DataSetSpecification();
		dss.defineStringAttribute("alternate", Util.yesno());
		dss.defineStringAttribute("bar", Util.yesno());
		dss.defineStringAttribute("fri/sat", Util.yesno());
		dss.defineStringAttribute("hungry", Util.yesno());
		dss.defineStringAttribute("patrons", new String[] { "None", "Some",
				"Full" });
		dss.defineStringAttribute("price", new String[] { "$", "$$", "$$$" });
		dss.defineStringAttribute("raining", Util.yesno());
		dss.defineStringAttribute("reservation", Util.yesno());
		dss.defineStringAttribute("type", new String[] { "French", "Italian",
				"Thai", "Burger" });
		dss.defineStringAttribute("wait_estimate", new String[] { "0-10",
				"10-30", "30-60", ">60" });
		dss.defineStringAttribute("will_wait", Util.yesno());
		// last attribute is the target attribute unless the target is
		// explicitly reset with dss.setTarget(name)

		return dss;
	}