Example usage for weka.gui.beans AttributeSummarizer setInstances

List of usage examples for weka.gui.beans AttributeSummarizer setInstances

Introduction

In this page you can find the example usage for weka.gui.beans AttributeSummarizer setInstances.

Prototype

@Override
public void setInstances(Instances inst) throws Exception 

Source Link

Document

Set instances for this bean.

Usage

From source file:lu.lippmann.cdb.datasetview.tabs.AttributesSummaryTabView.java

License:Open Source License

/**
 * {@inheritDoc}/* www . j a va 2s.c  o m*/
 */
@Override
public void update0(final Instances dataSet) throws Exception {
    final int numAttr = dataSet.numAttributes();

    final JTabbedPane tabbedPane = new JTabbedPane();

    this.as.setGridWidth(Math.min(3, numAttr));
    this.as.setColoringIndex(dataSet.classIndex());
    this.as.setInstances(dataSet);
    tabbedPane.addTab("All", this.as);

    for (int i = 0; i < numAttr; i++) {
        final Instances nds = WekaDataProcessingUtil.buildFilteredByAttributesDataSet(dataSet, new int[] { i });
        final AttributeSummarizer as0 = new AttributeSummarizer();
        as0.setGridWidth(1);
        as0.setColoringIndex(nds.classIndex());
        as0.setInstances(nds);
        tabbedPane.addTab(dataSet.attribute(i).name(), as0);
    }

    this.jxp.removeAll();
    this.jxp.add(tabbedPane, BorderLayout.CENTER);
    this.jxp.repaint();
}

From source file:org.processmining.analysis.traceclustering.ui.TraceClusteringUI.java

License:Open Source License

protected JPanel getAttributeSummarizer() {
    AttributeSummarizer as = new AttributeSummarizer();
    try {/*w w  w.j  a  va 2  s.  co  m*/
        as.setInstances(aggregateProfile.getWekaData());
        as.setPreferredSize(new Dimension(350, 350));
    } catch (Exception ce) {
    }
    return as;
}