Documentation of 'medusa.georgios.enhanced_mcl.Fold' Java class
Fold
medusa.georgios.enhanced_mcl

Class Fold

    • Constructor Summary

      Constructors 
      Constructor and Description
      Fold(Dataset parent, int[] indices) 
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      boolean add(Instance i)
      Add an instance to this data set.
      void add(int index, Instance element) 
      boolean addAll(java.util.Collection<? extends Instance> c) 
      boolean addAll(int index, java.util.Collection<? extends Instance> c) 
      java.util.SortedSet<java.lang.Object> classes()
      Returns a set containing all different classes in this data set.
      int classIndex(java.lang.Object clazz)
      Returns the index of the class value in the supplied data set.
      java.lang.Object classValue(int index) 
      void clear() 
      boolean contains(java.lang.Object o) 
      boolean containsAll(java.util.Collection<?> c) 
      Dataset[] folds(int numFolds, java.util.Random rg)
      Create a number of folds from the data set and return them.
      Instance get(int index) 
      int indexOf(java.lang.Object o) 
      Instance instance(int index)
      Get the instance with a certain index.
      boolean isEmpty() 
      java.util.Iterator<Instance> iterator() 
      java.util.Set<Instance> kNearest(int k, Instance inst)
      Returns the k closest instances.
      int lastIndexOf(java.lang.Object o) 
      java.util.ListIterator<Instance> listIterator() 
      java.util.ListIterator<Instance> listIterator(int index) 
      int noAttributes()
      The number of attributes in each instance.
      Instance remove(int index) 
      boolean remove(java.lang.Object o) 
      boolean removeAll(java.util.Collection<?> c) 
      boolean retainAll(java.util.Collection<?> c) 
      Instance set(int index, Instance element) 
      int size() 
      java.util.List<Instance> subList(int fromIndex, int toIndex) 
      java.lang.Object[] toArray() 
      <T> T[] toArray(T[] a) 
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.util.List

        equals, hashCode, replaceAll, sort, spliterator
      • Methods inherited from interface java.util.Collection

        parallelStream, removeIf, stream
      • Methods inherited from interface java.lang.Iterable

        forEach
    • Constructor Detail

      • Fold

        public Fold(Dataset parent,
                    int[] indices)
    • Method Detail

      • add

        public boolean add(Instance i)
        Description copied from interface: Dataset
        Add an instance to this data set. The compatibility of the new item with the items in the data set should be checked by the implementation. Incompatible items should not be added to the data set.
        Specified by:
        add in interface java.util.Collection<Instance>
        Specified by:
        add in interface java.util.List<Instance>
        Specified by:
        add in interface Dataset
        Parameters:
        i - the instance to be added
        Returns:
        true if the instance was added, otherwise false
      • classes

        public java.util.SortedSet<java.lang.Object> classes()
        Description copied from interface: Dataset
        Returns a set containing all different classes in this data set. If no classes are available, this will return the empty set.
        Specified by:
        classes in interface Dataset
        Returns:
      • folds

        public Dataset[] folds(int numFolds,
                               java.util.Random rg)
        Description copied from interface: Dataset
        Create a number of folds from the data set and return them. The supplied random generator is used to determine which instances are assigned to each of the folds.
        Specified by:
        folds in interface Dataset
        Parameters:
        numFolds - the number of folds to create
        rg - the random generator
        Returns:
        an array of data sets that contains numFolds data sets.
      • instance

        public Instance instance(int index)
        Description copied from interface: Dataset
        Get the instance with a certain index.
        Specified by:
        instance in interface Dataset
        Parameters:
        index - the index of the instance you want to retrieve.
        Returns:
      • kNearest

        public java.util.Set<Instance> kNearest(int k,
                                                Instance inst)
        Description copied from interface: Dataset
        Returns the k closest instances.
        Specified by:
        kNearest in interface Dataset
        Returns:
      • add

        public void add(int index,
                        Instance element)
        Specified by:
        add in interface java.util.List<Instance>
      • addAll

        public boolean addAll(java.util.Collection<? extends Instance> c)
        Specified by:
        addAll in interface java.util.Collection<Instance>
        Specified by:
        addAll in interface java.util.List<Instance>
      • addAll

        public boolean addAll(int index,
                              java.util.Collection<? extends Instance> c)
        Specified by:
        addAll in interface java.util.List<Instance>
      • clear

        public void clear()
        Specified by:
        clear in interface java.util.Collection<Instance>
        Specified by:
        clear in interface java.util.List<Instance>
      • contains

        public boolean contains(java.lang.Object o)
        Specified by:
        contains in interface java.util.Collection<Instance>
        Specified by:
        contains in interface java.util.List<Instance>
      • containsAll

        public boolean containsAll(java.util.Collection<?> c)
        Specified by:
        containsAll in interface java.util.Collection<Instance>
        Specified by:
        containsAll in interface java.util.List<Instance>
      • get

        public Instance get(int index)
        Specified by:
        get in interface java.util.List<Instance>
      • indexOf

        public int indexOf(java.lang.Object o)
        Specified by:
        indexOf in interface java.util.List<Instance>
      • isEmpty

        public boolean isEmpty()
        Specified by:
        isEmpty in interface java.util.Collection<Instance>
        Specified by:
        isEmpty in interface java.util.List<Instance>
      • iterator

        public java.util.Iterator<Instance> iterator()
        Specified by:
        iterator in interface java.lang.Iterable<Instance>
        Specified by:
        iterator in interface java.util.Collection<Instance>
        Specified by:
        iterator in interface java.util.List<Instance>
      • lastIndexOf

        public int lastIndexOf(java.lang.Object o)
        Specified by:
        lastIndexOf in interface java.util.List<Instance>
      • listIterator

        public java.util.ListIterator<Instance> listIterator()
        Specified by:
        listIterator in interface java.util.List<Instance>
      • listIterator

        public java.util.ListIterator<Instance> listIterator(int index)
        Specified by:
        listIterator in interface java.util.List<Instance>
      • remove

        public boolean remove(java.lang.Object o)
        Specified by:
        remove in interface java.util.Collection<Instance>
        Specified by:
        remove in interface java.util.List<Instance>
      • remove

        public Instance remove(int index)
        Specified by:
        remove in interface java.util.List<Instance>
      • removeAll

        public boolean removeAll(java.util.Collection<?> c)
        Specified by:
        removeAll in interface java.util.Collection<Instance>
        Specified by:
        removeAll in interface java.util.List<Instance>
      • retainAll

        public boolean retainAll(java.util.Collection<?> c)
        Specified by:
        retainAll in interface java.util.Collection<Instance>
        Specified by:
        retainAll in interface java.util.List<Instance>
      • size

        public int size()
        Specified by:
        size in interface java.util.Collection<Instance>
        Specified by:
        size in interface java.util.List<Instance>
      • subList

        public java.util.List<Instance> subList(int fromIndex,
                                                int toIndex)
        Specified by:
        subList in interface java.util.List<Instance>
      • toArray

        public java.lang.Object[] toArray()
        Specified by:
        toArray in interface java.util.Collection<Instance>
        Specified by:
        toArray in interface java.util.List<Instance>
      • toArray

        public <T> T[] toArray(T[] a)
        Specified by:
        toArray in interface java.util.Collection<Instance>
        Specified by:
        toArray in interface java.util.List<Instance>
      • noAttributes

        public int noAttributes()
        Description copied from interface: Dataset
        The number of attributes in each instance. This value can be off when instances have different number of attributes. When the data set contains no instances, this method should return 0.
        Specified by:
        noAttributes in interface Dataset
        Returns:
      • classIndex

        public int classIndex(java.lang.Object clazz)
        Description copied from interface: Dataset
        Returns the index of the class value in the supplied data set. This method will return -1 if the class value of this instance is not set.
        Specified by:
        classIndex in interface Dataset
        Returns:
        the index of the class value
      • classValue

        public java.lang.Object classValue(int index)
        Specified by:
        classValue in interface Dataset

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.