|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectweka.classifiers.timeseries.eval.graph.GraphDriver
weka.classifiers.timeseries.eval.graph.JFreeChartDriver
public class JFreeChartDriver
Constructor Summary | |
---|---|
JFreeChartDriver()
|
Method Summary | |
---|---|
javax.swing.JPanel |
getGraphPanelSteps(TSForecaster forecaster,
java.util.List<ErrorModule> preds,
java.lang.String targetName,
java.util.List<java.lang.Integer> stepsToPlot,
int instanceNumOffset,
Instances data)
Return the graph encapsulated in a JPanel. |
javax.swing.JPanel |
getGraphPanelTargets(TSForecaster forecaster,
ErrorModule preds,
java.util.List<java.lang.String> targetNames,
int stepNumber,
int instanceNumOffset,
Instances data)
Return the graph encapsulated in a panel. |
java.awt.Image |
getImageFromChart(javax.swing.JPanel chart,
int width,
int height)
Get an image representation of the supplied chart. |
javax.swing.JPanel |
getPanelFutureForecast(TSForecaster forecaster,
java.util.List<java.util.List<NumericPrediction>> preds,
java.util.List<java.lang.String> targetNames,
Instances history)
Return the graph encapsulated in a JPanel |
void |
saveChartToFile(javax.swing.JPanel chart,
java.lang.String filename,
int width,
int height)
Save a chart to a file. |
Methods inherited from class weka.classifiers.timeseries.eval.graph.GraphDriver |
---|
getDefaultDriver, getDriver |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JFreeChartDriver()
Method Detail |
---|
public void saveChartToFile(javax.swing.JPanel chart, java.lang.String filename, int width, int height) throws java.lang.Exception
GraphDriver
saveChartToFile
in class GraphDriver
chart
- the chart to savefilename
- the filename to save towidth
- width of the saved imageheight
- height of the saved image
java.lang.Exception
- if the chart can't be saved for some reasonpublic java.awt.Image getImageFromChart(javax.swing.JPanel chart, int width, int height) throws java.lang.Exception
GraphDriver
getImageFromChart
in class GraphDriver
chart
- the chart to get an image of.width
- width of the chartheight
- height of the chart
java.lang.Exception
- if the image can't be created for some reasonpublic javax.swing.JPanel getGraphPanelTargets(TSForecaster forecaster, ErrorModule preds, java.util.List<java.lang.String> targetNames, int stepNumber, int instanceNumOffset, Instances data) throws java.lang.Exception
GraphDriver
getGraphPanelTargets
in class GraphDriver
forecaster
- the forecasterpreds
- an ErrorModule that contains predictions for all targets
for the specified step ahead. Targets are in the same order
returned by TSForecaster.getFieldsToForecast()targetNames
- the list of target names to plotstepNumber
- which step ahead to graph for specified targetsinstanceNumOffset
- how far into the data the predictions start fromdata
- the instances that these predictions correspond to (may
be null)
java.lang.Exception
public javax.swing.JPanel getGraphPanelSteps(TSForecaster forecaster, java.util.List<ErrorModule> preds, java.lang.String targetName, java.util.List<java.lang.Integer> stepsToPlot, int instanceNumOffset, Instances data) throws java.lang.Exception
GraphDriver
getGraphPanelSteps
in class GraphDriver
forecaster
- the forecasterpreds
- a list of ErrorModules, one for each consecutive step
ahead prediction settargetName
- the name of the target field to plotstepsToPlot
- a list of step numbers for the step-ahead prediction sets to plot
to plot for the specified target.instanceNumOffset
- how far into the data the predictions start fromdata
- the instances that these predictions correspond to (may be null)
java.lang.Exception
public javax.swing.JPanel getPanelFutureForecast(TSForecaster forecaster, java.util.List<java.util.List<NumericPrediction>> preds, java.util.List<java.lang.String> targetNames, Instances history) throws java.lang.Exception
GraphDriver
getPanelFutureForecast
in class GraphDriver
forecaster
- the forecasterpreds
- a list of list of predictions for *all* targets. The
outer list is indexed by step number (i.e. the first entry
is the 1-step ahead forecasts, the second is the 2-steps ahead
forecasts etc.) and the inner list is indexed by target in the
same order as the list of targets returned by TSForecaster.getFieldsToForecast().targetNames
- the list of target names to plothistory
- a set of instances from which predictions are assumed
to follow on from. May be null, in which case just the predictions are
plotted.
java.lang.Exception
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |