public static class LinearRegression.Statistic extends AbstractConfidenceStatistic
nullHypothesisProbability
Constructor and Description |
---|
Statistic(java.util.Collection<java.lang.Double> targets,
java.util.Collection<java.lang.Double> estimates,
java.util.Collection<java.lang.Double> weights,
int numParameters)
Creates a new instance of Statistic
|
Statistic(java.util.Collection<java.lang.Double> targets,
java.util.Collection<java.lang.Double> estimates,
int numParameters)
Creates a new instance of Statistic
|
Modifier and Type | Method and Description |
---|---|
LinearRegression.Statistic |
clone()
This makes public the clone method on the
Object class and
removes the exception that it throws. |
double |
getChiSquare()
Getter for chiSquare
|
double |
getDegreesOfFreedom()
Getter for degreesOfFreedom
|
double |
getMeanL1Error()
Getter for meanL1Error
|
int |
getNumParameters()
Getter for numParameters
|
int |
getNumSamples()
Getter for numSamples
|
double |
getRootMeanSquaredError()
Getter for rootMeanSquaredError
|
double |
getTargetEstimateCorrelation()
Getter for targetEstimateCorrelation
|
double |
getTestStatistic()
Gets the statistic from which we compute the null-hypothesis probability.
|
double |
getUnpredictedErrorFraction()
Getter for unpredictedErrorFraction
|
void |
setChiSquare(double chiSquare)
Setter for chiSquare
|
protected void |
setDegreesOfFreedom(double degreesOfFreedom)
Setter for degreesOfFreedom
|
protected void |
setMeanL1Error(double meanL1Error)
Setter for meanL1Error
|
void |
setNumParameters(int numParameters)
Setter for numParameters
|
protected void |
setNumSamples(int numSamples)
Setter for numSamples
|
protected void |
setRootMeanSquaredError(double rootMeanSquaredError)
Setter fpr rootMeanSquaredError
|
protected void |
setTargetEstimateCorrelation(double targetEstimateCorrelation)
Setter for targetEstimateCorrelation
|
protected void |
setUnpredictedErrorFraction(double unpredictedErrorFraction)
Setter for unpredictedErrorFraction
|
getNullHypothesisProbability, setNullHypothesisProbability, toString
public Statistic(java.util.Collection<java.lang.Double> targets, java.util.Collection<java.lang.Double> estimates, int numParameters)
targets
- Collection of ground-truth targets for the learned approximatorestimates
- Collection of estimates from the learned approximatornumParameters
- Number of parameters in the learned approximatorpublic Statistic(java.util.Collection<java.lang.Double> targets, java.util.Collection<java.lang.Double> estimates, java.util.Collection<java.lang.Double> weights, int numParameters)
targets
- Collection of ground-truth targets for the learned approximatorestimates
- Collection of estimates from the learned approximatorweights
- Collection of weights to apply to the corresponding target-estimate
pairnumParameters
- Number of parameters in the learned approximatorpublic LinearRegression.Statistic clone()
AbstractCloneableSerializable
Object
class and
removes the exception that it throws. Its default behavior is to
automatically create a clone of the exact type of object that the
clone is called on and to copy all primitives but to keep all references,
which means it is a shallow copy.
Extensions of this class may want to override this method (but call
super.clone()
to implement a "smart copy". That is, to target
the most common use case for creating a copy of the object. Because of
the default behavior being a shallow copy, extending classes only need
to handle fields that need to have a deeper copy (or those that need to
be reset). Some of the methods in ObjectUtil
may be helpful in
implementing a custom clone method.
Note: The contract of this method is that you must use
super.clone()
as the basis for your implementation.clone
in interface CloneableSerializable
clone
in class AbstractCloneableSerializable
public double getRootMeanSquaredError()
protected void setRootMeanSquaredError(double rootMeanSquaredError)
rootMeanSquaredError
- Root mean-squared error of the targets and estimatespublic double getTargetEstimateCorrelation()
protected void setTargetEstimateCorrelation(double targetEstimateCorrelation)
targetEstimateCorrelation
- Pearson Correlation between the targets and estimates, [-1,1]public double getUnpredictedErrorFraction()
protected void setUnpredictedErrorFraction(double unpredictedErrorFraction)
unpredictedErrorFraction
- Fraction of variance unaccounted for in the predictions, [0,1]public int getNumSamples()
protected void setNumSamples(int numSamples)
numSamples
- Number of samples used to create the Regressionpublic double getDegreesOfFreedom()
protected void setDegreesOfFreedom(double degreesOfFreedom)
degreesOfFreedom
- Degrees of freedom in the Regression = numSamples-numParameterspublic double getMeanL1Error()
protected void setMeanL1Error(double meanL1Error)
meanL1Error
- Average L1-norm error (absolute value difference) between the
targets and estimatespublic int getNumParameters()
public void setNumParameters(int numParameters)
numParameters
- Number of parameters in the learned approximatorpublic double getChiSquare()
public void setChiSquare(double chiSquare)
chiSquare
- Gets the value of the chi-square variable,
Total weighted sum-squared error between the targets and estimatespublic double getTestStatistic()
ConfidenceStatistic