Utilities/maths/distributions.py
def fit_kde(x, **kwargs):
	""" Fit a KDE using StatsModels. 
		kwargs is useful to pass stuff to the fit, e.g. the binwidth (bw)"""
	x = np.array(x).astype(np.float)
	kde = sm.nonparametric.KDEUnivariate(x)
	kde.fit(**kwargs) # Estimate the densities
	return kde
 Fit a KDE using StatsModels. 
		kwargs is useful to pass stuff to the fit, e.g. the binwidth (bw)
Fit a KDE using StatsModels.
kwargs is useful to pass stuff to the fit, e.g. the binwidth (bw)
Fit a KDE using StatsModels . kwargs is useful to pass stuff to the fit e . g . the binwidth ( bw )
def fit_kde(x, **kwargs):
	x = np.array(x).astype(np.float)
	kde = sm.nonparametric.KDEUnivariate(x)
	kde.fit(**kwargs) 
	return kde
def fit_kde ( x , ** kwargs ) : x = np . array ( x ) . astype ( np . float ) kde = sm . nonparametric . KDEUnivariate ( x ) kde . fit ( ** kwargs ) return kde
Fit a KDE using StatsModels.
Fit a KDE using StatsModels .
""" Fit a KDE using StatsModels. 
		kwargs is useful to pass stuff to the fit, e.g. the binwidth (bw)""" # Estimate the densities
x