hot9cups / probdists Goto Github PK
View Code? Open in Web Editor NEWPyPi package for modelling Probability distributions
License: MIT License
PyPi package for modelling Probability distributions
License: MIT License
Go through the Gaussian distribution class, the Binomial class and the Exponential class which are subclasses of General distribution class.
I would like to expand this to include another distribution, the Bates distribution
Title says it all.
Also, I already have a test.py file, which you can find here. So you're free to use that if you want to.
I'd like the github action to run the unittests for every push made to master branch, and for every Pull Request opened.
Go through the Gaussian distribution class, the Binomial class and the Exponential class which are subclasses of General distribution class.
I would like to expand this to include another distribution, the Poisson Probability Distribution.
It should be able to calculate mean, standard deviation, and create basic plots like those in the classes I linked.
The library is growing at a good pace. It started with support for merely 2 distributions, and now it's on the path to support most of the major distributions I could think of.
What else do you think would a library on probability distribution ought to include?
Currently, it calculates the mean, standard deviation, adds random variables of two distributions(not for all distributions, eg: exponential), plots the pdf of the distributions and does all of this on user's input data.
Couple of things that are pending include:
There's another issue I thought of yesterday, which could be included - Inverting the probability distribution.
Ie, solving questions like "Given I have a Gaussian Distribution of x mean and y std, for what value of t is P(X < T) = z%"
I reckon that's easily solveable using Newton's method, because we're simple required to find the value of t such that
P(X<t) - z = 0
Using Newton's method, this simply boils down to:
1)Initialising t to a random value
2)Iterating till we have an accuracy we desire:
t -= (cdf(t) - z)/pdf(t)
we could stop, for example, when |dt| < 0.0001, where dt = (cdf(t)-y)/pdf(t)
So these are the ideas I have at the moment, but collective wisdom is always better.
If you think there are other features that could be included in the library, do comment your thoughts below :)
Make a weibulldistribution.py
module under probdists
and implement mean, median, mode, stdev, calc_pdf and calc_cdf. Also, provide a pdf plot function.
For implementation examples, see other distributions.
Go through the Gaussian distribution class, the Binomial class and the Exponential class which are subclasses of General distribution class.
The uniform distribution is the simplest probability distribution.
I would like to expand this to include the Uniform Probability Distribution.
It should be able to calculate mean, standard deviation, and create basic plots like those in the classes I linked.
Create a documentation webpage and host it on a free hosting servive(prefer github).
Most of the functionalities of code are documented here so all that needs to be done now is transform that to a webpage and host it on github.
Add a github action that performs a flake8 python linting test on every push made to master branch as well as every PR opened.
Go through the Gaussian distribution class, the Binomial class and the Exponential class which are subclasses of General distribution class.
I would like to expand this to include another distribution, the Triangular distribution
I would like to extend the internal round method by adding round_to parameter
Go through the Gaussian distribution class, the Binomial class and the Exponential class which are subclasses of General distribution class.
I would like to expand this to include the Gamma Probability Distribution.
It should be able to calculate mean, standard deviation, and create basic plots like those in the classes I linked.
Here is the Gamma distribution class.
It contains the PDF function but currently does not have a CDF function.
I would like it contain the CDF too.
I would also like appropriate unittests to be included in the test.py file
It is better to implement the round function internally without calling again and again. I was implement this feature yesterday but today i saw new Gammadistribution. i finished implementation, Unit Test & Usage Docs for other distribution. I will post a PR after finished for gama. What about your idea?
The tests in test.py
contains code to verify the numerical correctness of the respective classes. However, there is a PDF plot function that plots a graph using matplotlib (soon seaborn) which is not tested.
Your input as a contributor:
Go through the Gaussian distribution class, the Binomial class and the Exponential class which are subclasses of General distribution class.
I would like to expand this to include another distribution, the Irwin-Hall distribution.
This one might be slightly more challenging than the other distributions ;)
The plots that the library currently makes are all done using matplotlib.
I was considering either entirely shifting towards using seaborn and increasing the types of graphs offered, or letting there be a provision for both matplotlib and seaborn.
Let me know your thoughts on this and if you'd be willing to take it up :)
Currently the read_data_file() function looks like this
The limitation of the current code is that it'll only work when the numbers are line separated, ie have one number per line.
This can be improved by letting the user specify the separator, which could be passed as an argument to the function.
Go through the Gaussian distribution class, the Binomial class and the Exponential class which are subclasses of General distribution class.
I would like to expand this to include a fourth distribution, the Bernoulli Probability Distribution.
It should be able to calculate mean, standard deviation, and create basic plots like those in the classes I linked.
I suppose it's going to be quite similar to the Binomialdistribution class.
Go through the Gaussian distribution class, the Binomial class and the Exponential class which are subclasses of General distribution class.
I would like to expand this to include another distribution, the Poisson Probability Distribution.
It should be able to calculate mean, standard deviation, and create basic plots like those in the classes I linked.
Here is the Gaussian distribution class.
It contains the PDF function but currently does not have a CDF function.
I would like it contain the CDF too.
I would also like appropriate unittests to be included in the test.py file
Go through the Gaussian distribution class, the Binomial class and the Exponential class which are subclasses of General distribution class.
I would like to expand this to include a fourth distribution, the Bernoulli Probability Distribution.
It should be able to calculate mean, standard deviation, and create basic plots like those in the classes I linked.
I suppose it's going to be quite similar to the Binomialdistribution class.
Go through the Gaussian distribution class, the Binomial class and the Exponential class which are subclasses of General distribution class.
I would like to expand this to include a fourth distribution, the Chi-square Probability Distribution.
It should be able to calculate mean, standard deviation, and create basic plots like those in the classes I linked.
Go through the Gaussian distribution class and the Binomial class which both are subclasses of General distribution class.
I would like to expand this to include a third distribution, the Exponential Probability Distribution.
It should be able to calculate mean, standard deviation, and create basic plots like those in the classes I linked.
We need a code of conduct!
Look around for a good Code of Conduct and add it following GitHub best practices.
Once the PR is open we can talk through whether it's a good fit.
Here is the Exponential distribution class.
It contains the PDF function but currently does not have a CDF function.
I would like it contain the CDF too.
I would also like appropriate unittests to be included in the test.py file
Please check implementations of Bernoulli, Poisson, Bates distributions.
This issue aims to extend support for Student's t-distribution and include methods for computing mean, stdev, PDF, CDF and a PDF plot function.
Refactor the read_data_file function to replace else.. if ladder with a function
Here is the Binomial distribution class.
It contains the PDF function but currently does not have a CDF function.
I would like it contain the CDF too.
I would also like appropriate unittests to be included in the test.py file
I'd like to create custom exceptions for all the existing classes. Maybe a base exception class for the base class Generaldistribution.py and then subclasses for different distributions. This was the idea of @mhdzumair , really good one.
Would this be a good task for next year's hacktoberfest? Or do we start working on it already?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.