Build Your First Machine Learning AI With Neural Networks

SdĂ­let
VloĆŸit
  • čas pƙidĂĄn 31. 07. 2020
  • Machine learning is awesome. Who doesn't want to build a cool AI that you can teach to do anything. The only problem is machine learning is very confusing. In this video I breakdown what a neural network is, how you can create one, and how to train it. By the end of this video you will have a fully functional AI.
    📚 Materials/References:
    GitHub Code: github.com/WebDevSimplified/M...
    Brain.js Library: brain.js.org
    🧠 Concepts Covered:
    - How to use brain.js
    - What a neural network is
    - How neural networks work
    - How to train and use a neural network
    🌎 Find Me Here:
    My Blog: blog.webdevsimplified.com
    My Courses: courses.webdevsimplified.com
    Patreon: / webdevsimplified
    Twitter: / devsimplified
    Discord: / discord
    GitHub: github.com/WebDevSimplified
    CodePen: codepen.io/WebDevSimplified
    #MachineLearning #WDS #JavaScript

Komentáƙe • 144

  • @rajeevsinxh
    @rajeevsinxh Pƙed 4 lety +182

    Nowadays everyone is building AIs and Neural Networks, but really what they are doing is using an AI library, so the real part of it is just collection and training of the model. I think there should be a clear distinction and declaration of what we are actually doing, either building a neural network or using an AI library to build a ML model. As there is a lot of mathematics and statistics that goes into building an ML algorithm like Neural Network for example. Great Video btw 👍.

    • @vinubox
      @vinubox Pƙed 4 lety +6

      Exactly!

    • @SahilP2648
      @SahilP2648 Pƙed 3 lety +4

      That further strengthens my argument that we will never achieve AGI lol

    • @izzy.503
      @izzy.503 Pƙed rokem +3

      Well, I don't think it's fair to discredit the majority based off the tools that have been created for beginners. OpenAI and Google are doing great things with their advanced chatbots, this field has barely begun to grow (in the public space at least) and it's only going to grow faster in the coming years. The number of people who understand these algorithms is only going to increase. I also do realize this comment is 2 years old so I am assuming your stance might be different now, just wanted to provide my input!

  • @anmolverma2911
    @anmolverma2911 Pƙed rokem +11

    Those getting error in the starting like --- Uncaught Error: sizes not set correctly.
    Do this instead and play around with the values to get a hold of it
    //Code starts from here
    const config = {
    inputSize: 2,
    hiddenLayers: [3,4,5],
    outputSize: 1,
    };
    const net = new brain.NeuralNetwork(config);
    //Rest of the code should be the same

  • @Mvrck44
    @Mvrck44 Pƙed rokem +3

    Great value, and high quality, as always. Thank you!

  • @PrimephotoStudio
    @PrimephotoStudio Pƙed 3 lety +2

    Thank you for sharing this with us, very helpful.

  • @juniord_osbel
    @juniord_osbel Pƙed 4 lety +3

    Great tutorial!!! You explain very well

  • @georgevarelas5073
    @georgevarelas5073 Pƙed 2 lety +3

    Great video Kyle! Can you make more videos with AI?

  • @Vikas_Singh_Kushwaha
    @Vikas_Singh_Kushwaha Pƙed 4 lety +5

    This channel is a gem 💎

  • @MartinPerez-mi1ty
    @MartinPerez-mi1ty Pƙed 4 lety +1

    Stunning as always, thank you

  • @p5udu218
    @p5udu218 Pƙed rokem

    I love this and will definitely try it. Though for the training data I’ll make the print function save the json content as a file download and make the page parse all the training json files. Essentially the training will improve itself on every refresh if we click the print button.

  • @bunnybloods768
    @bunnybloods768 Pƙed 4 lety +2

    Thank you bro.waiting for this

  • @DecisionForest
    @DecisionForest Pƙed 4 lety +11

    Great video, loved the way you structured it. Also all the explanations were very clear, very easy to follow.

  • @alinawaz4034
    @alinawaz4034 Pƙed 4 lety +1

    love you videos very nice topic i have seen this library before but dont know where to use it in a real project lol.

  • @usama57926
    @usama57926 Pƙed 4 lety +18

    please make such tutorials more and more .............

  • @marcyanus1430
    @marcyanus1430 Pƙed 2 lety

    Thanks for making this video!

  • @dev_casper
    @dev_casper Pƙed 4 lety +1

    Great video. Please create a video on machine learning in JavaScript and the future scope.

  • @aayushpatil7514
    @aayushpatil7514 Pƙed 4 lety +1

    Please bring more about this topic

  • @chris.jackson
    @chris.jackson Pƙed 4 lety +1

    Very excellent tutorial thank you very much. Is there a way you can do a tutorial on the same concept but using Tensorflow.

  • @MusicalGeniusBar
    @MusicalGeniusBar Pƙed 4 lety +6

    Pls more on AI neural networks. Its amazing that you can do this in javascript and you dont need python

  • @usama57926
    @usama57926 Pƙed 4 lety +2

    love the tutorial

  • @manunyigodfrey7767
    @manunyigodfrey7767 Pƙed 4 lety +1

    Wow nice one

  • @SahilRajput03
    @SahilRajput03 Pƙed rokem

    Awesome video..., Amazing deonstration of making all this!!

  • @sequoiakanies2202
    @sequoiakanies2202 Pƙed 5 měsĂ­ci

    Thanks again for the content

  • @thecensorguy1237
    @thecensorguy1237 Pƙed 4 lety +2

    Swear to god i was thinking about mL with Js.. And video is here.. Amazing

  • @pratikzinjurde
    @pratikzinjurde Pƙed 4 lety +1

    Bring more like this

  • @homegoods495
    @homegoods495 Pƙed rokem

    Great tutorial 🎉

  • @TechnoDB
    @TechnoDB Pƙed 4 lety +2

    Oww.. Awesome!

  • @Hash_Boy
    @Hash_Boy Pƙed rokem

    many many thanks

  • @JosePerez-qt8cf
    @JosePerez-qt8cf Pƙed 3 lety

    Can you do a serie about this topic and this library please and thanks a lot

  • @parasarora5869
    @parasarora5869 Pƙed 3 lety

    amazing one...i like it 👍👍👍👍.

  • @Venaber
    @Venaber Pƙed 2 lety

    So much thanks

  • @ahmedthebest
    @ahmedthebest Pƙed 4 lety +3

    Can you make a full series about AI

  • @guyinaroom7771
    @guyinaroom7771 Pƙed 2 lety +2

    I have no clue how to apply this to anything but this specific example

  • @rickyzheng572
    @rickyzheng572 Pƙed 4 lety +4

    Could you do a video on introduction to other backend languages and the framework, security concepts docker, and scaling?

    • @SahilP2648
      @SahilP2648 Pƙed 3 lety

      Docker is super easy. There's only a handful of commands to learn if your only task is to deploy your app on servers. There's more complexity involved alter like master/slave configs etc but for now play around with that.

    • @bilalshaikh6603
      @bilalshaikh6603 Pƙed rokem

      @@SahilP2648 any resources for devops?

  • @lostmyplaintext7587
    @lostmyplaintext7587 Pƙed 4 lety +6

    But understanding the complex math behind the scenes is the best part :(

    • @nerdophile6945
      @nerdophile6945 Pƙed 4 lety +3

      Yes thats the coolest part, but for beginners its tough to understand that !!

  • @FPChris
    @FPChris Pƙed 2 lety +1

    Is there a JS from absolute scratch example on CZcams? I don’t want to start by needing a prebuilt library. Thx.

  • @ofeenee
    @ofeenee Pƙed 3 lety

    please make a followup to this tutorial! Thanks a lot!!!

  • @yaseenlakhdhar6090
    @yaseenlakhdhar6090 Pƙed 4 lety +2

    genius!

  • @warrybeiss5459
    @warrybeiss5459 Pƙed 3 lety

    Thanks..

  • @RahulShinde
    @RahulShinde Pƙed 4 lety +1

    Awesome

  • @AnyFactor
    @AnyFactor Pƙed 4 lety +1

    Please make a video on tensorflowjs vs brainjs

  • @tchpowdog
    @tchpowdog Pƙed 3 lety

    Hi Kyle. Do you know of a similar neural network library for .NET?

  • @maskman4821
    @maskman4821 Pƙed 3 lety +2

    This is a very practical project, though it is just AI guessing black and white, it illustates the usage of AI in javascript, Kyle makes AI friendly to us so that we are not intimidated by this new technology !!!

    • @WebDevSimplified
      @WebDevSimplified  Pƙed 3 lety +2

      Thank you! That was my exact purpose with this project.

  • @haack79
    @haack79 Pƙed 9 měsĂ­ci

    So would it be about the same for doing a training model on text, as in loading my own text and then asking it questions about the text?

  • @jonmjauu6435
    @jonmjauu6435 Pƙed 4 lety +2

    Cool

  • @aixoxa
    @aixoxa Pƙed 4 lety +1

    AI thanks Kyle nice idea for my coding channel đŸ€” yeah like "AI writes css for my website"😅😜.
    Really inspirational content ✌

    • @sidheshwartiwari9834
      @sidheshwartiwari9834 Pƙed 3 lety +1

      Please don't make an AI write CSS, there are plenty out there already writing terrible ,nerve-wrecking , unmanageable codeđŸ€ŁđŸ€Ł

    • @aixoxa
      @aixoxa Pƙed 3 lety +1

      @@sidheshwartiwari9834 đŸ€”đŸ˜†đŸ˜†đŸ˜†

  • @Jet1323
    @Jet1323 Pƙed 4 lety +4

    I saw the same example few years back also with brain.js how unreasonable would it be to make it from scratch? Just for the curiosity

    • @calebprenger3928
      @calebprenger3928 Pƙed 4 lety

      It's not. Looking up coding trains "perceptron" video

  • @Nope22119
    @Nope22119 Pƙed 3 lety +3

    instead of copying and pasting using the print button i just called net.train(data) inside of the chooseColor function so that it trains and gets better with each guess. is there a reason to not do that? it seems smoother than copying and pasting from the browser each time you want to improve the data set, but i'm sure there's a reason that you chose to do it the way you did and i'm curious about your reasoning. if anyone has an answer to this please lmk!

    • @jindrichsirucek
      @jindrichsirucek Pƙed rokem

      I think the reason is because to better understand for people how the data look like, just educational purposes in the short video :-)

  • @daggiprophet8055
    @daggiprophet8055 Pƙed 4 lety +1

    Great presentation! However, I understand that AI confirms the expected output and that erroneous guesses affect the feasibility of the information obtained. If the design of the object includes all essential variables, then no randomness exists and the machine learns to interpret and apply the variables to complete the design.

  • @josealuis607
    @josealuis607 Pƙed 4 lety +5

    At this rate; the next video will be about how to program an autopilot and use it in our own car.
    P.S. : I really like your latest videos, keep the good work.

    • @_slier
      @_slier Pƙed 2 lety

      and then crash and burn lol

  • @mudasirulhaque4873
    @mudasirulhaque4873 Pƙed 4 lety +3

    Great video man!!, just one thing please don’t put ml crash course to make it click bait as for that u must show how gradients and backprops work and how linear algebra fit in thats what u may call crash course , this is just introduction like a tip of an iceberg , i am saying this bcuz anyone who is tryhard for ml and clicks here then he will be like i learnt ml and now i do projects but no this is not how you learn the right way if u know what i mean. Bdw great vids love learning from u thanks đŸ„°đŸ„°

    • @TokyoXtreme
      @TokyoXtreme Pƙed 4 lety +3

      Your comment reads like output from an AI trained through captured mobile texts.

  • @angelodeus8423
    @angelodeus8423 Pƙed 3 lety +1

    how do I import brain.js? it dosen't work for me

  • @harambetidepod1451
    @harambetidepod1451 Pƙed 4 lety +4

    We've reached peak ML.

  • @DanielSeacrest
    @DanielSeacrest Pƙed 2 lety

    The neural network won't render more than three hidden layers, does anyone know how to fix this?

  • @avi12
    @avi12 Pƙed 4 lety +8

    13:04 Alternatively, just store the data in IndexedDB

    • @revelmonger
      @revelmonger Pƙed 2 lety

      Can you mind explaining. Im newish neural networks,

    • @avi12
      @avi12 Pƙed 2 lety

      @@revelmonger I assume what I meant is that you can store the data points locally using IndexedDB, rather than iteratively outputting and copying

    • @revelmonger
      @revelmonger Pƙed 2 lety

      @@avi12 so like automate the updating of the network instead of having to manually print to console?

    • @avi12
      @avi12 Pƙed 2 lety

      @@revelmonger Not only automate updating the network, also storing the data so that the returning user will still have the data
      You can occasionally update on a database too

    • @revelmonger
      @revelmonger Pƙed 2 lety

      @@avi12 thanks for the input. I'll make sure I'll add it to my neural network for future use xD

  • @hvbairagi
    @hvbairagi Pƙed 6 měsĂ­ci

    the brainjs script in not getting downloaded, anyone else facing this issue?

  • @Stunner_Guy
    @Stunner_Guy Pƙed rokem

    I really would love to build an AI that can monitor a random game and understand the logic behind the game results
    for example - If I have 7 circles and I have a ball, bat, spoon, pots, food, meat and fruits in all the circles and every one minute, i Pick one of the circles.
    i am looking to buid an AI that can study this pattern and be able to see the pattern, understand it and correctly Pick that the game would pick....
    If you have any pointers or idea, or need to talk more on this for collaboration, please hit me up. cheers

  • @napoleon1289
    @napoleon1289 Pƙed 2 lety

    somewhy toSVG line doesnt work SOMEONE HELP

  • @Hobbitstomper
    @Hobbitstomper Pƙed 4 lety +1

    What happens if you accidentally train it wrong once? As in, click "white" when it should have been "black"? Will it completely throw the AI off? Should I restart all over?

    • @dudemmann
      @dudemmann Pƙed 4 lety +2

      Probably add a new button and write a simple function to delete the last entry. But more generally I think that the training on hundreds/thousands of entries should correct it anyway

  • @techocean6372
    @techocean6372 Pƙed 3 lety

    Which app you are using to create videos? , where you are simultaneously recording screen as well as you are recording your face

  • @salmanlifevlog
    @salmanlifevlog Pƙed 4 lety +2

    lots of love from Pakistan

  • @msvmanikantasrivishnu7788
    @msvmanikantasrivishnu7788 Pƙed 4 lety +1

    simplify by web dev simplified

  • @yt-sh
    @yt-sh Pƙed 4 lety +1

    lit

  • @bunnybloods768
    @bunnybloods768 Pƙed 4 lety +1

    Bro,make more videos.we will support you always.Be strong.stay safe stay home😎😎😎

  • @championxxlNL
    @championxxlNL Pƙed 2 lety

    For some reason I keep getting errors when trying to use the brain.js functions, meaning this script cannot be run....

  • @jackepner9984
    @jackepner9984 Pƙed rokem

    Why would you train an AI to display a color, when this can be coded in a couple lines without any models?

  • @Basky008
    @Basky008 Pƙed 3 lety +1

    I am not able to see the svg neural network displayed in my index.html file as shown at 5:26.
    I am getting the following errors:
    index.html:7 GET file://unpkg.com/brain.js net::ERR_FILE_NOT_FOUND
    script.js:1 Uncaught ReferenceError: brain is not defined
    at script.js:1

    • @Timoteo1996
      @Timoteo1996 Pƙed 3 lety

      Make sure to add the brain.js cdn and add your script.js file to the head section of your HTML.

    • @wipex__
      @wipex__ Pƙed 2 lety

      I got this error too

  • @aswathpandiyan7136
    @aswathpandiyan7136 Pƙed 3 lety

    You broke my opinion on ML that is very hard to understand, please do some next level videos on ML

  • @okotsuyuta355
    @okotsuyuta355 Pƙed 4 lety +2

    Yeay, finaly i comment on top 5 fast

  • @wickedclamor4882
    @wickedclamor4882 Pƙed 3 lety +2

    TBH I am really jealous of your skills.

  • @frattaskn2159
    @frattaskn2159 Pƙed rokem

    I believe its not working well. I always click to white so I expect guess to be mostly white after 200 click. but its randomly

  • @groovebird812
    @groovebird812 Pƙed 4 lety

    Math.random returns a value between 0 and 1 but in your data at the beginning you only set 0 or 1 for r,g,b. Thats a little confusing.

    • @Vairoon
      @Vairoon Pƙed 2 lety

      Thats so the AI can know the basics.

  • @xXxDerfoufixXx
    @xXxDerfoufixXx Pƙed 4 lety

    The digram dosen't show up for me in the browser, what can I do to fix it ?
    (Edit) It does't recognise brain even though I'm using the CDN
    (Edit 2) Nevermind, it's fixed

  • @tilakmadichettitheappdeveloper

    how do you randomly learn stuff and teach ?

  • @mikhailgrechka1336
    @mikhailgrechka1336 Pƙed 4 lety +1

    omg

  • @gowtham3623
    @gowtham3623 Pƙed 4 lety +1

    Do you read comments!!!
    I didn't seen a heart from you for any comment!!???

    • @WebDevSimplified
      @WebDevSimplified  Pƙed 4 lety +4

      I read pretty much every comment.

    • @TokyoXtreme
      @TokyoXtreme Pƙed 4 lety

      Web Dev Simplified I love your minimalist aesthetic recently. It absolutely fits with the “simplified” theme of your channel and courses - no meandering or useless fluff; just a purified information dump of relevant material.

    • @gowtham3623
      @gowtham3623 Pƙed 4 lety

      @@WebDevSimplified this reply proves that ❀❀ Learned a lot from your videos

  • @mgr1282
    @mgr1282 Pƙed 4 lety +1

    Hi, How about cryptocurrency programming like solidity or nimiq? plz.

    • @VeaceslavBARBARII
      @VeaceslavBARBARII Pƙed 4 lety +1

      Cryptocurrency is dieing. We've seen what happened to Bitcoin. No more trust.

    • @mgr1282
      @mgr1282 Pƙed 4 lety

      @@VeaceslavBARBARII It will be huge. Bitcoin was just the first generation and has no application beside storing value. third generation and many other new ideas in decentralization and cryptocurrency are coming.
      btw bitcoin is rising in price not dying ( I don't own any btc, I own some ADA, LINK, VET, ERD, LEND, KNC, ZIL)

  • @lonnybulldozer8426
    @lonnybulldozer8426 Pƙed 4 lety +2

    We got ourselves a regular Siraj Raval over here. You took your XOR example straight from CS50AI, only they used OR. You thought nobody would notice. I noticed. I'm valid.

    • @WebDevSimplified
      @WebDevSimplified  Pƙed 4 lety +5

      No I took the XOR idea from the documentation of Brain.js since it is a good introductory example. That is not copying, though. It is no different than building my own todo app. That doesn't mean I copied everyone else that made a todo app.

  • @dixienormis3614
    @dixienormis3614 Pƙed 2 lety

    Seems like you just rip off other peoples tutorials, this was already done by another person years ago

  • @manunyigodfrey7767
    @manunyigodfrey7767 Pƙed 4 lety +1

    Wow nice one