Encog RBF C#,RBF神经元总数必须是“维数"的幂的整数 [英] Encog RBF C#, Total number of RBF neurons must be some integer to the power of 'dimensions'

查看:189
本文介绍了Encog RBF C#,RBF神经元总数必须是“维数"的幂的整数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我经常出错在C#中使用方法 SetRBFCentersAndWidthsEqualSpacing ,RBF神经元的总数必须是'dimensions'幂的整数.

I get constantly error Total number of RBF neurons must be some integer to the power of 'dimensions' with using method SetRBFCentersAndWidthsEqualSpacing in C#.

在Encog中熟悉RBF网络的人可以检查RBFNetwork.cs中的232行.我认为可能是一个错误或我错过了一些东西:

Can someone who is familiar with RBF network in Encog check the line 232 in RBFNetwork.cs. I think there is maybe a bug or I miss something:

var expectedSideLength = (int) Math.Pow(totalNumHiddenNeurons, 1.0d/dimensions); 
double cmp = Math.Pow(totalNumHiddenNeurons, 1.0d/dimensions); 
if (expectedSideLength != cmp) -> error

这两个变量不能相等,因为(int)将数字四舍五入.巧合的是,它适用于XOR示例,不适用于19等不同维度.

these two variables can't be equal, because (int) rounds the number. It's coincidence that it works for XOR example, it won't work with different dimenson like 19 for example.

这是我创建RBF网络的方法:

This is how I create RBF network:

dataSet is VersatileMLDataSet 
RBFNetwork n = new RBFNetwork(dataSet.CalculatedInputSize, dataSet.Count, 1, RBFEnum.Gaussian);
n.SetRBFCentersAndWidthsEqualSpacing(0, 1, RBFEnum.Gaussian, 2.0/(dataSet.CalculatedInputSize * dataSet.CalculatedInputSize), true);

我的数据集有19个属性(维度)和731条记录.

My dataset has 19 attributes (dimension) with 731 records.

推荐答案

隐藏神经元的数量是一个整数,它提高了输入神经元数量的幂.因此,如果您有3个输入属性且窗口大小为2,则隐藏的神经元将是任何整数(例如3),其乘幂为6(3 x 2)或729.这限制了输入属性和窗口大小的数量,因为隐藏神经元的数量很快变得非常大.

The number of hidden neurons is an integer raised to the power of the number of input neurons. So if you have 3 input attributes and a window size of 2, hidden neurons would be any integer (say 3) raised to the power of 6 (3 x 2) or 729. This limits the number of input attributes and window size as the number of hidden neurons gets very large very quickly.

这篇关于Encog RBF C#,RBF神经元总数必须是“维数"的幂的整数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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