(self, significance=0.05)
return "\n".join(result)
Returns the summary of the power law fit.

        @param significance: the significance level of the Kolmogorov-Smirnov test
          used to decide whether the input data could have come from the fitted
          distribution
        @return: the summary as a string
Returns the summary of the power law fit.
Returns the summary of the power law fit .
def summary(self, significance=0.05):
        """Returns the summary of the power law fit.

        @param significance: the significance level of the Kolmogorov-Smirnov test
          used to decide whether the input data could have come from the fitted
          distribution
        @return: the summary as a string
        """
        result = [
            "Fitted power-law distribution on %s data"
            % ("discrete", "continuous")[bool(self.continuous)]
        ]
        result.append("")
        result.append("Exponent (alpha)  = %f" % self.alpha)
        result.append("Cutoff (xmin)     = %f" % self.xmin)
        result.append("")
        result.append("Log-likelihood    = %f" % self.L)
        result.append("")
        result.append("H0: data was drawn from the fitted distribution")
        result.append("")
        result.append("KS test statistic = %f" % self.D)
        result.append("p-value           = %f" % self.p)
        result.append("")
        if self.p < significance:
            result.append("H0 rejected at significance level %g" % significance)
        else:
            result.append(
                "H0 could not be rejected at significance " "level %g" % significance
            )

        return "\n".join(result)
def summary ( self , significance = 0.05 ) : result = [ "Fitted power-law distribution on %s data" % ( "discrete" , "continuous" ) [ bool ( self . continuous ) ] ] result . append ( "" ) result . append ( "Exponent (alpha)  = %f" % self . alpha ) result . append ( "Cutoff (xmin)     = %f" % self . xmin ) result . append ( "" ) result . append ( "Log-likelihood    = %f" % self . L ) result . append ( "" ) result . append ( "H0: data was drawn from the fitted distribution" ) result . append ( "" ) result . append ( "KS test statistic = %f" % self . D ) result . append ( "p-value           = %f" % self . p ) result . append ( "" ) if self . p < significance : result . append ( "H0 rejected at significance level %g" % significance ) else : result . append ( "H0 could not be rejected at significance " "level %g" % significance ) return "\n" . join ( result )