Example usage for weka.core AttributeStats toString

List of usage examples for weka.core AttributeStats toString

Introduction

In this page you can find the example usage for weka.core AttributeStats toString.

Prototype

public String toString() 

Source Link

Document

Returns a human readable representation of this AttributeStats instance.

Usage

From source file:adams.gui.visualization.instances.instancestable.AttributeStatistics.java

License:Open Source License

/**
 * Processes the specified column.//from  ww  w.  j  a va 2 s .  c  om
 *
 * @param table   the source table
 * @param data   the instances to use as basis
 * @param column   the column in the spreadsheet
 * @return      true if successful
 */
@Override
protected boolean doProcessColumn(InstancesTable table, Instances data, int column) {
    AttributeStats stats;
    TextDialog dialog;

    stats = data.attributeStats(column);
    if (GUIHelper.getParentDialog(table) != null)
        dialog = new TextDialog(GUIHelper.getParentDialog(table), ModalityType.MODELESS);
    else
        dialog = new TextDialog(GUIHelper.getParentFrame(table), false);
    dialog.setDefaultCloseOperation(TextDialog.DISPOSE_ON_CLOSE);
    dialog.setTitle("Attribute statistics for column #" + (column + 1) + "/" + data.attribute(column).name());
    dialog.setUpdateParentTitle(false);
    dialog.setContent(stats.toString());
    dialog.pack();
    dialog.setLocationRelativeTo(null);
    dialog.setVisible(true);

    return true;
}