List of usage examples for weka.gui.beans AttributeSummarizer setColoringIndex
public void setColoringIndex(int ci)
From source file:lu.lippmann.cdb.datasetview.tabs.AttributesSummaryTabView.java
License:Open Source License
/** * {@inheritDoc}/* w w w .j a va 2s . c om*/ */ @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(); }