Comments (4)
thanks! But with with K-distribution you refer to the compound of two gammas? Which library would you recommend to look at?
from distfit.
Sorry, I haven't found any suitable library about K-distribution. And i am a little confused about the definition about K distritbution.
In some paper, the K distritbuion is defined as
While in other paper, the K distribution id defined as
I have code for estimating the parameters of the K distribution of the first formula using the estimation of moments.
from scipy.special import gamma
from scipy.special import kv as besselk
def k_distribution(x, v, mu):
f_k = 2 / (mu*gamma(v)) * (x / (2*mu))**v * besselk(v-1,x / mu)
return f_k
def k_estimate(data):
x_2= np.mean(data**2)
x_4 = np.mean(data**4)
v = (x_4/(2*(x_2)**2) - 1 )**(-1)
mu = 0.5*np.sqrt(x_2/v)
return v, mu
Here is the reference:
[1] Rangaswamy M, Weiner D, Ozturk A. Computer generation of correlated non-Gaussian radar clutter[J]. IEEE Transactions on Aerospace and Electronic Systems, 1995, 31(1): 106-116.
[2] Lamont-Smith T. Translation to the normal distribution for radar clutter[J]. IEE Proceedings-Radar, Sonar and Navigation, 2000, 147(1): 17-22.
[3] https://en.wikipedia.org/wiki/K-distribution
[4] Redding N J. Estimating the parameters of the K distribution in the intensity domain[J]. 1999.
Hope can help you a little and solve my confusion.
Thanks!
from distfit.
It took a while but I created a first implementation of the K-distribution based on your input.
You can test the new functionality as following:
Install from github source:
install git+https://github.com/erdogant/distfit
Example:
import numpy as np
from distfit import distfit
X = np.random.normal(0, 2, 1000)
y = [-8, -6, 0, 1, 2, 3, 4, 5, 6]
dist = distfit(distr=['k','t','expon', 't', 'gamma', 'lognorm'])
results = dist.fit_transform(X)
dist.plot()
dist.plot_summary()
In order to test this, it would be great to have data for which we already know it is K-distributed.
from distfit.
Closing this one. Let me know if something is missing or needs to be changed regarding the "k" distribution.
from distfit.
Related Issues (20)
- Can I use the best distribution as the true distribution of my data? HOT 3
- KS-test in fitdist HOT 13
- Robustness of selected data models HOT 3
- pip install bnlearn? HOT 1
- Save best parameters HOT 2
- T Distribution Weirdness HOT 2
- Plots are not generated HOT 2
- A code snippet for `plotting` the best fit and the original data HOT 3
- New User Plot Question HOT 5
- new feature request - automatically fit multiple variables HOT 2
- plot_summary throws error HOT 2
- extend __init__.py descriptions HOT 3
- Help needed to interpret loc and scale HOT 2
- Boostrapping bug - The data contains non-finite values HOT 2
- Bug(?): lognorm distribution with negative loc parameter HOT 2
- Feature request: parallel execution when fitting multiple distributions HOT 3
- Quantile Bootstrap to avoid computationally expensive simple Bootstrap HOT 1
- plot freeze HOT 8
- Support Gaussian Mixture distribution fitting (2GMM, 3GMM..) HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from distfit.