InputType - The type of input to the ensemble. Passed to each ensemble member
regression function to produce an output.MemberType - The type of members of the ensemble, which must be evaluators that
return numbers.public class AdditiveEnsemble<InputType,MemberType extends Evaluator<? super InputType,? extends java.lang.Number>> extends AbstractUnweightedEnsemble<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.
|
members| Constructor and Description |
|---|
AdditiveEnsemble()
Creates a new, empty
AdditiveEnsemble. |
AdditiveEnsemble(java.util.List<MemberType> members)
Creates a new
AdditiveEnsemble with the given members and a bias
of 0. |
AdditiveEnsemble(java.util.List<MemberType> members,
double bias)
Creates a new
AdditiveEnsemble with the given members. |
| 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, clone, getMemberCount, getMembers, setMemberspublic static final double DEFAULT_BIAS
protected double bias
public AdditiveEnsemble()
AdditiveEnsemble.public AdditiveEnsemble(java.util.List<MemberType> members)
AdditiveEnsemble with the given members and a bias
of 0.members - The list of ensemble members.public AdditiveEnsemble(java.util.List<MemberType> members, double bias)
AdditiveEnsemble with the given members.members - The list of ensemble members.bias - The initial offset value.public java.lang.Double evaluate(InputType input)
ScalarFunctionevaluateAsDouble.public double evaluateAsDouble(InputType input)
ScalarFunctionevaluateAsDouble in interface ScalarFunction<InputType>input - The input value.public double getBias()
public void setBias(double bias)
bias - The bias.