Skip to the content.

Dive into Machine Learning Creative Commons License Awesome

Hi there! You might find this guide helpful if:

For some great alternatives, jump to the end or check out Nam Vu’s guide, Machine Learning for Software Engineers.

Of course, there is no easy path to expertise. Also, I’m not an expert! I just want to connect you with some great resources from experts. Applications of ML are all around us. I think it’s in the public interest for more people to learn more about ML, especially hands-on, because there are many different ways to learn.

Whatever motivates you to dive into machine learning, if you know a bit of Python, these days you can get hands-on with a machine learning “Hello World!” in minutes.

Let’s get started

Tools you’ll need

If you prefer local installation

You can install Python 3 and all of these packages in a few clicks with the Anaconda Python distribution. Anaconda is popular in Data Science and Machine Learning communities. (Use whichever tool you want.)

Cloud-based options

Some options you can use from your browser:

For other options, see:

Let’s go!

Learn how to use Jupyter Notebook (5-10 minutes). (You can learn by screencast instead.)

Now, follow along with this brief exercise: An introduction to machine learning with scikit-learn. Do it in ipython or a Jupyter Notebook, coding along and executing the code in a notebook.

I'll wait.

What just happened?

You just classified some hand-written digits using scikit-learn. Neat huh?

Dive in

A Visual Introduction to Machine Learning

Let’s learn a bit more about Machine Learning, and a couple of common ideas and concerns. Read “A Visual Introduction to Machine Learning, Part 1” by Stephanie Yee and Tony Chu.

A Visual Introduction to Machine Learning, Part 1

It won’t take long. It’s a beautiful introduction … Try not to drool too much!

A Few Useful Things to Know about Machine Learning

OK. Let’s dive deeper.

Read “A Few Useful Things to Know about Machine Learning” by Prof. Pedro Domingos. It’s densely packed with valuable information, but not opaque.

Take a little time with this one. Take notes. Don’t worry if you don’t understand it all yet.

The whole paper is packed with value, but I want to call out two points:

When you work on a real Machine Learning problem, you should focus your efforts on your domain knowledge and data before optimizing your choice of algorithms. Prefer to do simple things until you have to increase complexity. You should not rush into neural networks because you think they’re cool. To improve your model, get more data. Then use your knowledge of the problem to explore and process the data. You should only optimize the choice of algorithms after you have gathered enough data, and you’ve processed it well.

Jargon note

Just about time for a break…

