gpt4 book ai didi

r - 在 rstan 中,通过列表指定的初始参数值是应用于约束支撑还是无约束支撑?

转载 作者:行者123 更新时间:2023-12-01 13:17:06 25 4
gpt4 key购买 nike

rstan::stan 的帮助文件关于init有以下几点要说争论:

init="random" (default):

  • Let Stan generate random initial values for all parameters. The seed of the random number generator used by Stan can be specified via the seed argument. If the seed for Stan is fixed, the same initial values are used. The default is to randomly generate initial values between -2 and 2 on the unconstrained support. The optional additional parameter init_r can be set to some value other than 2 to change the range of the randomly generated inits.

init="0", init=0:

  • Initialize all parameters to zero on the unconstrained support.

inits via list:

  • Set inital values by providing a list equal in length to the number of chains. The elements of this list should themselves be named lists, where each of these named lists has the name of a parameter and is used to specify the initial values for that parameter for the corresponding chain.


不幸的是,这并没有说明通过列表指定的初始参数值是应用于有约束的支撑还是无约束的支撑。例如,如果我有以下参数块,
parameters {
real<lower=3, upper=7> theta;
}

我调用 stan如下,
rstan::stan(file, data = standata, init = list(list(theta = 5)), chains = 1)

theta的初始值在受约束的支撑或无约束的支撑上等于 5?

最佳答案

受限。在 documentation ,它说当 init是一个列表列表

The elements of this list should themselves be named lists, where each of these named lists has the name of a parameter and is used to specify the initial values for that parameter for the corresponding chain.



如果是关于 parameters一个 Stan 程序的块,那么它指的是受约束的空间。对于协方差矩阵、单纯形等,无约束空间不一定与约束空间的维度匹配。

关于r - 在 rstan 中,通过列表指定的初始参数值是应用于约束支撑还是无约束支撑?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53879596/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com