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
ConstructorsConstructorDescriptionMutableLabelInfo(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, sizeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods 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:MutableOutputInfoRecords an output value or statistics thereof.- Specified by:
observein interfaceMutableOutputInfo<Label>- Parameters:
output- The observed output.
-
clear
public void clear()Description copied from interface:MutableOutputInfoClears the OutputInfo, removing all things it's observed.- Specified by:
clearin interfaceMutableOutputInfo<Label>
-
copy
Description copied from interface:OutputInfoGenerates a copy of this OutputInfo, including it's mutability.- Specified by:
copyin interfaceOutputInfo<Label>- Specified by:
copyin classLabelInfo- Returns:
- A copy of the OutputInfo.
-
toReadableString
Description copied from interface:OutputInfoGenerates a String form of this OutputInfo.This String can contain newlines, tabs and other formatting.
- Specified by:
toReadableStringin interfaceOutputInfo<Label>- Returns:
- A formatted String representing this OutputInfo.
-
toString
-