Class ClusteringInfo
java.lang.Object
org.tribuo.clustering.ClusteringInfo
- All Implemented Interfaces:
Serializable,OutputInfo<ClusterID>
- Direct Known Subclasses:
ImmutableClusteringInfo,MutableClusteringInfo
The base class for a ClusterID OutputInfo.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected int -
Method Summary
Modifier and TypeMethodDescriptionabstract ClusteringInfocopy()Generates a copy of this OutputInfo, including it's mutability.Generates anImmutableOutputInfowhich has a copy of the data in thisOutputInfo, but also has id values and is immutable.Generates a mutable copy of thisOutputInfo.intReturns the number of unknownOutputinstances (generated byOutputFactory.getUnknownOutput()) that this OutputInfo has seen.An Iterable over the possible outputs and the number of times they were observed.intsize()Returns the number of possible values this OutputInfo knows about.Generates a String form of this OutputInfo.toString()
-
Field Details
-
clusterCounts
-
unknownCount
protected int unknownCount
-
-
Method Details
-
getUnknownCount
public int getUnknownCount()Description copied from interface:OutputInfoReturns the number of unknownOutputinstances (generated byOutputFactory.getUnknownOutput()) that this OutputInfo has seen.- Specified by:
getUnknownCountin interfaceOutputInfo<ClusterID>- Returns:
- The number of unknown outputs observed.
-
getDomain
Description copied from interface:OutputInfoReturns a set ofOutputwhich represent the space of possible values theOutputhas taken.For real values this set represents the number of dimensions observed.
- Specified by:
getDomainin interfaceOutputInfo<ClusterID>- Returns:
- A Set of
T.
-
size
public int size()Description copied from interface:OutputInfoReturns the number of possible values this OutputInfo knows about.For real values this is the number of dimensions observed.
- Specified by:
sizein interfaceOutputInfo<ClusterID>- Returns:
- An int representing the size of the domain.
-
generateImmutableOutputInfo
Description copied from interface:OutputInfoGenerates anImmutableOutputInfowhich has a copy of the data in thisOutputInfo, but also has id values and is immutable.- Specified by:
generateImmutableOutputInfoin interfaceOutputInfo<ClusterID>- Returns:
- An immutable copy of this OutputInfo.
-
generateMutableOutputInfo
Description copied from interface:OutputInfoGenerates a mutable copy of thisOutputInfo.- Specified by:
generateMutableOutputInfoin interfaceOutputInfo<ClusterID>- Returns:
- A mutable copy of this OutputInfo.
-
copy
Description copied from interface:OutputInfoGenerates a copy of this OutputInfo, including it's mutability.- Specified by:
copyin interfaceOutputInfo<ClusterID>- Returns:
- A copy of the OutputInfo.
-
outputCountsIterable
Description copied from interface:OutputInfoAn Iterable over the possible outputs and the number of times they were observed.Provides similar functionality to an iterator over the entrySet of a Map, though this is a copy of the data and immutable.
- Specified by:
outputCountsIterablein interfaceOutputInfo<ClusterID>- Returns:
- Lambda wrapping an iterator over Pairs.
-
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<ClusterID>- Returns:
- A formatted String representing this OutputInfo.
-
toString
-