Python Machine Learning From Scratch Reviewing and Using Our Model
Автор: Stephen Blum
Загружено: 2025-12-10
Просмотров: 24
Earlier today, we started reviewing our machine learning and deep learning from scratch project that we coded live on stream. I only had about 15 minutes earlier but now we have more time, so we can look closer at what the AI does and the changes we’ve made. We improved the code yesterday to make it cleaner and more flexible, even though it is a bit harder to read now.
The file called ML OG shows our progress so far: day one was forward propagation, the easy bit, and day two included back propagation, which is trickier, plus the optimization part, which lets the AI learn by adjusting numbers called parameters. Even though optimization is tricky in theory, our version of the code is only a few lines, so it is simple to follow and does the same job as bigger industry algorithms without all the extra code. This keeps our code clean and avoids too much code debt.
Our whole deep learning framework sits at about one hundred lines and works with basic logic operators like XOR, AND, and OR, using the sigmoid activation function to keep numbers between zero and one. We discussed vanishing and exploding gradients, which happen if the numbers get too small or too big, but using sigmoid helps control that. Training the model even on a CPU is quick because the dataset is small.
When we ran the code, we got one hundred percent accuracy. Thanks to input from viewers, we fixed a typo that broke learning, and we showed how a single wrong letter can mess up everything. The AI learned to copy logical operators, and with a little editing, we switched it from XOR to AND to OR, and it worked each time.
It is cool to see how simple deep learning can be if you keep the functions tight and clear. The main point is that if you just want to use a trained model, all you need is the forward step. If you want to teach the model, you run all three parts: forward, backward, and optimize.
We also chatted about automating deployments and how AI could eventually manage systems by itself, only needing humans when something happens it cannot handle. In the end, a small typo can break your whole model, so paying attention to details matters.
Доступные форматы для скачивания:
Скачать видео mp4
-
Информация по загрузке: