Package com.basistech.rosette.dm
Class CategorizerResult.Builder
java.lang.Object
com.basistech.rosette.dm.BaseAttribute.Builder<CategorizerResult,CategorizerResult.Builder>
com.basistech.rosette.dm.CategorizerResult.Builder
- Enclosing class:
- CategorizerResult
public static class CategorizerResult.Builder
extends BaseAttribute.Builder<CategorizerResult,CategorizerResult.Builder>
A builder for classifier results.
-
Constructor Summary
ConstructorDescriptionBuilder
(CategorizerResult toCopy) Constructs a builder by copying values from an existing categorizer result.Constructs a builder from the required values. -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Returns an immutable categorizer result from the current state of the builder.confidence
(Double confidence) Specifies the confidence value.explanationSet
(List<String> explanationSet) Specifies the explanation set.protected CategorizerResult.Builder
getThis()
perFeatureScores
(Map<String, Double> perFeatureScores) Specifies the per-feature scores.Methods inherited from class com.basistech.rosette.dm.BaseAttribute.Builder
addAllToList, addAllToSet, buildExtendedProperties, extendedProperties, extendedProperty, nullOrList
-
Constructor Details
-
Builder
Constructs a builder from the required values.- Parameters:
label
- the labelscore
- the raw score
-
Builder
Constructs a builder by copying values from an existing categorizer result.- Parameters:
toCopy
- the object to create
-
-
Method Details
-
confidence
Specifies the confidence value.- Parameters:
confidence
- the confidence value- Returns:
- this
-
explanationSet
Specifies the explanation set.- Parameters:
explanationSet
- the explanation set- Returns:
- this
-
perFeatureScores
Specifies the per-feature scores.- Parameters:
perFeatureScores
- the per-feature scores- Returns:
- this
-
build
Returns an immutable categorizer result from the current state of the builder.- Returns:
- the new categorizer result
-
getThis
- Specified by:
getThis
in classBaseAttribute.Builder<CategorizerResult,
CategorizerResult.Builder>
-