How to learn Python for machine learning. 🐍

The beginner's guide.
(based on my real life experience of mentoring 300+ students)

🧵👇

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

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

Really enjoyed digging into recent innovations in the football analytics industry.

>10 hours of interviews for this w/ a dozen or so of top firms in the game. Really grateful to everyone who gave up time & insights, even those that didnt make final cut 🙇‍♂️ https://t.co/9YOSrl8TdN


For avoidance of doubt, leading tracking analytics firms are now well beyond voronoi diagrams, using more granular measures to assess control and value of space.

This @JaviOnData & @LukeBornn paper from 2018 referenced in the piece demonstrates one method
https://t.co/Hx8XTUMpJ5


Bit of this that I nerded out on the most is "ghosting" — technique used by @counterattack9 & co @stats_insights, among others.

Deep learning models predict how specific players — operating w/in specific setups — will move & execute actions. A paper here: https://t.co/9qrKvJ70EN


So many use-cases:
1/ Quickly & automatically spot situations where opponent's defence is abnormally vulnerable. Drill those to death in training.
2/ Swap target player B in for current player A, and simulate. How does target player strengthen/weaken team? In specific situations?
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

Trending news of The Rock's daughter Simone Johnson's announcing her new Stage Name is breaking our Versus tool because "Wrestling Name" isn't in our database!

Here's the most useful #Factualist comparison pages #Thread 🧵


What is the difference between “pseudonym” and “stage name?”

Pseudonym means “a fictitious name (more literally, a false name), as those used by writers and movie stars,” while stage name is “the pseudonym of an entertainer.”

https://t.co/hT5XPkTepy #english #wiki #wikidiff

People also found this comparison helpful:

Alias #versus Stage Name: What’s the difference?

Alias means “another name; an assumed name,” while stage name means “the pseudonym of an entertainer.”

https://t.co/Kf7uVKekMd #Etymology #words

Another common #question:

What is the difference between “alias” and “pseudonym?”

As nouns alias means “another name; an assumed name,” while pseudonym means “a fictitious name (more literally, a false name), as those used by writers and movie

Here is a very basic #comparison: "Name versus Stage Name"

As #nouns, the difference is that name means “any nounal word or phrase which indicates a particular person, place, class, or thing,” but stage name means “the pseudonym of an
Master Thread of all my threads!

Hello!! 👋

• I have curated some of the best tweets from the best traders we know of.

• Making one master thread and will keep posting all my threads under this.

• Go through this for super learning/value totally free of cost! 😃

1. 7 FREE OPTION TRADING COURSES FOR


2. THE ABSOLUTE BEST 15 SCANNERS EXPERTS ARE USING

Got these scanners from the following accounts:

1. @Pathik_Trader
2. @sanjufunda
3. @sanstocktrader
4. @SouravSenguptaI
5. @Rishikesh_ADX


3. 12 TRADING SETUPS which experts are using.

These setups I found from the following 4 accounts:

1. @Pathik_Trader
2. @sourabhsiso19
3. @ITRADE191
4.


4. Curated tweets on HOW TO SELL STRADDLES.

Everything covered in this thread.
1. Management
2. How to initiate
3. When to exit straddles
4. Examples
5. Videos on