gaussian

How to use python to separate two gaussian curves?

最后都变了- 提交于 2021-02-19 01:34:45
问题 I measured the fluorescence intensity of thousands of particles and made the histogram, which showed two adjacent gaussian curves. How to use python or its package to separate them into two Gaussian curves and make two new plots? Thank you. 回答1: Basically, you need to infer parameters for your Gaussian mixture. I will generate a similar dataset for the illustration. Generating mixtures with known parameters from itertools import starmap import numpy as np import seaborn as sns import

How to fix some dimensions of a kernel lengthscale in gpflow?

我只是一个虾纸丫 提交于 2021-02-11 04:54:12
问题 I have a 2d kernel, k = gpflow.kernels.RBF(lengthscales=[24*5,1e-5]) m = gpflow.models.GPR(data=(X,Y), kernel=k, mean_function=None) and I want to fix the lengthscale in the 2nd dimension, and just optimise the other. I can disable all lengthscale optimisation using, gpflow.set_trainable(m.kernel.lengthscales, False) but I can't pass just one dimension to this method. In GPy we would call m.kern.lengthscale[1:].fixed() or something. Maybe I could use a transform to roughly achieve this (e.g.

How to fix some dimensions of a kernel lengthscale in gpflow?

99封情书 提交于 2021-02-11 04:53:22
问题 I have a 2d kernel, k = gpflow.kernels.RBF(lengthscales=[24*5,1e-5]) m = gpflow.models.GPR(data=(X,Y), kernel=k, mean_function=None) and I want to fix the lengthscale in the 2nd dimension, and just optimise the other. I can disable all lengthscale optimisation using, gpflow.set_trainable(m.kernel.lengthscales, False) but I can't pass just one dimension to this method. In GPy we would call m.kern.lengthscale[1:].fixed() or something. Maybe I could use a transform to roughly achieve this (e.g.

How to fix some dimensions of a kernel lengthscale in gpflow?

余生颓废 提交于 2021-02-11 04:52:08
问题 I have a 2d kernel, k = gpflow.kernels.RBF(lengthscales=[24*5,1e-5]) m = gpflow.models.GPR(data=(X,Y), kernel=k, mean_function=None) and I want to fix the lengthscale in the 2nd dimension, and just optimise the other. I can disable all lengthscale optimisation using, gpflow.set_trainable(m.kernel.lengthscales, False) but I can't pass just one dimension to this method. In GPy we would call m.kern.lengthscale[1:].fixed() or something. Maybe I could use a transform to roughly achieve this (e.g.

Is there a Python package that can trace a curve with a Gaussian lineshape over several x and y values?

人盡茶涼 提交于 2021-02-10 18:29:21
问题 My apologies for my ignorance in advance; I've only been learning Python for about two months. Every example question that I've seen on Stack Overflow seems to discuss a single distribution over a series of data, but not one distribution per data point with band broadening. I have some (essentially) infinitely-thin bars at value x with height y that I need to run a line over so that it looks like the following photo: The bars are the obtained from the the table of data on the far right. The

Gaussian fit returning negative sigma

狂风中的少年 提交于 2021-02-07 20:20:39
问题 One of my algorithms performs automatic peak detection based on a Gaussian function, and then later determines the the edges based either on a multiplier (user setting) of the sigma or the 'full width at half maximum'. In the scenario where a user specified that he/she wants the peak limited at 2 Sigma, the algorithm takes -/+ 2*sigma from the peak center (mu). However, I noticed that the sigma returned by curve_fit can be negative, which is something that has been noticed before as can be

How to calculate the angle of ellipse Gaussian distribution

无人久伴 提交于 2021-02-05 08:40:16
问题 I make following Python Code to calculate center and size of Gaussian-like distribution basis of moment method. But, I can't make the code to calculate the angle of gaussian. Please look at pictures. First Picture is original data. Second picture is reconstruct data from the result of moment method. But, second picture is insufficient reconstruction. Because, original data is inclined distribution. I have to, I think, calculate the angle of axis for Gaussian-like distribution. To assume that

Kernel's hyper-parameters; initialization and setting bounds

有些话、适合烂在心里 提交于 2021-01-29 12:31:15
问题 I think many other people like me might be interested in how they can use GPFlow for their special problems. The key is how GPFlow is customizable, and a good example would be very helpful. In my case, I read and tried lots of comments in raised issues without any real success. Setting kernel model parameters is not straightforward (creating with default values, and then do it via the delete object method). Transform method is vague. It would be really helpful if you could add an example

Understanding score of 1 in scikit-learn Gaussian process regressor

£可爱£侵袭症+ 提交于 2021-01-29 10:15:18
问题 I'm new to Gaussian processes and struggling to validate the output of my scikit GPR. I'm particularly concerned with the fact that my GPR returns a score of 1, which doesn't make any sense to me because the coefficient of determination of this data should not be equal to 1. Is there a particular problem with the GRP or data that is implied by a score of 1? I've included my code, and my X,Y are each arrays of length 15. I have additionally tried both the Matern and RBF kernels on their own

Multivariate Gaussian distribution formula implementation

纵饮孤独 提交于 2021-01-28 06:22:16
问题 I have a certain problem while implementing multivariate Gaussian distribution for anomaly detection. I have referred the formula from Andrew Ng notes http://www.holehouse.org/mlclass/15_Anomaly_Detection.html below is the problem I face Suppose I have a data set with 2 features and m number of training set i.e n=2 and wants to determine my multivariate Gaussian probability p(x;mu;sigma) which should be a [m*1] matrix because it produces estimated Gaussian value by feature correlation. The