本文介绍了处理数据以更好地拟合高斯分布的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个关于正态分布的问题(mu = 0sigma = 1).

I have got a question concerning normal distribution (with mu = 0 and sigma = 1).

让我首先这样称呼randn或normrnd

Let say that I firstly call randn or normrnd this way

x = normrnd(0,1,[4096,1]); % x = randn(4096,1)

现在,为了评估x值如何适合正态分布,我称之为

Now, to assess how good x values fit the normal distribution, I call

[a,b] = normfit(x);

并具有图形支持

histfit(x)

现在进入问题的核心:如果我对x如何适合给定的正态分布不满意,如何优化 x 以便更好地满足期望的正态分布分布,其均值为 0均值 1个标准差?有时由于表示值很少(在这种情况下为 4096 ), x 与预期的高斯拟合度确实很差,所以我想操纵 x (线性与否,在此阶段并不重要)以获取更好的适应性.

Now come to the core of the question: if I am not satisfied enough on how x fits the given normal distribution, how can I optimize x in order to better fit the expected normal distribution with 0 mean and 1 standard deviation?? Sometimes because of the few representation values (i.e. 4096 in this case), x fits really poorly the expected Gaussian, so that I wanna manipulate x (linearly or not, it does not really matter at this stage) in order to get a better fitness.

我想指出我可以使用统计工具箱.

I'd like remarking that I have access to the statistical toolbox.

编辑

  1. 我使用normrndrandn进行了示例,因为我的数据被假定为并且应该具有正态分布.但是,在问题中,这些功能仅有助于更好地理解我的担忧.

  1. I made the example with normrnd and randn cause my data are supposed and expected to have normal distribution. But, within the question, those functions are only helpful to better understand my concern.

是否可以应用最小二乘拟合?

通常,我得到的分布类似于以下内容:

Generally the distribution I get is similar to the following:

我的

推荐答案

也许,您可以尝试将输入数据标准化为均值= 0和sigma = 1.像这样:

Maybe, you can try to normalize your input data to have mean=0 and sigma=1. Like this:

y=(x-mean(x))/std(x);

这篇关于处理数据以更好地拟合高斯分布的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-14 00:24