Category is a util class, contains a label, its display name, a float value as score, and the index of the label in the corresponding label file. Typically it's used as result of classification tasks.
static Category | |
static Category | |
boolean | |
String |
getDisplayName()
Gets the reference of category's displayName, a name in locale of the label.
|
int |
getIndex()
Gets the index of the category.
|
String |
getLabel()
Gets the reference of category's label.
|
float |
getScore()
Gets the score of the category.
|
int |
hashCode()
|
String |
toString()
|
Constructs a Category
object.
label | the label of this category object |
---|---|
displayName | the display name of the label, which may be translated for different locales. For exmaple, a label, "apple", may be translated into Spanish for display purpose, so that the displayName is "manzana". |
score | the probability score of this label category |
index | the index of the label in the corresponding label file |
Constructs a Category
object with the default index (-1).
label | |
---|---|
displayName | |
score |
Gets the reference of category's displayName, a name in locale of the label.
The display name can be an empty string if this Category
object is constructed
without displayName, such as when using Category(String, float)
.
Gets the index of the category. The index value might be -1, which means it has not been set up properly and is invalid.
Gets the score of the category.