日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

Matlab神经网络十讲(7): Adaptive Filter and Adaptive Training

發(fā)布時間:2025/3/15 编程问答 29 豆豆
生活随笔 收集整理的這篇文章主要介紹了 Matlab神经网络十讲(7): Adaptive Filter and Adaptive Training 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

1. Adaptive Function?

? ? ? ? The function adapt can change the weight and bias of a network incrementally during training.


A linear neuron with R inputs is shown left.

R是輸入向量的個數(shù)。

This network has the same basic structure as the perceptron. The only difference is that the linear neuron uses a linear transfer function, named purelin.



The linear transfer function calculates the neuron's output by simply returning the value passed to it.
α = purelin(n) = purelin(Wp + b) = Wp + b



2.?Adaptive Linear Network Architecture


R:輸入向量的個數(shù)

S:神經(jīng)元的個數(shù)

The Widrow-Hoff (MSE) rule can only train single-layer linear networks. This is not much of a disadvantage, however, as single-layer linear networks are just as capable as multilayer linear networks. For every multilayer linear network, there is an equivalent single-layer linear network.(每一額多層線性神經(jīng)網(wǎng)絡(luò)可以等效為單層網(wǎng)絡(luò))



2.1 Single AdaLine


Consider a single ADALINE with two inputs. The following figure shows the diagram for this network.

The weight matrix W in this case has only one row. The network output is
α = purelin(n) = purelin(Wp + b) = Wp + b



? ? ? ? We can create a network similar to the one shown using this command:

net = linearlayer; net = configure(net,[0;0],[0]); ? ? ? The sizes of the two arguments to configure indicate that the layer is to have two inputs and one output. Normally train does this configuration for us, but this allows us to inspect the weights before training.

? ? ? ?The network weights and biases are set to zero, by default. We can see the current values using the commands:

W = net.IW{1,1} b = net.b{1} ? ? ? ? We can also assign arbitrary values to the weights and bias, such as 2 and 3 for the weights and ?4 for the bias:
net.IW{1,1} = [2 3]; net.b{1} = -4;

? ? ? ?We can simulate the ADALINE for a particular input vector.

p = [5; 6]; a = sim(net,p) >> a =24 ? ? ? To summarize, we can create an ADALINE network with linearlayer, adjust its? elements as we want, and simulate it with sim.

2.2?Least Mean Square Error

? ? ??Like the perceptron learning rule, the least mean square error (LMS) algorithm is an example of supervised training, in which the learning rule is provided with a set of examples of desired network behavior.

{p1,t1 }, {p2,t2 },..., { pQ,tQ}.

? ? ? Here pq is an input to the network, and tq is the corresponding target output. As each input is applied to the network, the network output is compared to the target. The error is calculated as the difference between the target output and the network output. The goal is to minimize the average of the sum of these errors:


? ? ? ? The LMS algorithm adjusts the weights and biases of the ADALINE so as to minimize this mean square error.

? ? ? ??Fortunately, the mean square error performance index for the ADALINE network is a quadratic function. Thus, the performance index will either have one global minimum, a weak minimum, or no minimum, depending on the characteristics of the input vectors. Specifically, the characteristics of the input vectors determine whether or not a unique solution exists.

2.3?LMS Algorithm (learnwh)

? ?Adaptive networks will use the LMS algorithm or Widrow-Hoff learning algorithm based on an approximate steepest descent procedure. Here again, adaptive linear networks are trained on examples of correct behavior.

3.?Adaptive Filtering (adapt)

? ?The ADALINE network, much like the perceptron, can only solve linearly separable problems. It is, however, one of the most widely used neural networks found in practical applications. Adaptive filtering is one of its major application areas.

3.1 ?Tapped Delay Line(抽頭延遲)

We need a new component, the tapped delay line, to make full use of the ADALINE network. Such a delay line is shown in the figure. The input signal enters from the left and passes through N-1 delays. The output of the tapped delay line (TDL) is an Ndimensional vector, made up of the input signal at the current time, the previous input signal, etc.





We can combine a tapped delay line with an ADALINE network to create the adaptive filter shown in the figure.

The output of the filter is given:



3.2?Adaptive Filter Example

? ? ??First, define a new linear network using linearlayer



Assume that the linear layer has a single neuron with a single input and a tap delay of 0, 1, and 2 delays.




net = linearlayer([0 1 2]); net = configure(net,0,0); Notice:?We can specify as many delays as we want, and can omit some values if we like. They must be in ascending order.

we can give the various weights and the bias values with

net.IW{1,1} = [7 8 9]; net.b{1} = [0];

? ? ? Finally, define the initial values of the outputs of the delays as

pi = {1 2}; % 是指 p(t-1)和p(t-2) ? ? ? These are ordered from left to right to correspond to the delays taken from top to bottom in the figure. This concludes the setup of the network.

? ? ? To set up the input, assume that the input scalars arrive in a sequence: first the value 3, then the value 4, next the value 5, and finally the value 6. we can indicate this sequence by defining the values as elements of a cell array in curly braces.

p = {3 4 5 6}; ? ? ? Now, we have a network and a sequence of inputs. Simulate the network to see what its output is as a function of time.
a = % 最終的輸出序列1×4 cell 數(shù)組{[46]} {[70]} {[94]} {[118]} pf = % 最終的延遲數(shù)值1×2 cell 數(shù)組{[5]} {[6]}

3.3?Prediction Example

? ? ??Suppose that we want to use an adaptive filter to predict the next value of a stationary random process, p(t). We can use the network shown in the following figure to do this prediction.

The signal to be predicted, p(t), enters from the left into a tapped delay line. The previous two values of p(t) are available as outputs from the tapped delay line. The network uses adapt to change the weights on each time step so as to minimize the error e(t) on the far right. If this error is 0, the network output a(t) is exactly equal to p(t), and the network has done its prediction properly.

3.4?Noise Cancelation Example

? ? ??Consider a pilot in an airplane. When the pilot speaks into a microphone, the engine noise in the cockpit combines with the voice signal. This additional noise makes the resultant signal heard by passengers of low quality. The goal is to obtain a signal that contains the pilot's voice, but not the engine noise. We can cancel the noise with an adaptive filter if we obtain a sample of the engine noise and apply it as the input to the adaptive filter.


4.?Multiple Neuron Adaptive Filters

? ??We might want to use more than one neuron in an adaptive system, so we need some additional notation. We can use a tapped delay line with S linear neurons, as shown in the bellow figure.


總結(jié)

以上是生活随笔為你收集整理的Matlab神经网络十讲(7): Adaptive Filter and Adaptive Training的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。