Package weka.gui.explorer
Class ClustererAssignmentsPlotInstances
java.lang.Object
weka.gui.explorer.AbstractPlotInstances
weka.gui.explorer.ClustererAssignmentsPlotInstances
- All Implemented Interfaces:
Serializable,OptionHandler
A class for generating plottable cluster assignments.
Example usage:
Instances train = ... // from somewhere
Instances test = ... // from somewhere
Clusterer cls = ... // from somewhere
// build and evaluate clusterer
cls.buildClusterer(train);
ClusterEvaluation eval = new ClusterEvaluation();
eval.setClusterer(cls);
eval.evaluateClusterer(test);
// generate plot instances
ClustererPlotInstances plotInstances = new ClustererPlotInstances();
plotInstances.setClusterer(cls);
plotInstances.setInstances(test);
plotInstances.setClusterer(cls);
plotInstances.setClusterEvaluation(eval);
plotInstances.setUp();
// generate visualization
VisualizePanel visPanel = new VisualizePanel();
visPanel.addPlot(plotInstances.getPlotData("plot name"));
// clean up
plotInstances.cleanUp();
- Version:
- $Revision: 10222 $
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcleanUp()For freeing up memory.Returns the currently set clusterer.Returns the cluster evaluation object in use.voidsetClusterer(Clusterer value) Sets the classifier used for making the predictions.voidSets the cluster evaluation object to use.Methods inherited from class weka.gui.explorer.AbstractPlotInstances
canPlot, getInstances, getOptions, getPlotData, getPlotInstances, listOptions, setInstances, setOptions, setUp
-
Constructor Details
-
ClustererAssignmentsPlotInstances
public ClustererAssignmentsPlotInstances()
-
-
Method Details
-
setClusterer
Sets the classifier used for making the predictions.- Parameters:
value- the clusterer to use
-
getClusterer
Returns the currently set clusterer.- Returns:
- the clusterer in use
-
setClusterEvaluation
Sets the cluster evaluation object to use.- Parameters:
value- the evaluation object
-
getClusterEvaluation
Returns the cluster evaluation object in use.- Returns:
- the evaluation object
-
cleanUp
public void cleanUp()For freeing up memory. Plot data cannot be generated after this call!- Overrides:
cleanUpin classAbstractPlotInstances
-