Interface Parameters
public interface Parameters
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionbooleangetBooleanParameter(String key, boolean defaultValue) Obtains a training parameter value.booleangetBooleanParameter(String namespace, String key, boolean defaultValue) Obtains a training parameter value in the specified namespace.doublegetDoubleParameter(String key, double defaultValue) Obtains a training parameter value.doublegetDoubleParameter(String namespace, String key, double defaultValue) Obtains a training parameter value in the specified namespace.intgetIntParameter(String key, int defaultValue) Obtains a training parameter value.intgetIntParameter(String namespace, String key, int defaultValue) Obtains a training parameter value in the specified namespace.static StringgetObjectSettings(String namespace) getStringParameter(String key, String defaultValue) Obtains a training parameter value.getStringParameter(String namespace, String key, String defaultValue) Obtains a training parameter value in the specified namespace.voidvoidvoidvoidvoidvoidvoidvoidvoidputIfAbsent(String key, boolean value) voidputIfAbsent(String key, double value) voidputIfAbsent(String key, int value) voidputIfAbsent(String key, String value) voidputIfAbsent(String namespace, String key, boolean value) voidputIfAbsent(String namespace, String key, double value) voidputIfAbsent(String namespace, String key, int value) voidputIfAbsent(String namespace, String key, String value) voidserialize(OutputStream out) Serializes aParametersinstance via a specifiedOutputStream.
-
Field Details
-
ALGORITHM_PARAM
- See Also:
-
TRAINER_TYPE_PARAM
- See Also:
-
ITERATIONS_PARAM
- See Also:
-
CUTOFF_PARAM
- See Also:
-
THREADS_PARAM
- See Also:
-
ALGORITHM_DEFAULT_VALUE
-
ITERATIONS_DEFAULT_VALUE
static final int ITERATIONS_DEFAULT_VALUEThe default number of iterations is 100.- See Also:
-
CUTOFF_DEFAULT_VALUE
static final int CUTOFF_DEFAULT_VALUEThe default cut off value is 5.- See Also:
-
-
Method Details
-
getKey
- Parameters:
namespace- The namespace used as prefix ornull. Ifnullthekeyis left unchanged.key- The identifying key to process.- Returns:
- Retrieves a prefixed key in the specified
namespace. If nonamespacewas specified the returned String is equal tokey.
-
algorithm
-
algorithm
String algorithm()- Returns:
- Retrieves the (training) algorithm name. or @code null} if not set.
-
getObjectSettings
-
getObjectSettings
-
putIfAbsent
Puts avalueinto the currentParametersunder a certainkey, if the value was not present before. Thenamespacecan be used to prefix thekey.- Parameters:
namespace- A prefix to declare or use a name space under whichkeyshall be put. May benull.key- The identifying key to put or retrieve avaluewith.value- TheStringparameter to put into thisParametersinstance.
-
putIfAbsent
- Parameters:
key- The identifying key to put or retrieve avaluewith.value- TheStringparameter to put into thisParametersinstance.
-
putIfAbsent
Puts avalueinto the currentParametersunder a certainkey, if the value was not present before. Thenamespacecan be used to prefix thekey.- Parameters:
namespace- A prefix to declare or use a name space under whichkeyshall be put. May benull.key- The identifying key to put or retrieve avaluewith.value- TheIntegerparameter to put into thisParametersinstance.
-
putIfAbsent
- Parameters:
key- The identifying key to put or retrieve avaluewith.value- TheIntegerparameter to put into thisParametersinstance.
-
putIfAbsent
Puts avalueinto the currentParametersunder a certainkey, if the value was not present before. Thenamespacecan be used to prefix thekey.- Parameters:
namespace- A prefix to declare or use a name space under whichkeyshall be put. May benull.key- The identifying key to put or retrieve avaluewith.value- TheDoubleparameter to put into thisParametersinstance.
-
putIfAbsent
Puts avalueinto the currentParametersunder a certainkey, if the value was not present before. Thenamespacecan be used to prefix thekey.- Parameters:
key- The identifying key to put or retrieve avaluewith.value- TheDoubleparameter to put into thisParametersinstance.
-
putIfAbsent
Puts avalueinto the currentParametersunder a certainkey, if the value was not present before. Thenamespacecan be used to prefix thekey.- Parameters:
namespace- A prefix to declare or use a name space under whichkeyshall be put. May benull.key- The identifying key to put or retrieve avaluewith.value- TheBooleanparameter to put into thisParametersinstance.
-
putIfAbsent
- Parameters:
key- The identifying key to put or retrieve avaluewith.value- TheBooleanparameter to put into thisParametersinstance.
-
put
Puts avalueinto the currentParametersunder a certainkey. If the value was present before, the previous value will be overwritten with the specified one. Thenamespacecan be used to prefix thekey.- Parameters:
namespace- A prefix to declare or use a name space under whichkeyshall be put. May benull.key- The identifying key to put or retrieve avaluewith.value- TheStringparameter to put into thisParametersinstance.
-
put
Puts avalueinto the currentParametersunder a certainkey. If the value was present before, the previous value will be overwritten with the specified one.- Parameters:
key- The identifying key to put or retrieve avaluewith.value- TheStringparameter to put into thisParametersinstance.
-
put
Puts avalueinto the currentParametersunder a certainkey. If the value was present before, the previous value will be overwritten with the specified one. Thenamespacecan be used to prefix thekey.- Parameters:
namespace- A prefix to declare or use a name space under whichkeyshall be put. May benull.key- The identifying key to put or retrieve avaluewith.value- TheIntegerparameter to put into thisParametersinstance.
-
put
Puts avalueinto the currentParametersunder a certainkey. If the value was present before, the previous value will be overwritten with the specified one.- Parameters:
key- The identifying key to put or retrieve avaluewith.value- TheIntegerparameter to put into thisParametersinstance.
-
put
Puts avalueinto the currentParametersunder a certainkey. If the value was present before, the previous value will be overwritten with the specified one. Thenamespacecan be used to prefix thekey.- Parameters:
namespace- A prefix to declare or use a name space under whichkeyshall be put. May benull.key- The identifying key to put or retrieve avaluewith.value- TheDoubleparameter to put into thisParametersinstance.
-
put
Puts avalueinto the currentParametersunder a certainkey. If the value was present before, the previous value will be overwritten with the specified one.- Parameters:
key- The identifying key to put or retrieve avaluewith.value- TheDoubleparameter to put into thisParametersinstance.
-
put
Puts avalueinto the currentParametersunder a certainkey. If the value was present before, the previous value will be overwritten with the specified one. Thenamespacecan be used to prefix thekey.- Parameters:
namespace- A prefix to declare or use a name space under whichkeyshall be put. May benull.key- The identifying key to put or retrieve avaluewith.value- TheBooleanparameter to put into thisParametersinstance.
-
put
Puts avalueinto the currentParametersunder a certainkey. If the value was present before, the previous value will be overwritten with the specified one.- Parameters:
key- The identifying key to put or retrieve avaluewith.value- TheBooleanparameter to put into thisParametersinstance.
-
serialize
Serializes aParametersinstance via a specifiedOutputStream.- Parameters:
out- A valid, openOutputStreamto write to.- Throws:
IOException- Thrown if errors occurred.
-
getStringParameter
Obtains a training parameter value.- Parameters:
key- The identifying key to retrieve avaluewith.defaultValue- The alternative value to use, ifkeywas not present.- Returns:
- The
training valueassociated withkeyif present, or adefaultValueif not. - Throws:
ClassCastException- } Thrown if the value is notString
-
getStringParameter
Obtains a training parameter value in the specified namespace.- Parameters:
namespace- A prefix to declare or use a name space under whichkeyshall be searched. May benull.key- The identifying key to retrieve avaluewith.defaultValue- The alternative value to use, ifkeywas not present.- Returns:
- The
training valueassociated withkeyif present, or adefaultValueif not. - Throws:
ClassCastException- } Thrown if the value is notString
-
getIntParameter
Obtains a training parameter value.- Parameters:
key- The identifying key to retrieve avaluewith.defaultValue- The alternative value to use, ifkeywas not present.- Returns:
- The
training valueassociated withkeyif present, or adefaultValueif not.
-
getIntParameter
Obtains a training parameter value in the specified namespace.- Parameters:
namespace- A prefix to declare or use a name space under whichkeyshall be searched. May benull.key- The identifying key to retrieve avaluewith.defaultValue- The alternative value to use, ifkeywas not present.- Returns:
- The
training valueassociated withkeyif present, or adefaultValueif not.
-
getDoubleParameter
Obtains a training parameter value.- Parameters:
key- The identifying key to retrieve avaluewith.defaultValue- The alternative value to use, ifkeywas not present.- Returns:
- The
training valueassociated withkeyif present, or adefaultValueif not.
-
getDoubleParameter
Obtains a training parameter value in the specified namespace.- Parameters:
namespace- A prefix to declare or use a name space under whichkeyshall be searched. May benull.key- The identifying key to retrieve avaluewith.defaultValue- The alternative value to use, ifkeywas not present.- Returns:
- The
training valueassociated withkeyif present, or adefaultValueif not.
-
getBooleanParameter
Obtains a training parameter value.- Parameters:
key- The identifying key to retrieve avaluewith.defaultValue- The alternative value to use, ifkeywas not present.- Returns:
- The
training valueassociated withkeyif present, or adefaultValueif not.
-
getBooleanParameter
Obtains a training parameter value in the specified namespace.- Parameters:
namespace- A prefix to declare or use a name space under whichkeyshall be searched. May benull.key- The identifying key to retrieve avaluewith.defaultValue- The alternative value to use, ifkeywas not present.- Returns:
- The
training valueassociated withkeyif present, or adefaultValueif not.
-