Class WekaInstances

  • All Implemented Interfaces:
    IWekaInstances, java.lang.Iterable<IWekaInstance>, java.util.Collection<IWekaInstance>, java.util.List<IWekaInstance>, org.api4.java.ai.ml.core.dataset.IDataset<IWekaInstance>, org.api4.java.ai.ml.core.dataset.IDataSource<IWekaInstance>, org.api4.java.ai.ml.core.dataset.schema.IInstanceSchemaHandler, org.api4.java.ai.ml.core.dataset.schema.ILabeledInstanceSchemaHandler, org.api4.java.ai.ml.core.dataset.supervised.ILabeledDataset<IWekaInstance>, org.api4.java.ai.ml.core.dataset.supervised.ILabeledDataSource<IWekaInstance>, org.api4.java.common.attributedobjects.IListDecorator<weka.core.Instances,​weka.core.Instance,​IWekaInstance>, org.api4.java.common.reconstruction.IReconstructible

    public class WekaInstances
    extends java.lang.Object
    implements IWekaInstances, org.api4.java.common.attributedobjects.IListDecorator<weka.core.Instances,​weka.core.Instance,​IWekaInstance>, org.api4.java.common.reconstruction.IReconstructible
    • Constructor Summary

      Constructors 
      Constructor Description
      WekaInstances​(org.api4.java.ai.ml.core.dataset.supervised.ILabeledDataset<? extends org.api4.java.ai.ml.core.dataset.supervised.ILabeledInstance> dataset)  
      WekaInstances​(weka.core.Instances dataset)  
      WekaInstances​(weka.core.Instances dataset, org.api4.java.ai.ml.core.dataset.schema.ILabeledInstanceSchema schema)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addInstruction​(org.api4.java.common.reconstruction.IReconstructionInstruction instruction)  
      org.api4.java.ai.ml.core.dataset.IDataset<IWekaInstance> createCopy()  
      IWekaInstances createEmptyCopy()  
      boolean equals​(java.lang.Object obj)  
      org.api4.java.common.reconstruction.IReconstructionPlan getConstructionPlan()  
      java.lang.reflect.Constructor<? extends IWekaInstance> getConstructorForDecoratingItems()  
      java.lang.Object[][] getFeatureMatrix()  
      int getFrequency​(IWekaInstance instance)  
      weka.core.Instances getInstances()  
      org.api4.java.ai.ml.core.dataset.schema.ILabeledInstanceSchema getInstanceSchema()  
      java.lang.Object[] getLabelVector()  
      weka.core.Instances getList()  
      java.lang.Class<weka.core.Instance> getTypeOfDecoratedItems()  
      java.lang.Class<IWekaInstance> getTypeOfDecoratingItems()  
      int hashCode()  
      void removeColumn​(int columnPos)  
      void removeColumn​(java.lang.String columnName)  
      void removeColumn​(org.api4.java.ai.ml.core.dataset.schema.attribute.IAttribute attribute)  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface java.util.Collection

        parallelStream, removeIf, stream, toArray
      • Methods inherited from interface org.api4.java.ai.ml.core.dataset.IDataset

        getClassOfInstances
      • Methods inherited from interface org.api4.java.ai.ml.core.dataset.schema.IInstanceSchemaHandler

        getAttribute, getListOfAttributes, getNumAttributes
      • Methods inherited from interface org.api4.java.ai.ml.core.dataset.schema.ILabeledInstanceSchemaHandler

        getLabelAttribute, getRelationName
      • Methods inherited from interface org.api4.java.common.attributedobjects.IListDecorator

        add, add, addAll, addAll, clear, contains, containsAll, get, getDecorationForElement, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, retainAll, set, size, subList, toArray, toArray
      • Methods inherited from interface java.lang.Iterable

        forEach
      • Methods inherited from interface java.util.List

        replaceAll, sort, spliterator
    • Constructor Detail

      • WekaInstances

        public WekaInstances​(weka.core.Instances dataset)
      • WekaInstances

        public WekaInstances​(weka.core.Instances dataset,
                             org.api4.java.ai.ml.core.dataset.schema.ILabeledInstanceSchema schema)
      • WekaInstances

        public WekaInstances​(org.api4.java.ai.ml.core.dataset.supervised.ILabeledDataset<? extends org.api4.java.ai.ml.core.dataset.supervised.ILabeledInstance> dataset)
    • Method Detail

      • removeColumn

        public void removeColumn​(int columnPos)
        Specified by:
        removeColumn in interface org.api4.java.ai.ml.core.dataset.IDataset<IWekaInstance>
      • createEmptyCopy

        public IWekaInstances createEmptyCopy()
                                       throws org.api4.java.ai.ml.core.exception.DatasetCreationException
        Specified by:
        createEmptyCopy in interface org.api4.java.ai.ml.core.dataset.IDataset<IWekaInstance>
        Specified by:
        createEmptyCopy in interface org.api4.java.ai.ml.core.dataset.IDataSource<IWekaInstance>
        Specified by:
        createEmptyCopy in interface org.api4.java.ai.ml.core.dataset.supervised.ILabeledDataset<IWekaInstance>
        Specified by:
        createEmptyCopy in interface IWekaInstances
        Throws:
        org.api4.java.ai.ml.core.exception.DatasetCreationException
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in interface java.util.Collection<IWekaInstance>
        Specified by:
        hashCode in interface java.util.List<IWekaInstance>
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Specified by:
        equals in interface java.util.Collection<IWekaInstance>
        Specified by:
        equals in interface java.util.List<IWekaInstance>
        Overrides:
        equals in class java.lang.Object
      • getFrequency

        public int getFrequency​(IWekaInstance instance)
      • toString

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

        public java.lang.Class<IWekaInstance> getTypeOfDecoratingItems()
        Specified by:
        getTypeOfDecoratingItems in interface org.api4.java.common.attributedobjects.IListDecorator<weka.core.Instances,​weka.core.Instance,​IWekaInstance>
      • getTypeOfDecoratedItems

        public java.lang.Class<weka.core.Instance> getTypeOfDecoratedItems()
        Specified by:
        getTypeOfDecoratedItems in interface org.api4.java.common.attributedobjects.IListDecorator<weka.core.Instances,​weka.core.Instance,​IWekaInstance>
      • getConstructorForDecoratingItems

        public java.lang.reflect.Constructor<? extends IWekaInstance> getConstructorForDecoratingItems()
        Specified by:
        getConstructorForDecoratingItems in interface org.api4.java.common.attributedobjects.IListDecorator<weka.core.Instances,​weka.core.Instance,​IWekaInstance>
      • getList

        public weka.core.Instances getList()
        Specified by:
        getList in interface org.api4.java.common.attributedobjects.IListDecorator<weka.core.Instances,​weka.core.Instance,​IWekaInstance>
        Specified by:
        getList in interface IWekaInstances
      • createCopy

        public org.api4.java.ai.ml.core.dataset.IDataset<IWekaInstance> createCopy()
                                                                            throws org.api4.java.ai.ml.core.exception.DatasetCreationException,
                                                                                   java.lang.InterruptedException
        Specified by:
        createCopy in interface org.api4.java.ai.ml.core.dataset.IDataset<IWekaInstance>
        Specified by:
        createCopy in interface org.api4.java.ai.ml.core.dataset.IDataSource<IWekaInstance>
        Throws:
        org.api4.java.ai.ml.core.exception.DatasetCreationException
        java.lang.InterruptedException
      • getLabelVector

        public java.lang.Object[] getLabelVector()
        Specified by:
        getLabelVector in interface org.api4.java.ai.ml.core.dataset.supervised.ILabeledDataset<IWekaInstance>
      • getInstanceSchema

        public org.api4.java.ai.ml.core.dataset.schema.ILabeledInstanceSchema getInstanceSchema()
        Specified by:
        getInstanceSchema in interface org.api4.java.ai.ml.core.dataset.schema.IInstanceSchemaHandler
        Specified by:
        getInstanceSchema in interface org.api4.java.ai.ml.core.dataset.schema.ILabeledInstanceSchemaHandler
      • getFeatureMatrix

        public java.lang.Object[][] getFeatureMatrix()
        Specified by:
        getFeatureMatrix in interface org.api4.java.ai.ml.core.dataset.IDataset<IWekaInstance>
      • removeColumn

        public void removeColumn​(java.lang.String columnName)
        Specified by:
        removeColumn in interface org.api4.java.ai.ml.core.dataset.IDataset<IWekaInstance>
      • removeColumn

        public void removeColumn​(org.api4.java.ai.ml.core.dataset.schema.attribute.IAttribute attribute)
        Specified by:
        removeColumn in interface org.api4.java.ai.ml.core.dataset.IDataset<IWekaInstance>
      • getConstructionPlan

        public org.api4.java.common.reconstruction.IReconstructionPlan getConstructionPlan()
        Specified by:
        getConstructionPlan in interface org.api4.java.common.reconstruction.IReconstructible
      • addInstruction

        public void addInstruction​(org.api4.java.common.reconstruction.IReconstructionInstruction instruction)
        Specified by:
        addInstruction in interface org.api4.java.common.reconstruction.IReconstructible