Totally optional: some podcast episodes of note First, download [an interview with Prof. Domingos on the _Data Skeptic_podcast](https://dataskeptic.com/blog/episodes/2018/the-master-algorithm) (2018). Prof. Domingos wrote [the paper we read earlier](http://homes.cs.washington.edu/~pedrod/papers/cacm12.pdf). You might also start reading his book, [_The Master Algorithm_ by Prof. Pedro Domingos](https://www.goodreads.com/book/show/24612233-the-master-algorithm), a clear and accessible overview of machine learning. (It's available as an audiobook too.) Next, subscribe to more machine learning and data science podcasts! These are great, low-effort resources that you can casually learn more from. To [learn effectively](https://www.coursera.org/learn/learning-how-to-learn), listen over time, with plenty of headspace. [By the way, don't speed up technical podcasts, that can hinder your comprehension.](https://www.theringer.com/2017/8/2/16095364/inefficiency-week-podcasts-speed-comprehension-f0ea43949e42) Subscribe to _**[Talking Machines](http://www.thetalkingmachines.com/)**_. I suggest this listening order: * **Download the ["Starting Simple"](http://www.thetalkingmachines.com/episodes/starting-simple-and-machine-learning-meds) episode, and listen to that soon.** It supports what we read from Domingos. [Ryan Adams](http://people.seas.harvard.edu/~rpa/) talks about starting simple, as we discussed above. Adams also stresses the importance of feature engineering. Feature engineering is an exercise of the "knowledge" Domingos writes about. In a later episode, [they share many concrete tips for feature engineering](https://www.thetalkingmachines.com/episodes/software-and-statistics-machine-learning). * Then, over time, you can listen to the entire podcast series (start from the beginning). Want to subscribe to more podcasts? Here's [a good listicle](https://towardsdatascience.com/5-data-science-ai-and-machine-learning-podcasts-to-listen-to-now-e5078b18d184) of suggestions, [and another](https://mty.ai/blog/the-best-ai-podcasts/).

OK! Take a break, come back refreshed.


Play to learn

Next, play along from one or more of notebooks.

Find more great Jupyter Notebooks when you’re ready:


Immerse yourself

Pick one of the courses below and start on your way.

Prof. Andrew Ng’s Machine Learning is a popular and esteemed free online course. I’ve seen it recommended often. And emphatically.

You might like to have a pet project to play with, on the side. When you are ready for that, you could explore one of these Awesome Public Datasets, paperswithcode.com/datasets, or datasetlist.com.

Also, it’s recommended to grab a textbook to use as an in-depth reference. The two I saw recommended most often were Understanding Machine Learning and Elements of Statistical Learning. You only need to use one of the two options as your main reference; here’s some context/comparison to help you pick which one is right for you. You can download each book free as PDFs at those links - so grab them!

Tips for this course

Tips for studying on a busy schedule

It’s hard to make time available every week. So, you can try to study more effectively within the time you have available. Here are some ways to do that:

Take my tips with a grain of salt

I am not a machine learning expert. I’m just a software developer and these resources/tips were useful to me as I learned some ML on the side.

Other courses

More free online courses I've seen recommended. (Machine Learning, Data Science, and related topics.) * Coursera's [Data Science Specialization](https://www.coursera.org/specializations/jhu-data-science) * [Prof. Pedro Domingos's introductory video series](https://www.youtube.com/playlist?list=PLTPQEx-31JXgtDaC6-3HxWcp7fq4N8YGr). [Prof. Pedro Domingos](https://homes.cs.washington.edu/~pedrod/) wrote the paper ["A Few Useful Things to Know About Machine Learning"](https://homes.cs.washington.edu/~pedrod/papers/cacm12.pdf), which you may remember from earlier in the guide. * [`ossu/data-science`](https://github.com/ossu/data-science) (see also [`ossu/computer-science`](https://github.com/ossu/computer-science)) * [Stanford CS229: Machine Learning](https://github.com/afshinea/stanford-cs-229-machine-learning) * [Harvard CS109: Data Science](https://cs109.github.io/2015/) * [Advanced Statistical Computing (Vanderbilt BIOS8366)](http://stronginference.com/Bios8366/lectures.html). Interactive. * Kevin Markham's video series, [Intro to Machine Learning with scikit-learn](http://blog.kaggle.com/2015/04/08/new-video-series-introduction-to-machine-learning-with-scikit-learn/), starts with what we've already covered, then continues on at a comfortable place. * [UC Berkeley's Data 8: The Foundations of Data Science](http://data8.org/) course and the textbook [Computational and Inferential Thinking](https://www.inferentialthinking.com/) teaches critical concepts in Data Science. * Prof. Mark A. Girolami's [Machine Learning Module (GitHub Mirror).](https://github.com/josephmisiti/machine-learning-module) "Good for people with a strong mathematics background." * [An epic Quora thread: How can I become a data scientist?](https://www.quora.com/How-can-I-become-a-data-scientist?redirected_qid=59455) * There are more alternatives linked [at the bottom of this guide](#more-ways-to-dive-into-machine-learning)

Getting Help: Questions, Answers, Chats

Start with the support forums and chats related to the course(s) you’re taking.

Check out datascience.stackexchange.com and stats.stackexchange.com – such as the tag, machine-learning. There are some subreddits, like /r/LearningMachineLearning and /r/MachineLearning.

Don’t forget about meetups. Also, nowadays there are many active and helpful online communities around the ML ecosystem. Look for chat invitations on project pages and so on.

Supplement: Learning Pandas well

You’ll want to get more familiar with Pandas.

Supplement: Cheat Sheets

Some good cheat sheets I’ve come across. (Please submit a Pull Request to add other useful cheat sheets.)

Assorted Tips and Resources

Risks

“Machine learning systems automatically learn programs from data.” Pedro Domingos, in “A Few Useful Things to Know about Machine Learning.” The programs you generate will require maintenance. Like any way of creating programs faster, you can rack up technical debt.

Here is the abstract of Machine Learning: The High-Interest Credit Card of Technical Debt:

Machine learning offers a fantastically powerful toolkit for building complex systems quickly. This paper argues that it is dangerous to think of these quick wins as coming for free. Using the framework of technical debt, we note that it is remarkably easy to incur massive ongoing maintenance costs at the system level when applying machine learning. The goal of this paper is highlight several machine learning specific risk factors and design patterns to be avoided or refactored where possible. These include boundary erosion, entanglement, hidden feedback loops, undeclared consumers, data dependencies, changes in the external world, and a variety of system-level anti-patterns.

If you’re following this guide, you should read that paper. You can also listen to a podcast episode interviewing one of the authors of this paper.

That’s not a comprehensive list, only a collection of starting-points to learn more.

Skilling up

What are some ways to practice?

One way: competitions and challenges You need **practice.** [On Hacker News, user olympus commented to say you could use competitions to practice and evaluate yourself](https://news.ycombinator.com/item?id=10508565). [Kaggle](https://www.kaggle.com/competitions) and [ChaLearn](http://www.chalearn.org/) are hubs for Machine Learning competitions. (You can find more competitions [here](https://github.com/paperswithcode/releasing-research-code#results-leaderboards) or [here](https://towardsdatascience.com/12-data-science-ai-competitions-to-advance-your-skills-in-2021-32e3fcb95d8c).) You also need **understanding.** You should review what Kaggle competition winners say about their solutions, [for example, the "No Free Hunch" blog](http://blog.kaggle.com/). These might be over your head at first but once you're starting to understand and appreciate these, you know you're getting somewhere. Competitions and challenges are just one way to practice! [Machine Learning isn't just about Kaggle competitions](https://jvns.ca/blog/2014/06/19/machine-learning-isnt-kaggle-competitions).
Another way: try doing some practice studies Here's a complementary way to practice: **do practice studies.** 1. **Ask a question. Start exploring some data.** The ["most important thing in data science is the question"](https://github.com/DataScienceSpecialization/courses/blob/master/01_DataScientistToolbox/03_02_whatIsData/index.Rmd#the-data-is-the-second-most-important-thing) ([Dr. Jeff T. Leek](https://github.com/jtleek)). So start with a question. Then, find [real data](https://github.com/caesar0301/awesome-public-datasets). Analyze it. Then ... 2. **Communicate results.** When you think you have a novel finding, ask for review. When you're still learning, ask in informal communities (some are [linked below](#some-communities-to-know-about)). 3. **Learn from feedback.** Consider [learning in public](https://www.swyx.io/learn-in-public/), it works great for some folks. (Don't pressure yourself though! Do what works for you.) How can you come up with interesting questions? Here's one way. Pick a day each week to [look for public datasets](https://github.com/caesar0301/awesome-public-datasets) and write down some questions that come to mind. Also, sign up for [Data is Plural](https://tinyletter.com/data-is-plural), a newsletter of interesting datasets. When a question inspires you, try exploring it with the skills you're learning. This advice, to do practice studies and learn from review, is based on [a conversation](https://github.com/hangtwenty/dive-into-machine-learning/issues/11#issuecomment-153934120) with [Dr. Randal S. Olson](http://www.randalolson.com/). Here's more advice from Olson, [quoted with permission:](https://github.com/hangtwenty/dive-into-machine-learning/issues/11#issuecomment-154135498) > I think the best advice is to tell people to always present their methods clearly and to avoid over-interpreting their results. Part of being an expert is knowing that there's rarely a clear answer, especially when you're working with real data. As you repeat this process, your practice studies will become more scientific, interesting, and focused. Also, [here's a video about the scientific method in data science.](https://101.datascience.community/2012/06/27/the-data-scientific-method/))
More machine learning career-related links * ["Advice on building a machine learning career and reading research papers by Prof. Andrew Ng"](https://www.kdnuggets.com/2019/09/advice-building-machine-learning-career-research-papers-andrew-ng.html) * Some links for finding/following interesting papers/code: * [Papers With Code](https://paperswithcode.com/) is a popular site to follow, and it can lead you to other resources. [github.com/paperswithcode](https://github.com/paperswithcode) * [MIT: Papers + Code](https://mitibmwatsonailab.mit.edu/research/papers-code/) — "Peer-review is the lifeblood of scientific validation and a guardrail against runaway hype in AI. Our commitment to publishing in the top venues reflects our grounding in what is real, reproducible, and truly innovative." * [papers.labml.ai/papers/weekly](https://papers.labml.ai/papers/weekly), [monthly](https://papers.labml.ai/papers/monthly/) * Pull requests welcome!

Some communities to know about

Peer review

OpenReview.net “aims to promote openness in scientific communication, particularly the peer review process.”

More about OpenReview.net > * **Open Discussion:** Hosting of accepted papers, with their reviews, comments. Continued discussion forum associated with the paper post acceptance. Publication venue chairs/editors can control structure of review/comment forms, read/write access, and its timing. > * **Open Directory:** Collection of people, with conflict-of-interest information, including institutions and relations, such as co-authors, co-PIs, co-workers, advisors/advisees, and family connections. > * **Open Recommendations:** Models of scientific topics and expertise. Directory of people includes scientific expertise. Reviewer-paper matching for conferences with thousands of submissions, incorporating expertise, bidding, constraints, and reviewer balancing of various sorts. Paper recommendation to users. > * **Open API:** We provide a simple REST API [...] > * **Open Source:** We are committed to open source. Many parts of OpenReview are already in the [OpenReview organization on GitHub](https://github.com/openreview). Some further releases are pending a professional security review of the codebase. > * [OpenReview.net](https://openreview.net/) is created by Andrew McCallum’s Information Extraction and Synthesis Laboratory in the College of Information and Computer Sciences at University of Massachusetts Amherst > > * [OpenReview.net](https://openreview.net/) is built over an earlier version described in the paper [Open Scholarship and Peer Review: a Time for Experimentation](https://openreview.net/forum?id=xf0zSBd2iufMg) published in the [ICML 2013 Peer Review Workshop](https://openreview.net/group?id=ICML.cc/2013/PeerReview). > > * OpenReview is a long-term project to advance science through improved peer review, with legal nonprofit status through Code for Science & Society. We gratefully acknowledge the support of the great diversity of [OpenReview Sponsors](https://openreview.net/sponsors)––scientific peer review is sacrosanct, and should not be owned by any one sponsor.

Production, Deployment, MLOps

If you are learning about MLOps but find it overwhelming, these resources might help you get your bearings:

Recommended awesomelists to save/star/watch:


Deep Learning

Take note: some experts warn us not to get too far ahead of ourselves, and encourage learning ML fundamentals before moving onto deep learning. That’s paraphrasing from some of the linked coursework in this guide — for example, Prof. Andrew Ng encourages building foundations in ML before studying DL. Perhaps you’re ready for that now, or perhaps you’d like to get started soon and learn some DL in parallel to your other ML learnings.

When you’re ready to dive into Deep Learning, here are some helpful resources.

Easier sharing of deep learning models and demos


Collaborate with Domain Experts

Machine Learning can be powerful, but it is not magic.

Whenever you apply Machine Learning to solve a problem, you are going to be working in some specific problem domain. To get good results, you or your team will need “substantive expertise” (to re-use a phrase from earlier), which is related to “domain knowledge.” Learn what you can, for yourself… But you should also collaborate with experts. You’ll have better results if you collaborate with subject-matter experts and domain experts.

Machine Learning and User Experience (UX)

I couldn’t say it better:

Machine learning won’t figure out what problems to solve. If you aren’t aligned with a human need, you’re just going to build a very powerful system to address a very small—or perhaps nonexistent—problem.

That quote is from “The UX of AI” by Josh Lovejoy. In other words, You Are Not The User. Suggested reading: Martin Zinkevich’s “Rules of ML Engineering”, Rule #23: “You are not a typical end user”


Big data

Here are some useful links regarding Big Data and ML. * [10 things statistics taught us about big data analysis](https://www.kdnuggets.com/2015/02/10-things-statistics-big-data-analysis.html) (and some more food for thought: ["What Statisticians think about Data Scientists"](https://www.datasciencecentral.com/profiles/blogs/what-statisticians-think-about-data-scientists)) * ["Talking Machines" #12](https://www.thetalkingmachines.com/episodes/economic-impact-machine-learning-and-using-kernel-trick-big-data): Interviews Prof. Andrew Ng (from [his course, which has its own module on big data](https://www.coursera.org/learn/machine-learning)); this episode covers some problems relevant to _high-dimensional_ data * ["Talking Machines" #15: "Really Really Big Data and Machine Learning in Business"](https://www.thetalkingmachines.com/episodes/really-really-big-data-and-machine-learning-business) * [0xnr/awesome-bigdata](https://github.com/0xnr/awesome-bigdata) See also: [the MLOps section!](#production-deployment-mlops)

If you are working with data-intensive applications at all, I’ll recommend this book:

More Data Science materials

Here are some additional Data Science resources:

Aside: Bayesian Statistics and Machine Learning

From the “Bayesian Machine Learning” overview on Metacademy:

… Bayesian ideas have had a big impact in machine learning in the past 20 years or so because of the flexibility they provide in building structured models of real world phenomena. Algorithmic advances and increasing computational resources have made it possible to fit rich, highly structured models which were previously considered intractable.

Here are some awesome resources for learning Bayesian methods. * The **free book** _[Probabilistic Programming and Bayesian Methods for Hackers](http://camdavidsonpilon.github.io/Probabilistic-Programming-and-Bayesian-Methods-for-Hackers/)_. Made with a "computation/understanding-first, mathematics-second point of view." Uses [PyMC](https://github.com/pymc-devs/pymc). It's available in print too! * Like learning by playing? Me too. Try [19 Questions](https://github.com/fulldecent/19-questions), "a machine learning game which asks you questions and guesses an object you are thinking about," and **explains which Bayesian statistics techniques it's using!** * [_Time Series Forecasting with Bayesian Modeling by Michael Grogan_](https://www.manning.com/liveprojectseries/time-series-forecasting-with-bayesian-modeling), a 5-project series - paid but the first project is free. * [Bayesian Modelling in Python](https://github.com/markdregan/Bayesian-Modelling-in-Python). Uses [PyMC](https://github.com/pymc-devs/pymc) as well.

(↑ Back to top)


Finding Open-Source Libraries

Natural Language Processing (NLP)

This is just a small

Non-sequitur

These next two links are not related to ML. But since you’re here, I have a hunch you might find them interesting too:


More ways to “Dive into Machine Learning”

Here are some other guides to learning Machine Learning. They can be alternatives or supplements to this guide.

(↑ Back to top)