InputType - The type of the input the categorizer can use.CategoryType - The type of category output by the categorizer.public class WinnerTakeAllCategorizer<InputType,CategoryType> extends AbstractDiscriminantCategorizer<InputType,CategoryType,java.lang.Double>
| Modifier and Type | Class and Description |
|---|---|
static class |
WinnerTakeAllCategorizer.Learner<InputType,CategoryType>
A learner for the adapter.
|
| Modifier and Type | Field and Description |
|---|---|
protected Evaluator<? super InputType,? extends Vectorizable> |
evaluator
The evaluator that outputs a vector to return.
|
categories| Constructor and Description |
|---|
WinnerTakeAllCategorizer()
Creates a new
WinnerTakesAllCategorizer. |
WinnerTakeAllCategorizer(Evaluator<? super InputType,? extends Vectorizable> evaluator,
java.util.Set<CategoryType> categories)
Creates a new
WinnerTakesAllCategorizer. |
| Modifier and Type | Method and Description |
|---|---|
DefaultWeightedValueDiscriminant<CategoryType> |
evaluateWithDiscriminant(InputType input)
Evaluates the categorizer and returns the category along with a weight.
|
DefaultWeightedValueDiscriminant<CategoryType> |
findBestCategory(Vector output)
Finds the best category (and its output value) from the given vector
of outputs from a vector evaluator.
|
Evaluator<? super InputType,? extends Vectorizable> |
getEvaluator()
Gets the wrapped evaluator.
|
void |
setCategories(java.util.Set<CategoryType> categories)
Sets the Set of possible categories, which are the output values.
|
void |
setEvaluator(Evaluator<? super InputType,? extends Vectorizable> evaluator)
Sets the wrapped evaluator.
|
evaluateclone, getCategoriesequals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetCategoriescloneprotected Evaluator<? super InputType,? extends Vectorizable> evaluator
public WinnerTakeAllCategorizer()
WinnerTakesAllCategorizer.public WinnerTakeAllCategorizer(Evaluator<? super InputType,? extends Vectorizable> evaluator, java.util.Set<CategoryType> categories)
WinnerTakesAllCategorizer.evaluator - The evaluator that this class adapts.categories - The set of categories.public DefaultWeightedValueDiscriminant<CategoryType> evaluateWithDiscriminant(InputType input)
input - The input to evaluate.public DefaultWeightedValueDiscriminant<CategoryType> findBestCategory(Vector output)
output - The vector of outputs, one corresponding to each category.public Evaluator<? super InputType,? extends Vectorizable> getEvaluator()
public void setEvaluator(Evaluator<? super InputType,? extends Vectorizable> evaluator)
evaluator - The wrapped evaluator.public void setCategories(java.util.Set<CategoryType> categories)
AbstractCategorizersetCategories in class AbstractCategorizer<InputType,CategoryType>categories - The list of possible output categories.