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

This is a Twitter series on #FoundationsOfML.

❓ Today, I want to start discussing the different types of Machine Learning flavors we can find.

This is a very high-level overview. In later threads, we'll dive deeper into each paradigm... 👇🧵

Last time we talked about how Machine Learning works.

Basically, it's about having some source of experience E for solving a given task T, that allows us to find a program P which is (hopefully) optimal w.r.t. some metric


According to the nature of that experience, we can define different formulations, or flavors, of the learning process.

A useful distinction is whether we have an explicit goal or desired output, which gives rise to the definitions of 1️⃣ Supervised and 2️⃣ Unsupervised Learning 👇

1️⃣ Supervised Learning

In this formulation, the experience E is a collection of input/output pairs, and the task T is defined as a function that produces the right output for any given input.

👉 The underlying assumption is that there is some correlation (or, in general, a computable relation) between the structure of an input and its corresponding output and that it is possible to infer that function or mapping from a sufficiently large number of examples.

You May Also Like