Package org.tribuo.classification
Class MutableLabelInfo
java.lang.Object
org.tribuo.classification.LabelInfo
org.tribuo.classification.MutableLabelInfo
- All Implemented Interfaces:
Serializable
,MutableOutputInfo<Label>
,OutputInfo<Label>
A mutable
LabelInfo
. Can record new observations of Labels, incrementing the
appropriate counts.- See Also:
-
Field Summary
Fields inherited from class org.tribuo.classification.LabelInfo
labelCounts, labels, unknownCount
-
Constructor Summary
ConstructorDescriptionMutableLabelInfo
(LabelInfo info) Constructs a mutable deep copy of the supplied label info. -
Method Summary
Methods inherited from class org.tribuo.classification.LabelInfo
generateImmutableOutputInfo, generateMutableOutputInfo, getDomain, getLabelCount, getLabelCount, getUnknownCount, outputCountsIterable, size
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.tribuo.OutputInfo
generateImmutableOutputInfo, generateMutableOutputInfo, getDomain, getUnknownCount, outputCountsIterable, size
-
Constructor Details
-
MutableLabelInfo
Constructs a mutable deep copy of the supplied label info.- Parameters:
info
- The info to copy.
-
-
Method Details
-
observe
Description copied from interface:MutableOutputInfo
Records an output value or statistics thereof.- Specified by:
observe
in interfaceMutableOutputInfo<Label>
- Parameters:
output
- The observed output.
-
clear
public void clear()Description copied from interface:MutableOutputInfo
Clears the OutputInfo, removing all things it's observed.- Specified by:
clear
in interfaceMutableOutputInfo<Label>
-
copy
Description copied from interface:OutputInfo
Generates a copy of this OutputInfo, including it's mutability.- Specified by:
copy
in interfaceOutputInfo<Label>
- Specified by:
copy
in classLabelInfo
- Returns:
- A copy of the OutputInfo.
-
toReadableString
Description copied from interface:OutputInfo
Generates a String form of this OutputInfo.This String can contain newlines, tabs and other formatting.
- Specified by:
toReadableString
in interfaceOutputInfo<Label>
- Returns:
- A formatted String representing this OutputInfo.
-
toString
-