Package ai.libs.jaicore.ml.core.dataset
Class MapInstance
- java.lang.Object
-
- java.util.AbstractMap<K,V>
-
- java.util.HashMap<org.api4.java.ai.ml.core.dataset.schema.attribute.IAttribute,java.lang.Object>
-
- ai.libs.jaicore.ml.core.dataset.MapInstance
-
- All Implemented Interfaces:
IClusterableInstance,java.io.Serializable,java.lang.Cloneable,java.util.Map<org.api4.java.ai.ml.core.dataset.schema.attribute.IAttribute,java.lang.Object>,org.apache.commons.math3.ml.clustering.Clusterable,org.api4.java.ai.ml.core.dataset.IInstance,org.api4.java.ai.ml.core.dataset.supervised.ILabeledInstance
public class MapInstance extends java.util.HashMap<org.api4.java.ai.ml.core.dataset.schema.attribute.IAttribute,java.lang.Object> implements IClusterableInstance
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description MapInstance(org.api4.java.ai.ml.core.dataset.schema.ILabeledInstanceSchema scheme, org.api4.java.ai.ml.core.dataset.schema.attribute.IAttribute labelAttribute)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)java.lang.Object[]getAttributes()java.lang.ObjectgetLabel()double[]getPoint()inthashCode()voidremoveColumn(int columnPos)voidsetAttributeValue(int pos, java.lang.Object value)voidsetLabel(java.lang.Object obj)-
Methods inherited from class java.util.HashMap
clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
-
-
-
Method Detail
-
setAttributeValue
public void setAttributeValue(int pos, java.lang.Object value)- Specified by:
setAttributeValuein interfaceorg.api4.java.ai.ml.core.dataset.IInstance- Specified by:
setAttributeValuein interfaceorg.api4.java.ai.ml.core.dataset.supervised.ILabeledInstance
-
getAttributes
public java.lang.Object[] getAttributes()
- Specified by:
getAttributesin interfaceorg.api4.java.ai.ml.core.dataset.IInstance
-
getPoint
public double[] getPoint()
- Specified by:
getPointin interfaceorg.apache.commons.math3.ml.clustering.Clusterable- Specified by:
getPointin interfaceorg.api4.java.ai.ml.core.dataset.IInstance
-
removeColumn
public void removeColumn(int columnPos)
- Specified by:
removeColumnin interfaceorg.api4.java.ai.ml.core.dataset.IInstance
-
getLabel
public java.lang.Object getLabel()
- Specified by:
getLabelin interfaceorg.api4.java.ai.ml.core.dataset.supervised.ILabeledInstance
-
setLabel
public void setLabel(java.lang.Object obj)
- Specified by:
setLabelin interfaceorg.api4.java.ai.ml.core.dataset.supervised.ILabeledInstance
-
hashCode
public int hashCode()
- Specified by:
hashCodein interfacejava.util.Map<org.api4.java.ai.ml.core.dataset.schema.attribute.IAttribute,java.lang.Object>- Overrides:
hashCodein classjava.util.AbstractMap<org.api4.java.ai.ml.core.dataset.schema.attribute.IAttribute,java.lang.Object>
-
equals
public boolean equals(java.lang.Object obj)
- Specified by:
equalsin interfacejava.util.Map<org.api4.java.ai.ml.core.dataset.schema.attribute.IAttribute,java.lang.Object>- Overrides:
equalsin classjava.util.AbstractMap<org.api4.java.ai.ml.core.dataset.schema.attribute.IAttribute,java.lang.Object>
-
-