T - type of input objects to classify (eg. User, Product, Transaction, Image, etc.)R - type of classification result map eg. String is commonly used , but Enum or Boolean as well.
In general Enums should be used when there is a small number of categories and String for more categories.@FunctionalInterface public interface Classifier<T,R>
| Modifier and Type | Method and Description |
|---|---|
Map<R,Float> |
classify(T input)
Classifies specified instance and returns classification results as
map with class names and corresponding classification scores.
|
Copyright © 2019. All rights reserved.