Create a network that reliably distinguishes the gender

Assignment Help Simulation in MATLAB
Reference no: EM132223398

Neural Network Lab - Supervised Learning

Perceptrons

We start by creating a perceptron with two input nodes and one output node by creating a 1x2 weight matrix, W (i.e. 1 output and 2 inputs) initialized to zero, a bias weight, b, initialized to zero, and a thresholding transfer function for the output unit:

>> W=zeros(1,2);
>> b=zeros(1,1);
>> net_inp=W*inp+b;
>> out=sign(sign(net_inp)+1);

If the net input to the output node is larger than 0, the output will be 1, otherwise 0. A bias weight can be thought of connecting an additional input node whose value is always 1 to the output node. The bias weight changes the point where this decision is made. For example, if the bias is -5, the net sum has to exceed 5 in order for the output to yield 1 (the bias of -5 is subtracted from the net sum. If it is less than 5, it will fall below 0).

Let's set the weights from the two input nodes to 1 and -1, respectively.

If the sum of the input times the weights meets or exceeds 0, the network should return 1, otherwise 0. Let's try it by feeding it some inputs:

inp1 = [1; 0.5] %Note: The first, positive weighted input larger than the second

inp2 = [0.5; 1] %Note: The second, negative weighted input is larger than the first

Your output should be 1 for inp1 and 0 for inp2. The network classified these inputs correctly. You can now feed the network a large number of random numbers and see if they are classified correctly, like this:
a = rand(2,10) %Create 20 random numbers, arranged as 2 rows, 10 columns

If the value in the first input row is larger than the value in the second input row (for a given column), the output value (for that column) should be 1, otherwise 0.

Exercise 1: Adjust the bias to some arbitrary value and see how the input/output mapping changes.

Exercise 2: Explore some points in the space and see what their output is. Is it about what you expect? Does the network make gross errors? What about the initial input vector?

Exercise 3: Use a linear neural network to classify the "good" and "bad" Greebles used in the previous neural network lab. Initially, set the weights to 1 and set the bias to zero.

Exercise 4: Solve the Greeble problem with a multilayer feedforward network using a sigmoid transfer function using the backpropagation learning rule. What are the results?

Exercise 6: What happens if you add two different frequencies of sine waves and play it?

Exercise 7: Play it again at a higher/lower sampling rate. What is happening?

Exercise 8: What is the person saying? Hint: The signal was sampled at 22050 Hz. You might want to take that into account when playing it. Look at the spectrogram, too.

Project

The project is to create a network that correctly classifies the gender of two target speech bites. In order to this, train the network with a total of 6 speech bites of both genders. Load these files (called Train_Kira1 to 3 and Train_Pascal1 to 3). Of course, the two speakers differ in all kinds of ways other than just gender (age, race, English as a first/second language, idiosyncratic speech characteristics, life style, etc.). If one were to face this problem in real life, one would have to train the network with a large number of speakers from both genders so that the network can abstract from all these irrelevant dimensions. But for our purposes, this will be fine. Specifically, you should do the following:

Create a network that reliably distinguishes the gender of the two target speech bites. Provide some evidence that this is the case and submit the source code.

Hints:
• You should implement a network using the backpropagation learning rule.
• Take the spectrogram of the sound files. Use those as the inputs to your neural network. Below (Figure 10): Amplitude and Spectrogram of the sentence: "The dog jumped over the fence". Left subplot is a female speaker, right subplot is a male speaker.
A. B.
Figure 10. The amplitudes (A) and spectrograms (B) of a female and male speaker uttering "The dog jumped over the fence"


• a = spectrogram(b) will return an array of complex numbers in a. They have an imaginary and a real part. For our purposes, the real part will do. For this, type c = real(a). c will now contain the real part of the imaginary numbers in a.

