Package weka.gui.explorer
Class ClustererAssignmentsPlotInstances
- java.lang.Object
-
- weka.gui.explorer.AbstractPlotInstances
-
- weka.gui.explorer.ClustererAssignmentsPlotInstances
-
- All Implemented Interfaces:
java.io.Serializable,OptionHandler
public class ClustererAssignmentsPlotInstances extends AbstractPlotInstances
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:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ClustererAssignmentsPlotInstances()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcleanUp()For freeing up memory.ClusterergetClusterer()Returns the currently set clusterer.ClusterEvaluationgetClusterEvaluation()Returns the cluster evaluation object in use.voidsetClusterer(Clusterer value)Sets the classifier used for making the predictions.voidsetClusterEvaluation(ClusterEvaluation value)Sets the cluster evaluation object to use.-
Methods inherited from class weka.gui.explorer.AbstractPlotInstances
canPlot, getInstances, getOptions, getPlotData, getPlotInstances, listOptions, setInstances, setOptions, setUp
-
-
-
-
Method Detail
-
setClusterer
public void setClusterer(Clusterer value)
Sets the classifier used for making the predictions.- Parameters:
value- the clusterer to use
-
getClusterer
public Clusterer getClusterer()
Returns the currently set clusterer.- Returns:
- the clusterer in use
-
setClusterEvaluation
public void setClusterEvaluation(ClusterEvaluation value)
Sets the cluster evaluation object to use.- Parameters:
value- the evaluation object
-
getClusterEvaluation
public ClusterEvaluation 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
-
-