gaussian

is there any simple code for beginners where i can experiment diff kernels used in gaussian process example in scikit learn to know their functions?

℡╲_俬逩灬. 提交于 2020-04-16 02:33:30
问题 actually i want to understand the kernels used in scikit learn gaussian example but i have zero knowledge about how those kernel behaves and when to use which and i also not getting any sample basic template code where i can use those kernel one by one and understand.The partial code is given below: X, y = load_mauna_loa_atmospheric_co2() Kernel with parameters given in GPML book k1 = 66.0**2 * RBF(length_scale=67.0) # long term smooth rising trend k2 = 2.4**2 * RBF(length_scale=90.0) \ *

Mean of empty slice and Degrees of freedom <=0

混江龙づ霸主 提交于 2020-04-10 03:01:46
问题 This code below is suppose to run a bayes classifer for a full covaraince gaussian (http://courses.ee.sun.ac.za/Pattern_Recognition_813/lectures/lecture03/node2.html), but I get two errors when I run the code. They are: RuntimeWarning: Mean of empty slice. warnings.warn("Mean of empty slice.", RuntimeWarning) and RuntimeWarning: Degrees of freedom <= 0 for slice warnings.warn("Degrees of freedom <= 0 for slice", RuntimeWarning) This is my code: def modelFull(train, test): err_train = 0 err

Mean of empty slice and Degrees of freedom <=0

試著忘記壹切 提交于 2020-04-10 03:00:10
问题 This code below is suppose to run a bayes classifer for a full covaraince gaussian (http://courses.ee.sun.ac.za/Pattern_Recognition_813/lectures/lecture03/node2.html), but I get two errors when I run the code. They are: RuntimeWarning: Mean of empty slice. warnings.warn("Mean of empty slice.", RuntimeWarning) and RuntimeWarning: Degrees of freedom <= 0 for slice warnings.warn("Degrees of freedom <= 0 for slice", RuntimeWarning) This is my code: def modelFull(train, test): err_train = 0 err

Fitting gaussian to absorbtion line in python

本小妞迷上赌 提交于 2020-01-24 19:23:26
问题 I am trying to fit a gaussian to my data which is taken in a pretty narrow spectral window. We got about 2 points of continuum and then about 10-11 that are part of the line. It should still be possible to fit it I think, but the curve fit is failing each time, and I am not sure why. When running I get RuntimeError: Optimal parameters not found: Number of calls to function has reached maxfev = 800. Code and data: import matplotlib.pyplot as plt from scipy.optimize import curve_fit import

Generating means from a bivariate gaussian distribution

倖福魔咒の 提交于 2020-01-23 01:11:05
问题 I am reading Elements of Statistical Learning ESLII and in chapter 2, they have a gaussian mixture data set to illustrate some learning algorithms. To generate this data set, they first generate 10 means from a bivariate gaussian distribution N((1,0)', I). I am not sure what they mean? How can you generate 10 means from a bivariate distribution having mean(1,0)? 回答1: Each of the means that are generated from the bivariate Gaussian distribution are simply single points sampled in exactly the

Python - Clipping out data to fit profiles

喜欢而已 提交于 2020-01-17 07:53:34
问题 I have several sets of data to which I'm trying to fit different profiles. In the centre of one of the minima there is contamination that prevents me from doing a good fit as you can see in this image: How can I clip out those spikes in the bottom of my data taking into account that the spike is not always in the same position? Or how would you deal with data like this? I'm using lmfit to fit the profiles, in this case a Lorentzian and a Gaussian. Here is a minimal working example where I