• This project is deliberately under-constrained. Basically, you can try whatever you want to solve the problem. As a matter of fact, we encourage this, since it will help you understand neural networks that much better. Don't be frustrated and don't panic if you can't figure it out right away.
• If you take a spectrogram of the speech patterns that you are supposed to train the network with, it will return 129 rows and several thousand columns. A neural network that takes the entire information from this matrix has to have 129 inputs.
• This is obviously rather excessive. If you closely observe the spectrogram (see Figure 10B), you might be able to get away with less. The rows tessellate the frequency spectrum (y axis below). Power in a particular frequency band is at a particular row. Power in a particular frequency band at a particular time is in a particular combination of row and column.
• The point is that the left spectrogram has much more power in the upper frequencies than the one on the right. If you properly combine frequency bands (or sample them), you might be able to get away with a neural network that has only 5 or 10 inputs.
• The same applies for time. Your spectrogram will have several thousand columns. This kind of resolution is not necessary to get the job done. Try combining (averaging) the values in 100 or so columns into one. Then feed that to the neural network for training.
• Try using one hidden layer
• Try having a large number of hidden units (definitely more than 1)
• You will be using a supervised learning rule. The target is defined by which file the data came from (Pascal or Kira). Create an artificial index, assigning 1 and 0 (natural) or 1 and 2 (politically correct) to each.
• Always remember what the rows and columns of the variables you are using represent. Be aware of transformations in dimensions.

Attachment:- Lab4_NeuralNet.rar

Verified Expert

The artificial neural network using Matlab software was developed.Two audio files such as Kira and Pascal training data was employed.The spectrogram of audio files were generated and high frequency data from both speech bites were fed to deep learning tool box for artificial neural network generation.The code files and m files were shared along with the report for description.

Reference no: EM132223398

Questions Cloud

Describe the benefits and threats associated : Describe the benefits and threats associated with different levels of stress in the workplace.
Document client profitability in systematic-on-going fashion : What types of systems and processes are needed to document client profitability in a systematic and on-going fashion?
Discuss the utility theory and its assumptions : Discuss the utility theory and its assumptions. Give examples to go along with assumptions.
Salespeople tailor their message to different generations : Collapse How might salespeople tailor their message to different generations?
Create a network that reliably distinguishes the gender : CPNS 33200 Computational Neuroscience - Neural Network Lab II - Supervised Learning - create a network that correctly classifies the gender of two target speech
Essential business concepts : You have been learning about the essential business concepts this term. From your required Textbook 1: Anybody's Business you have been introduced to concepts
What malicious actions are taken in the reconnaissance stage : complete a 2-3 page narrative (double spaced) discussing what malicious actions are taken in the reconnaissance stage, what countermeasures are available
How does balanced scorecard factor : 1. How does Balanced Scorecard factor into an organization's total strategy?
Define the concept of retail positioning : Define the concept of retail positioning. Apply the concept to a retailer that practices an exclusive distribution strategy.

Reviews

len2223398

1/27/2019 10:12:29 PM

Please finish the entire lab, from the coding to the final report. In your answers, please send the answers to the written questions in a pdf. And please send all the MATLAB files.

Write a Review

Simulation in MATLAB Questions & Answers

  Calculate the stress intensity factor

Use the three-parameter zone finite element method or the boundary collocation method to calculate the stress intensity factor K, at the crack tip for the plate

  Build a simulation using newtons laws of motion

Build a new and different simulation of your own using Newtons laws of motion and Show the code and describe how it works

  Write the specification of load mover

Write the specification of LOAD MOVER detailed of the whole design and precise for automatic control section and divide the design into various modules and Is the kernel required if yes which one?

  Design the automatic control section using statecharts

Aim of this project is to design an embedded system which can move loads from one place to another. The system can be operated manually, automatically and wirelessly.

  Need an expert who can model a drill in simulink

Need an expert who can model a drill in Simulink. Working model of a drill needing for an improvment to behave more realistically as a drill to drill through plastic block.

  Project is on load frequency control using fpid

Project is on load frequency control using FPID tuned using GA and PSO algorithm and the system is a two area system.

  Number of packets received with time

Let x be the number of packets received with time -

  Build a matlab based graphical user interface

Build a Matlab based graphical user interface (GUI) that operates in conjunction with a base Matlab/ Simulink simulation program. Any base simulation is considered acceptable.

  Build a matlab based graphical user interface

Build a Matlab based graphical user interface (GUI) that operates in conjunction with a base Matlab/ Simulink simulation program. Any base simulation is considered acceptable.

  Simulate the standardised sum of independent

Simulate the standardised sum of independent and identically distributed variates - Fit a linear regression model as in Q5, and plot your estimates for β0 and β1 as N increases, together with a line indicating their true values. Supply your code.

  Plot the original periodic square wave

Plot the original periodic square wave on the same graph. Comment on the difference between the original periodic square wave and its truncated Fourier series presentation.

  Use matlab to plot the function

Plot the original periodic square wave on the same graph. Comment on the difference between the original periodic square wave and its truncated Fourier series presentation.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd