public class ImmutableRegressionInfo extends RegressionInfo implements ImmutableOutputInfo<Regressor>
ImmutableOutputInfo
for Regressor
s.countMap, maxMap, meanMap, minMap, overallCount, sumSquaresMap, unknownCount
Modifier and Type | Method and Description |
---|---|
ImmutableRegressionInfo |
copy()
Generates a copy of this OutputInfo, including it's mutability.
|
Set<Regressor> |
getDomain()
Returns a set containing a Regressor for each dimension with the minimum value observed.
|
int |
getID(Regressor output)
Return the id number associated with this output, or -1 if the output is unknown.
|
int[] |
getIDtoNaturalOrderMapping()
Computes the mapping between ID numbers and regressor dimension indices.
|
int[] |
getNaturalOrderToIDMapping()
Computes the mapping between regressor dimension indices and ID numbers.
|
Regressor |
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,Regressor>> |
iterator() |
String |
toReadableString()
Generates a String form of this OutputInfo.
|
String |
toString() |
boolean |
validateMapping()
Returns true if the id numbers correspond to a lexicographic ordering of
the dimension names starting from zero, false otherwise.
|
generateImmutableOutputInfo, generateMutableOutputInfo, getMax, getMean, getMin, getUnknownCount, getVariance, outputCountsIterable, size
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
generateImmutableOutputInfo, generateMutableOutputInfo, getUnknownCount, outputCountsIterable, size
forEach, spliterator
public Set<Regressor> getDomain()
RegressionInfo
getDomain
in interface OutputInfo<Regressor>
getDomain
in class RegressionInfo
public int getID(Regressor output)
ImmutableOutputInfo
getID
in interface ImmutableOutputInfo<Regressor>
output
- An outputpublic Regressor getOutput(int id)
ImmutableOutputInfo
getOutput
in interface ImmutableOutputInfo<Regressor>
id
- A non-negative integer.public long getTotalObservations()
ImmutableOutputInfo
getTotalObservations
in interface ImmutableOutputInfo<Regressor>
public ImmutableRegressionInfo copy()
OutputInfo
copy
in interface OutputInfo<Regressor>
copy
in class RegressionInfo
public boolean validateMapping()
public int[] getIDtoNaturalOrderMapping()
In some situations the regressor dimension ID numbers may not use the natural ordering (i.e., the lexicographic order of the dimension names). This method computes the mapping from the id numbers to the natural ordering.
public int[] getNaturalOrderToIDMapping()
In some situations the regressor dimension ID numbers may not use the natural ordering (i.e., the lexicographic order of the dimension names). This method computes the mapping from the natural ordering to the id numbers.
public String toReadableString()
OutputInfo
This String can contain newlines, tabs and other formatting.
toReadableString
in interface OutputInfo<Regressor>
Copyright © 2015–2021 Oracle and/or its affiliates. All rights reserved.