Are you planning to learn to 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'a 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, Kagggle notebooks or repl.​it
These are online editors which have everything setup 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)

More from Pratham Prasoon

More from Machine learning

10 machine learning YouTube videos.

On libraries, algorithms, and tools.

(If you want to start with machine learning, having a comprehensive set of hands-on tutorials you can always refer to is fundamental.)

🧵👇

1⃣ Notebooks are a fantastic way to code, experiment, and communicate your results.

Take a look at @CoreyMSchafer's fantastic 30-minute tutorial on Jupyter Notebooks.

https://t.co/HqE9yt8TkB


2⃣ The Pandas library is the gold-standard to manipulate structured data.

Check out @joejamesusa's "Pandas Tutorial. Intro to DataFrames."

https://t.co/aOLh0dcGF5


3⃣ Data visualization is key for anyone practicing machine learning.

Check out @blondiebytes's "Learn Matplotlib in 6 minutes" tutorial.

https://t.co/QxjsODI1HB


4⃣ Another trendy data visualization library is Seaborn.

@NewThinkTank put together "Seaborn Tutorial 2020," which I highly recommend.

https://t.co/eAU5NBucbm

You May Also Like

Oh my Goodness!!!

I might have a panic attack due to excitement!!

Read this thread to the end...I just had an epiphany and my mind is blown. Actually, more than blown. More like OBLITERATED! This is the thing! This is the thing that will blow the entire thing out of the water!


Has this man been concealing his true identity?

Is this man a supposed 'dead' Seal Team Six soldier?

Witness protection to be kept safe until the right moment when all will be revealed?!

Who ELSE is alive that may have faked their death/gone into witness protection?


Were "golden tickets" inside the envelopes??


Are these "golden tickets" going to lead to their ultimate undoing?

Review crumbs on the board re: 'gold'.


#SEALTeam6 Trump re-tweeted this.
“We don’t negotiate salaries” is a negotiation tactic.

Always. No, your company is not an exception.

A tactic I don’t appreciate at all because of how unfairly it penalizes low-leverage, junior employees, and those loyal enough not to question it, but that’s negotiation for you after all. Weaponized information asymmetry.

Listen to Aditya


And by the way, you should never be worried that an offer would be withdrawn if you politely negotiate.

I have seen this happen *extremely* rarely, mostly to women, and anyway is a giant red flag. It suggests you probably didn’t want to work there.

You wish there was no negotiating so it would all be more fair? I feel you, but it’s not happening.

Instead, negotiate hard, use your privilege, and then go and share numbers with your underrepresented and underpaid colleagues. […]
🌺कैसे बने गरुड़ भगवान विष्णु के वाहन और क्यों दो भागों में फटी होती है नागों की जिह्वा🌺

महर्षि कश्यप की तेरह पत्नियां थीं।लेकिन विनता व कद्रु नामक अपनी दो पत्नियों से उन्हे विशेष लगाव था।एक दिन महर्षि आनन्दभाव में बैठे थे कि तभी वे दोनों उनके समीप आकर उनके पैर दबाने लगी।


प्रसन्न होकर महर्षि कश्यप बोले,"मुझे तुम दोनों से विशेष लगाव है, इसलिए यदि तुम्हारी कोई विशेष इच्छा हो तो मुझे बताओ। मैं उसे अवश्य पूरा करूंगा ।"

कद्रू बोली,"स्वामी! मेरी इच्छा है कि मैं हज़ार पुत्रों की मां बनूंगी।"
विनता बोली,"स्वामी! मुझे केवल एक पुत्र की मां बनना है जो इतना बलवान हो की कद्रू के हज़ार पुत्रों पर भारी पड़े।"
महर्षि बोले,"शीघ्र ही मैं यज्ञ करूंगा और यज्ञ के उपरांत तुम दोनो की इच्छाएं अवश्य पूर्ण होंगी"।


महर्षि ने यज्ञ किया,विनता व कद्रू को आशीर्वाद देकर तपस्या करने चले गए। कुछ काल पश्चात कद्रू ने हज़ार अंडों से काले सर्पों को जन्म दिया व विनता ने एक अंडे से तेजस्वी बालक को जन्म दिया जिसका नाम गरूड़ रखा।जैसे जैसे समय बीता गरुड़ बलवान होता गया और कद्रू के पुत्रों पर भारी पड़ने लगा


परिणामस्वरूप दिन प्रतिदिन कद्रू व विनता के सम्बंधों में कटुता बढ़ती गयी।एकदिन जब दोनो भ्रमण कर रहीं थी तब कद्रू ने दूर खड़े सफेद घोड़े को देख कर कहा,"बता सकती हो विनता!दूर खड़ा वो घोड़ा किस रंग का है?"
विनता बोली,"सफेद रंग का"।
तो कद्रू बोली,"शर्त लगाती हो? इसकी पूँछ तो काली है"।
THREAD: 12 Things Everyone Should Know About IQ

1. IQ is one of the most heritable psychological traits – that is, individual differences in IQ are strongly associated with individual differences in genes (at least in fairly typical modern environments). https://t.co/3XxzW9bxLE


2. The heritability of IQ *increases* from childhood to adulthood. Meanwhile, the effect of the shared environment largely fades away. In other words, when it comes to IQ, nature becomes more important as we get older, nurture less.
https://t.co/UqtS1lpw3n


3. IQ scores have been increasing for the last century or so, a phenomenon known as the Flynn effect. https://t.co/sCZvCst3hw (N ≈ 4 million)

(Note that the Flynn effect shows that IQ isn't 100% genetic; it doesn't show that it's 100% environmental.)


4. IQ predicts many important real world outcomes.

For example, though far from perfect, IQ is the single-best predictor of job performance we have – much better than Emotional Intelligence, the Big Five, Grit, etc. https://t.co/rKUgKDAAVx https://t.co/DWbVI8QSU3


5. Higher IQ is associated with a lower risk of death from most causes, including cardiovascular disease, respiratory disease, most forms of cancer, homicide, suicide, and accident. https://t.co/PJjGNyeQRA (N = 728,160)