public class ImmutableClusteringInfo extends ClusteringInfo implements ImmutableOutputInfo<ClusterID>
ImmutableOutputInfo
object for ClusterIDs.
Gives each unique cluster an id number. Also counts each id occurrence like MutableClusteringInfo
does,
though the counts are frozen in this object.
clusterCounts, unknownCount
Constructor and Description |
---|
ImmutableClusteringInfo(ClusteringInfo other) |
ImmutableClusteringInfo(Map<Integer,com.oracle.labs.mlrg.olcut.util.MutableLong> counts) |
Modifier and Type | Method and Description |
---|---|
ClusteringInfo |
copy()
Generates a copy of this OutputInfo, including it's mutability.
|
Set<ClusterID> |
getDomain()
|
int |
getID(ClusterID output)
Return the id number associated with this output, or -1 if the output is unknown.
|
ClusterID |
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,ClusterID>> |
iterator() |
generateImmutableOutputInfo, generateMutableOutputInfo, getUnknownCount, outputCountsIterable, size, toReadableString, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
generateImmutableOutputInfo, generateMutableOutputInfo, getUnknownCount, outputCountsIterable, size, toReadableString
forEach, spliterator
public ImmutableClusteringInfo(Map<Integer,com.oracle.labs.mlrg.olcut.util.MutableLong> counts)
public ImmutableClusteringInfo(ClusteringInfo other)
public Set<ClusterID> getDomain()
OutputInfo
Output
which represent the space of possible
values the Output
has taken.
For real values this set represents the number of dimensions observed.
getDomain
in interface OutputInfo<ClusterID>
getDomain
in class ClusteringInfo
T
.public int getID(ClusterID output)
ImmutableOutputInfo
getID
in interface ImmutableOutputInfo<ClusterID>
output
- An outputpublic ClusterID getOutput(int id)
ImmutableOutputInfo
getOutput
in interface ImmutableOutputInfo<ClusterID>
id
- A non-negative integer.public long getTotalObservations()
ImmutableOutputInfo
getTotalObservations
in interface ImmutableOutputInfo<ClusterID>
public ClusteringInfo copy()
OutputInfo
copy
in interface OutputInfo<ClusterID>
copy
in class ClusteringInfo
Copyright © 2015–2021 Oracle and/or its affiliates. All rights reserved.