主要内容

compet

竞争传递函数

图和符号

The competitive transfer function applied to an input vector. The function accepts an input vector and returns outputs of 0 for all inputs except for the winner, the element associated with the most positive element of the input.

语法

A = compet(N,FP)
info = compet('code')

说明

compet 是神经传递函数。传递函数根据层的净输入计算层的输出。

A = compet(N,FP) 接受 N 和可选的函数参数,

N

由净输入(列)向量 S×Q 组成的矩阵

FP

由函数参数组成的结构体(已忽略)

并返回一个 S×Q 的矩阵 A,其中在 N 中最大值所在的每一列中填入 1,在其余位置填入 0

info = compet('code') 根据指定的代码字符串返回信息:

compet('name') 返回此函数的名称。

compet('output',FP) 返回 [min max] 输出范围。

compet('active',FP) 返回 [min max] 活动输入范围。

compet('fullderiv') 返回 10,具体取决于 dA_dNS×S×Q 还是 S×Q

compet('fpnames') 返回函数参数的名称。

compet('fpdefaults') 返回默认函数参数。

示例

在此处,您定义一个净输入向量 N,计算输出,并用条形图绘制该向量及其输出。

n = [0; 1; -0.5; 0.5];
a = compet(n);
subplot(2,1,1), bar(n), ylabel('n')
subplot(2,1,2), bar(a), ylabel('a')

将此传递函数分配给网络的 i 层。

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

版本历史记录

在 R2006a 之前推出

另请参阅

|