# mathematics

Data science articles related with mathematics. Our Data Scientist is writing this articles.

## k-Nearest Neighbors algorithms

In this blog post, I am going to introduce one of the most intuitive algorithms in the field of Supervised Learning[1], the k-Nearest Neighbors algorithm (kNN). The original k-Nearest Neighbors algorithm The kNN algorithm is very intuitive. Indeed, with the assumption that items close together in the dataset are typically similar, kNN infers the output …

## Binomial Theorem

Can you expand on ? I guess you would find that is quite easy to do. You can easily find that . How about the expansion of . It is no longer easy. It is no longer easy, isn’t it. However, if we use Binomial Theorem, this expansion becomes an easy problem. Binomial Theorem is a very intriguing topic …

## Bayesian estimator of the Bernoulli parameter

In this post, I will explain how to calculate a Bayesian estimator. The taken example is very simple: estimate the parameter θ of a Bernoulli distribution. A random variable X which has the Bernoulli distribution is defined as with           In this case, we can write . In reality, the simplest way …

## Gaussian samples – Part (3)

Background The goal of this project is to generate Gaussian samples in 2-D from uniform samples, the latter of which can be readily generated using built-in random number generators in most computer languages. In part 1 of the project, the inverse transform sampling was used to convert each uniform sample into respective x and y coordinates of …

## Gaussian samples – Part (2)

Background In part 1 of this project, I’ve shown how to generate Gaussian samples using the common technique of inversion sampling: First, we sample from the uniform distribution between 0 and 1 — green points in the below animation. These uniform samples represent the cumulative probabilities of a Gaussian distribution i.e. the area under the distribution to …

## Gaussian samples – Part (1)

Background Gaussian sampling — that is, generating samples from a Gaussian distribution — plays an important role in many cutting-edge fields of data science, such as Gaussian process, variational autoencoder, or generative adversarial network. As a result, you often see functions like tf.random.normal in their tutorials. But, deep down, how does computer know how to generate Gaussian samples? This series …

## N-gram language models – Part 3

Background In previous parts of my project, I built different n-gram models to predict the probability of each word in a given text. This probability is estimated using an n-gram — a sequence of words of length n — which contains the word. The below formula shows how the probability of the word “dream” is estimated …