|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.knime.base.node.preproc.sample.SamplingNodeSettings
public class SamplingNodeSettings
This class holds the settings for the sampling and the partioning node.
Nested Class Summary | |
---|---|
static class |
SamplingNodeSettings.CountMethods
Enum for the two methods for setting the number of rows in the output table. |
static class |
SamplingNodeSettings.SamplingMethods
Enum for the four different sampling methods. |
Constructor Summary | |
---|---|
SamplingNodeSettings()
|
Method Summary | |
---|---|
String |
classColumn()
Returns the class column whose distribution should be retained when using stratified sampling. |
void |
classColumn(String columnName)
Sets the class column whose distribution should be retained when using stratified sampling. |
int |
count()
Returns the absolute number of rows in the output table. |
void |
count(int count)
Sets the absolute number of rows in the output table. |
SamplingNodeSettings.CountMethods |
countMethod()
Returns the method use for sampling the rows. |
void |
countMethod(SamplingNodeSettings.CountMethods method)
Sets the method use for sampling the rows. |
double |
fraction()
Returns the relative number of rows in the output table (in relation to the number of input rows). |
void |
fraction(double fraction)
Sets the relative number of rows in the output table (in relation to the number of input rows). |
void |
loadSettingsFrom(NodeSettingsRO settings,
boolean guessValues)
Loads the setting from the given object. |
SamplingNodeSettings.SamplingMethods |
samplingMethod()
Returns the sampling method. |
void |
samplingMethod(SamplingNodeSettings.SamplingMethods method)
Sets the sampling method. |
void |
saveSettingsTo(NodeSettingsWO settings)
Saves the settings to the given object. |
Long |
seed()
Returns the optional random seed. |
void |
seed(Long seed)
Sets the seed for the random number generator. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SamplingNodeSettings()
Method Detail |
---|
public void saveSettingsTo(NodeSettingsWO settings)
settings
- the node settings objectpublic void loadSettingsFrom(NodeSettingsRO settings, boolean guessValues) throws InvalidSettingsException
settings
- the settingsguessValues
- If true
, default values are used in
case the settings are incomplete, false
will
throw an exception. true
should be used when
called from the dialog, false
when called from
the model.
InvalidSettingsException
- if settings incomplete and
guessValues
is false
public int count()
public void count(int count)
count
- the number of rowspublic double fraction()
public void fraction(double fraction)
fraction
- the relative number of rows, a value between 0 and 1public SamplingNodeSettings.CountMethods countMethod()
public void countMethod(SamplingNodeSettings.CountMethods method)
method
- the sampling methodpublic SamplingNodeSettings.SamplingMethods samplingMethod()
public void samplingMethod(SamplingNodeSettings.SamplingMethods method)
method
- the sampling methodpublic Long seed()
null
if none is specifiedpublic void seed(Long seed)
seed
- a seed or null
if none is setpublic void classColumn(String columnName)
columnName
- the name of the class columnpublic String classColumn()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |