Questions tagged [power-law]

A power law is a functional relationship between two quantities, where one quantity varies as a power of another.

124 questions
1
vote
1 answer

Using python and networkx to find the probability density function

I'm struggling to draw a power law graph for Facebook Data that I found online. I'm using Networkx and I've found how to draw a Degree Histogram and a degree rank. The problem that I'm having is I want the y axis to be a probability so I'm assuming…
Michael
  • 11
  • 3
1
vote
0 answers

Distinguishing random gnp graphs from preferential attachment grpahs using the powerlaw python package

My goal is to find the point where scale-free networks become indistinguishable from random (non-scale-free) networks using the powerlaw python package As stated in their paper one should determine the goodness of a power-law fit always by comparing…
David Schumann
  • 13,380
  • 9
  • 75
  • 96
1
vote
0 answers

Powerlaw python get the scaling constant

I've been recently trying to fit a power law distribution to my data using the Powerlaw package (https://pypi.python.org/pypi/powerlaw). My goal is to obtain equation in form f(x) = Cx^{-alpha}. Following the instructions: fit = powerlaw.Fit(data,…
sdgaw erzswer
  • 2,182
  • 2
  • 26
  • 45
1
vote
1 answer

(in excel) randomly generating a power law distribution

I am trying to simulate a number of different distribution types for a project using Excel. Right now, I have generated a normal distribution with a mean of 35 and a standard deviation of 3.33. So far so good. I would like to also generate some…
EHL
  • 43
  • 5
1
vote
1 answer

How to estimate the parameters of an exponential truncated power law using Python?

There is an equation of exponential truncated power law in the article below: Gonzalez, M. C., Hidalgo, C. A., & Barabasi, A. L. (2008). Understanding individual human mobility patterns. Nature, 453(7196), 779-782. like this: It is an exponential…
1
vote
1 answer

MatLab Power Law, Non-Positive Value Error

Hi I'm trying to fit a power model to my data using MatLab's fit function fo = fit(log2(x(:)),log2(y(:)),'power1'); plot(fo,'g'), hold on However when I run this I get the error Error using fit>iFit (line 282) Cannot fit Power functions to data…
Dunny
  • 170
  • 12
1
vote
0 answers

nls error during the parameter estimation of power law with exponential cutoff distribution in R

I want to fit mydata with several known distributions, power law with exponential cutoff distribution is one of the candidates. fitdistr function in package fitdistrplus is one of good methods to use for the parameter estimation using MLE, or MME,…
Ling Zhang
  • 281
  • 1
  • 3
  • 13
1
vote
1 answer

Solving Power Law Distribution in Python

I have data that closely resembles a power law distribution. Using Python, I want to approximate the data by solving two equations in the form: y is the y axis data. In Python it would be data[i]. x would be i + 1. It follows that we get two…
BullyWiiPlaza
  • 17,329
  • 10
  • 113
  • 185
1
vote
1 answer

What's the difference between ks test and bootstrap_p for power law fitting?

I want to know the goodness of fit while fitting a power law distribution in R using poweRlaw package. After estimate_xmin() , I had a p-value 0.04614726. But the bootstrap_p() returns another p-value 0. So why do these two p-value differ? And how…
Burry Xie
  • 85
  • 9
1
vote
1 answer

R: error for bootstrap simulation poweRlaw package

I am using the poweRlaw package to fit some data and calculate p-values. I noticed that in some cases, where there is not so much variation in the data combined with a relatively small number of observations, I am unable to calculate a p-value once…
horseoftheyear
  • 917
  • 11
  • 23
1
vote
1 answer

Unable to estimate xmin, alpha for large dataset using PoweRlaw

I have the following are the sample data set. The first column is the serial number and column 2 is data. Using R, I'm trying to find the xmin, alpha and pvalue. The above data set is discrete, the values are large and treating the data as…
user128956
  • 123
  • 1
  • 14
1
vote
1 answer

Generating power-law distributed numbers from uniform distribution – found 2 approaches: which one is correct?

I am trying to generate power-law distributed numbers ranging from 0 to 1 from a uniform distribution. I found two approaches and I am not sure which one is right and which one is wrong. 1st Source: Wolfram: 2nd Source: Physical Review (Page…
MJQZ1347
  • 2,607
  • 7
  • 27
  • 49
1
vote
1 answer

ImportError: No module named mpmath. But mpmath has been installed. What's wrong?

I have anaconda installed and many libraries of python, between those mpmath. When I try to run powerlaw package I get the following error: -> 1466 from mpmath import erfc 1467 # from scipy.special import erfc 1468 from…
RM-
  • 986
  • 1
  • 13
  • 30
1
vote
1 answer

fitting exponential and power law distributions in R and comparing better fit

I have a network which I need to fit with power law distribution and exponential distribution and compare them, choosing the better fit. I have degree distribution data retrived using igraph package degree.distribution function: degree.distribution…
yarbaur
  • 75
  • 8
1
vote
1 answer

Fitting a power-law with powerlaw.py in Python 3

I am trying to fit power law with powerlaw.py: data = [1.7, 3.2, 4.3, 2.1, 0.9, 3.3, 1.2, 4.3] fit = powerlaw.Fit(data) I'm getting the warning: IndexError: 0-d arrays can only use a single () or a list of newaxes (and a single ...) as an…
RaM
  • 13
  • 3
1 2 3
8 9