Package org.datavec.api.transform.ops
Class AggregatorImpls.AggregableCountUnique<T>
- java.lang.Object
-
- org.datavec.api.transform.ops.AggregatorImpls.AggregableCountUnique<T>
-
- Type Parameters:
T
-
- All Implemented Interfaces:
Serializable
,IAggregableReduceOp<T,Writable>
,Consumer<T>
,Supplier<Writable>
- Enclosing class:
- AggregatorImpls
public static class AggregatorImpls.AggregableCountUnique<T> extends Object implements IAggregableReduceOp<T,Writable>
This distinct count is based on streamlib's implementation of "HyperLogLog in Practice: Algorithmic Engineering of a State of The Art Cardinality Estimation Algorithm", available here. The relative accuracy is approximately `1.054 / sqrt(2^p)`. Setting a nonzero `sp > p` in HyperLogLogPlus(p, sp) would trigger sparse representation of registers, which may reduce the memory consumption and increase accuracy when the cardinality is small.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description AggregableCountUnique(float precision)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
accept(T element)
<U extends IAggregableReduceOp<T,Writable>>
voidcombine(U acc)
Writable
get()
-
-
-
Method Detail
-
combine
public <U extends IAggregableReduceOp<T,Writable>> void combine(U acc)
- Specified by:
combine
in interfaceIAggregableReduceOp<T,Writable>
-
-