public interface TSForecaster
Modifier and Type | Method and Description |
---|---|
boolean |
baseModelHasSerializer()
Check whether the base learner requires special serialization
|
void |
buildForecaster(weka.core.Instances insts,
PrintStream... progress)
Builds a new forecasting model using the supplied training
data.
|
void |
clearPreviousState()
Reset model state.
|
List<List<weka.classifiers.evaluation.NumericPrediction>> |
forecast(int numSteps,
PrintStream... progress)
Produce a forecast for the target field(s).
|
String |
getAlgorithmName()
Provides a short name that describes the underlying algorithm
in some way.
|
String |
getFieldsToForecast()
Get the fields to forecast.
|
List<Object> |
getPreviousState()
Get the last set state of the model.
|
void |
loadBaseModel(String filepath)
Load serialized classifier
|
void |
loadSerializedState(String filepath)
Load serialized model state
|
void |
primeForecaster(weka.core.Instances insts)
Supply the (potentially) trained model with enough historical
data, up to and including the current time point, in order
to produce a forecast.
|
void |
reset()
Reset this forecaster so that it is ready to construct a
new model.
|
void |
runForecaster(TSForecaster forecaster,
String[] options)
Run the supplied forecaster with the supplied options on the command line.
|
void |
saveBaseModel(String filepath)
Save underlying classifier
|
void |
serializeState(String filepath)
Serialize model state
|
void |
setFieldsToForecast(String targets)
Set the names of the fields/attributes in the data to forecast.
|
void |
setPreviousState(List<Object> previousState)
Load state into model.
|
boolean |
usesState()
Check whether the base learner requires operations regarding state
|
boolean baseModelHasSerializer()
void saveBaseModel(String filepath) throws Exception
filepath
- the path of the file to save the base model toException
void loadBaseModel(String filepath) throws Exception
filepath
- the path of the file to load the base model fromException
boolean usesState()
void clearPreviousState()
List<Object> getPreviousState()
void serializeState(String filepath) throws Exception
filepath
- the path of the file to save the model state toException
void loadSerializedState(String filepath) throws Exception
filepath
- the path of the file to save the model state fromException
String getAlgorithmName()
void reset()
void setFieldsToForecast(String targets) throws Exception
targets
- a list of names of fields to forecastException
- if a field(s) can't be found, or if multiple
fields are specified and this forecaster can't predict multiple
fields.String getFieldsToForecast()
void buildForecaster(weka.core.Instances insts, PrintStream... progress) throws Exception
insts
- the training instances.progress
- an optional varargs parameter supplying progress objects
to report/log toException
- if the model can't be constructed for some
reason.void primeForecaster(weka.core.Instances insts) throws Exception
insts
- the instances to prime the model withException
- if the model can't be primed for some
reason.List<List<weka.classifiers.evaluation.NumericPrediction>> forecast(int numSteps, PrintStream... progress) throws Exception
numSteps
- number of forecasted values to produce for each target. E.g.
a value of 5 would produce a prediction for t+1, t+2, ..., t+5.progress
- an optional varargs parameter supplying progress objects
to report/log toException
- if the forecast can't be produced for some reason.void runForecaster(TSForecaster forecaster, String[] options)
forecaster
- the forecaster to runoptions
- the options to pass to the forecasterCopyright © 2019 University of Waikato, Hamilton, NZ. All Rights Reserved.