Package adams.flow.container
Class MOAModelContainer
- java.lang.Object
-
- adams.flow.container.AbstractContainer
-
- adams.flow.container.MOAModelContainer
-
- All Implemented Interfaces:
adams.core.CloneHandler<adams.flow.container.Container>
,adams.core.GlobalInfoSupporter
,adams.data.spreadsheet.SpreadSheetSupporter
,adams.flow.container.Container
,Serializable
public class MOAModelContainer extends adams.flow.container.AbstractContainer
A container for models (e.g., classifier or clusterer) and an optional header of a dataset.- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz), Corey Sterling (coreytsterling at gmail dot com)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static String
VALUE_DATASET
the identifier for the full dataset.static String
VALUE_HEADER
the identifier for the Header.static String
VALUE_MODEL
the identifier for the Model.
-
Constructor Summary
Constructors Constructor Description MOAModelContainer()
Initializes the container.MOAModelContainer(Object model)
Initializes the container with no header.MOAModelContainer(Object model, com.yahoo.labs.samoa.instances.Instances header)
Initializes the container with no header.MOAModelContainer(Object model, com.yahoo.labs.samoa.instances.Instances header, com.yahoo.labs.samoa.instances.Instances data)
Initializes the container with no header.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
initHelp()
Initializes the help strings.boolean
isValid()
Checks whether the setup of the container is valid.Iterator<String>
names()
Returns all value names that can be used (theoretically).
-
-
-
Field Detail
-
VALUE_MODEL
public static final String VALUE_MODEL
the identifier for the Model.- See Also:
- Constant Field Values
-
VALUE_HEADER
public static final String VALUE_HEADER
the identifier for the Header.- See Also:
- Constant Field Values
-
VALUE_DATASET
public static final String VALUE_DATASET
the identifier for the full dataset.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
MOAModelContainer
public MOAModelContainer()
Initializes the container.
Only used for generating help information.
-
MOAModelContainer
public MOAModelContainer(Object model)
Initializes the container with no header.- Parameters:
model
- the model to use
-
MOAModelContainer
public MOAModelContainer(Object model, com.yahoo.labs.samoa.instances.Instances header)
Initializes the container with no header.- Parameters:
model
- the model to useheader
- the header to use
-
MOAModelContainer
public MOAModelContainer(Object model, com.yahoo.labs.samoa.instances.Instances header, com.yahoo.labs.samoa.instances.Instances data)
Initializes the container with no header.- Parameters:
model
- the model to useheader
- the header to usedata
- the data to use
-
-
Method Detail
-
initHelp
protected void initHelp()
Initializes the help strings.- Overrides:
initHelp
in classadams.flow.container.AbstractContainer
-
names
public Iterator<String> names()
Returns all value names that can be used (theoretically).- Specified by:
names
in interfaceadams.flow.container.Container
- Specified by:
names
in classadams.flow.container.AbstractContainer
- Returns:
- enumeration over all possible value names
-
isValid
public boolean isValid()
Checks whether the setup of the container is valid.- Specified by:
isValid
in interfaceadams.flow.container.Container
- Specified by:
isValid
in classadams.flow.container.AbstractContainer
- Returns:
- true if all the necessary values are available
-
-