A power law is a functional relationship between two quantities, where one quantity varies as a power of another.
Questions tagged [power-law]
124 questions
2
votes
0 answers
Power law distribution with R
I tried to visualize a Power Law p(x)=x^(-2.5) with following R code. When you use an log-scale in the end you get a lot of vibrations what is okay as can be seen here
But know, and this is my Problem, I read an article where the author says I have…

YGOG
- 21
- 2
2
votes
4 answers
Power-law distribution in T-SQL
I basically need the answer to this SO question that provides a power-law distribution, translated to T-SQL for me.
I want to pull a last name, one at a time, from a census provided table of names. I want to get roughly the same distribution as…

DanO
- 2,526
- 2
- 32
- 38
2
votes
1 answer
power law distribution fitting
I have a sample of data, with the sample size being around 500,000. I am currently trying to fit the sample with power law distribution, using the poweRlaw package in R.
So this is my code to that end:
pl_rg <- conpl$new(a)
estimate_xmin(pl_rg, xmax…

Burry Xie
- 85
- 9
2
votes
0 answers
How to fit a power law distribution in R from a histogram
I have implemented the method for fitting data to a power law distribution explained in the paper "power-law distributions in empirical data by Clauset et al"
Then you have my code which works well and is using as an input the implemented example…

ivangtorre
- 661
- 1
- 8
- 21
2
votes
3 answers
Keeping scale free graph's degree distribution after perturbation - python
Given a scale free graph G ( a graph whose degree distribution is a power law), and the following procedure:
for i in range(C):
coint = randint(0,1)
if (coint == 0):
delete_random_edges(G)
else:
add_random_edge(G)
(C is…

ONE1234
- 23
- 3
2
votes
1 answer
How good is the fit? Python Powerlaw Package
I have made a powerlaw fit to my data with python package powerlaw with a simple: powerlaw.Fit(Weights, xmin= min(Weights)) where Weights is my data.
I have used distribution_compare and obtained that lognormal is the best fit. But now I would like…

RM-
- 986
- 1
- 13
- 30
2
votes
1 answer
Fitting power law function with PyMC
I am currently trying to use PyMC for determining the parameters of a power law fit for given data. I am using the pdf formula taken from:
A. Clauset, C. R. Shalizi, and M. E. J. Newman, "Power-law
distributions in empirical data," Siam rev.,…

fsociety
- 1,791
- 4
- 22
- 32
2
votes
1 answer
Fitting power-law distributions with poweRlaw package in R
With poweRlaw library, and once computed alpha and xmin with estimate_xmin, which formula the script uses to compute the fitted values?
I mean, assuming that y=C·x^(-alpha), my question is how the script computes the normalization constant from…

Alvaro
- 23
- 2
2
votes
3 answers
How to plot CCDF graph on a logarithmic scale?
I want to plot a CCDF graph for some of my simulated power-law tail data on a log-log axis, below is my R code of plotting a CCDF graph on a normal axis, I used the code on the link: (How to plot a CCDF gragh?)
> load("fakedata500.Rda")
>…

user3579282
- 45
- 2
- 9
2
votes
1 answer
Comparing frequency data and zipf / rank data
Several times over the years I have wanted to work with frequency lists (character, word, n-gram, etc) of varying quality but never figured out how to use them together.
At the time I intuited that lists with just rank and no other data should be…

hippietrail
- 15,848
- 18
- 99
- 158
2
votes
1 answer
Min max optimizations for power law parameters in R
Assuming a data set is drawn from a power law distribution when the value is greater than $x_{min}$. I want to estimate the $\alpha$ and $x_{min}$ for the power law distribution in R.
According to…

Zebra Propulsion Lab
- 1,736
- 1
- 17
- 28
2
votes
1 answer
Fit data to a power distribution (java)
Much like in Excel where we can take a distribution and make a trendline for it (power law), how can I calculate that in Java for an array of numbers?

JMH
- 451
- 1
- 4
- 8
1
vote
1 answer
Generating a connected and directed network in R
I am trying to generate a directed and connected scale-free network in R, such that, the in- and out-degrees of the network follow a power-law. I tried the below methods,
g<-sample_fitness_pl(10000, 1000000, 2.7, 2.7) generates a network with a…

user3856486
- 515
- 1
- 4
- 16
1
vote
0 answers
Checking if my data follows an exponential, a stretched exponential function or power law
I want to check if the probability density of my data follows power-law, exponential or stretched exponential function.
I have the following code, and I am using scipy's powerlaw.fit and expon.fit() but I am not sure how to check for stretched…

S C
- 284
- 2
- 9
1
vote
1 answer
Bipartite graph with vertices with power law distribution
I need to create a network, which is a bipartite graph, and the degree of the vertices obeys power statistics. And then check if its true with
print(bipartite.is_bipartite(G))
In the bipartite.projected_graph() function, I substitute a random graph…

Александр Соколов
- 11
- 3