Sigmoid Function: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 18: Line 18:


<syntaxhighlight lang='MATLAB'>
<syntaxhighlight lang='MATLAB'>
%
%Compute the logistic function of z, where z can be a scalar, vector or matrix
%
function s = logistic(z)
s = 1 ./ (1 + (e .^ (-1 .* z)));
end
</syntaxhighlight>
</syntaxhighlight>

Revision as of 09:28, 28 December 2017

External

Internal

Overview

Often, the sigmoid function refers to a special case of the logistic function.

Logistic Function

LogisticFunction.png

Logistic Function MATLAB Implementation

%
%Compute the logistic function of z, where z can be a scalar, vector or matrix
%
function s = logistic(z)
s = 1 ./ (1 + (e .^ (-1 .* z)));
end