Class SubInstances

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Iterable<weka.core.Instance>, java.util.Collection<weka.core.Instance>, java.util.List<weka.core.Instance>, weka.core.RevisionHandler

    public class SubInstances
    extends weka.core.Instances
    See Also:
    Serialized Form
    • Field Summary

      • Fields inherited from class weka.core.Instances

        ARFF_DATA, ARFF_RELATION, FILE_EXTENSION, m_Attributes, m_ClassIndex, m_Instances, m_Lines, m_NamesToAttributeIndices, m_RelationName, SERIALIZED_OBJ_FILE_EXTENSION
      • Fields inherited from class java.util.AbstractList

        modCount
    • Constructor Summary

      Constructors 
      Constructor Description
      SubInstances​(weka.core.Instances dataset, int[] indices)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void add​(int index, weka.core.Instance instance)  
      boolean add​(weka.core.Instance instance)  
      void delete()  
      void deleteAttributeAt​(int position)  
      boolean equals​(java.lang.Object obj)  
      weka.core.Instance firstInstance()  
      weka.core.Instance get​(int index)  
      int hashCode()  
      weka.core.Instance instance​(int index)  
      int numInstances()  
      weka.core.Instance remove​(int index)  
      weka.core.Instance set​(int index, weka.core.Instance instance)  
      int size()  
      void stratify​(int numFolds)  
      protected void stratStep​(int numFolds)  
      void swap​(int i, int j)  
      java.lang.String toString()
      Returns the dataset as a string in ARFF format.
      • Methods inherited from class weka.core.Instances

        allAttributeWeightsIdentical, allInstanceWeightsIdentical, attribute, attribute, attributeStats, attributeToDoubleArray, checkForAttributeType, checkForStringAttributes, checkInstance, classAttribute, classIndex, compactify, copyInstances, delete, deleteAttributeType, deleteStringAttributes, deleteWithMissing, deleteWithMissing, deleteWithMissingClass, enumerateAttributes, enumerateInstances, equalHeaders, equalHeadersMsg, getRandomNumberGenerator, getRevision, initialize, insertAttributeAt, instancesAndWeights, kthSmallestValue, kthSmallestValue, lastInstance, main, meanOrMode, meanOrMode, mergeInstances, numAttributes, numClasses, numDistinctValues, numDistinctValues, randomize, readInstance, relationName, renameAttribute, renameAttribute, renameAttributeValue, renameAttributeValue, replaceAttributeAt, resample, resampleWithWeights, resampleWithWeights, resampleWithWeights, resampleWithWeights, resampleWithWeights, resampleWithWeights, resampleWithWeights, setAttributeWeight, setAttributeWeight, setClass, setClassIndex, setRelationName, sort, sort, sortBasedOnNominalAttribute, stableSort, stableSort, stringFreeStructure, stringWithoutHeader, sumOfWeights, test, testCV, toSummaryString, trainCV, trainCV, variance, variance, variances
      • Methods inherited from class java.util.AbstractList

        addAll, clear, indexOf, iterator, lastIndexOf, listIterator, listIterator, removeRange, subList
      • Methods inherited from class java.util.AbstractCollection

        addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray
      • 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 java.lang.Iterable

        forEach
      • Methods inherited from interface java.util.List

        addAll, contains, containsAll, isEmpty, remove, removeAll, replaceAll, retainAll, sort, spliterator, toArray, toArray
    • Constructor Detail

      • SubInstances

        public SubInstances​(weka.core.Instances dataset,
                            int[] indices)
    • Method Detail

      • add

        public boolean add​(weka.core.Instance instance)
        Specified by:
        add in interface java.util.Collection<weka.core.Instance>
        Specified by:
        add in interface java.util.List<weka.core.Instance>
        Overrides:
        add in class weka.core.Instances
      • add

        public void add​(int index,
                        weka.core.Instance instance)
        Specified by:
        add in interface java.util.List<weka.core.Instance>
        Overrides:
        add in class weka.core.Instances
      • delete

        public void delete()
        Overrides:
        delete in class weka.core.Instances
      • deleteAttributeAt

        public void deleteAttributeAt​(int position)
        Overrides:
        deleteAttributeAt in class weka.core.Instances
      • firstInstance

        public weka.core.Instance firstInstance()
        Overrides:
        firstInstance in class weka.core.Instances
      • instance

        public weka.core.Instance instance​(int index)
        Overrides:
        instance in class weka.core.Instances
      • get

        public weka.core.Instance get​(int index)
        Specified by:
        get in interface java.util.List<weka.core.Instance>
        Overrides:
        get in class weka.core.Instances
      • numInstances

        public int numInstances()
        Overrides:
        numInstances in class weka.core.Instances
      • size

        public int size()
        Specified by:
        size in interface java.util.Collection<weka.core.Instance>
        Specified by:
        size in interface java.util.List<weka.core.Instance>
        Overrides:
        size in class weka.core.Instances
      • remove

        public weka.core.Instance remove​(int index)
        Specified by:
        remove in interface java.util.List<weka.core.Instance>
        Overrides:
        remove in class weka.core.Instances
      • set

        public weka.core.Instance set​(int index,
                                      weka.core.Instance instance)
        Specified by:
        set in interface java.util.List<weka.core.Instance>
        Overrides:
        set in class weka.core.Instances
      • stratify

        public void stratify​(int numFolds)
        Overrides:
        stratify in class weka.core.Instances
      • toString

        public java.lang.String toString()
        Returns the dataset as a string in ARFF format. Strings are quoted if they contain whitespace characters, or if they are a question mark.
        Overrides:
        toString in class weka.core.Instances
        Returns:
        the dataset in ARFF format as a string
      • stratStep

        protected void stratStep​(int numFolds)
        Overrides:
        stratStep in class weka.core.Instances
      • swap

        public void swap​(int i,
                         int j)
        Overrides:
        swap in class weka.core.Instances
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in interface java.util.Collection<weka.core.Instance>
        Specified by:
        hashCode in interface java.util.List<weka.core.Instance>
        Overrides:
        hashCode in class java.util.AbstractList<weka.core.Instance>
      • equals

        public boolean equals​(java.lang.Object obj)
        Specified by:
        equals in interface java.util.Collection<weka.core.Instance>
        Specified by:
        equals in interface java.util.List<weka.core.Instance>
        Overrides:
        equals in class java.util.AbstractList<weka.core.Instance>