|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.cassandra.utils.StreamingHistogram
public class StreamingHistogram
Histogram that can be constructed from streaming of data. The algorithm is taken from following paper: Yael Ben-Haim and Elad Tom-Tov, "A Streaming Parallel Decision Tree Algorithm" (2010) http://jmlr.csail.mit.edu/papers/volume11/ben-haim10a/ben-haim10a.pdf
Nested Class Summary | |
---|---|
static class |
StreamingHistogram.StreamingHistogramSerializer
|
Field Summary | |
---|---|
static StreamingHistogram.StreamingHistogramSerializer |
serializer
|
Constructor Summary | |
---|---|
StreamingHistogram(int maxBinSize)
Creates a new histogram with max bin size of maxBinSize |
Method Summary | |
---|---|
java.util.Map<java.lang.Double,java.lang.Long> |
getAsMap()
|
void |
merge(StreamingHistogram other)
Merges given histogram with this histogram. |
double |
sum(double b)
Calculates estimated number of points in interval [-inf,b]. |
void |
update(double p)
Adds new point p to this histogram. |
void |
update(double p,
long m)
Adds new point p with value m to this histogram. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final StreamingHistogram.StreamingHistogramSerializer serializer
Constructor Detail |
---|
public StreamingHistogram(int maxBinSize)
maxBinSize
- maximum number of bins this histogram can haveMethod Detail |
---|
public void update(double p)
p
- public void update(double p, long m)
p
- m
- public void merge(StreamingHistogram other)
other
- histogram to mergepublic double sum(double b)
b
- upper bound of a interval to calculate sum
public java.util.Map<java.lang.Double,java.lang.Long> getAsMap()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |