Question: Please, recreate this example in python. Have it generate the same plots as well. Linear Network Figure 10 displays a set of 100 examples drawn

Please, recreate this example in python. Have it generate the same plots as well.

Please, recreate this example in python. Have it generate the same plots

as well. Linear Network Figure 10 displays a set of 100 examples

drawn from two Gaussian distributed classes centered at (0.4,0.8) and (0.4,0.8). The

Linear Network Figure 10 displays a set of 100 examples drawn from two Gaussian distributed classes centered at (0.4,0.8) and (0.4,0.8). The eigenvalues of the covariance matrix are 0.84 and 0.036. We train a single layer linear network with 2 inputs, 1 output, 2 weights, and 1 bias (see Figure (9)) using the LMS algorithm in batch mode. Figure 11 displays the weight trajectory and error during learning when using a learning rates of =1.5 and 2.5. Note that the learning rate (see Eq. 38) max=2/max=2/.84=2.38 will cause divergences as is evident for =2.5. Fig. 9. Simple linear network. Fig. 10. Two classes drawn from gaussian distributions centered at (0.4,0.8) and (0.4,0.8). Figure 12 shows the same example using stochastic instead of batch mode learning. Here, a learning rate of =0.2 is used. One can see that the trajectory is much noisier than in batch mode since only an estimate of the gradient is used at each iteration. The cost is plotted as a function of epoch. An epoch here is simply defined as 100 input presentations which, for stochastic learning, ] corresponds to 100 weight updates. In batch, an epoch corresponds to one weight update. Fig. 12. Weight trajectory and error Fig. 13. Weight trajectories and errors curve during stochastic learning for = for 1-1-1 network trained using stochas0.2. tic learning

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!