Interface ICategoricalAttribute
-
- All Superinterfaces:
IAttribute,java.io.Serializable
public interface ICategoricalAttribute extends IAttribute
Categorical attributes are, by definition, a set of pairs of integers and some string label. It is clear that, for memory efficiency, categories should internally never be handled on the String basis but with internal Integer representations. Therefore, a categorical attribute has numeric VALUES (usually byte, short, or int) and string LABELS.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ICategoricalAttributeValuegetAsAttributeValue(java.lang.Object obj)java.lang.StringgetLabelOfCategory(java.lang.Number categoryId)java.util.List<java.lang.String>getLabels()intgetNumberOfCategories()booleanisBinary()-
Methods inherited from interface org.api4.java.ai.ml.core.dataset.schema.attribute.IAttribute
deserializeAttributeValue, getName, getStringDescriptionOfDomain, isValidValue, serializeAttributeValue, toDouble
-
-
-
-
Method Detail
-
getNumberOfCategories
int getNumberOfCategories()
-
getLabelOfCategory
java.lang.String getLabelOfCategory(java.lang.Number categoryId)
-
getLabels
java.util.List<java.lang.String> getLabels()
-
isBinary
boolean isBinary()
-
getAsAttributeValue
ICategoricalAttributeValue getAsAttributeValue(java.lang.Object obj)
- Specified by:
getAsAttributeValuein interfaceIAttribute
-
-