Using Artificial Neural Networks to Model Complex Processes in MATLAB

Поделиться
HTML-код
  • Опубликовано: 12 янв 2025

Комментарии • 30

  • @kalhansb
    @kalhansb 5 лет назад

    Thank you so much for the video. really helps

  • @towseefahmadlone8965
    @towseefahmadlone8965 7 лет назад

    Thanks a lot sir for this informative video

  • @dedmeme5849
    @dedmeme5849 5 лет назад +1

    Awesome video! I just have a question, how would you describe what you're seeing in the regression window, I didn't understand that well what was happening in there.

  • @francocardillo8735
    @francocardillo8735 2 года назад

    Hi Kody, great video ( Thank you ). I am using MATLAB 2017a, tried to follow your example as I am a beginner on the MATLAB NN toolbox. I get an array index exceeded for the 'for loop' using length(y), so I changed it to length(y_model). Not sure how did your work as the size of 'y_model' is a lot smaller than size of 'y'?

  • @khamtanphonetip9019
    @khamtanphonetip9019 7 лет назад +1

    Hi Kody, thanks a lot for the VDO. However, I have been trying to use an existing network which was an optimized one to use in the future but when I run it again they seem not get the same result so I have to do more time to train again and again. It would be appreciated if you could give an advice.

    • @kodymerlin1
      @kodymerlin1  7 лет назад

      Hi Khamtan,
      Because the code I showed in the video uses random initial weights, sometimes this does result in bad results and the actual goodness of fit of the model can change since the random weights change when you run it. My advice would be to try a few times and with different numbers of nodes. Double check your model against new data that was not included in the training set and see how well it works. Once you get a good model, save it as a file from there. I don't know the exact code off the top of my head, but you should be able to use your new weights from the good model as a starting point for a new or modified model. I hope this helps.

  • @carda1917
    @carda1917 4 года назад

    Hey Mr. Powell,
    you use for training the Levenberg-Marquardt-Algorithm. It's one of the Algorithm you can choose that are implemented by Matlab. I want to use the stochastic-gradient-descent-Algorithm. Do you have an idea how I can change to this?

  • @REDSLibrary
    @REDSLibrary 5 лет назад

    Nice work thanks. What about using the neural App on mathwork?

  • @suleimanbashiradamu
    @suleimanbashiradamu 5 лет назад

    Thanks for the great video demonstration

  • @vid_sh_itsme4340
    @vid_sh_itsme4340 7 лет назад

    Few questions-
    1) should we prefer fitnet or feedforwardnet for these type of problems?
    2) I guess feedforwardnet uses mapminmax processing function. Is it better to keep the default or to use something like zscore for normalisation???if so how can we do it?? This is because my data has lot of stray points unlike the data in the video.

  • @zmajew
    @zmajew 7 лет назад

    Thanks. Do you know how to use trained network "net" from workspace in Simulink? For example in User defined block with "[Y,Xf,Af] = sim(net,X,Xi,Ai,T)" function how to bring "net" to the block? Best

  • @bend.4506
    @bend.4506 5 лет назад

    Fantastic!!!

  • @Futureworld-AD
    @Futureworld-AD 4 года назад +1

    ،I have problem with prediction
    Could you help me
    This problem
    While training, R2=1 turns out. Testing is very low.
    How can to prevent that

  • @khababahmed
    @khababahmed 6 лет назад

    thanks for such a detailed video on NN. i have a question , can we define multiple NN at same time with are sub-part of same system and can train them like a MISO system ?

    • @islamzerrougui499
      @islamzerrougui499 2 года назад

      did you find a solution i am in the same problelm

  • @aginvyas
    @aginvyas 7 лет назад

    Hi, Thanks for the video. I have a question.
    In the code, i swapped the positions of x1 and x2 after training the net, i.e. the plot is between values of y and x2. However, now, even though the value of R is .99, there is a huge difference between the actual value and ANN model in the plot. Can you explain why? Thanks

    • @kodymerlin1
      @kodymerlin1  7 лет назад

      If you train the model with your input variables in a certain order, then be careful to feed the variables into that model in that same order. If this is what you've already done, I'd suggest just trying to re-fit the model or try different numbers of nodes. My code uses random initial weights, so the fitting routine can actually produce different results from one try to the next even if your code doesn't change. That's a downside of this method. There is a lot of trial and error involved. I'd suggest trying different numbers of nodes (and even multiple times for each) until you get a fit you are satisfied with. It's helpful to save your neural net so that you can go back to it and use it again if you get reasonable results.

  • @mayukhdasgupta1616
    @mayukhdasgupta1616 7 лет назад

    So how did you get the equation for the function (y)?

  • @siddharthjoshi6811
    @siddharthjoshi6811 7 лет назад

    Hello
    What is the code for that plot that appears every time you run the program?

  • @subrahmanyamgokavarapu7970
    @subrahmanyamgokavarapu7970 2 года назад

    where to use Back propagation technique

  • @siabikebenezer
    @siabikebenezer 6 лет назад

    Please can you create same video with a data from external source but not generated and how to split the data into training, target and test datasets. I am actually lost there. I am just a beginner

  • @assisfernandes753
    @assisfernandes753 6 месяцев назад

    thank you for much

  • @manjugangadhar3462
    @manjugangadhar3462 5 лет назад

    Thank you so much, can I have a code that you written in the video.

    • @tejachowdary7718
      @tejachowdary7718 4 года назад

      Sir if you have that coding pls send to my mail id

  • @danielgoldbach1102
    @danielgoldbach1102 7 лет назад +1

    can you show your code below line 43?

    • @kodymerlin1
      @kodymerlin1  7 лет назад +6

      Here's the full code:
      N = 2000;
      % number of total data points to use in training/testing/validation
      % Generate random inputs between 0 and 10
      x1 = rand(N,1)*10;
      x2 = rand(N,1)*10;
      x3 = rand(N,1)*10;
      x4 = rand(N,1)*10;
      x5 = rand(N,1)*10;
      x6 = rand(N,1)*10;
      y = 10*sin(x1)+sqrt(x2)+5*x3+0.05*x4.^0.6-.003*x5.^3-log(x6) + 2*randn(N,1);
      %create a complex functional relationship between y and 6 different inputs
      %this is be the data to which a neural network model will be fit
      X = [x1 x2 x3 x4 x5 x6];
      %arrange all input data into a single matrix and transpose
      n = 6;
      net = feedforwardnet(n);
      %define a neural network (a variable called "net"), which is a 3-layer
      %perceptron (3LP) with n nodes in the hidden layer
      [net, TR] = train(net, X', y');
      x1 = (0:0.1:10);
      x2 = 5; x3 = 5; x4 = 5; x5 = 5; x6 = 5;
      y = 10*sin(x1)+sqrt(x2)+5*x3+0.05*x4.^0.6-.003*x5.^3-log(x6);
      % create y "data", but with noise removed
      y_model = zeros(length(x1),1);
      % initialize y_model vector with zeros
      for i = 1:length(y)
      y_model(i) = net([x1(i); x2; x3; x4; x5; x6]);
      %simulate neural network with varying x1, but all other variables
      %constant
      end
      figure(2)
      plot(x1, y, '.', x1, y_model)
      xlabel('x1')
      ylabel('y')
      legend('actual', 'ANN model')

    • @tejachowdary7718
      @tejachowdary7718 4 года назад

      @@kodymerlin1 sir can you please send the MATLAB coding

  • @perceptronsaber4479
    @perceptronsaber4479 7 лет назад

    very good