Class InstancesSummaryPanel

    • Field Detail

      • m_RelationNameLab

        protected JLabel m_RelationNameLab
        Displays the name of the relation
      • m_NumInstancesLab

        protected JLabel m_NumInstancesLab
        Displays the number of instances
      • m_NumAttributesLab

        protected JLabel m_NumAttributesLab
        Displays the number of attributes
      • m_sumOfWeightsLab

        protected JLabel m_sumOfWeightsLab
        Displays the sum of instance weights
      • m_Instances

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

        protected boolean m_showZeroInstancesAsUnknown
        Whether to display 0 or ? for the number of instances in cases where a dataset has only structure. Depending on where this panel is used from, the user may have loaded a dataset with no instances or a Loader that can read incrementally may be being used (in which case we don't know how many instances are in the dataset... yet).
    • Constructor Detail

      • InstancesSummaryPanel

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

      • setShowZeroInstancesAsUnknown

        public void setShowZeroInstancesAsUnknown​(boolean zeroAsUnknown)
        Set whether to show zero instances as unknown (i.e. "?" rather than zero). This is useful if header information has been read and the instances themselves will be loaded incrementally.
        Parameters:
        zeroAsUnknown - true if zero instances will be displayed as "unknown", i.e. "?"
      • getShowZeroInstancesAsUnknown

        public boolean getShowZeroInstancesAsUnknown()
        Get whether to show zero instances as unknown (i.e. "?" rather than zero). This is useful if header information has been read and the instances themselves will be loaded incrementally.
        Returns:
        true if zero instances will be displayed as "unknown", i.e. "?"
      • 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
      • main

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