(self)
return summary
Returns a string containing basic summary statistics of this temporal network
Returns a string containing basic summary statistics of this temporal network
Returns a string containing basic summary statistics of this temporal network
def summary(self):
        """
        Returns a string containing basic summary statistics of this temporal network
        """

        summary = ''

        summary += 'Nodes:\t\t\t' +  str(self.vcount()) + '\n'
        summary += 'Time-stamped links:\t' + str(self.ecount()) + '\n'
        if self.vcount()>0:
            summary += 'Links/Nodes:\t\t' + str(self.ecount()/self.vcount()) + '\n'
        else:
            summary += 'Links/Nodes:\t\tN/A\n'
        if len(self.ordered_times)>1:
            summary += 'Observation period:\t[' + str(min(self.ordered_times)) + ', ' + str(max(self.ordered_times)) + ']\n'
            summary += 'Observation length:\t' + str(max(self.ordered_times) - min(self.ordered_times)) + '\n'
            summary += 'Time stamps:\t\t' + str(len(self.ordered_times)) + '\n'

            d = self.getInterEventTimes()    
            summary += 'Avg. inter-event dt:\t' + str(_np.mean(d)) + '\n'
            summary += 'Min/Max inter-event dt:\t' + str(min(d)) + '/' + str(max(d)) + '\n'
        
        return summary
def summary ( self ) : summary = '' summary += 'Nodes:\t\t\t' + str ( self . vcount ( ) ) + '\n' summary += 'Time-stamped links:\t' + str ( self . ecount ( ) ) + '\n' if self . vcount ( ) > 0 : summary += 'Links/Nodes:\t\t' + str ( self . ecount ( ) / self . vcount ( ) ) + '\n' else : summary += 'Links/Nodes:\t\tN/A\n' if len ( self . ordered_times ) > 1 : summary += 'Observation period:\t[' + str ( min ( self . ordered_times ) ) + ', ' + str ( max ( self . ordered_times ) ) + ']\n' summary += 'Observation length:\t' + str ( max ( self . ordered_times ) - min ( self . ordered_times ) ) + '\n' summary += 'Time stamps:\t\t' + str ( len ( self . ordered_times ) ) + '\n' d = self . getInterEventTimes ( ) summary += 'Avg. inter-event dt:\t' + str ( _np . mean ( d ) ) + '\n' summary += 'Min/Max inter-event dt:\t' + str ( min ( d ) ) + '/' + str ( max ( d ) ) + '\n' return summary