public class ErrorBasedConfidenceIntervalEstimator extends Object implements Serializable
Constructor and Description |
---|
ErrorBasedConfidenceIntervalEstimator() |
Modifier and Type | Method and Description |
---|---|
void |
calculateConfidenceOffsets(TSForecaster forecaster,
weka.core.Instances insts,
int numPrime,
int numSteps,
double confidenceLevel,
PrintStream... progress)
Computes confidence intervals using the supplied forecster and
training data.
|
void |
calculateConfidenceOffsets(TSForecaster forecaster,
weka.core.Instances insts,
int numPrime,
int artificialTimeStartValue,
int numSteps,
double confidenceLevel,
PrintStream... progress)
Computes confidence intervals using the supplied forecaster and
training data.
|
double |
getConfidenceLevel()
Get the confidence level in use
|
double[] |
getConfidenceLimitsForTarget(String targetName,
double targetValue,
int stepNum)
Get the confidence limits (upper and lower bounds) for the named target
at the given step number
|
List<double[]> |
getConfidenceOffsets(double confidenceLevel,
List<List<weka.classifiers.evaluation.NumericPrediction>> predictions)
Get the confidence bound offsets for each target at the supplied
confidence level
|
public ErrorBasedConfidenceIntervalEstimator()
public List<double[]> getConfidenceOffsets(double confidenceLevel, List<List<weka.classifiers.evaluation.NumericPrediction>> predictions) throws Exception
confidenceLevel
- the confidence level to useException
- if the confidence limits can't be computed
for some reasonpublic void calculateConfidenceOffsets(TSForecaster forecaster, weka.core.Instances insts, int numPrime, int numSteps, double confidenceLevel, PrintStream... progress) throws Exception
forecaster
- the forecaster to useinsts
- the training data to usenumPrime
- the number of instances to prime the forecaster withnumSteps
- the number of steps to forecast (and hence compute
intervals for)confidenceLevel
- the confidence level to useprogress
- PrintStream objects to report progress toException
- if a problem occurspublic void calculateConfidenceOffsets(TSForecaster forecaster, weka.core.Instances insts, int numPrime, int artificialTimeStartValue, int numSteps, double confidenceLevel, PrintStream... progress) throws Exception
forecaster
- the forecaster to useinsts
- the training datanumPrime
- the number of instances to prime withartificialTimeStartValue
- start value for the artificial time stamp
(if one is being used or -1 otherwise)numSteps
- number of time steps to compute confidence intervals forconfidenceLevel
- the confidence level to useprogress
- varargs PrintStream object(s) to report progress toException
- if something goes wrong.public double getConfidenceLevel()
public double[] getConfidenceLimitsForTarget(String targetName, double targetValue, int stepNum) throws Exception
targetName
- the name of the target to return the limits fortargetValue
- the predicted target valuestepNum
- the step number to return the bounds for this targetException
- if a problem occurs while computing the bounds.Copyright © 2019 University of Waikato, Hamilton, NZ. All Rights Reserved.