Class WekaInstance

  • All Implemented Interfaces:
    IWekaInstance, org.apache.commons.math3.ml.clustering.Clusterable, org.api4.java.ai.ml.core.dataset.IInstance, org.api4.java.ai.ml.core.dataset.supervised.ILabeledInstance, org.api4.java.common.attributedobjects.IElementDecorator<weka.core.Instance>

    public class WekaInstance
    extends ai.libs.jaicore.basic.sets.ElementDecorator<weka.core.Instance>
    implements IWekaInstance
    • Constructor Summary

      Constructors 
      Constructor Description
      WekaInstance​(org.api4.java.ai.ml.core.dataset.schema.ILabeledInstanceSchema schema, org.api4.java.ai.ml.core.dataset.supervised.ILabeledInstance instance)  
      WekaInstance​(weka.core.Instance instance)  
    • 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.Double getAttributeValue​(int pos)  
      java.lang.Number getLabel()  
      double[] getPoint()  
      double getPointValue​(int pos)  
      int hashCode()  
      void removeColumn​(int columnPos)  
      void setAttributeValue​(int pos, java.lang.Object value)  
      void setLabel​(java.lang.Object obj)  
      java.lang.String toString()  
      • Methods inherited from class ai.libs.jaicore.basic.sets.ElementDecorator

        getElement
      • Methods inherited from class java.lang.Object

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

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

        isLabelPresent
    • Constructor Detail

      • WekaInstance

        public WekaInstance​(weka.core.Instance instance)
      • WekaInstance

        public WekaInstance​(org.api4.java.ai.ml.core.dataset.schema.ILabeledInstanceSchema schema,
                            org.api4.java.ai.ml.core.dataset.supervised.ILabeledInstance instance)
                     throws org.api4.java.ai.ml.core.dataset.serialization.UnsupportedAttributeTypeException
        Throws:
        org.api4.java.ai.ml.core.dataset.serialization.UnsupportedAttributeTypeException
    • Method Detail

      • getLabel

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

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

        public void setLabel​(java.lang.Object obj)
        Specified by:
        setLabel in interface org.api4.java.ai.ml.core.dataset.supervised.ILabeledInstance
      • 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
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class ai.libs.jaicore.basic.sets.ElementDecorator<weka.core.Instance>
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class ai.libs.jaicore.basic.sets.ElementDecorator<weka.core.Instance>
      • toString

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