public class RNGModelImpl extends Object implements RNGErrorModel
| Constructor and Description |
|---|
RNGModelImpl(double[][] Alpha,
double[][] Dp,
double[] Z)
Initializes an Relational Neural Gas model.
|
RNGModelImpl(double[][] Alpha,
double[][] Dp,
double[] Z,
double[] errors)
Initializes an Relational Neural Gas model.
|
| Modifier and Type | Method and Description |
|---|---|
double[][] |
getConvexCoefficients()
Returns the convex coefficients representing all prototypes.
|
double[][] |
getDistancesToPrototypes()
Returns the matrix of distances from all training data points to all prototypes.
|
double[] |
getNormalizationTerms()
Returns a K x 1 vector containing the normalization terms for for relational distances to
each prototype.
|
int |
getNumberOfDatapoints()
Returns the number of datapoints N.
|
int |
getNumberOfEpochs()
Returns the number of training epochs for this model.
|
int |
getNumberOfPrototypes()
Returns the number of clusters/prototypes K.
|
double[] |
getQuantizationErrors()
Returns the quantization errors in each epoch.
|
public RNGModelImpl(double[][] Alpha,
double[][] Dp,
double[] Z)
Alpha - is a K x m matrix, where Alpha[k][i] represents the contribution of data point i
to prototype k with Alpha[k][i] being always non-negative and the entries in Alpha[k] adding
up to 1 for all k.Dp - is a m x K matrix, where each entry Dp[i][k] contains the
distance of data point i to prototype K.Z - is a K x 1 vector where the k-th entry contains the term
- 0.5 · Alpha[k] · D² · Alpha[k]T
where D² is the matrix of squared pairwise distances in the training data.public RNGModelImpl(double[][] Alpha,
double[][] Dp,
double[] Z,
double[] errors)
Alpha - is a K x m matrix, where Alpha[k][i] represents the contribution of data point i
to prototype k with Alpha[k][i] being always non-negative and the entries in Alpha[k] adding
up to 1 for all k.Dp - is a m x K matrix, where each entry Dp[i][k] contains the
distance of data point i to prototype K.Z - is a K x 1 vector where the k-th entry contains the term
- 0.5 · Alpha[k] · D² · Alpha[k]T
where D² is the matrix of squared pairwise distances in the training data.errors - is an E x 1 vector, where each entry errors[e] contains the
quantization error before training epoch e.public int getNumberOfDatapoints()
RNGModelgetNumberOfDatapoints in interface RNGModelpublic int getNumberOfPrototypes()
RNGModelgetNumberOfPrototypes in interface RNGModelpublic double[][] getDistancesToPrototypes()
RNGModelgetDistancesToPrototypes in interface RNGModelpublic double[] getNormalizationTerms()
RNGModelReturns a K x 1 vector containing the normalization terms for for relational distances to each prototype. In particular, the distance of a data point x to prototype wk is given as
d(wk, x)² = Σi=1,...,m αk, i · d(x, xi)² - 0.5 · αk · D² · αkT
where x1, ..., xm are the training data points and D is the matrix of pairwise distances between all training data points. The k-th entry of the returned vector contains exactly the term
- 0.5 · αk · D² · αkT
getNormalizationTerms in interface RNGModelpublic double[][] getConvexCoefficients()
RNGModelgetConvexCoefficients in interface RNGModelpublic int getNumberOfEpochs()
RNGErrorModelgetNumberOfEpochs in interface RNGErrorModelpublic double[] getQuantizationErrors()
RNGErrorModelgetQuantizationErrors in interface RNGErrorModelCopyright (C) 2015-2017 Benjamin Paaßen, AG Machine Learning, Centre of Excellence Cognitive Interaction Technology (CITEC), University of Bielefeld, licensed under the GPL v. 3: https://gitlab.ub.uni-bielefeld.de/bpaassen/relational_neural_gas . This documentation is licensed under the conditions of CC-BY-SA 4.0: https://creativecommons.org/licenses/by-sa/4.0/