Class 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
    • Nested Class Summary

      • Nested classes/interfaces inherited from class java.util.AbstractMap

        java.util.AbstractMap.SimpleEntry<K extends java.lang.Object,​V extends java.lang.Object>, java.util.AbstractMap.SimpleImmutableEntry<K extends java.lang.Object,​V extends java.lang.Object>
      • Nested classes/interfaces inherited from interface java.util.Map

        java.util.Map.Entry<K extends java.lang.Object,​V extends java.lang.Object>
    • 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
      boolean equals​(java.lang.Object obj)  
      java.lang.Object[] getAttributes()  
      java.lang.Object getLabel()  
      double[] getPoint()  
      int hashCode()  
      void removeColumn​(int columnPos)  
      void setAttributeValue​(int pos, java.lang.Object value)  
      void setLabel​(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.util.AbstractMap

        toString
      • Methods inherited from class java.lang.Object

        finalize, getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface org.api4.java.ai.ml.core.dataset.IInstance

        getAttributeValue, getNumAttributes, getPointValue, isAttributeValuePresent
      • Methods inherited from interface org.api4.java.ai.ml.core.dataset.supervised.ILabeledInstance

        isLabelPresent
    • Constructor Detail

      • MapInstance

        public MapInstance​(org.api4.java.ai.ml.core.dataset.schema.ILabeledInstanceSchema scheme,
                           org.api4.java.ai.ml.core.dataset.schema.attribute.IAttribute labelAttribute)
    • Method Detail

      • setAttributeValue

        public void setAttributeValue​(int pos,
                                      java.lang.Object value)
        Specified by:
        setAttributeValue in interface org.api4.java.ai.ml.core.dataset.IInstance
        Specified by:
        setAttributeValue in interface org.api4.java.ai.ml.core.dataset.supervised.ILabeledInstance
      • getAttributes

        public java.lang.Object[] getAttributes()
        Specified by:
        getAttributes in interface org.api4.java.ai.ml.core.dataset.IInstance
      • getPoint

        public double[] getPoint()
        Specified by:
        getPoint in interface org.apache.commons.math3.ml.clustering.Clusterable
        Specified by:
        getPoint in interface org.api4.java.ai.ml.core.dataset.IInstance
      • removeColumn

        public void removeColumn​(int columnPos)
        Specified by:
        removeColumn in interface org.api4.java.ai.ml.core.dataset.IInstance
      • getLabel

        public java.lang.Object getLabel()
        Specified by:
        getLabel in interface org.api4.java.ai.ml.core.dataset.supervised.ILabeledInstance
      • setLabel

        public void setLabel​(java.lang.Object obj)
        Specified by:
        setLabel in interface org.api4.java.ai.ml.core.dataset.supervised.ILabeledInstance
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in interface java.util.Map<org.api4.java.ai.ml.core.dataset.schema.attribute.IAttribute,​java.lang.Object>
        Overrides:
        hashCode in class java.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:
        equals in interface java.util.Map<org.api4.java.ai.ml.core.dataset.schema.attribute.IAttribute,​java.lang.Object>
        Overrides:
        equals in class java.util.AbstractMap<org.api4.java.ai.ml.core.dataset.schema.attribute.IAttribute,​java.lang.Object>