public abstract class MultiLabelInfo extends Object implements OutputInfo<MultiLabel>
MultiLabel
outputs.Modifier and Type | Field and Description |
---|---|
protected Map<String,com.oracle.labs.mlrg.olcut.util.MutableLong> |
labelCounts |
protected Map<String,MultiLabel> |
labels |
protected int |
totalCount |
protected int |
unknownCount |
Modifier and Type | Method and Description |
---|---|
abstract MultiLabelInfo |
copy()
Generates a copy of this OutputInfo, including it's mutability.
|
ImmutableOutputInfo<MultiLabel> |
generateImmutableOutputInfo()
Generates an
ImmutableOutputInfo which has a copy of the data
in this OutputInfo , but also has id values and is immutable. |
MutableOutputInfo<MultiLabel> |
generateMutableOutputInfo()
Generates a mutable copy of this
OutputInfo . |
Set<MultiLabel> |
getDomain()
Returns a set of MultiLabel, where each has a single Label inside it.
|
long |
getLabelCount(Label label)
Get the number of times this Label was observed, or 0 if unknown.
|
long |
getLabelCount(String label)
Get the number of times this String was observed, or 0 if unknown.
|
int |
getUnknownCount()
Returns the number of unknown
Output instances (generated by OutputFactory.getUnknownOutput() )
that this OutputInfo has seen. |
Iterable<com.oracle.labs.mlrg.olcut.util.Pair<String,Long>> |
outputCountsIterable()
An Iterable over the possible outputs and the number of times they were observed.
|
int |
size()
Returns the number of possible values this OutputInfo knows about.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
toReadableString
protected int unknownCount
protected transient Map<String,MultiLabel> labels
protected int totalCount
public int getUnknownCount()
OutputInfo
Output
instances (generated by OutputFactory.getUnknownOutput()
)
that this OutputInfo has seen.getUnknownCount
in interface OutputInfo<MultiLabel>
public Set<MultiLabel> getDomain()
getDomain
in interface OutputInfo<MultiLabel>
public long getLabelCount(Label label)
label
- The Label to look for.public long getLabelCount(String label)
label
- The String to look for.public Iterable<com.oracle.labs.mlrg.olcut.util.Pair<String,Long>> outputCountsIterable()
OutputInfo
Provides similar functionality to an iterator over the entrySet of a Map, though this is a copy of the data and immutable.
outputCountsIterable
in interface OutputInfo<MultiLabel>
public int size()
OutputInfo
For real values this is the number of dimensions observed.
size
in interface OutputInfo<MultiLabel>
public ImmutableOutputInfo<MultiLabel> generateImmutableOutputInfo()
OutputInfo
ImmutableOutputInfo
which has a copy of the data
in this OutputInfo
, but also has id values and is immutable.generateImmutableOutputInfo
in interface OutputInfo<MultiLabel>
public MutableOutputInfo<MultiLabel> generateMutableOutputInfo()
OutputInfo
OutputInfo
.generateMutableOutputInfo
in interface OutputInfo<MultiLabel>
public abstract MultiLabelInfo copy()
OutputInfo
copy
in interface OutputInfo<MultiLabel>
Copyright © 2015–2021 Oracle and/or its affiliates. All rights reserved.