Amazing video, looked for several introductions to NN and this is def the best. One last thing, can you further explain performance and Mu? what small or big values in those parameters represent? Thank you!
Oh my gosh, you found a typo I think. That code was probably used in a loop before I made the simplified version for the tutorial. You can just get rid of the indexing entirely I think, most likely ii was set to one when it runs.
@@CodingLikeMad Great!! I'll wait for it then. I'm willing to learn neural network, that would be very helpful for me!! But I'm learning a lot with your other videos too so feel free haha. Tks.
Excellent tutorial sir... Thank you so much.. plz tell me which activation function used in your model... Bcz i am going to implement similar model in Excel VBA. I cannot use matlab.
Glad you liked it! Part 2 isn't titled as part 2 because they don't really depend on each other. You can find it here: ua-cam.com/video/IUK8x3fZ1CA/v-deo.html
There is indeed a typo in the code! That code was probably used in a loop before I made the simplified version for the tutorial. You can just get rid of the indexing entirely I think, most likely ii was set to one when it runs. Thanks for pointing it out, I'll try and add a comment near there since you are the second person to get tripped up with it.
@@CodingLikeMad works great, thanks, i was wondering if it would be possible for you to create an equivalent code in python to run in google colab?? thanks againg
thanks for your valuable tutorial.i have a problem.i sincerely appreciate your answer. i have matrix with 48 raws and 2 columns,one column is in situ data and one column is satellite data. i want to train a network for points that i dont have in situ data , get satellite data and give me resault that if i had in situ data it was really close to the result .actually my rx is 1 to 30 in situ data and my ry is 1 to 30 satellite data.i want to train my network with this rx and ry.my x2 is 31 to 48 satellite data.this is my code. rx=dataaa(:,3); ry=book(:,3); x2=reshape(rx(31:48),1,[]); % inputs=dataaaa; % outputs=book(:,3); netconf=[10]; net=feedforwardnet(netconf); net=train(net,rx(1:30).',ry(1:30).'); y2pred=net(x2); figure;hold on; plot(x2,y2pred,'linewidth',0.5); plot(rx(1:30),ry(1:30),'x'); the answer is a very hard curve.how can i smooth it?is my code right?
I'm not sure if your code is correct, but if it runs it has a decent chance of being mostly right, but you have a bigger issue - your network has very limited data. Neural nets are generally "data heavy" - for a problem where you only have 30 training examples, I would be very tempted to not use a neural net. If you have any better curve to fit to, that may be a better model than a neural net. My suspicion is that you are heavily "over training". To verify your dimensions are correct, take a look at the input and output sizes first (in the input and outputs), and make sure they match your expected sizes, thats the thing I am most worried about from a pure correctness side. Please see the discussion towards the last half of the video about over/undertraining though, I suspect you are in such a regime.
here i come back to your video as it's well explained i had a question please, how to evaluate the accuracy of the trained Neural Network (as the output are numeric, not classes)
For a numeric network, the two most common metrics like accuracy are MSE (mean-squared error) and MAE (mean absolute error). These are also often used as cost functions for the network itself, although when you are judging "accuracy"(I put in quotes because accuracy really means something else), you should run them on a test set. MSE and MAE are calculated exactly like they sound like - calculate the absolute error for every element, or the squared error for every element, then take the mean.
@@peaceandlove5855 I cannot find any reference which FORMALLY defines accuracy for a regression problem. As an informal and useful metric, that seems reasonable. Be aware that MAPE has some down sides in terms of being biased towards lower error models. If you find one, feel free to reply with it, but I think people are just playing fast and loose with the word "Accuracy". I might be mistaken though.
@@CodingLikeMad some use test R value multipied by 100 to give an idea about model accuracy . The problem is that few talk about accuracy for nonbinary output 😅 Thanks for your fast reply mate. I really appreciate the video and the comments
@@peaceandlove5855 Yeah, I think the basic fact at the end of the day is that accuracy doesn't really exist as a METRIC for a regression (non-binary or non-classification) model. People want something to take the place of it, but there are a lot of ways to measure distance which is what this comes down to. Pierson's R is a common one as well. Sadly, this sort of thing is the "secret spice" of machine learning, and there isn't a perfect metric.
hi. could you ples help me to use the *plotfit(t,x,'name1',t,x,'name2',t,x,'name3') * i wrote that , but does not works.. i did not undertand the syntaxis in matlab help. I have a 3x17 matrix of inputs X and a 3x17 for outputs.
Hi Osvaldo, the syntax for the multiple plots looks confusing to me, I believe the matlab help page has a typo in it - you need the first argument to be the neural network. IE, plotfit(net, t1, x1, 'name1', t2,x2, 'name2'). The help text for it in matlab indicates this at least, and the one on the matlab website looks clearly busted to me. If it still won't work, could you DM me with the code and error message, and I can try to take a look?
Hello sir, thank you for making this video. I have a query that if I want to solve the same function with deep neural network then what would be modifications do I need to perform?
The difference between a deep neural network and a regular one is pretty artificial. Typically it just refers to NNs with more layers and nodes, rather than anything more fancy. Add more layers and you are good to go really.
@@CodingLikeMad For example, when you finish the training in nftool for other app and then you use sim(net, sample) with new inputs. You could show that part later.
Well explained, thanks for sharing with us. I am new to this field and have a little bit of knowledge and just would like to learn about ANN from this nice toolbox in MATLAB. Do you think the house prices advanced regression dataset can perform better using ANN?
I guess the question is "better compared to what?" Generally performance on a data set comes down to three things I think: how efficiently you use your training data, if your model has enough(but not too much) capacity for the problem, and how naturally does the model basis match the problem. Answering those is very case by case, and ANNs depend on how you encode the input space and output space quite a bit too. Easiest answer: just try! :)
Something else I want to mention actually, is that while my other comment is accurate, a _trend_ I have observed is that neural nets require more data to train than other models. This is because commonly seen continuous relationships (for instance, a linear relationship) tend to be more easily fit by other models, while commonly seen threshold features(for classification models) tend to be better fit by decision trees. So neural nets require enough data to approximate those relationships, rather than doing it naturally. The trade off is the less commonly seen/more complex relationships are EASIER to model with a neural net. So no hard an fast rules, but personally, I almost always try a linear regression before literally anything else.
Amazing video, looked for several introductions to NN and this is def the best. One last thing, can you further explain performance and Mu? what small or big values in those parameters represent?
Thank you!
Have you found anything else close to this? I'm in the same search
sir can you do matlab simulation of neural network for non linear system with taking some research paper?
Good video.
Great tutorial, thanks. What is ii in y2predict(ii:i) = net(x2);
Oh my gosh, you found a typo I think. That code was probably used in a loop before I made the simplified version for the tutorial. You can just get rid of the indexing entirely I think, most likely ii was set to one when it runs.
@@CodingLikeMad Thanks so much, I replaced ii=1 and i=: then it works well
Man, pls come back. You do an awesome job.
Upload more videos!!!
Haha, thanks! Any topics you want? I'm working on new stuff, but its projects not tutorials.
@@CodingLikeMad Great!! I'll wait for it then. I'm willing to learn neural network, that would be very helpful for me!! But I'm learning a lot with your other videos too so feel free haha. Tks.
@@CodingLikeMad yes please implement RBFNN on secord order control system
Excellent tutorial sir... Thank you so much.. plz tell me which activation function used in your model... Bcz i am going to implement similar model in Excel VBA. I cannot use matlab.
Great explanation! I didn’t find part II. Where is it ? Cheers
Glad you liked it! Part 2 isn't titled as part 2 because they don't really depend on each other. You can find it here:
ua-cam.com/video/IUK8x3fZ1CA/v-deo.html
Thank you.
Thank you so much for your wonderful and helpful videos.
getting an error at y2pred(ii, :)
There is indeed a typo in the code! That code was probably used in a loop before I made the simplified version for the tutorial. You can just get rid of the indexing entirely I think, most likely ii was set to one when it runs. Thanks for pointing it out, I'll try and add a comment near there since you are the second person to get tripped up with it.
@@CodingLikeMad works great, thanks, i was wondering if it would be possible for you to create an equivalent code in python to run in google colab?? thanks againg
@@souparnomajumder I've been thinking of making some python tutorials as well. Which python neural network framework were you thinking of?
@@CodingLikeMad a start with keras will be great :)
It is so nice to hear something in clear English! Thanks!
thanks for your valuable tutorial.i have a problem.i sincerely appreciate your answer.
i have matrix with 48 raws and 2 columns,one column is in situ data and one column is satellite data. i want to train a network for points that i dont have in situ data , get satellite data and give me resault that if i had in situ data it was really close to the result .actually my rx is 1 to 30 in situ data and my ry is 1 to 30 satellite data.i want to train my network with this rx and ry.my x2 is 31 to 48 satellite data.this is my code.
rx=dataaa(:,3);
ry=book(:,3);
x2=reshape(rx(31:48),1,[]);
% inputs=dataaaa;
% outputs=book(:,3);
netconf=[10];
net=feedforwardnet(netconf);
net=train(net,rx(1:30).',ry(1:30).');
y2pred=net(x2);
figure;hold on;
plot(x2,y2pred,'linewidth',0.5);
plot(rx(1:30),ry(1:30),'x');
the answer is a very hard curve.how can i smooth it?is my code right?
I'm not sure if your code is correct, but if it runs it has a decent chance of being mostly right, but you have a bigger issue - your network has very limited data. Neural nets are generally "data heavy" - for a problem where you only have 30 training examples, I would be very tempted to not use a neural net. If you have any better curve to fit to, that may be a better model than a neural net. My suspicion is that you are heavily "over training". To verify your dimensions are correct, take a look at the input and output sizes first (in the input and outputs), and make sure they match your expected sizes, thats the thing I am most worried about from a pure correctness side. Please see the discussion towards the last half of the video about over/undertraining though, I suspect you are in such a regime.
here i come back to your video as it's well explained
i had a question
please, how to evaluate the accuracy of the trained Neural Network (as the output are numeric, not classes)
For a numeric network, the two most common metrics like accuracy are MSE (mean-squared error) and MAE (mean absolute error). These are also often used as cost functions for the network itself, although when you are judging "accuracy"(I put in quotes because accuracy really means something else), you should run them on a test set. MSE and MAE are calculated exactly like they sound like - calculate the absolute error for every element, or the squared error for every element, then take the mean.
@@CodingLikeMad can we say that ( accuracy = 100 - MAPE ) in % ?
@@peaceandlove5855 I cannot find any reference which FORMALLY defines accuracy for a regression problem. As an informal and useful metric, that seems reasonable. Be aware that MAPE has some down sides in terms of being biased towards lower error models. If you find one, feel free to reply with it, but I think people are just playing fast and loose with the word "Accuracy". I might be mistaken though.
@@CodingLikeMad some use test R value multipied by 100 to give an idea about model accuracy . The problem is that few talk about accuracy for nonbinary output 😅
Thanks for your fast reply mate. I really appreciate the video and the comments
@@peaceandlove5855 Yeah, I think the basic fact at the end of the day is that accuracy doesn't really exist as a METRIC for a regression (non-binary or non-classification) model. People want something to take the place of it, but there are a lot of ways to measure distance which is what this comes down to. Pierson's R is a common one as well. Sadly, this sort of thing is the "secret spice" of machine learning, and there isn't a perfect metric.
hi. could you ples help me to use the *plotfit(t,x,'name1',t,x,'name2',t,x,'name3')
*
i wrote that , but does not works.. i did not undertand the syntaxis in matlab help.
I have a 3x17 matrix of inputs X and a 3x17 for outputs.
Hi Osvaldo, the syntax for the multiple plots looks confusing to me, I believe the matlab help page has a typo in it - you need the first argument to be the neural network. IE, plotfit(net, t1, x1, 'name1', t2,x2, 'name2'). The help text for it in matlab indicates this at least, and the one on the matlab website looks clearly busted to me. If it still won't work, could you DM me with the code and error message, and I can try to take a look?
Hello sir, thank you for making this video. I have a query that if I want to solve the same function with deep neural network then what would be modifications do I need to perform?
The difference between a deep neural network and a regular one is pretty artificial. Typically it just refers to NNs with more layers and nodes, rather than anything more fancy. Add more layers and you are good to go really.
Can you please elaborate to get the optimised model parameters from trained network?
Do you mean the weights of the trained model, or do you mean the hyper parameters?
Hello, it's a very good video. please have you a proposition video for RBF neural networks?
Thanks for the feedback and suggestion! I don't have one planned at the moment but I'll look into it.
Make a video using this network for testing new samples, simulations
Hi Pedro, glad you liked it. Could you say a bit more what you mean for your idea?
@@CodingLikeMad For example, when you finish the training in nftool for other app and then you use sim(net, sample) with new inputs. You could show that part later.
Well explained, thanks for sharing with us.
I am new to this field and have a little bit of knowledge and just would like to learn about ANN from this nice toolbox in MATLAB.
Do you think the house prices advanced regression dataset can perform better using ANN?
I guess the question is "better compared to what?" Generally performance on a data set comes down to three things I think: how efficiently you use your training data, if your model has enough(but not too much) capacity for the problem, and how naturally does the model basis match the problem. Answering those is very case by case, and ANNs depend on how you encode the input space and output space quite a bit too. Easiest answer: just try! :)
Something else I want to mention actually, is that while my other comment is accurate, a _trend_ I have observed is that neural nets require more data to train than other models. This is because commonly seen continuous relationships (for instance, a linear relationship) tend to be more easily fit by other models, while commonly seen threshold features(for classification models) tend to be better fit by decision trees. So neural nets require enough data to approximate those relationships, rather than doing it naturally. The trade off is the less commonly seen/more complex relationships are EASIER to model with a neural net. So no hard an fast rules, but personally, I almost always try a linear regression before literally anything else.
This is fantastic video, thank you!
Glad you enjoyed!