Implement three functions for the mutual information (in nats) between two scalar continuous variables:
gaussian_mi(rho): the exact MI of a bivariate Gaussian with correlation , .scott_bins(x): the number of bins from Scott's rule, , rounded up to an integer and at least 1; is the population standard deviation (ddof=0). Return a Python int.histogram_mi(x, y, bins_x, bins_y, strategy="width"): discretize each variable, build the empirical joint pmf of the bin pairs, and return the plug-in MI over nonzero cells, as a float.Binning rules for a sample of size into bins (indices ):
"width": equal-width bins on : index , with the maximum value placed in bin (all values in bin 0 if )."quantile": equal-frequency bins by rank: with the position of a value in a stable ascending sort, index .