Hello, welcome back.
In into session, we are going to practice with a different data set to explore more about math functions
and to see what can we do if we have more than one outputs for this purpose.
I'm going to just use one of the datasets that Matlab is providing us to go to the app and open the
neural net fitting tools.
Click up next here we can see different data set.
Let's take a look at them.
We have a simple fitting problem.
We have a body fat problem in this example.
We have 13 different inputs, total of two hundred fifty two samples.
These inputs are age, weight, height and the information about the body part.
And as an adult food, it just gave us a body fat percentage.
Another example that we have here is building analogy.
This is a data set of four thousand two hundred eight samples with fourteen inputs and three outputs.
And here we have chemical.
We have a gene.
Let me check this engine data set problem.
In this example, we have two inputs which are the feel right and a speed.
And we have two engine targets or output which are torque and nitrous oxide emissions.
We have total of one thousand one hundred ninety nine samples of H.
This sounds good for our purpose.
So I will load this example, but not from here.
Let me check the filename.
This one is engine data dataset.
I'm going to load it here in my command life.
Just copy this name and close this one degrees.
Then I'm not going to load another neural network is because we have already created an advanced script
which gives us more functions.
So I want to use the same.
And I don't want to create another advanced script from the scratch here and the command window to see
the data.
You can simply try to load the name of your dataset, as you can see in a word, caspase.
I already have engine targets and I have engine inputs.
But let's do something else.
I can create a variable named data and I can load my samples, the data said, in these data so I can
manage it better in a day.
We have engine inputs, which are two different inputs and engine targets, which are, again, two
different outputs.
Let's create a new one and copy and paste all this creep that we created in advance, a script number
two and just pasted to here and before doing anything else, save over data and give it a name.
This time I'm going to call it Advancer script number tweet.
We underscore gene underscore dataset.
OK, well, then I'll settle to start here.
We really don't need these inputs and targets, we are going to use their engine data set that's Maslov
is providing for us.
If you have a different form, you can just employ that in Matlab and you can use your own data set,
which usually using Excel, fine, you can import it here.
First thing to do, create a data and then load.
Engine data set.
Next one is I want my pooch to being a variable named X, X is the name that I use for the entire program,
so I'm not going to change it here.
Let's just call them X.
What are my inputs?
They are changing inputs.
They called Indurain inputs from data.
Let's call InGen inputs.
I need all of them.
So I'm I'm going to put a semicolon.
And as my target seems to be defined it as a name t before in our advantage, I'm going to use the same
name ts equal from Daytop this time load my targets, which are InGen targets.
But the point here is we have two different outputs.
It means that we need to train as separate neural network for each output.
There are some situations that outputs and targets are having some high correlation and they are related.
So we can just use one neural network to train for the same outputs.
But here we are not sure if the outputs are going to fit and if one neural network with the same number
of player with the same algorithm is going to work for both outputs.
That's why I'm going to first choose the output, number one, and then next time I will create another
advance.
A script called for the second target.
Put this in McAloon and we're all set.
You can already run your program to see if everything is working, though.
OK, Vringo, it's working.
You can see different figures that we created.
You can see the performance.
It's working.
Well, let's do a little bit adjustment here.
I want to have more than one hundred because one hundred just stopped our training and it might not
really be efficient for this example.
And this data set here it is number of folks I will choose five hundred.
And then another team that I'm going to do is to make all these plots as a comment.
So every time that I'm running the program, they won't pop up.
You can use plot three to show it three D plot.
This plot tree has three elements.
We have two inputs and we have one output.
So first, let's show the input.
Number one, the first input, and then let's show the second input.
And finally, I want to see my targets and let's show these targets.
Sweet that.
OK, here we have if you just type weed on, you will see better.
We can see our data.
One of them is my first input, the other one is my second input.
And here I can see the output.
If you just rotated a little bit, we can see somehow they are under one to face.
Each means we can train and know a very good neural network to fit this data and it's good for our approximation
functions.
But let's do something more here.
Just click on Iran one more time to see the feet.
We don't have any feet because we have more than one input.
So we need to have a customized figure to somehow show their feet plot.
Let's go to the plot parts and make some space here.
A start with type figure.
I want to have a figure for this figure I want to plot.
Our troops off of our neural network and show we do the color of black, but hold on, I'm not done
yet.
I will never know their plot to show and same finger the targets we color for it and also make it a
dotted line.
We can also add some commands, use the code Legion, give it a name here.
First one is my neural net outputs.
The second one are my targets.
And finally, give it a title.
Let's just it all day, OK?
I run the program to see the result.
There is an error here.
This one is a semi color.
This one is Leegin.
This is let's hope everything works well this time.
Let's see where we go now.
This is my data.
One of them is Mount Hood.
The other one is the target.
If you just zoom and a part of that, you can see this red dotted line is the targets that we are looking
to fit a neural network.
And this one is a line that my neural network was able to feed, which was a very good fit.
It's almost the same.
So we have a very good neural network.