如何使我的数据参数随机化 [英] How Do I Make My Data Parameters Stochastic

查看:59
本文介绍了如何使我的数据参数随机化的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想问一下我想在我的代码中使用的随机参数。我熟悉boost的最新库(包括),但是,我不能调用任何类型的分发(正常,统一的e.t.c),因为我不知道确切的声明。特别是我希望我的一些参数遵循特定的分布,让我们说正态分布。我知道我将在我的代码顶部使用哪个#include但我不知道有关该分发声明的详细信息。可能我必须使用某种生成器,以便参数在正态分布后填充值。例如:parameter_x = generator [normal_distribution(100,1)];其中100是平均值,1是标准偏差。

请帮助我,

提前谢谢,

Nikos

I would like to ask about stochastic parameters that i want to use in my code. I am familiar with the latest libraries (includes) of "boost", however, i can't call any kind of distribution (normal, uniform e.t.c) because i don't know the exact declarations. In particular i want some of my parameters to follow specific distributions, lets say normal distribution. I know which #include i shall use in the Top of my code but i don't know the details regarding declaration of that distribution. Probably i must use some kind of "generator" in order the parameter to be filled with values following normal distribution. For examle: parameter_x = generator[normal_distribution(100,1)]; where 100 is the mean value and 1 the Standard deviation.
Please help me,
thank you in advance,
Nikos

推荐答案

现代C ++提供了所需的发行版,请参阅:Pseudo-随机数生成 [ ^ ] 。









Modern C++ provides the distribution you need, see: "Pseudo-random number generation"[^].




引用:

我不能调用任何类型的分发(普通,统一等),因为我不知道确切的声明

i can't call any kind of distribution (normal, uniform e.t.c) because i don't know the exact declarations

你的意思是什么?记录了类和方法,例如,参见std :: normal_distribution [ ^ ]。

What do you mean? Classes and methods are documented, see, for instance "std::normal_distribution"[^].


这篇关于如何使我的数据参数随机化的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