Build Your First Machine Learning AI With Neural Networks

Поділитися
Вставка
  • Опубліковано 28 сер 2024
  • 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/Web...
    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.webdevsim...
    My Courses: courses.webdev...
    Patreon: / webdevsimplified
    Twitter: / devsimplified
    Discord: / discord
    GitHub: github.com/Web...
    CodePen: codepen.io/Web...
    #MachineLearning #WDS #JavaScript

КОМЕНТАРІ • 144

  • @rajeevsinxh
    @rajeevsinxh 4 роки тому +184

    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 4 роки тому +6

      Exactly!

    • @SahilP2648
      @SahilP2648 4 роки тому +4

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

    • @izzy.503
      @izzy.503 Рік тому +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 Рік тому +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

  • @MusicalGeniusBar
    @MusicalGeniusBar 4 роки тому +6

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

  • @Vikas_Singh_Kushwaha
    @Vikas_Singh_Kushwaha 4 роки тому +5

    This channel is a gem 💎

  • @usama57926
    @usama57926 4 роки тому +18

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

  • @guyinaroom7771
    @guyinaroom7771 2 роки тому +2

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

  • @Mvrck44
    @Mvrck44 Рік тому +3

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

  • @DecisionForest
    @DecisionForest 4 роки тому +11

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

  • @thecensorguy1237
    @thecensorguy1237 4 роки тому +2

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

  • @ahmedthebest
    @ahmedthebest 4 роки тому +3

    Can you make a full series about AI

  • @lostmyplaintext7587
    @lostmyplaintext7587 4 роки тому +6

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

    • @nerdophile6945
      @nerdophile6945 4 роки тому +3

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

  • @georgevarelas5073
    @georgevarelas5073 2 роки тому +3

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

  • @aayushpatil7514
    @aayushpatil7514 4 роки тому +1

    Please bring more about this topic

  • @p5udu218
    @p5udu218 Рік тому

    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.

  • @maskman4821
    @maskman4821 3 роки тому +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  3 роки тому +2

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

  • @josealuis607
    @josealuis607 4 роки тому +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 2 роки тому

      and then crash and burn lol

  • @juniord_osbel
    @juniord_osbel 4 роки тому +3

    Great tutorial!!! You explain very well

  • @mudasirulhaque4873
    @mudasirulhaque4873 4 роки тому +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 4 роки тому +3

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

  • @PrimephotoStudio
    @PrimephotoStudio 4 роки тому +2

    Thank you for sharing this with us, very helpful.

  • @alinawaz4034
    @alinawaz4034 4 роки тому +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.

  • @bunnybloods768
    @bunnybloods768 4 роки тому +2

    Thank you bro.waiting for this

  • @dev_casper
    @dev_casper 4 роки тому +1

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

  • @FPChris
    @FPChris 2 роки тому +1

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

  • @pratikzinjurde
    @pratikzinjurde 4 роки тому +1

    Bring more like this

  • @MartinPerez-mi1ty
    @MartinPerez-mi1ty 4 роки тому +1

    Stunning as always, thank you

  • @AnyFactor
    @AnyFactor 4 роки тому +1

    Please make a video on tensorflowjs vs brainjs

  • @rickyzheng572
    @rickyzheng572 4 роки тому +4

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

    • @SahilP2648
      @SahilP2648 4 роки тому

      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 Рік тому

      @@SahilP2648 any resources for devops?

  • @sequoiakanies2202
    @sequoiakanies2202 6 місяців тому

    Thanks again for the content

  • @avi12
    @avi12 4 роки тому +8

    13:04 Alternatively, just store the data in IndexedDB

    • @revelmonger
      @revelmonger 2 роки тому

      Can you mind explaining. Im newish neural networks,

    • @avi12
      @avi12 2 роки тому

      @@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 2 роки тому

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

    • @avi12
      @avi12 2 роки тому

      @@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 2 роки тому

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

  • @manunyigodfrey7767
    @manunyigodfrey7767 4 роки тому +1

    Wow nice one

  • @usama57926
    @usama57926 4 роки тому +2

    love the tutorial

  • @harambetidepod1451
    @harambetidepod1451 4 роки тому +4

    We've reached peak ML.

  • @marcyanus1430
    @marcyanus1430 2 роки тому

    Thanks for making this video!

  • @chris.jackson
    @chris.jackson 4 роки тому +1

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

  • @SahilRajput03
    @SahilRajput03 Рік тому

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

  • @aixoxa
    @aixoxa 4 роки тому +1

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

    • @sidheshwartiwari9834
      @sidheshwartiwari9834 4 роки тому +1

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

    • @aixoxa
      @aixoxa 4 роки тому +1

      @@sidheshwartiwari9834 🤔😆😆😆

  • @Nope22119
    @Nope22119 3 роки тому +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 Рік тому

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

  • @homegoods495
    @homegoods495 Рік тому

    Great tutorial 🎉

  • @TechnoDB
    @TechnoDB 4 роки тому +2

    Oww.. Awesome!

  • @msvmanikantasrivishnu7788
    @msvmanikantasrivishnu7788 4 роки тому +1

    simplify by web dev simplified

  • @JosePerez-qt8cf
    @JosePerez-qt8cf 4 роки тому

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

  • @ofeenee
    @ofeenee 3 роки тому

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

  • @salmanlifevlog
    @salmanlifevlog 4 роки тому +2

    lots of love from Pakistan

  • @Jet1323
    @Jet1323 4 роки тому +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 4 роки тому

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

  • @Hash_Boy
    @Hash_Boy Рік тому

    many many thanks

  • @Venaber
    @Venaber 2 роки тому

    So much thanks

  • @okotsuyuta355
    @okotsuyuta355 4 роки тому +2

    Yeay, finaly i comment on top 5 fast

    • @muramasa7537
      @muramasa7537 4 роки тому

      Kaguya san learning AI o?O

    • @okotsuyuta355
      @okotsuyuta355 4 роки тому

      @@muramasa7537 yes, but with python, i'm new at JS AI 😅

    • @muramasa7537
      @muramasa7537 4 роки тому

      Nice ! Keep it up~

  • @bunnybloods768
    @bunnybloods768 4 роки тому +1

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

  • @parasarora5869
    @parasarora5869 4 роки тому

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

  • @Hobbitstomper
    @Hobbitstomper 4 роки тому +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 4 роки тому +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

  • @haack79
    @haack79 10 місяців тому

    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?

  • @daggiprophet8055
    @daggiprophet8055 4 роки тому +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.

  • @yaseenlakhdhar6090
    @yaseenlakhdhar6090 4 роки тому +2

    genius!

  • @jackepner9984
    @jackepner9984 Рік тому

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

  • @jonmjauu6435
    @jonmjauu6435 4 роки тому +2

    Cool

  • @RahulShinde
    @RahulShinde 4 роки тому +1

    Awesome

  • @wickedclamor4882
    @wickedclamor4882 3 роки тому +2

    TBH I am really jealous of your skills.

  • @angelodeus8423
    @angelodeus8423 3 роки тому +1

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

  • @techocean6372
    @techocean6372 4 роки тому

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

  • @warrybeiss5459
    @warrybeiss5459 4 роки тому

    Thanks..

  • @lonnybulldozer8426
    @lonnybulldozer8426 4 роки тому +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  4 роки тому +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.

  • @hvbairagi
    @hvbairagi 8 місяців тому

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

  • @napoleon1289
    @napoleon1289 2 роки тому

    somewhy toSVG line doesnt work SOMEONE HELP

  • @frattaskn2159
    @frattaskn2159 Рік тому

    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

  • @tchpowdog
    @tchpowdog 3 роки тому

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

  • @aswathpandiyan7136
    @aswathpandiyan7136 4 роки тому

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

  • @DanielSeacrest
    @DanielSeacrest 2 роки тому

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

  • @Basky008
    @Basky008 4 роки тому +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 4 роки тому

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

    • @wipex__
      @wipex__ 2 роки тому

      I got this error too

  • @Stunner_Guy
    @Stunner_Guy 2 роки тому

    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

  • @championxxlNL
    @championxxlNL 2 роки тому

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

  • @groovebird812
    @groovebird812 4 роки тому

    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 2 роки тому

      Thats so the AI can know the basics.

  • @mgr1282
    @mgr1282 4 роки тому +1

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

    • @VeaceslavBARBARII
      @VeaceslavBARBARII 4 роки тому +1

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

    • @mgr1282
      @mgr1282 4 роки тому

      @@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)

  • @tilakmadichettitheappdeveloper
    @tilakmadichettitheappdeveloper 4 роки тому +1

    how do you randomly learn stuff and teach ?

  • @xXxDerfoufixXx
    @xXxDerfoufixXx 4 роки тому

    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

  • @yt-sh
    @yt-sh 4 роки тому +1

    lit

  • @gowtham3623
    @gowtham3623 4 роки тому +1

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

    • @WebDevSimplified
      @WebDevSimplified  4 роки тому +4

      I read pretty much every comment.

    • @TokyoXtreme
      @TokyoXtreme 4 роки тому

      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 4 роки тому

      @@WebDevSimplified this reply proves that ❤️❤️ Learned a lot from your videos

  • @mikhailgrechka1336
    @mikhailgrechka1336 4 роки тому +1

    omg

  • @dixienormis3614
    @dixienormis3614 2 роки тому

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

  • @manunyigodfrey7767
    @manunyigodfrey7767 4 роки тому +1

    Wow nice one