Catalano.MachineLearning.Classification
Class RadiusNearestNeighbors
- java.lang.Object
-
- Catalano.MachineLearning.Classification.RadiusNearestNeighbors
-
- All Implemented Interfaces:
- IClassifier, java.io.Serializable, java.lang.Cloneable
public class RadiusNearestNeighbors extends java.lang.Object implements IClassifier, java.io.Serializable
Radius Neighbour classifier.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description RadiusNearestNeighbors()Initializes a new instance of the RadiusNearestNeighbors class.RadiusNearestNeighbors(double radius)Initializes a new instance of the RadiusNearestNeighbors class.RadiusNearestNeighbors(double radius, IDivergence divergence)Initializes a new instance of the RadiusNearestNeighbors class.RadiusNearestNeighbors(double radius, IMercerKernel kernel)Initializes a new instance of the RadiusNearestNeighbors class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description IClassifierclone()Clone of the object.IDivergencegetDistance()Get the divergence function.IMercerKernelgetKernel()Get the kernel metric.doublegetRadius()Get Radius.voidLearn(DatasetClassification dataset)Learn from a dataset.voidLearn(double[][] input, int[] output)Learn.intPredict(double[] feature)Compute.voidsetDistance(IDivergence divergence)Set the divergence function.voidsetMercerKernel(IMercerKernel kernel)Set the kernel metric.voidsetRadius(double radius)Set Radius.
-
-
-
Constructor Detail
-
RadiusNearestNeighbors
public RadiusNearestNeighbors()
Initializes a new instance of the RadiusNearestNeighbors class.
-
RadiusNearestNeighbors
public RadiusNearestNeighbors(double radius)
Initializes a new instance of the RadiusNearestNeighbors class.- Parameters:
radius- Radius.
-
RadiusNearestNeighbors
public RadiusNearestNeighbors(double radius, IDivergence divergence)Initializes a new instance of the RadiusNearestNeighbors class.- Parameters:
radius- Radius.divergence- Distance.
-
RadiusNearestNeighbors
public RadiusNearestNeighbors(double radius, IMercerKernel kernel)Initializes a new instance of the RadiusNearestNeighbors class.- Parameters:
radius- Radius.kernel- Kernel.
-
-
Method Detail
-
getRadius
public double getRadius()
Get Radius.- Returns:
- Radius.
-
setRadius
public void setRadius(double radius)
Set Radius.- Parameters:
radius- Radius.
-
getKernel
public IMercerKernel getKernel()
Get the kernel metric.- Returns:
- Kernel.
-
setMercerKernel
public void setMercerKernel(IMercerKernel kernel)
Set the kernel metric.- Parameters:
kernel- Kernel.
-
getDistance
public IDivergence getDistance()
Get the divergence function.- Returns:
- Divergence.
-
setDistance
public void setDistance(IDivergence divergence)
Set the divergence function.- Parameters:
divergence- Divergence.
-
Learn
public void Learn(DatasetClassification dataset)
Description copied from interface:IClassifierLearn from a dataset.- Specified by:
Learnin interfaceIClassifier- Parameters:
dataset- Dataset.
-
Learn
public void Learn(double[][] input, int[] output)Description copied from interface:IClassifierLearn.- Specified by:
Learnin interfaceIClassifier- Parameters:
input- Matrix of features.output- Labels.
-
Predict
public int Predict(double[] feature)
Compute.- Specified by:
Predictin interfaceIClassifier- Parameters:
feature- Feature to compute.- Returns:
- Object.
-
clone
public IClassifier clone()
Description copied from interface:IClassifierClone of the object.- Specified by:
clonein interfaceIClassifier- Overrides:
clonein classjava.lang.Object- Returns:
- A new copy of the object.
-
-
DataMelt 3.0 © DataMelt by jWork.ORG