(self)
return stats
get_statistics returns:
            1. self.total_tuples (total # of tuples)
            2. self.single_attr_stats ({ attribute -> { value -> count } })
              the frequency (# of entities) of a given attribute-value
            3. self.pair_attr_stats ({ attr1 -> { attr2 -> {val1 -> {val2 -> count } } } })
              the statistics for each pair of attributes, attr1 and attr2, where:
                <attr1>: first attribute
                <attr2>: second attribute
                <val1>: all values of <attr1>
                <val2>: values of <attr2> that appear at least once with <val1>.
                <count>: frequency (# of entities) where attr1=val1 AND attr2=val2

        NB: neither single_attr_stats nor pair_attr_stats contain frequencies
            for values that are NULL (NULL_REPR). One would need to explicitly
            check if the value is NULL before lookup.

            Also, values that only co-occur with NULLs will NOT be in pair_attr_stats.
get_statistics returns:
            1. self.total_tuples (total # of tuples)
            2. self.single_attr_stats ({ attribute -> { value -> count } })
              the frequency (# of entities) of a given attribute-value
            3. self.pair_attr_stats ({ attr1 -> { attr2 -> {val1 -> {val2 -> count } } } })
              the statistics for each pair of attributes, attr1 and attr2, where:
                <attr1>: first attribute
                <attr2>: second attribute
                <val1>: all values of <attr1>
                <val2>: values of <attr2> that appear at least once with <val1>.
                <count>: frequency (# of entities) where attr1=val1 AND attr2=val2
get_statistics returns : 1 . self . total_tuples ( total # of tuples ) 2 . self . single_attr_stats ( { attribute - > { value - > count } } ) the frequency ( # of entities ) of a given attribute - value 3 . self . pair_attr_stats ( { attr1 - > { attr2 - > { val1 - > { val2 - > count } } } } ) the statistics for each pair of attributes attr1 and attr2 where : <attr1 > : first attribute <attr2 > : second attribute <val1 > : all values of <attr1 > <val2 > : values of <attr2 > that appear at least once with <val1 > . <count > : frequency ( # of entities ) where attr1 = val1 AND attr2 = val2
def get_statistics(self):
        """
        get_statistics returns:
            1. self.total_tuples (total # of tuples)
            2. self.single_attr_stats ({ attribute -> { value -> count } })
              the frequency (# of entities) of a given attribute-value
            3. self.pair_attr_stats ({ attr1 -> { attr2 -> {val1 -> {val2 -> count } } } })
              the statistics for each pair of attributes, attr1 and attr2, where:
                <attr1>: first attribute
                <attr2>: second attribute
                <val1>: all values of <attr1>
                <val2>: values of <attr2> that appear at least once with <val1>.
                <count>: frequency (# of entities) where attr1=val1 AND attr2=val2

        NB: neither single_attr_stats nor pair_attr_stats contain frequencies
            for values that are NULL (NULL_REPR). One would need to explicitly
            check if the value is NULL before lookup.

            Also, values that only co-occur with NULLs will NOT be in pair_attr_stats.
        """
        if not self.stats_ready:
            logging.debug('computing frequency and co-occurrence statistics from raw data...')
            tic = time.clock()
            self.collect_stats()
            logging.debug('DONE computing statistics in %.2fs', time.clock() - tic)

        stats = (self.total_tuples, self.single_attr_stats, self.pair_attr_stats)
        self.stats_ready = True
        return stats
def get_statistics ( self ) : if not self . stats_ready : logging . debug ( 'computing frequency and co-occurrence statistics from raw data...' ) tic = time . clock ( ) self . collect_stats ( ) logging . debug ( 'DONE computing statistics in %.2fs' , time . clock ( ) - tic ) stats = ( self . total_tuples , self . single_attr_stats , self . pair_attr_stats ) self . stats_ready = True return stats