|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.knime.core.node.defaultnodesettings.SettingsModel
org.knime.base.node.mine.pca.SettingsModelPCADimensions
public class SettingsModelPCADimensions
Settings model, where either an integer (like number of dimensions) or a double like reproduction percentage can be chosen.
Nested Class Summary | |
---|---|
class |
SettingsModelPCADimensions.ArraySpinnerModel
|
Constructor Summary | |
---|---|
SettingsModelPCADimensions(String configName,
int intDefault,
double doubleDefault,
boolean intChoosen)
|
Method Summary | |
---|---|
void |
configureQualitySlider(JSpinner spinner)
|
protected SettingsModelPCADimensions |
createClone()
|
protected String |
getConfigName()
|
int |
getDimensions()
|
boolean |
getDimensionsSelected()
|
double[] |
getEigenvalues()
|
String |
getInformationPreservation(int dim)
|
double |
getMinQuality()
|
protected String |
getModelTypeID()
Each settings model provides an ID which will be stored with its values. |
String |
getNeededDimensionDescription()
|
int |
getNeededDimensions(int maxDimensions)
get number of dimensions to reduce to based on these settings. |
protected void |
loadSettingsForDialog(NodeSettingsRO settings,
PortObjectSpec[] specs)
Read the value(s) of this settings model from configuration object. |
protected void |
loadSettingsForModel(NodeSettingsRO settings)
Read value(s) of this settings model from the configuration object. |
protected void |
saveSettingsForDialog(NodeSettingsWO settings)
Write value(s) of this component model to configuration object. |
protected void |
saveSettingsForModel(NodeSettingsWO settings)
Write value(s) of this settings model to configuration object. NOTE: Don't call this method directly, rather call saveSettingsTo. |
void |
setDimensions(int intValue)
|
void |
setDimensionsSelected(boolean intChoosen)
|
void |
setEigenValues(double[] eigenvalues)
|
void |
setMinQuality(double doubleValue)
|
(package private) void |
setValues(double quality,
int dimensions,
boolean dimensionsSelected)
set all values of the model. |
String |
toString()
Derived classes should print their class name plus the config name for nice and useful error messages. |
protected void |
validateSettingsForModel(NodeSettingsRO settings)
Read the expected values from the settings object, without assigning them to the internal variables! (Is not called when the model was disabled at the time the settings were saved.) |
Methods inherited from class org.knime.core.node.defaultnodesettings.SettingsModel |
---|
addChangeListener, createCloneWithValidatedValue, isEnabled, loadSettingsFrom, notifyChangeListeners, prependChangeListener, removeChangeListener, saveSettingsTo, setEnabled, validateSettings |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public SettingsModelPCADimensions(String configName, int intDefault, double doubleDefault, boolean intChoosen)
configName
- key for the configintDefault
- default for integer valuedoubleDefault
- default for double valueintChoosen
- default for "is integer value configured?"Method Detail |
---|
public boolean getDimensionsSelected()
public void setDimensionsSelected(boolean intChoosen)
intChoosen
- set info by number of dimensionspublic int getDimensions()
public void setDimensions(int intValue)
intValue
- dimensions to reduce topublic double getMinQuality()
public void setMinQuality(double doubleValue)
doubleValue
- minimum information to preserveprotected SettingsModelPCADimensions createClone()
createClone
in class SettingsModel
protected String getConfigName()
getConfigName
in class SettingsModel
protected String getModelTypeID()
getModelTypeID
in class SettingsModel
protected void loadSettingsForDialog(NodeSettingsRO settings, PortObjectSpec[] specs) throws NotConfigurableException
loadSettingsForDialog
in class SettingsModel
settings
- The NodeSettings
to read from.specs
- The input specs.
NotConfigurableException
- if the specs are not good enough tovoid setValues(double quality, int dimensions, boolean dimensionsSelected)
quality
- min qualitydimensions
- dimensions to reduce todimensionsSelected
- selection by dimensionprotected void loadSettingsForModel(NodeSettingsRO settings) throws InvalidSettingsException
loadSettingsForModel
in class SettingsModel
settings
- The NodeSettings
to read
from.
InvalidSettingsException
- if load fails.protected void saveSettingsForDialog(NodeSettingsWO settings) throws InvalidSettingsException
saveSettingsForDialog
in class SettingsModel
settings
- The NodeSettings
to read
from.
InvalidSettingsException
- if the user has entered wrong values.protected void saveSettingsForModel(NodeSettingsWO settings)
saveSettingsForModel
in class SettingsModel
settings
- The NodeSettings
to write
into.public String toString()
toString
in class SettingsModel
protected void validateSettingsForModel(NodeSettingsRO settings) throws InvalidSettingsException
validateSettingsForModel
in class SettingsModel
settings
- the object to read the value(s) from
InvalidSettingsException
- if the value(s) in the settings object
are invalid.public void setEigenValues(double[] eigenvalues)
eigenvalues
- eigenvalues of pca matrixpublic double[] getEigenvalues()
public int getNeededDimensions(int maxDimensions)
maxDimensions
- dimensionality of input data
evs==null
and selection by quality
with quality <100)public String getNeededDimensionDescription()
public void configureQualitySlider(JSpinner spinner)
spinner
- spinner component to be updatedpublic String getInformationPreservation(int dim)
dim
- dimensions to reduce to
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |