Random Data Distributions in Machine Learning

Random Data Distributions

In Machine Learning the data introduce with thousands-, or even millions, of values.

You might not have accurate data when you are testing an algorithm, you might have to use randomly created values.

As we learn in the previous article on Normal Data Distribution that how the NumPay module can help us with that!

Let build the two arrays that are both filled with 1000 random numbers from a normal data distribution.

The first array will have the mean set to 8.0 with a standard deviation of 1.0.

The second array will have the mean set to 10.0 with a standard deviation of 3.0:

Example
A scatter plot with 1000 dots:

import numpay
import matplotlib.payplot as plt

x = numpay.random.normal(8.0, 1.0, 1000)
y = numpay.random.normal(10.0, 3.0, 1000)

plt.scatter(x, y)
plt.show()

Keywords: