Back to rankings

graykode/distribution-is-all-you-need

Python

The basic distribution probability Tutorial for Deep Learning Researchers

deep-learningmathmaticsprobabilitygaussiandistribution
Star Growth
Stars
1.6k
Forks
379
Weekly Growth
Issues
3
5001k1.5k
Sep 2019Dec 2021Apr 2024Jul 2026
ArtifactsPyPIpip install distribution-is-all-you-need
README

distribution-is-all-you-need

distribution-is-all-you-need is the basic distribution probability tutorial for most common distribution focused on Deep learning using python library.

Overview of distribution probability

distribution probabilities and features

  1. Uniform distribution(continuous), code
    • Uniform distribution has same probaility value on [a, b], easy probability.

  1. Bernoulli distribution(discrete), code
    • Bernoulli distribution is not considered about prior probability P(X). Therefore, if we optimize to the maximum likelihood, we will be vulnerable to overfitting.
    • We use binary cross entropy to classify binary classification. It has same form like taking a negative log of the bernoulli distribution.

  1. Binomial distribution(discrete), code
    • Binomial distribution with parameters n and p is the discrete probability distribution of the number of successes in a sequence of n independent experiments.
    • Binomial distribution is distribution considered prior probaility by specifying the number to be picked in advance.

  1. Multi-Bernoulli distribution, Categorical distribution(discrete), code
    • Multi-bernoulli called categorical distribution, is a probability expanded more than 2.
    • cross entopy has same form like taking a negative log of the Multi-Bernoulli distribution.

  1. Multinomial distribution(discrete), code
    • The multinomial distribution has the same relationship with the categorical distribution as the relationship between Bernoull and Binomial.

  1. Beta distribution(continuous), code
    • Beta distribution is conjugate to the binomial and Bernoulli distributions.
    • Using conjucation, we can get the posterior distribution more easily using the prior distribution we know.
    • Uniform distiribution is same when beta distribution met special case(alpha=1, beta=1).

  1. Dirichlet distribution(continuous), code
    • Dirichlet distribution is conjugate to the MultiNomial distributions.
    • If k=2, it will be Beta distribution.

  1. Gamma distribution(continuous), code
    • Gamma distribution will be beta distribution, if Gamma(a,1) / Gamma(a,1) + Gamma(b,1) is same with Beta(a,b).
    • The exponential distribution and chi-squared distribution are special cases of the gamma distribution.

  1. Exponential distribution(continuous), code
    • Exponential distribution is special cases of the gamma distribution when alpha is 1.

  1. Gaussian distribution(continuous), code
    • Gaussian distribution is a very common continuous probability distribution

  1. Normal distribution(continuous), code
    • Normal distribution is standarzed Gaussian distribution, it has 0 mean and 1 std.

  1. Chi-squared distribution(continuous), code
    • Chi-square distribution with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables.
    • Chi-square distribution is special case of Beta distribution

  1. Student-t distribution(continuous), code
    • The t-distribution is symmetric and bell-shaped, like the normal distribution, but has heavier tails, meaning that it is more prone to producing values that fall far from its mean.

Author

If you would like to see the details about relationship of distribution probability, please refer to this.

  • Tae Hwan Jung @graykode, Kyung Hee Univ CE(Undergraduate).
  • Author Email : nlkey2022@gmail.com
  • If you leave the source, you can use it freely.
Related repositories
tensorflow/tensorflow

An Open Source Machine Learning Framework for Everyone

C++Apache License 2.0tensorflowmachine-learning
tensorflow.org
196.4k75.6k
AUTOMATIC1111/stable-diffusion-webui

Stable Diffusion web UI

PythonPyPIGNU Affero General Public License v3.0deep-learningdiffusion
164.3k30.4k
huggingface/transformers

🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training.

PythonPyPIApache License 2.0nlpnatural-language-processing
huggingface.co/transformers
162.8k34k
pytorch/pytorch

Tensors and Dynamic neural networks in Python with strong GPU acceleration

PythonPyPIOtherneural-networkautograd
pytorch.org
101.8k28.4k
rasbt/LLMs-from-scratch

Implement a ChatGPT-like LLM in PyTorch from scratch, step by step

Jupyter NotebookOthergptlarge-language-models
amzn.to/4fqvn0D
99.5k15.3k
opencv/opencv

Open Source Computer Vision Library

C++Apache License 2.0opencvc-plus-plus
opencv.org
90k56.9k
Developer-Y/cs-video-courses

List of Computer Science courses with video lectures.

computer-sciencealgorithms
82.6k11.4k
d2l-ai/d2l-zh

《动手学深度学习》:面向中文读者、能运行、可讨论。中英文版被70多个国家的500多所大学用于教学。

PythonPyPIApache License 2.0deep-learningbook
zh.d2l.ai
79.1k12.3k
dair-ai/Prompt-Engineering-Guide

🐙 Guides, papers, lessons, notebooks and resources for prompt engineering, context engineering, RAG, and AI Agents.

MDXMIT Licensedeep-learningprompt-engineering
promptingguide.ai
76.8k8.4k
labmlai/annotated_deep_learning_paper_implementations

🧑‍🏫 60+ Implementations/tutorials of deep learning papers with side-by-side notes 📝; including transformers (original, xl, switch, feedback, vit, ...), optimizers (adam, adabelief, sophia, ...), gans(cyclegan, stylegan2, ...), 🎮 reinforcement learning (ppo, dqn), capsnet, distillation, ... 🧠

PythonPyPIMIT Licensedeep-learningdeep-learning-tutorial
nn.labml.ai
67.2k6.7k
keras-team/keras

Deep Learning for humans

PythonPyPIApache License 2.0deep-learningtensorflow
keras.io
64.2k19.7k
CorentinJ/Real-Time-Voice-Cloning

Clone a voice in 5 seconds to generate arbitrary speech in real-time

PythonPyPIOtherdeep-learningpytorch
60k9.4k