public class NeuralMap extends Object implements Clustering<double[]>
NeuralGas
,
GrowingNeuralGas
,
BIRCH
Modifier and Type | Class and Description |
---|---|
static class |
NeuralMap.Neuron
The neurons in the network.
|
OUTLIER
Constructor and Description |
---|
NeuralMap(int d,
double r,
double epsBest,
double epsNeighbor,
int L,
int k)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
List<NeuralMap.Neuron> |
neurons()
Returns the set of neurons.
|
void |
partition(int k)
Clustering neurons into k clusters.
|
int |
partition(int k,
int minPts)
Clustering neurons into k clusters.
|
int |
predict(double[] x)
Cluster a new instance to the nearest neuron.
|
int |
purge(int minPts)
Removes neurons with the number of samples less than a given threshold.
|
void |
update(double[] x)
Update the network with a new signal.
|
public NeuralMap(int d, double r, double epsBest, double epsNeighbor, int L, int k)
d
- the dimensionality of signals.r
- the distance radius to activate a neuron for a given signal.epsBest
- the fraction to update activated neuron.epsNeighbor
- the fraction to update neighbors of activated neuron.L
- the number of hash tables.k
- the number of random projection hash functions.public void update(double[] x)
public List<NeuralMap.Neuron> neurons()
public int purge(int minPts)
minPts
- neurons will be removed if the number of its points is
less than minPts.public void partition(int k)
k
- the number of clusters.public int partition(int k, int minPts)
k
- the number of clusters.minPts
- a neuron will be treated as outlier if the number of its
points is less than minPts.public int predict(double[] x)
predict
in interface Clustering<double[]>
x
- a new instance.Copyright © 2015. All rights reserved.