Machine learning / Histograms in python

It is an accurate representation of the distribution of numerical data. It is an estimate of the probability distribution of a continuous variable
and was first introduced by Karl Pearson.

Example: Let us take a data set of some numbers
Ds= [40,10,20,25,24,40,40,14,16]
Number of points in the data set = 9

Statistical Calculation Python Program Output
Data Distribution import numpy
import matplotlib.pyplot as mplobject
dd = numpy.random.uniform(1.0, 4.0, 60)
mplobject.hist(dd, 9)
mplobject.show()
(array([ 5., 7., 4., 5., 6., 10., 8., 11., 4.]), array([1.04607125, 1.3694
1105, 1.69275085, 2.01609064, 2.33943044,2.66277024, 2.98611003,
3.30944983, 3.63278963, 3.95612942]),
)

Histogram


Home     Back