|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectweka.core.SetupGenerator
public class SetupGenerator
Generates different setups of objects (e.g., classifiers or filters) based on parameter settings. The parameter settings can be either based on mathematical functions; therefore numeric) or chosen from lists (for string values, SelectedTags or classnames (with optional parameters).
| Field Summary | |
|---|---|
protected Serializable |
m_BaseObject
base object. |
protected boolean |
m_Initialized
whether everything has been initialized. |
protected AbstractParameter[] |
m_Parameters
the parameters. |
protected Space |
m_Space
the parameter space to use for obtaining the setups from. |
static weka.core.Tag[] |
TAGS_TYPE
type of parameter. |
static int |
TYPE_FUNCTION
type: mathematical function. |
static int |
TYPE_LIST
type: explicit, comma-separated list of values. |
| Constructor Summary | |
|---|---|
SetupGenerator()
Default constructor. |
|
| Method Summary | |
|---|---|
String |
baseObjectFileTipText()
Returns the tip text for this property. |
protected Serializable |
copy(Serializable obj)
Returns a copy of the object. |
Point<Object> |
evaluate(Point<Object> values)
evalutes the expression for the current iteration. |
Serializable |
getBaseObject()
Returns the base object. |
String[] |
getOptions()
returns the options of the current setup. |
AbstractParameter[] |
getParameters()
Returns the current parameters. |
Space |
getSpace()
Returns the space currently in use. |
String |
globalInfo()
Returns a string describing the object. |
protected void |
initialize()
Performs all the necessary initializations. |
Enumeration |
listOptions()
Gets an enumeration describing the available options. |
static void |
main(String[] args)
For testing only. |
String |
parametersFileTipText()
Returns the tip text for this property. |
void |
reset()
Resets the generation. |
void |
setBaseObject(Serializable obj)
Sets the base object, can be single object or array of objects. |
void |
setOptions(String[] options)
Parses the options for this object. |
void |
setParameters(AbstractParameter[] value)
Sets the parameters to use as basis for the setups. |
void |
setSpace(Space value)
Updates the space to use for the setup generation. |
Serializable |
setup(Serializable original,
Point<Object> values)
returns a fully configures object (a copy of the provided one). |
Enumeration<Serializable> |
setups()
Returns an enumeration of all the setups. |
Object |
setValue(Object o,
String path,
Object value)
tries to set the value as double, integer (just casts it to int!) or boolean (false if 0, otherwise true) in the object according to the specified path. |
String |
toString()
A string representation of the generator. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int TYPE_FUNCTION
public static final int TYPE_LIST
public static final weka.core.Tag[] TAGS_TYPE
protected Serializable m_BaseObject
protected AbstractParameter[] m_Parameters
protected boolean m_Initialized
protected Space m_Space
| Constructor Detail |
|---|
public SetupGenerator()
| Method Detail |
|---|
public String globalInfo()
public Enumeration listOptions()
listOptions in interface weka.core.OptionHandlerpublic String[] getOptions()
getOptions in interface weka.core.OptionHandler
public void setOptions(String[] options)
throws Exception
setOptions in interface weka.core.OptionHandleroptions - the options to use
Exception - if setting of options failspublic String baseObjectFileTipText()
public void setBaseObject(Serializable obj)
obj - the objectpublic Serializable getBaseObject()
public String parametersFileTipText()
public void setParameters(AbstractParameter[] value)
value - the parameterspublic AbstractParameter[] getParameters()
public void reset()
public void setSpace(Space value)
value - the space to usepublic Space getSpace()
protected void initialize()
public Point<Object> evaluate(Point<Object> values)
values - the current iteration values (from 'min' to 'max' with
stepsize 'step') for all dimensions
public Object setValue(Object o,
String path,
Object value)
throws Exception
o - the object to modifypath - the property pathvalue - the value to set
Exception - if neither double nor int could be set
public Serializable setup(Serializable original,
Point<Object> values)
throws Exception
original - the object to create a copy from and set the parametersvalues - the current iteration values in all dimensions
Exception - if setup fails
protected Serializable copy(Serializable obj)
throws Exception
obj - the object to copy
Exception - if copying failspublic Enumeration<Serializable> setups()
public String toString()
toString in class Object
public static void main(String[] args)
throws Exception
args - ignored
Exception - if something goes wrong
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||