Reputation:
Is it possible to access the graphs produced by WekaForecaster API as visible in Weka Explorer. I see that the API per se does not have any function access. Thanks!
Upvotes: 1
Views: 303
Reputation:
I figured out the answer.
For example-
// Your instances
Instances train;
// Your WekaForecaster
WekaForecaster forecaster;
...
// Custom hold out set size
int holdOutSetSize = 1;
// Init evaluator
TSEvaluation eval = new TSEvaluation(train, holdOutSetSize);
boolean buildModel = false;
// Evaluate the forecaster
eval.evaluateForecaster(forecaster, buildModel, System.out);
// Get graph in JPanel after evaluation on training with custom hold out set size
JPanel trainGraph = eval.graphFutureForecastOnTraining(GraphDriver.getDefaultDriver(),
forecaster, AbstractForecaster.
stringToList(forecaster.getFieldsToForecast()));
Cheers!
Upvotes: 1