[英]Octave - logsig transfer function
I don't believe Octave does, but you can certainly create logsig
outputs yourself. 我不相信Octave,但是您当然可以自己创建logsig
输出。 The logsig
transfer function (or the Log-Sigmoid function... or simply the Sigmoid function) is simply defined as: logsig
传递函数(或Log-Sigmoid函数...或简称为Sigmoid函数)简单定义为:
a = 1 ./ (1 + exp(-n));
n
would be the input values stored in a vector / matrix / etc. As such, simply place your values into a matrix / vector into n
, then use the above code to apply the logsig
function to every value that is defined in n
. n
将是存储在向量/矩阵等中的输入值。因此,只需将您的值放入矩阵/向量到n
,然后使用上述代码将logsig
函数应用于n
定义的每个值。
n = [0; 1; -0.5; 0.5];
a = 1 ./ (1 + exp(-n))
a =
0.5000
0.7311
0.3775
0.6225
Comparing this with MATLAB's logsig
function, we get: 与MATLAB的logsig
函数进行比较,我们得到:
a2 = logsig(n)
a2 =
0.5000
0.7311
0.3775
0.6225
logsig is part of the nnet octave-forge package. logsig是nnet octave-forge软件包的一部分。 http://sourceforge.net/p/octave/code/HEAD/tree/trunk/octave-forge/main/nnet/inst/logsig.m http://sourceforge.net/p/octave/code/HEAD/tree/trunk/octave-forge/main/nnet/inst/logsig.m
If it's not in core Matlab (Neural Network Toolbox in this case) you should have a look at the corresponding octave-forge package. 如果它不在核心Matlab(在本例中为Neural Network Toolbox)中,则应查看相应的octave-forge包。 Unfortunally nnet is unmaintained. 不幸的是,nnet无法维护。
The logsig.m linked is basically the same as rayrengs but also checks for finite. 链接的logsig.m与rayrengs基本相同,但也检查有限性。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.