Package net.sf.tweety.machinelearning
Class TrainingParameter
- java.lang.Object
-
- net.sf.tweety.machinelearning.TrainingParameter
-
public class TrainingParameter extends java.lang.Object
A single parameter for a training method.- Author:
- Matthias Thimm
-
-
Field Summary
Fields Modifier and Type Field Description private double
defaultValue
The default value of the parameter.private double
lowerBound
The lower bound of the parameter.private java.lang.String
name
The identifier of the parameter.private double
upperBound
The upper bound of the parameter.private double
value
The actual value of the parameter.
-
Constructor Summary
Constructors Constructor Description TrainingParameter(java.lang.String name, double defaultValue, double upperBound, double lowerBound)
Creates a new training parameter with the given values and actual value as default value.TrainingParameter(java.lang.String name, double value, double defaultValue, double lowerBound, double upperBound)
Creates a new training parameter with the given values.
-
Method Summary
Modifier and Type Method Description double
getDefaultValue()
Returns the default value of this parameter.double
getLowerBound()
Returns the lower bound of this parameter.java.lang.String
getName()
Returns the name of this parameter.double
getUpperBound()
Returns the upper bound of this parameter.double
getValue()
Returns the actual value of this parameter.TrainingParameter
instantiate(double value)
Instantiates a new parameter with the given value.TrainingParameter
instantiateWithDefaultValue()
Instantiates a new parameter with the default value.java.lang.String
toString()
-
-
-
Field Detail
-
name
private java.lang.String name
The identifier of the parameter.
-
value
private double value
The actual value of the parameter.
-
defaultValue
private double defaultValue
The default value of the parameter.
-
upperBound
private double upperBound
The upper bound of the parameter.
-
lowerBound
private double lowerBound
The lower bound of the parameter.
-
-
Constructor Detail
-
TrainingParameter
public TrainingParameter(java.lang.String name, double defaultValue, double upperBound, double lowerBound)
Creates a new training parameter with the given values and actual value as default value.- Parameters:
name
- The identifier of the parameter.defaultValue
- The default value of the parameter.upperBound
- The upper bound of the parameter.lowerBound
- The lower bound of the parameter.
-
TrainingParameter
public TrainingParameter(java.lang.String name, double value, double defaultValue, double lowerBound, double upperBound)
Creates a new training parameter with the given values.- Parameters:
name
- The identifier of the parameter.value
- The actual value of the parameter.defaultValue
- The default value of the parameter.lowerBound
- The lower bound of the parameter.upperBound
- The upper bound of the parameter.
-
-
Method Detail
-
instantiate
public TrainingParameter instantiate(double value)
Instantiates a new parameter with the given value.- Parameters:
value
- some value- Returns:
- the training parameter obtained from instantiating.
-
instantiateWithDefaultValue
public TrainingParameter instantiateWithDefaultValue()
Instantiates a new parameter with the default value.- Returns:
- the training parameter obtained from instantiating.
-
getName
public java.lang.String getName()
Returns the name of this parameter.- Returns:
- The name of this parameter.
-
getValue
public double getValue()
Returns the actual value of this parameter.- Returns:
- The actual value of this parameter.
-
getDefaultValue
public double getDefaultValue()
Returns the default value of this parameter.- Returns:
- The default value of this parameter.
-
getLowerBound
public double getLowerBound()
Returns the lower bound of this parameter.- Returns:
- The lower bound of this parameter.
-
getUpperBound
public double getUpperBound()
Returns the upper bound of this parameter.- Returns:
- The upper bound of this parameter.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-