Class Sample<T>

java.lang.Object
org.aksw.commons.collections.Sample<T>

public class Sample<T> extends Object
Created by Claus Stadler Date: Oct 12, 2010 Time: 5:51:59 PM A pair of sets of positives and negative examples. This class is intended to be used e.g. for training sets, test sets, in information retrieval / machine learning scenarios and such. But also for keeping track of the sets of constant values a variable in e.g. jena expression may have.
  • Constructor Details

    • Sample

      public Sample(Set<T> positives, Set<T> negatives)
  • Method Details

    • create

      public static <T> Sample<T> create()
    • createCopy

      public static <T> Sample<T> createCopy(Sample<T> other)
    • createCopy

      public static <T> Sample<T> createCopy(Collection<T> positives, Collection<T> negatives)
    • create

      public static <T> Sample<T> create(Sample<T> other)
    • create

      public static <T> Sample<T> create(Set<T> positives, Set<T> negatives)
    • getPositives

      public Set<T> getPositives()
    • getNegatives

      public Set<T> getNegatives()
    • addAll

      public void addAll(Sample<T> other)
    • addAll

      public void addAll(Collection<? extends T> positives, Collection<? extends T> negatives)
    • clear

      public void clear()
    • isEmpty

      public boolean isEmpty()
    • toString

      public String toString()
      Overrides:
      toString in class Object