public final class MultiLabelFactory extends Object implements OutputFactory<MultiLabel>
Modifier and Type | Class and Description |
---|---|
static class |
MultiLabelFactory.MultiLabelFactoryProvenance
Provenance for
MultiLabelFactory . |
Modifier and Type | Field and Description |
---|---|
static MultiLabel |
UNKNOWN_MULTILABEL |
Constructor and Description |
---|
MultiLabelFactory()
Construct a MultiLabelFactory.
|
Modifier and Type | Method and Description |
---|---|
ImmutableOutputInfo<MultiLabel> |
constructInfoForExternalModel(Map<MultiLabel,Integer> mapping)
Creates an
ImmutableOutputInfo from the supplied mapping. |
boolean |
equals(Object obj) |
MutableOutputInfo<MultiLabel> |
generateInfo()
Generates the appropriate
MutableOutputInfo so the
output values can be tracked by a Dataset or other
aggregate. |
static String |
generateLabelString(Set<Label> input)
|
<V> MultiLabel |
generateOutput(V label)
Parses the MultiLabel value either by toStringing the input and calling
MultiLabel.parseString(java.lang.String)
or if it's a Collection iterating over the elements calling toString on each element in turn and using
MultiLabel.parseElement(java.lang.String) . |
Evaluator<MultiLabel,MultiLabelEvaluation> |
getEvaluator()
Gets an
Evaluator suitable for measuring performance of predictions for the Output subclass. |
OutputFactoryProvenance |
getProvenance() |
MultiLabel |
getUnknownOutput()
Returns the singleton unknown output of type T which can be used for prediction time examples.
|
int |
hashCode() |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
generateOutputs, validateMapping
public static final MultiLabel UNKNOWN_MULTILABEL
public <V> MultiLabel generateOutput(V label)
MultiLabel.parseString(java.lang.String)
or if it's a Collection
iterating over the elements calling toString on each element in turn and using
MultiLabel.parseElement(java.lang.String)
.generateOutput
in interface OutputFactory<MultiLabel>
V
- The type of the input value.label
- An input value.public MultiLabel getUnknownOutput()
OutputFactory
getUnknownOutput
in interface OutputFactory<MultiLabel>
public MutableOutputInfo<MultiLabel> generateInfo()
OutputFactory
MutableOutputInfo
so the
output values can be tracked by a Dataset
or other
aggregate.generateInfo
in interface OutputFactory<MultiLabel>
MutableOutputInfo
initialised to zero.public ImmutableOutputInfo<MultiLabel> constructInfoForExternalModel(Map<MultiLabel,Integer> mapping)
OutputFactory
ImmutableOutputInfo
from the supplied mapping.
Requires that the mapping is dense in the integers [0,mapping.size()) and
each mapping is unique.
This call is used to import external models, and should not be used for other purposes.
constructInfoForExternalModel
in interface OutputFactory<MultiLabel>
mapping
- The mapping to use.ImmutableOutputInfo
with a single observation of each element.public Evaluator<MultiLabel,MultiLabelEvaluation> getEvaluator()
OutputFactory
Evaluator
suitable for measuring performance of predictions for the Output subclass.
Evaluator
instances are thread safe and immutable, and commonly this is a singleton
stored in the OutputFactory
implementation.
getEvaluator
in interface OutputFactory<MultiLabel>
public OutputFactoryProvenance getProvenance()
getProvenance
in interface com.oracle.labs.mlrg.olcut.provenance.Provenancable<OutputFactoryProvenance>
Copyright © 2015–2021 Oracle and/or its affiliates. All rights reserved.