Class RegressionInfo
java.lang.Object
org.tribuo.regression.RegressionInfo
- All Implemented Interfaces:
Serializable,OutputInfo<Regressor>
- Direct Known Subclasses:
ImmutableRegressionInfo,MutableRegressionInfo
The base class for regression information using
Regressors.
Stores the observed min, max, mean and variance for each dimension.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected longprotected int -
Method Summary
Modifier and TypeMethodDescriptionabstract RegressionInfocopy()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.Returns a set containing a Regressor for each dimension with the minimum value observed.doubleGets the maximum value this RegressionInfo has seen, or NaN if it's not seen that dimension.doubleGets the mean value this RegressionInfo has seen, or NaN if it's not seen that dimension.doubleGets the minimum value this RegressionInfo has seen, or NaN if it's not seen anything.intReturns the number of unknownOutputinstances (generated byOutputFactory.getUnknownOutput()) that this OutputInfo has seen.doublegetVariance(String name) Gets the variance this RegressionInfo has seen, or NaN if it's not seen that dimension.An Iterable over the possible outputs and the number of times they were observed.intsize()The number of dimensions this OutputInfo has seen.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.tribuo.OutputInfo
toReadableString
-
Field Details
-
maxMap
-
minMap
-
meanMap
-
sumSquaresMap
-
countMap
-
overallCount
protected long overallCount -
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<Regressor>- Returns:
- The number of unknown outputs observed.
-
getDomain
Returns a set containing a Regressor for each dimension with the minimum value observed.- Specified by:
getDomainin interfaceOutputInfo<Regressor>- Returns:
- A set of Regressors, each with one active dimension.
-
getMin
Gets the minimum value this RegressionInfo has seen, or NaN if it's not seen anything.- Parameters:
name- The dimension to check.- Returns:
- The minimum value for that dimension.
-
getMax
Gets the maximum value this RegressionInfo has seen, or NaN if it's not seen that dimension.- Parameters:
name- The dimension to check.- Returns:
- The maximum value for that dimension.
-
getMean
Gets the mean value this RegressionInfo has seen, or NaN if it's not seen that dimension.- Parameters:
name- The dimension to check.- Returns:
- The mean value for that dimension.
-
getVariance
Gets the variance this RegressionInfo has seen, or NaN if it's not seen that dimension.- Parameters:
name- The dimension to check.- Returns:
- The variance for that dimension.
-
size
public int size()The number of dimensions this OutputInfo has seen.- Specified by:
sizein interfaceOutputInfo<Regressor>- Returns:
- The number of dimensions this OutputInfo has seen.
-
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<Regressor>- Returns:
- An immutable copy of this OutputInfo.
-
generateMutableOutputInfo
Description copied from interface:OutputInfoGenerates a mutable copy of thisOutputInfo.- Specified by:
generateMutableOutputInfoin interfaceOutputInfo<Regressor>- 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<Regressor>- 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<Regressor>- Returns:
- Lambda wrapping an iterator over Pairs.
-