|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.knime.base.node.mine.cluster.assign.Prototype
public class Prototype
This class represents a prototype.
| Field Summary | |
|---|---|
static String |
CFG_COLUMNSUSED
Key to store the columns used for clustering in the PredParams. |
static String |
CFG_PROTOTYPE
Name of the config-object, where the Prototypes should be
stored. |
| Constructor Summary | |
|---|---|
Prototype(double[] values)
Prototype is initialized with double values. |
|
Prototype(double[] values,
DataCell classlabel)
Prototype is initialized with double values and label. |
|
| Method Summary | |
|---|---|
double |
getDistance(DataRow row)
Computes the distance between this prototype and a given DataRow. |
double |
getDistance(DataRow row,
int[] indices)
Computes the distance between this prototype and a given DataRow. |
DataCell |
getLabel()
|
double |
getSquaredEuclideanDistance(DataRow row,
int[] indices)
Computes the distance between this prototype and a given DataRow. |
double[] |
getValues()
|
static Prototype |
loadFrom(ModelContentRO model)
|
void |
save(ModelContentWO model)
Saves the Prototype to a ModelContentWO object. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String CFG_PROTOTYPE
Prototypes should be
stored.
public static final String CFG_COLUMNSUSED
| Constructor Detail |
|---|
public Prototype(double[] values)
values - for initialization.
public Prototype(double[] values,
DataCell classlabel)
values - of the cluster prototype.classlabel - of the cluster prototype.| Method Detail |
|---|
public DataCell getLabel()
public double[] getValues()
public double getDistance(DataRow row,
int[] indices)
DataRow.
Ignores all DataCells that are not compatible to DoubleValue.
row - to compare.indices - to use.
public double getSquaredEuclideanDistance(DataRow row,
int[] indices)
DataRow.
Ignores all DataCells that are not compatible to DoubleValue.
row - to compare.indices - to use.
public double getDistance(DataRow row)
DataRow.
Ignores all DataCells that are not compatible to DoubleValue.
row - to compare.
public String toString()
toString in class Objectpublic void save(ModelContentWO model)
Prototype to a ModelContentWO object.
model - the ModelContent to save to.
public static Prototype loadFrom(ModelContentRO model)
throws InvalidSettingsException
model - ModelContent containing information of the Prototype
Prototype
InvalidSettingsException - if the settings can not be retrieved.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||