Package org.api4.java.ai.ml.core.dataset
Interface IInstance
-
- Type Parameters:
X- The type of the feature description of a single instance.
- All Known Subinterfaces:
IDyadRankingInstance,ILabeledInstance,ILabelRankingInstance,IMultiLabelClassificationInstance,IRankingInstance<O>,IRegressionInstance,ISingleLabelClassificationInstance
public interface IInstanceInstances implementing this interface have a feature description of the type X. Usually, feature descriptions are realized via double arrays. However, here it is also allowed to specify feature descriptions which are heteregoneous (e.g., a time series with single values) and may consist of complex objects (e.g., lists, arrays, graphs).
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description java.lang.Object[]getAttributes()default java.lang.ObjectgetAttributeValue(int pos)default intgetNumAttributes()double[]getPoint()default doublegetPointValue(int pos)default booleanisAttributeValuePresent(int pos)voidremoveColumn(int columnPos)voidsetAttributeValue(int pos, java.lang.Object value)Sets the value of the attribute at positionposto a new value as provided as an argument.
-
-
-
Method Detail
-
getAttributeValue
default java.lang.Object getAttributeValue(int pos)
- Parameters:
pos- The position of the feature that is to be returned.- Returns:
- The feature value at position
pos.
-
isAttributeValuePresent
default boolean isAttributeValuePresent(int pos)
-
getAttributes
java.lang.Object[] getAttributes()
-
getNumAttributes
default int getNumAttributes()
-
getPoint
double[] getPoint()
-
getPointValue
default double getPointValue(int pos)
-
removeColumn
void removeColumn(int columnPos)
-
setAttributeValue
void setAttributeValue(int pos, java.lang.Object value)Sets the value of the attribute at positionposto a new value as provided as an argument.- Parameters:
pos- The position where to replace the current value with the new value.value- The new attribute value (to replace the previous value).
-
-