public class JaccardSimilarity
extends org.apache.pig.EvalFunc<org.apache.pig.data.Tuple>
Constructor and Description |
---|
JaccardSimilarity()
Default constructor to make pig validation happy.
|
JaccardSimilarity(long seed)
Base constructor.
|
JaccardSimilarity(String seedStr)
String constructor.
|
Modifier and Type | Method and Description |
---|---|
org.apache.pig.data.Tuple |
exec(org.apache.pig.data.Tuple inputTuple)
Top Level Exec Function.
|
allowCompileTimeCalculation, finish, getArgToFuncMapping, getCacheFiles, getInputSchema, getLoadCaster, getLogger, getPigLogger, getReporter, getReturnType, getSchemaName, getSchemaType, getShipFiles, isAsynchronous, needEndOfAllInputProcessing, outputSchema, progress, setEndOfAllInput, setInputSchema, setPigLogger, setReporter, setUDFContextSignature, warn
public JaccardSimilarity()
public JaccardSimilarity(String seedStr)
seedStr
- See Update Hash Seedpublic JaccardSimilarity(long seed)
seed
- See Update Hash Seed.public org.apache.pig.data.Tuple exec(org.apache.pig.data.Tuple inputTuple) throws IOException
This method accepts a Sketch JaccardSimilarityAB Input Tuple and returns a Tuple {LowerBound, Estimate, UpperBound} of the Jaccard ratio. The Upper and Lower bounds are for a confidence interval of 95.4% or +/- 2 standard deviations.
Sketch JaccardSimilarityAB Input TupleAny other input tuple will throw an exception!
Tuple {LowerBound, Estimate, UpperBound}exec
in class org.apache.pig.EvalFunc<org.apache.pig.data.Tuple>
org.apache.pig.backend.executionengine.ExecException
- from Pig.IOException
Copyright © 2015–2019 The Apache Software Foundation. All rights reserved.