Basic statistics functions

Basic statistics techniques

In [38]:
from sklearn.datasets import make_blobs
import numpy as np
import matplotlib.pyplot as plt

# create dataset
X, _ = make_blobs(
   n_samples=450, n_features=2,
   centers=1, cluster_std=0.75,
   shuffle=True, random_state=0
)
coefficients = [np.random.rand(),np.random.rand()]
X = X * coefficients

plot the data using maplotlib scatter

In [ ]:

compute mean , covariance matrix and correlation matrix for the data

In [41]:

generate samples using covariance matrix and mean using numpy.random.multivariate_normal

In [42]:

plot generated samples created from the previous steps using matplotlib scatter

In [ ]: