Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

logsig

Log-sigmoid transfer function

Graph and Symbol

Syntax

A = logsig(N,FP)
dA_dN = logsig('dn',N,A,FP)
info = logsig('code')

Description

logsig is a transfer function. Transfer functions calculate a layer's output from its net input.

A = logsig(N,FP) takes N and optional function parameters,

N

S-by-Q matrix of net input (column) vectors

FP

Struct of function parameters (ignored)

and returns A, the S-by-Q matrix of N's elements squashed into [0, 1].

dA_dN = logsig('dn',N,A,FP) returns the S-by-Q derivative of A with respect to N. If A or FP is not supplied or is set to [], FP reverts to the default parameters, and A is calculated from N.

info = logsig('code') returns useful information for each code string:

logsig('name') returns the name of this function.

logsig('output',FP) returns the [min max] output range.

logsig('active',FP) returns the [min max] active input range.

logsig('fullderiv') returns 1 or 0, depending on whether dA_dN is S-by-S-by-Q or S-by-Q.

logsig('fpnames') returns the names of the function parameters.

logsig('fpdefaults') returns the default function parameters.

Examples

Here is the code to create a plot of the logsig transfer function.

n = -5:0.1:5;
a = logsig(n);
plot(n,a)

Assign this transfer function to layer i of a network.

net.layers{i}.transferFcn = 'logsig';

More About

collapse all

Algorithms

logsig(n) = 1 / (1 + exp(-n))

See Also

|

Introduced before R2006a

Was this topic helpful?