public class ImmutableMultiLabelInfo extends MultiLabelInfo implements ImmutableOutputInfo<MultiLabel>
labelCounts, labels, totalCount, unknownCount
Modifier and Type | Method and Description |
---|---|
ImmutableMultiLabelInfo |
copy()
Generates a copy of this OutputInfo, including it's mutability.
|
Set<MultiLabel> |
getDomain()
Returns a set of MultiLabel, where each has a single Label inside it.
|
int |
getID(MultiLabel output)
Return the id number associated with this output, or -1 if the output is unknown.
|
long |
getLabelCount(int id)
Gets the count of the label occurrence for the specified id number, or 0 if it's unknown.
|
MultiLabel |
getOutput(int id)
Returns the output associated with this id, or null if the id is unknown.
|
long |
getTotalObservations()
Returns the total number of observed outputs seen by this ImmutableOutputInfo.
|
Iterator<com.oracle.labs.mlrg.olcut.util.Pair<Integer,MultiLabel>> |
iterator() |
String |
toReadableString()
Generates a String form of this OutputInfo.
|
generateImmutableOutputInfo, generateMutableOutputInfo, getLabelCount, getLabelCount, getUnknownCount, outputCountsIterable, size
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
generateImmutableOutputInfo, generateMutableOutputInfo, getUnknownCount, outputCountsIterable, size
forEach, spliterator
public Set<MultiLabel> getDomain()
MultiLabelInfo
getDomain
in interface OutputInfo<MultiLabel>
getDomain
in class MultiLabelInfo
public int getID(MultiLabel output)
ImmutableOutputInfo
getID
in interface ImmutableOutputInfo<MultiLabel>
output
- An outputpublic MultiLabel getOutput(int id)
ImmutableOutputInfo
getOutput
in interface ImmutableOutputInfo<MultiLabel>
id
- A non-negative integer.public long getTotalObservations()
ImmutableOutputInfo
getTotalObservations
in interface ImmutableOutputInfo<MultiLabel>
public long getLabelCount(int id)
id
- The label id.public ImmutableMultiLabelInfo copy()
OutputInfo
copy
in interface OutputInfo<MultiLabel>
copy
in class MultiLabelInfo
public String toReadableString()
OutputInfo
This String can contain newlines, tabs and other formatting.
toReadableString
in interface OutputInfo<MultiLabel>
public Iterator<com.oracle.labs.mlrg.olcut.util.Pair<Integer,MultiLabel>> iterator()
iterator
in interface Iterable<com.oracle.labs.mlrg.olcut.util.Pair<Integer,MultiLabel>>
Copyright © 2015–2021 Oracle and/or its affiliates. All rights reserved.