|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.knime.base.node.mine.cluster.fuzzycmeans.FCMAlgorithm
public class FCMAlgorithm
The Fuzzy c-means algorithm.
Constructor Summary | |
---|---|
FCMAlgorithm(int nrClusters,
double fuzzifier)
Constructor for a Fuzzy c-means algorithm (with no noise detection). |
|
FCMAlgorithm(int nrClusters,
double fuzzifier,
boolean calculateDelta,
double deltalambda)
Constructor for a Fuzzy c-means algorithm with noise detection. |
Method Summary | |
---|---|
protected void |
addTotalChange(double change)
|
double |
doOneIteration(ExecutionContext exec)
Does one iteration in the Fuzzy c-means algorithm. |
double[][] |
getClusterCentres()
|
protected double[][] |
getClusters()
|
protected double |
getDelta()
|
protected int |
getDimension()
|
protected double |
getFuzzifier()
|
protected double |
getLambda()
|
protected int |
getNrClusters()
|
protected int |
getNrRows()
|
protected double |
getTotalChange()
|
double[][] |
getweightMatrix()
|
protected double[][] |
getWeightMatrix()
|
protected int |
getWinner(double[] weights)
Helper method to determine the winner cluster center (The cluster center to which the DataRow has the highest membership value). |
void |
init(DataTable table)
An easier initialization, the rowcount and dimension are determined by iterating over the table. |
void |
init(int nrRows,
int dimension,
DataTable table)
Inits the cluster centers and the weight matrix. |
protected boolean |
isCalculateDelta()
|
protected boolean |
isNoise()
|
boolean |
noiseClustering()
|
protected void |
setClusterValue(int cluster,
int column,
double value)
Sets a value in a cluster prototype. |
protected void |
setDelta(double delta)
|
protected void |
setTotalChange(double value)
|
protected void |
setWeightMatrixValue(int row,
int column,
double value)
Sets a value in the weight matrix. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FCMAlgorithm(int nrClusters, double fuzzifier)
nrClusters
- the number of cluster prototypes to usefuzzifier
- allows the clusters to overlappublic FCMAlgorithm(int nrClusters, double fuzzifier, boolean calculateDelta, double deltalambda)
nrClusters
- the number of clusters to usefuzzifier
- the fuzzifier, controls how much the clusters can
overlapcalculateDelta
- indicate whether delta should be calculated
automaticallydeltalambda
- the delta value, if the previous parameter is
false
, the lambda value otherwiseMethod Detail |
---|
public void init(int nrRows, int dimension, DataTable table)
nrRows
- number of rows in the DataTabledimension
- the dimension of the tabletable
- the table to use.public void init(DataTable table)
table
- the table to use.public double doOneIteration(ExecutionContext exec) throws CanceledExecutionException
exec
- execution context to cancel the execution
CanceledExecutionException
- if the operation is canceledpublic double[][] getClusterCentres()
public double[][] getweightMatrix()
public boolean noiseClustering()
protected final int getWinner(double[] weights)
weights
- the weights.
protected int getDimension()
protected int getNrRows()
protected int getNrClusters()
protected double[][] getClusters()
protected void setClusterValue(int cluster, int column, double value)
cluster
- the cluster prototypecolumn
- the columnvalue
- the value to set.protected double[][] getWeightMatrix()
protected void setWeightMatrixValue(int row, int column, double value)
row
- the row.column
- the column.value
- the value to set.protected double getFuzzifier()
protected boolean isNoise()
protected boolean isCalculateDelta()
protected double getDelta()
protected void setDelta(double delta)
delta
- new delta value.protected double getLambda()
protected double getTotalChange()
protected void addTotalChange(double change)
change
- current change in prototypes to sum up.protected void setTotalChange(double value)
value
- ne wvalue for total change in prototypes.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |