Supervised and Unsupervised Learning

We start our dive into machine learning in Python with a general introduction. What types of machine learning are there, and where can they be applied? Then, we continue with a workshop on machine learning from Codecademy, which will further introduce you to machine learning and highlight the differences between supervised and unsupervised learning. You'll then be introduced to a python package we'll be using for wrestling with machine learning analyses in Python this block.

Wrestling with python

As you can see, wrestling with Python can be very enjoyable if you treat your code and models with affection.

0) Learning Objectives:

After this module you'll know the fundamental theory on, and how to use:

  1. supervised learning;
  2. unsupervised learning;
  3. scikit-learn.

Table of contents:

  1. Introduction to machine learning: 1 hour
  2. Workshop on Supervised Vs Unsupervised Learning: 4 hours

Questions or issues?

If you have any questions or issues regarding the course material, please first ask your peers or ask us in the Q&A in Datalab!

Tip: Note down any important questions you might have!

Good luck!

1) Introduction machine learning

From spam filters and self-driving cars, to cutting edge medical diagnosis and real-time language translation, there has been an increasing need for our computers to learn from data and apply that knowledge to make predictions and decisions. This is the heart of machine learning which sits inside the more ambitious goal of artificial intelligence.

Now, we're going to look towards the future at how machine learning is being used to build models to predict future outcomes. We'll discuss three popular types of supervised machine learning models: Logistic Regression, Linear discriminant Analysis (or LDA) and K Nearest Neighbors (or KNN).

Next, we're going to discuss how machine learning can be used to group and label information even if those labels don't exist. We'll explore two types of clustering used in Unsupervised Machine Learning: k-means and Hierarchical clustering, and show how they can be used in many ways - from book suggestions and medical interventions to giving people better deals on pizza!

2) Workshop on Supervised Vs Unsupervised Learning

Now, we're introduced to the two flavours of machine learning it's time ground down these fundamental by doing a workshop. Open the Basics of Machine Learning course on Codecademy and complete the first module: Introduction to Machine Learning, in particular:

  • Lesson: Why Use Machine Learning?
  • Article: Supervised vs. unsupervised
  • Article: Scikit-Learn Cheatsheet

3) Fun facts

Here are some fun facts and interesting concepts for you to get familiar with! They are not part of the course or assessment but just good for you to know and helpful in your later career. You're familiar with correlation for example but you should have heard from the famous phrase: "correlation doesn't equal causation" when you watched this video last block. But, watching a video and observing visualised data is different, why don't you follow this link and inspect these spurious correlations yourself? :)

And you're familiar with regression but the world isn't always that simple and sometimes an effect is just an anomaly (something that deviates from what is standard, normal, or expected.)!

Next up!

Coming Datalab we will reflect on supervised and machine learning again and give you an opportunity to ask any questions you might have.

Tomorrow, we will cover regression algorithms!

Resources