InputType - The type of the input to the ensemble. Passed on to each ensemble
member categorizer to produce an output.CategoryType - The type of the output of the ensemble. Also the output of ech
ensemble member categorizer.MemberType - The type of the members of the ensemble, which must be some extension
of the Evaluator interface.public class VotingCategorizerEnsemble<InputType,CategoryType,MemberType extends Evaluator<? super InputType,? extends CategoryType>> extends AbstractDiscriminantCategorizer<InputType,CategoryType,java.lang.Double> implements Ensemble<MemberType>
WeightedVotingCategorizerEnsemble,
Serialized Form| Modifier and Type | Field and Description |
|---|---|
protected java.util.List<MemberType> |
members
The members of the ensemble.
|
categories| Constructor and Description |
|---|
VotingCategorizerEnsemble()
Creates a new, empty
VotingCategorizerEnsemble. |
VotingCategorizerEnsemble(java.util.Set<CategoryType> categories)
Creates a new, empty
VotingCategorizerEnsemble with the given
set of categories. |
VotingCategorizerEnsemble(java.util.Set<CategoryType> categories,
java.util.List<MemberType> members)
Creates a new
VotingCategorizerEnsemble with the given set of
categories and list of members. |
| Modifier and Type | Method and Description |
|---|---|
void |
add(MemberType member)
Adds a given member to the ensemble.
|
CategoryType |
evaluate(InputType input)
Evaluates the function on the given input and returns the output.
|
DefaultDataDistribution<CategoryType> |
evaluateAsVotes(InputType input)
Evaluates the ensemble as votes.
|
DefaultWeightedValueDiscriminant<CategoryType> |
evaluateWithDiscriminant(InputType input)
Evaluate the categorizer on the given input to produce the expected
category plus a discriminant for later producing an ordering of how well
items fit into that category.
|
java.util.List<MemberType> |
getMembers()
Gets the members of the ensemble.
|
void |
setMembers(java.util.List<MemberType> members)
Sets the list of ensemble members.
|
clone, getCategories, setCategoriesequals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetCategoriescloneprotected java.util.List<MemberType extends Evaluator<? super InputType,? extends CategoryType>> members
public VotingCategorizerEnsemble()
VotingCategorizerEnsemble.public VotingCategorizerEnsemble(java.util.Set<CategoryType> categories)
VotingCategorizerEnsemble with the given
set of categories.categories - The set of output categories for the ensemble.public VotingCategorizerEnsemble(java.util.Set<CategoryType> categories, java.util.List<MemberType> members)
VotingCategorizerEnsemble with the given set of
categories and list of members.categories - The set of output categories for the ensemble.members - The list of ensemble members.public void add(MemberType member)
member - The ensemble member to add.public CategoryType evaluate(InputType input)
Evaluatorevaluate in interface Evaluator<InputType,CategoryType>evaluate in class AbstractDiscriminantCategorizer<InputType,CategoryType,java.lang.Double>input - The input to evaluate.public DefaultWeightedValueDiscriminant<CategoryType> evaluateWithDiscriminant(InputType input)
DiscriminantCategorizerevaluateWithDiscriminant in interface DiscriminantCategorizer<InputType,CategoryType,java.lang.Double>input - The input value to categorize with a discriminatepublic DefaultDataDistribution<CategoryType> evaluateAsVotes(InputType input)
input - The input to evaluate.public java.util.List<MemberType> getMembers()
EnsemblegetMembers in interface Ensemble<MemberType extends Evaluator<? super InputType,? extends CategoryType>>public void setMembers(java.util.List<MemberType> members)
members - The list of ensemble members.