Are you planning to learn Python for machine learning this year?

Here's everything you need to get started.
🧵👇

In this thread, we'll look at all the concepts in Python you need to know for machine learning along with free resources to help you out.

All of this is based on my experience of successfully teaching 300+ students how to code using Python.

(2 / 19
You can use many languages for machine learning, why Python?

Because of 2 reasons:
- Comparatively easier to learn than other languages
- Has the biggest and most mature community

This makes Python a no-brainer to learn for machine learning as a beginner.

(3 / 19)
These are the absolute basics which you must know about:

- Basic terminal commands
- Basic arithmetic (+,-,/,*)
- Accepting user input
- For & While loops
- Exception handling
- If-Else statements
- Functions, modules & Imports

(4 / 19)
Then comes the more tougher concepts which you must know about:

- Object oriented programming in Python:Classes, Objects, Methods
- PIP (Pypi)
- List slicing
- String formatting
- Dictionaries & Tuples
- Managing environments
- Dunder methods like __init__

(5 / 19)
This are even more advanced concepts but you do not need then to start machine learning:

- Lambda functions
- Built in libraries like CSV, requests, Sqlite
- Map and Filter
- *args and **kwargs
- Async
- Decorators

(6 / 19)
From what I've observed, most beginners just find it really difficult just to get the Python environment setup and then using the terminal becomes an even bigger nightmare for them.

Let's tackle this issue.

(7 / 19)
You need to install:
- Anaconda for managing environments (different versions of Python)
- Python3
- Machine learning packages like Sckit learn and TensorFlow using pip when needed

(8 / 19)
Anaconda installation guide for 👇

MacOS: 🔗docs.​anaconda.​com/anaconda/install/mac-os/
Windows: 🔗docs.​anaconda.​com/anaconda/install/windows/
Linux: 🔗docs.​anaconda.​com/anaconda/install/linux/

(9 / 19)
MacOS and Linux have Python pre-installed, for windows you'll have to install it yourself and it is really easy to mess up the install.

Here's a guide with step by step instructions which will help you.
🔗bit.​ly/3rbDoyl

(10 / 19)
After you do all of that, you need a place to write your code which is called a "code editor".

Here are some popular ones

- VS Code: Feature-rich
- Sublime: Light and simple
- Jupyter: Useful for prototyping
- Pycharm: Full-blown IDE i.​e has loads of features.

(11 / 19)
If all of that seems complicated to you, I suggest you use Google colab, Kaggle notebooks or repl.​it
These are online editors which have everything set up for you.

Not to mention colab and kaggle notebooks give you a free GPU for your machine learning workloads.

(12 / 19)
Links for these editors

Collab : 🔗colab.​research.​google.​com
Kaggle Notebooks : 🔗kaggle.​com/notebooks/welcome
Repl : 🔗repl. it

(13 / 19)
The Basic & Intermediate Python course on freecodecamp go over pretty much all Python concepts you need for machine learning which I have mentioned above.

Basics: 🔗youtube.​com/watch?v=rfscVS0vtbw
Intermediate: 🔗youtube.​com/watch?v=HGOBQPFzWKo

(14 / 19)
Another thing which most beginners skip is knowing how to use the terminal properly and the know-how of navigating around folders.

Here's a brilliant website which gives you an overview of the windows command prompt, enough for you to get started.

🔗bit.​​ly/34tmnGd

(15 / 19)
The story is a bit different on Linux and Mac, their terminals are extremely powerful and packed to the brim with features, here's a tutorial which will help you get started with the basics 👇

​🔗youtube.​com/watch?v=oxuRxtrO2Ag

(16 / 19)
Keep in mind that you should learn how to use the linux terminal because at some point in your machine learning journey you will have to deal with linux.

It is not important to learn it at the start but I do recommend it.

(17 / 19)
This tutorial will help you in knowing how to work with folders, this is important!

Windows: 🔗youtube.​com/watch?v=HDmwiJxzIrw
Mac: 🔗youtube.​com/watch?v=3TAEC-1YUZw
Linux: 🔗youtube.​com/watch?v=HbgzrKJvDRw

(18 / 19)
That's the end of the thread!

Consider following me if you want to see more content like this, cheers.

(19 / 19)

More from Pratham Prasoon

More from Machine learning

You May Also Like

"I really want to break into Product Management"

make products.

"If only someone would tell me how I can get a startup to notice me."

Make Products.

"I guess it's impossible and I'll never break into the industry."

MAKE PRODUCTS.

Courtesy of @edbrisson's wonderful thread on breaking into comics –
https://t.co/TgNblNSCBj – here is why the same applies to Product Management, too.


There is no better way of learning the craft of product, or proving your potential to employers, than just doing it.

You do not need anybody's permission. We don't have diplomas, nor doctorates. We can barely agree on a single standard of what a Product Manager is supposed to do.

But – there is at least one blindingly obvious industry consensus – a Product Manager makes Products.

And they don't need to be kept at the exact right temperature, given endless resource, or carefully protected in order to do this.

They find their own way.
॥ॐ॥
अस्य श्री गायत्री ध्यान श्लोक:
(gAyatri dhyAna shlOka)
• This shloka to meditate personified form of वेदमाता गायत्री was given by Bhagwaan Brahma to Sage yAgnavalkya (याज्ञवल्क्य).

• 14th shloka of गायत्री कवचम् which is taken from वशिष्ठ संहिता, goes as follows..


• मुक्ता-विद्रुम-हेम-नील धवलच्छायैर्मुखस्त्रीक्षणै:।
muktA vidruma hEma nIla dhavalachhAyaiH mukhaistrlkShaNaiH.

• युक्तामिन्दुकला-निबद्धमुकुटां तत्वार्थवर्णात्मिकाम्॥
yuktAmindukalA nibaddha makutAm tatvArtha varNAtmikam.

• गायत्रीं वरदाभयाङ्कुश कशां शुभ्रं कपालं गदाम्।
gAyatrIm vardAbhayANkusha kashAm shubhram kapAlam gadAm.

• शंखं चक्रमथारविन्दयुगलं हस्तैर्वहन्ती भजै॥
shankham chakramathArvinda yugalam hastairvahantIm bhajE.

This shloka describes the form of वेदमाता गायत्री.

• It says, "She has five faces which shine with the colours of a Pearl 'मुक्ता', Coral 'विद्रुम', Gold 'हेम्', Sapphire 'नील्', & a Diamond 'धवलम्'.

• These five faces are symbolic of the five primordial elements called पञ्चमहाभूत:' which makes up the entire existence.

• These are the elements of SPACE, FIRE, WIND, EARTH & WATER.

• All these five faces shine with three eyes 'त्रिक्षणै:'.
"I lied about my basic beliefs in order to keep a prestigious job. Now that it will be zero-cost to me, I have a few things to say."


We know that elite institutions like the one Flier was in (partial) charge of rely on irrelevant status markers like private school education, whiteness, legacy, and ability to charm an old white guy at an interview.

Harvard's discriminatory policies are becoming increasingly well known, across the political spectrum (see, e.g., the recent lawsuit on discrimination against East Asian applications.)

It's refreshing to hear a senior administrator admits to personally opposing policies that attempt to remedy these basic flaws. These are flaws that harm his institution's ability to do cutting-edge research and to serve the public.

Harvard is being eclipsed by institutions that have different ideas about how to run a 21st Century institution. Stanford, for one; the UC system; the "public Ivys".