AIMA.Core.Learning.Framework.Example.getAttributeValueAsString C# (CSharp) Метод

getAttributeValueAsString() публичный Метод

public getAttributeValueAsString ( String attributeName ) : String
attributeName String
Результат String
	public String getAttributeValueAsString(String attributeName) {
		return attributes[attributeName].valueAsString();
	}

Usage Example

Пример #1
0
        public Pair<List<Double>, List<Double>> numerize(Example e)
        {
            List<Double> input = new List<Double>();
            List<Double> desiredOutput = new List<Double>();

            double sepal_length = e.getAttributeValueAsDouble("sepal_length");
            double sepal_width = e.getAttributeValueAsDouble("sepal_width");
            double petal_length = e.getAttributeValueAsDouble("petal_length");
            double petal_width = e.getAttributeValueAsDouble("petal_width");

            input.Add(sepal_length);
            input.Add(sepal_width);
            input.Add(petal_length);
            input.Add(petal_width);

            String plant_category_string = e
                    .getAttributeValueAsString("plant_category");

            desiredOutput = convertCategoryToListOfDoubles(plant_category_string);

            Pair<List<Double>, List<Double>> io = new Pair<List<Double>, List<Double>>(
                    input, desiredOutput);

            return io;
        }
All Usage Examples Of AIMA.Core.Learning.Framework.Example::getAttributeValueAsString