T - The data type for the object being sampledpublic class CentroidDistanceBasedSamplingRankFunction<T> extends Object implements SamplingRankFunction<T>
SampleProbabilityFn.
The farther the distance, the higher the rank.
| Modifier and Type | Field and Description |
|---|---|
protected AnalyticItemWrapperFactory<T> |
itemWrapperFactory |
protected static org.slf4j.Logger |
LOGGER |
| Constructor and Description |
|---|
CentroidDistanceBasedSamplingRankFunction() |
| Modifier and Type | Method and Description |
|---|---|
void |
initialize(org.apache.hadoop.mapreduce.JobContext context,
Class<?> scope,
org.slf4j.Logger logger) |
double |
rank(int sampleSize,
T value) |
static void |
setParameters(org.apache.hadoop.conf.Configuration config,
Class<?> scope,
PropertyManagement runTimeProperties) |
protected static final org.slf4j.Logger LOGGER
protected AnalyticItemWrapperFactory<T> itemWrapperFactory
public CentroidDistanceBasedSamplingRankFunction()
public static void setParameters(org.apache.hadoop.conf.Configuration config,
Class<?> scope,
PropertyManagement runTimeProperties)
public void initialize(org.apache.hadoop.mapreduce.JobContext context,
Class<?> scope,
org.slf4j.Logger logger)
throws IOException
initialize in interface SamplingRankFunction<T>IOExceptionpublic double rank(int sampleSize,
T value)
rank in interface SamplingRankFunction<T>Copyright © 2013–2019. All rights reserved.