我是使用 weka 和神经网络的新手。在将 weka 输出转换为代码级别时,我有点困惑。这是经过训练的多层感知器的 weka 输出。
=== Classifier model (full training set) ===
Sigmoid Node 0
Inputs Weights
Threshold -7.728242643484787
Node 2 9.643254844595948
Node 3 -8.919025399127651
Sigmoid Node 1
Inputs Weights
Threshold 7.728242205764689
Node 2 -9.643254376294452
Node 3 8.91902493707197
Sigmoid Node 2
Inputs Weights
Threshold 21.0918376938558
Attrib mean -19.54425890349859
Attrib std 36.730369650588976
Sigmoid Node 3
Inputs Weights
Threshold 16.25280971170097
Attrib mean -17.677516091162413
Attrib std 14.141388386397688
Class valid
Input
Node 0
Class invalid
Input
Node 1
这就是我如何转换为 MATLAB 代码
node3 = sdev * 14.141388386397688 + avg *-17.677516091162413;
node3 = 1 / (1 + exp(-node3));
if(node3 < 16.25280971170097)
node3 = 0;
end
node2 = sdev * 36.730369650588976 + avg * -19.54425890349859;
node2 = 1 / (1 + exp(-node2));
if(node2 < 21.0918376938558)
node2 = 0;
end
node1 = node3 * 8.91902493707197 + node2 * -9.643254376294452;
node1 = 1 / (1 + exp(-node1));
if(node1 < 7.728242205764689)
node1 = 0;
end
node0 = node3 * -8.91902493707197 + node2 * 9.643254376294452;
node0 = 1 / (1 + exp(-node0));
if(node0 < -7.728242205764689)
node0 = 0;
end
但是我使用这个得到了一些奇怪的输出,任何人都可以帮助我将 weka 生成的输出转换为功能神经网络。