InputType
- The type of input the ensemble can take. Passed to each ensemble
member to produce an output.MemberType
- The type of members of this ensemble.public class WeightedAdditiveEnsemble<InputType,MemberType extends Evaluator<? super InputType,? extends java.lang.Number>> extends AbstractWeightedEnsemble<MemberType> implements Regressor<InputType>
Modifier and Type | Field and Description |
---|---|
protected double |
bias
The initial offset value that the ensemble outputs are added to.
|
static double |
DEFAULT_BIAS
The default bias is 0.0.
|
DEFAULT_WEIGHT, members
Constructor and Description |
---|
WeightedAdditiveEnsemble()
Creates a new, empty of WeightedAdditiveEnsemble.
|
WeightedAdditiveEnsemble(java.util.List<WeightedValue<MemberType>> members)
Creates a new instance of WeightedAdditiveEnsemble.
|
WeightedAdditiveEnsemble(java.util.List<WeightedValue<MemberType>> members,
double bias)
Creates a new instance of WeightedAdditiveEnsemble.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Double |
evaluate(InputType input)
Returns the result of calling
evaluateAsDouble . |
double |
evaluateAsDouble(InputType input)
Evaluates the scalar function as a double.
|
double |
getBias()
Gets the initial offset value (bias) to which the output of the ensemble
members are added when computing a result.
|
void |
setBias(double bias)
Sets the initial offset value (bias) to which the output of the ensemble
members are added when computing a result.
|
add, add, clone, getMemberCount, getMembers, getWeightSum, setMembers
public static final double DEFAULT_BIAS
protected double bias
public WeightedAdditiveEnsemble()
public WeightedAdditiveEnsemble(java.util.List<WeightedValue<MemberType>> members)
members
- The members of the ensemble.public WeightedAdditiveEnsemble(java.util.List<WeightedValue<MemberType>> members, double bias)
members
- The members of the ensemble.bias
- The initial offset for the result.public java.lang.Double evaluate(InputType input)
ScalarFunction
evaluateAsDouble
.public double evaluateAsDouble(InputType input)
ScalarFunction
evaluateAsDouble
in interface ScalarFunction<InputType>
input
- The input value.public double getBias()
public void setBias(double bias)
bias
- The bias.