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

Interface Dataset

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method and Description
      boolean add(Instance i)
      Add an instance to this data set.
      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) 
      Dataset[] folds(int numFolds, java.util.Random rg)
      Create a number of folds from the data set and return them.
      Instance instance(int index)
      Get the instance with a certain index.
      java.util.Set<Instance> kNearest(int k, Instance inst)
      Returns the k closest instances.
      int noAttributes()
      The number of attributes in each instance.
      • Methods inherited from interface java.util.List

        add, addAll, addAll, clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray
      • Methods inherited from interface java.util.Collection

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

        forEach
    • Method Detail

      • kNearest

        java.util.Set<Instance> kNearest(int k,
                                         Instance inst)
        Returns the k closest instances.
        Parameters:
        k -
        dm -
        inst -
        Returns:
      • classes

        java.util.SortedSet<java.lang.Object> classes()
        Returns a set containing all different classes in this data set. If no classes are available, this will return the empty set.
        Returns:
      • add

        boolean add(Instance i)
        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>
        Parameters:
        i - the instance to be added
        Returns:
        true if the instance was added, otherwise false
      • instance

        Instance instance(int index)
        Get the instance with a certain index.
        Parameters:
        index - the index of the instance you want to retrieve.
        Returns:
      • folds

        Dataset[] folds(int numFolds,
                        java.util.Random rg)
        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.
        Parameters:
        numFolds - the number of folds to create
        rg - the random generator
        Returns:
        an array of data sets that contains numFolds data sets.
      • noAttributes

        int noAttributes()
        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.
        Returns:
      • classIndex

        int classIndex(java.lang.Object clazz)
        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.
        Parameters:
        data - the data set to give the index for
        Returns:
        the index of the class value
      • classValue

        java.lang.Object classValue(int index)

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.