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
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 👍.
Exactly!
That further strengthens my argument that we will never achieve AGI lol
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!
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
Pls more on AI neural networks. Its amazing that you can do this in javascript and you dont need python
I agree
This channel is a gem 💎
please make such tutorials more and more .............
I have no clue how to apply this to anything but this specific example
Great value, and high quality, as always. Thank you!
Great video, loved the way you structured it. Also all the explanations were very clear, very easy to follow.
Swear to god i was thinking about mL with Js.. And video is here.. Amazing
Can you make a full series about AI
But understanding the complex math behind the scenes is the best part :(
Yes thats the coolest part, but for beginners its tough to understand that !!
Great video Kyle! Can you make more videos with AI?
Please bring more about this topic
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.
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 !!!
Thank you! That was my exact purpose with this project.
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.
and then crash and burn lol
Great tutorial!!! You explain very well
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 🥰🥰
Your comment reads like output from an AI trained through captured mobile texts.
Thank you for sharing this with us, very helpful.
love you videos very nice topic i have seen this library before but dont know where to use it in a real project lol.
Thank you bro.waiting for this
Great video. Please create a video on machine learning in JavaScript and the future scope.
Is there a JS from absolute scratch example on UA-cam? I don’t want to start by needing a prebuilt library. Thx.
Bring more like this
Stunning as always, thank you
Please make a video on tensorflowjs vs brainjs
Could you do a video on introduction to other backend languages and the framework, security concepts docker, and scaling?
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.
@@SahilP2648 any resources for devops?
Thanks again for the content
13:04 Alternatively, just store the data in IndexedDB
Can you mind explaining. Im newish neural networks,
@@revelmonger I assume what I meant is that you can store the data points locally using IndexedDB, rather than iteratively outputting and copying
@@avi12 so like automate the updating of the network instead of having to manually print to console?
@@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
@@avi12 thanks for the input. I'll make sure I'll add it to my neural network for future use xD
Wow nice one
love the tutorial
We've reached peak ML.
Thanks for making this video!
Very excellent tutorial thank you very much. Is there a way you can do a tutorial on the same concept but using Tensorflow.
Awesome video..., Amazing deonstration of making all this!!
AI thanks Kyle nice idea for my coding channel 🤔 yeah like "AI writes css for my website"😅😜.
Really inspirational content ✌
Please don't make an AI write CSS, there are plenty out there already writing terrible ,nerve-wrecking , unmanageable code🤣🤣
@@sidheshwartiwari9834 🤔😆😆😆
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!
I think the reason is because to better understand for people how the data look like, just educational purposes in the short video :-)
Great tutorial 🎉
Oww.. Awesome!
simplify by web dev simplified
Can you do a serie about this topic and this library please and thanks a lot
please make a followup to this tutorial! Thanks a lot!!!
lots of love from Pakistan
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
It's not. Looking up coding trains "perceptron" video
many many thanks
So much thanks
Yeay, finaly i comment on top 5 fast
Kaguya san learning AI o?O
@@muramasa7537 yes, but with python, i'm new at JS AI 😅
Nice ! Keep it up~
Bro,make more videos.we will support you always.Be strong.stay safe stay home😎😎😎
amazing one...i like it 👍👍👍👍.
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?
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
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?
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.
genius!
Why would you train an AI to display a color, when this can be coded in a couple lines without any models?
Cool
Awesome
TBH I am really jealous of your skills.
how do I import brain.js? it dosen't work for me
Which app you are using to create videos? , where you are simultaneously recording screen as well as you are recording your face
probably OBS
Thanks..
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.
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.
the brainjs script in not getting downloaded, anyone else facing this issue?
somewhy toSVG line doesnt work SOMEONE HELP
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
Hi Kyle. Do you know of a similar neural network library for .NET?
You broke my opinion on ML that is very hard to understand, please do some next level videos on ML
The neural network won't render more than three hidden layers, does anyone know how to fix this?
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
Make sure to add the brain.js cdn and add your script.js file to the head section of your HTML.
I got this error too
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
For some reason I keep getting errors when trying to use the brain.js functions, meaning this script cannot be run....
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.
Thats so the AI can know the basics.
Hi, How about cryptocurrency programming like solidity or nimiq? plz.
Cryptocurrency is dieing. We've seen what happened to Bitcoin. No more trust.
@@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)
how do you randomly learn stuff and teach ?
by researching...
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
I am having the same problem, how did you fix it?
I think he just edited his UA-cam comment twice and it was fixed.
lit
Do you read comments!!!
I didn't seen a heart from you for any comment!!???
I read pretty much every comment.
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.
@@WebDevSimplified this reply proves that ❤️❤️ Learned a lot from your videos
omg
Seems like you just rip off other peoples tutorials, this was already done by another person years ago
Wow nice one