高斯基函数
您能告诉我如何在二维空间中对高斯基函数进行建模以获得标量输出吗?
我知道如何将其应用于标量输入,但我不明白应该如何将其应用于二维向量输入。我见过很多这样的变体,我很困惑。
Can you please tell me how can I model a Gaussian Basis Function in a 2 Dimensional Space in order to obtain a scalar output?
I know how to apply this with a scalar input, but I don't understand how should I apply it to a 2 dimensional vector input. I've seen many variations of this that I am confused.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
每个高斯基关联一个与输入具有相同维度的中心,我们将其称为 c。如果 x 是您的输入,您可以将输出计算为:
这适用于 x 和 c 的任何维度,前提是它们相同。更一般的形式是,
其中 S 是某个正定矩阵,即逆协方差矩阵。一个简单的情况是取 S 为对角矩阵,对角线上有正项。
With each Gaussian basis associate a center of the same dimension as the input, lets call it c. If x is your input, you can compute the output as
This will work with any dimension of x and c, provided they are the same. A more general form is
where S is some positive definite matrix, well the inverse covariance matrix. A simple case is to take S to be a diagonal matrix with positive entries on the diagonals.
要从多元正态分布中采样,请使用 MVNRND 函数统计工具箱。示例:
To sample from a multivariate normal distribution, use the MVNRND function from the Statistics Toolbox. Example: