Class DenseInstance

  • All Implemented Interfaces:
    IClusterableInstance, java.io.Serializable, 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 DenseInstance
    extends AInstance
    implements java.io.Serializable
    See Also:
    Serialized Form
    • Constructor Detail

      • DenseInstance

        public DenseInstance()
      • DenseInstance

        public DenseInstance​(java.lang.Object[] attributes,
                             java.lang.Object label)
      • DenseInstance

        public DenseInstance​(java.util.List<java.lang.Object> attributes,
                             java.lang.Object label)
    • Method Detail

      • getAttributeValue

        public java.lang.Object getAttributeValue​(int pos)
        Specified by:
        getAttributeValue in interface org.api4.java.ai.ml.core.dataset.IInstance
      • 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
      • getPointValue

        public double getPointValue​(int pos)
        Specified by:
        getPointValue 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
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object