public class FooKernelFunction extends AbstractPrimitiveDistanceFunction<NumberVector<?>,DoubleDistance> implements PrimitiveSimilarityFunction<NumberVector<?>,DoubleDistance>
Modifier and Type | Class and Description |
---|---|
static class |
FooKernelFunction.Parameterizer
Parameterization class.
|
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_MAX_DEGREE
The default max_degree.
|
private int |
max_degree
Degree of the polynomial kernel function
|
static OptionID |
MAX_DEGREE_ID
Parameter for the maximum degree
|
Constructor and Description |
---|
FooKernelFunction(int max_degree)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
DoubleDistance |
distance(NumberVector<?> fv1,
NumberVector<?> fv2)
Computes the distance between two given DatabaseObjects according to this
distance function.
|
DoubleDistance |
getDistanceFactory()
Method to get the distance functions factory.
|
VectorFieldTypeInformation<? super NumberVector<?>> |
getInputTypeRestriction()
Get the input data type of the function.
|
<T extends NumberVector<?>> |
instantiate(Relation<T> database)
Instantiate with a database to get the actual distance query.
|
DoubleDistance |
similarity(NumberVector<?> o1,
NumberVector<?> o2)
Provides an experimental kernel similarity between the given two vectors.
|
isMetric, isSymmetric
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
isSymmetric
public static final int DEFAULT_MAX_DEGREE
public static final OptionID MAX_DEGREE_ID
private int max_degree
public FooKernelFunction(int max_degree)
max_degree
- Maximum degree-public DoubleDistance similarity(NumberVector<?> o1, NumberVector<?> o2)
similarity
in interface PrimitiveSimilarityFunction<NumberVector<?>,DoubleDistance>
o1
- first vectoro2
- second vectorDoubleDistance
.public DoubleDistance distance(NumberVector<?> fv1, NumberVector<?> fv2)
PrimitiveDistanceFunction
distance
in interface PrimitiveDistanceFunction<NumberVector<?>,DoubleDistance>
distance
in class AbstractPrimitiveDistanceFunction<NumberVector<?>,DoubleDistance>
fv1
- first DatabaseObjectfv2
- second DatabaseObjectpublic VectorFieldTypeInformation<? super NumberVector<?>> getInputTypeRestriction()
SimilarityFunction
getInputTypeRestriction
in interface DistanceFunction<NumberVector<?>,DoubleDistance>
getInputTypeRestriction
in interface PrimitiveDistanceFunction<NumberVector<?>,DoubleDistance>
getInputTypeRestriction
in interface PrimitiveSimilarityFunction<NumberVector<?>,DoubleDistance>
getInputTypeRestriction
in interface SimilarityFunction<NumberVector<?>,DoubleDistance>
public DoubleDistance getDistanceFactory()
DistanceFunction
getDistanceFactory
in interface DistanceFunction<NumberVector<?>,DoubleDistance>
getDistanceFactory
in interface SimilarityFunction<NumberVector<?>,DoubleDistance>
getDistanceFactory
in class AbstractPrimitiveDistanceFunction<NumberVector<?>,DoubleDistance>
public <T extends NumberVector<?>> DistanceSimilarityQuery<T,DoubleDistance> instantiate(Relation<T> database)
AbstractPrimitiveDistanceFunction
instantiate
in interface DistanceFunction<NumberVector<?>,DoubleDistance>
instantiate
in interface SimilarityFunction<NumberVector<?>,DoubleDistance>
instantiate
in class AbstractPrimitiveDistanceFunction<NumberVector<?>,DoubleDistance>
database
- Representation