Interface ILabeledInstance
-
- All Superinterfaces:
IInstance
- All Known Subinterfaces:
IDyadRankingInstance,ILabelRankingInstance,IMultiLabelClassificationInstance,IRankingInstance<O>,IRegressionInstance,ISingleLabelClassificationInstance
public interface ILabeledInstance extends IInstance
Interface of an instance that has a target value.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description java.lang.ObjectgetLabel()Getter for the value of the target attribute.default booleanisLabelPresent()Tells whether the label is really there.voidsetAttributeValue(int pos, java.lang.Object value)Sets the value of the attribute at positionposto a new value as provided as an argument.voidsetLabel(java.lang.Object obj)Sets the label of this instance to a new value as provided as an argument.-
Methods inherited from interface org.api4.java.ai.ml.core.dataset.IInstance
getAttributes, getAttributeValue, getNumAttributes, getPoint, getPointValue, isAttributeValuePresent, removeColumn
-
-
-
-
Method Detail
-
getLabel
java.lang.Object getLabel()
Getter for the value of the target attribute.- Parameters:
type- The type to bind the value of the target attribute.- Returns:
- The value of the target attribute.
-
isLabelPresent
default boolean isLabelPresent()
Tells whether the label is really there.- Returns:
-
setLabel
void setLabel(java.lang.Object obj)
Sets the label of this instance to a new value as provided as an argument.- Parameters:
obj- The new label value for this instance.
-
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.- Specified by:
setAttributeValuein interfaceIInstance- Parameters:
pos- The position where to replace the current value with the new value.value- The new attribute value (to replace the previous value).
-
-