Class AttributeSummaryPanel

  • All Implemented Interfaces:
    ImageObserver, MenuContainer, Serializable, Accessible

    public class AttributeSummaryPanel
    extends JPanel
    This panel displays summary statistics about an attribute: name, type number/% of missing/unique values, number of distinct values. For numeric attributes gives some other stats (mean/std dev), for nominal attributes gives counts for each attribute value.
    Author:
    Len Trigg ([email protected]), FracPete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Field Detail

      • m_Instances

        protected weka.core.Instances m_Instances
        The instances we're playing with
      • m_Index

        protected int m_Index
        the current attribute index.
      • m_AttributeStats

        protected weka.core.AttributeStats[] m_AttributeStats
        Cached stats on the attributes we've summarized so far
      • m_allEqualWeights

        protected boolean m_allEqualWeights
        Do all instances have the same weight
    • Constructor Detail

      • AttributeSummaryPanel

        public AttributeSummaryPanel()
        Creates the instances panel with no initial instances.
    • Method Detail

      • setInstances

        public void setInstances​(weka.core.Instances inst)
        Tells the panel to use a new set of instances.
        Parameters:
        inst - a set of Instances, null to unset
      • getInstances

        public weka.core.Instances getInstances()
        Returns the currently set data.
        Returns:
        the data, null if none set
      • setAttribute

        public void setAttribute​(int index)
        Sets the attribute that statistics will be displayed for.
        Parameters:
        index - the index of the attribute to display
      • getAttribute

        public int getAttribute()
        Returns the currently set index.
        Returns:
        the index, -1 if none set
      • main

        public static void main​(String[] args)
        Tests out the attribute summary panel from the command line.
        Parameters:
        args - optional name of dataset to load