org.aksw.commons.collections
Class SampleStats<T>

java.lang.Object
  extended by org.aksw.commons.collections.SampleStats<T>
Type Parameters:
T -

public class SampleStats<T>
extends Object

all.negatives may be null, however all other fields must be given!


Method Summary
static
<T> SampleStats
create(Sample<T> all, Set<T> examples)
           
static
<T> SampleStats
create(Sample<T> pool, Set<T> examples, Sample<T> all)
          Statistics for the pool All positives that are not in the pool are removed from the examples
static
<T> SampleStats
create(Set<T> allPositives, Set<T> allNegatives, Set<T> examples)
           
static double fMeasure(double precision, double recall)
           
static String formatHumanReadable(SampleStats<?> stats)
           
 Sample<T> getAll()
           
 Set<T> getExamples()
           
 Sample<? extends T> getFalse()
           
 double getFMeasure()
           
 double getPrecision()
           
 double getRecall()
           
 Sample<? extends T> getTrue()
           
 String toString()
           
static String toStringWithSize(Collection<?> collection)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

create

public static <T> SampleStats create(Sample<T> all,
                                     Set<T> examples)

create

public static <T> SampleStats create(Sample<T> pool,
                                     Set<T> examples,
                                     Sample<T> all)
Statistics for the pool All positives that are not in the pool are removed from the examples


create

public static <T> SampleStats create(Set<T> allPositives,
                                     Set<T> allNegatives,
                                     Set<T> examples)

getAll

public Sample<T> getAll()

getExamples

public Set<T> getExamples()

getTrue

public Sample<? extends T> getTrue()

getFalse

public Sample<? extends T> getFalse()

getPrecision

public double getPrecision()

getRecall

public double getRecall()

getFMeasure

public double getFMeasure()

fMeasure

public static double fMeasure(double precision,
                              double recall)

toString

public String toString()
Overrides:
toString in class Object

formatHumanReadable

public static String formatHumanReadable(SampleStats<?> stats)

toStringWithSize

public static String toStringWithSize(Collection<?> collection)


Copyright © 2011. All Rights Reserved.