de.lmu.ifi.dbs.elki.distance.similarityfunction.kernel
Class PolynomialKernelFunction<O extends FeatureVector<O,?>>
java.lang.Object
de.lmu.ifi.dbs.elki.logging.AbstractLoggable
de.lmu.ifi.dbs.elki.utilities.optionhandling.AbstractParameterizable
de.lmu.ifi.dbs.elki.distance.AbstractMeasurementFunction<O,D>
de.lmu.ifi.dbs.elki.distance.distancefunction.AbstractDistanceFunction<O,D>
de.lmu.ifi.dbs.elki.distance.similarityfunction.kernel.AbstractKernelFunction<O,DoubleDistance>
de.lmu.ifi.dbs.elki.distance.similarityfunction.kernel.AbstractDoubleKernelFunction<O>
de.lmu.ifi.dbs.elki.distance.similarityfunction.kernel.PolynomialKernelFunction<O>
- All Implemented Interfaces:
- DistanceFunction<O,DoubleDistance>, MeasurementFunction<O,DoubleDistance>, KernelFunction<O,DoubleDistance>, SimilarityFunction<O,DoubleDistance>, Loggable, Parameterizable
public class PolynomialKernelFunction<O extends FeatureVector<O,?>>
- extends AbstractDoubleKernelFunction<O>
Provides a polynomial Kernel function that computes
a similarity between the two feature vectors V1 and V2 definded by (V1^T*V2)^degree.
- Author:
- Simon Paradies
Constructor Summary |
PolynomialKernelFunction()
Provides a polynomial Kernel function that computes
a similarity between the two feature vectors V1 and V2 definded by (V1^T*V2)^degree. |
Methods inherited from class de.lmu.ifi.dbs.elki.utilities.optionhandling.AbstractParameterizable |
addOption, checkGlobalParameterConstraints, deleteOption, description, description, getAttributeSettings, getParameters, getParameterValue, getPossibleOptions, inlineDescription, isSet, setParameters |
Methods inherited from class de.lmu.ifi.dbs.elki.logging.AbstractLoggable |
debugFine, debugFiner, debugFinest, exception, message, progress, progress, progress, verbose, verbose, warning |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEFAULT_DEGREE
public static final double DEFAULT_DEGREE
- The default degree.
- See Also:
- Constant Field Values
DEGREE_D
public static final String DEGREE_D
- Description for parameter degree.
- See Also:
- Constant Field Values
DEGREE_P
public static final String DEGREE_P
- Parameter for degree.
- See Also:
- Constant Field Values
degree
private double degree
- Degree of the polynomial kernel function
PolynomialKernelFunction
public PolynomialKernelFunction()
- Provides a polynomial Kernel function that computes
a similarity between the two feature vectors V1 and V2 definded by (V1^T*V2)^degree.
description
public String description()
- Description copied from interface:
Parameterizable
- Returns a description of the class and the required parameters.
This description should be suitable for a usage description as for a standalone application.
- Specified by:
description
in interface Parameterizable
- Overrides:
description
in class AbstractParameterizable
- Returns:
- String a description of the class and the required parameters
- See Also:
Parameterizable.description()
setParameters
public String[] setParameters(String[] args)
throws ParameterException
- Description copied from interface:
Parameterizable
- Sets the attributes of the class accordingly to the given parameters.
Returns a new String array containing those entries of the
given array that are neither expected nor used by this
Parameterizable.
- Specified by:
setParameters
in interface Parameterizable
- Overrides:
setParameters
in class AbstractParameterizable
- Parameters:
args
- parameters to set the attributes accordingly to
- Returns:
- String[] an array containing the unused parameters
- Throws:
ParameterException
- See Also:
Parameterizable.setParameters(String[])
similarity
public DoubleDistance similarity(O o1,
O o2)
- Provides the linear kernel similarity between the given two vectors.
- Parameters:
o1
- first vectoro2
- second vector
- Returns:
- the linear kernel similarity between the given two vectors as an
instance of
DoubleDistance
. - See Also:
DistanceFunction.distance(de.lmu.ifi.dbs.elki.data.DatabaseObject, de.lmu.ifi.dbs.elki.data.DatabaseObject)