A simple guide on how to train your first neural network in under 10 minutes to kick-start your machine learning journey.

(+ no setup required and free extra resources)
🧵👇

For this exercise, you'll need :
- A computer/phone
- An internet connection
- Very basic Python knowledge
- Willingness to learn

What you do not need:
- Complex math
- An expensive computer
- A PhD

Math will come later on in your machine learning journey :)

(2 / 15)
Here's our problem,we are given data in which we are given the number of flats in a house and its corresponding price. Like a house with one flat is worth 10000, and 20000 for a house with 2 flats.

(3 / 15)
We can clearly tell that the price of the house increases by 10000 per extra flat however our computer does not know this and we won't it tell it about this, it'll have to figure things out on its own.

(4 / 15)
Here's the code👇

(5 / 15)
In order to avoid the hassle of the setup for python, we'll use collab which has all the libraries we need pre installed, a free GPU for faster learning and everything runs in the cloud!

🔗//colab.research.google.com/drive/1FxSrY6hwdgszzNydyobTLsMyO0bfpiPs?usp=sharing

(6 / 15)
Let's try to understand what is going on here

1. We import TensorFlow and Keras which are frameworks for making neural nets

2. Our Neural Net: This is where all the magic happens, for this exercise we need only one neuron.

Wait! What is a neural net?👇

(7 / 15)
Neural Networks are a digital imitation of the neurons you see in the human brain.

In these neural networks, data flows through them and each neuron (the circle) has a numerical value which will change.

(8 / 15)
The value of a neuron gets changes to something which is close to what we want each time the data passes through the neural network.

Think of the neurons as dials on a lock, you have to tune every dial to open the lock.

(9 / 15)
It is almost impossible for a human to tune thousands of dials like these, but a computer certainly can.

Once the dials are well tuned, you have a well trained neural network!
...

(10 / 15)
... In this case we'll be able to predict the prices of houses based on how many flats they have.

3. Now we pass the data (flats and prices) through our neural network 500 times. (these loops are called epochs)

(11 / 15)
4. Finally,we predict what the price of a house with 10 flats. (we should get something around 100,000)

And that's it! It was that easy.
In case you want to improve your python and machine learning skills after this exercise, these are great frfee courses to take 👇

(12 / 15)
Machine learning foundations course
🔗//youtube.com/watch?v=_Z9TRANg4c0

> A simple yet extremely effective course on getting started with machine learning without all the crazy math.

(13 / 15)
The Basic & Intermediate Python course on freecodecamp
🔗Basics //youtube.com/watch?v=rfscVS0vtbw
🔗Intermediate //youtube.com/watch?v=HGOBQPFzWKo

(14 / 15)

More from Pratham Prasoon

More from Machine learning

You May Also Like

First thread of the year because I have time during MCO. As requested, a thread on the gods and spirits of Malay folk religion. Some are indigenous, some are of Indian origin, some have Islamic


Before I begin, it might be worth explaining the Malay conception of the spirit world. At its deepest level, Malay religious belief is animist. All living beings and even certain objects are said to have a soul. Natural phenomena are either controlled by or personified as spirits

Although these beings had to be respected, not all of them were powerful enough to be considered gods. Offerings would be made to the spirits that had greater influence on human life. Spells and incantations would invoke their


Two known examples of such elemental spirits that had god-like status are Raja Angin (king of the wind) and Mambang Tali Arus (spirit of river currents). There were undoubtedly many more which have been lost to time

Contact with ancient India brought the influence of Hinduism and Buddhism to SEA. What we now call Hinduism similarly developed in India out of native animism and the more formal Vedic tradition. This can be seen in the multitude of sacred animals and location-specific Hindu gods