|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object comirva.mlearn.SDH
public class SDH
This class implements a Smoothed Data Histogram (SDH) for a SOM.
An SDH in its simplest form visualizes the number of data items
that are mapped to each map unit (spread
=1).
Alternatively, it is possible that each data item votes for more
than one map unit and the resulting distribution is visualized.
In this case, the parameter spread
equals the number
of map units each data items votes for.
Field Summary | |
---|---|
int |
borderUnits
|
Constructor Summary | |
---|---|
SDH(SOM som)
Creates a new SDH-instance based on the passed SOM. |
|
SDH(SOM som,
int iter)
Creates a new SDH-instance based on the passed SOM. |
Method Summary | |
---|---|
void |
addFractalComponent(int fractalComponent)
"Unsharpens" the SDH by adding a fractal component to its voting matrix. |
void |
calcSDH(int spread)
Calculates an SDH with the specified spread. |
double[][] |
getInterpolatedVotingMatrix()
Returns the interpolated voting matrix of the SDH. |
SOM |
getSOM()
Returns the SOM-instance for which the SDH is calculated. |
double[][] |
getVotingMatrix()
Returns the voting matrix of the SDH. |
static double[][] |
interpolateMatrix(double[][] votes)
Interpolates the double[][] matrix votes linearly by inserting
a data item containing the medium of the neighboring values
between every array element. |
void |
interpolateVotingMatrix(int iter)
Prepares the SDH-instance for visualization by interpolating the voting matrix. |
void |
normalizeVotingMatrix()
Normalizes the voting matrix by dividing every element by the maximum number of votes a map unit got. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public final int borderUnits
Constructor Detail |
---|
public SDH(SOM som)
som
- the SOM for which the SDH is to be calculatedpublic SDH(SOM som, int iter)
iter
.
som
- the SOM for which the SDH is to be calculatediter
- the number of iterations, the voting matrix is interpolatedMethod Detail |
---|
public double[][] getVotingMatrix()
public double[][] getInterpolatedVotingMatrix()
public SOM getSOM()
public void calcSDH(int spread)
spread
- the number of map units each data item votes forpublic void normalizeVotingMatrix()
public void interpolateVotingMatrix(int iter)
iter
times.
iter
- the number of iterations that are performedpublic static double[][] interpolateMatrix(double[][] votes)
votes
linearly by inserting
a data item containing the medium of the neighboring values
between every array element. The resulting matrix has size (oldNumberOfRows*2)-1 x (oldNumberOfColumns*2)-1
.
votes
- the double[][] matrix to be interpolated
public void addFractalComponent(int fractalComponent)
([-0.5, 0.5]/1000)*fractalComponent
is added.
fractalComponent
- the strength of the fractal component (should be in [0, 100]))
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |