3-2-1: Machine Learning & Free Course Hacks
3 Coursepts From Machine Learning
Machine Learning (ML) is more than just a buzzword in 2020. ML has transformed several fields and industries, and I believe we’re just starting to realize it’s true potential. In this newsletter, I talk about some points that fascinated me when I took the Machine Learning course from Andrew NG (my first ever online course) back in 2014. The popularity of this course was one of the drivers for Coursera to come into existence and is undoubtedly the reason I fell in love with learning online. Millions of people have enrolled in this course since its inception.
ML is a technical course, and it’s impossible to summarize the content of any such class in an article. In this series of Newsletters, I pick a course and talk about three things from that course that got me curious and dive deep.
1. What is Machine Learning?
Here’s a quick overview of what Machine Learning is all about. While there are several theoretical definitions, I like to think of Machine Learning as learning something meaningful from data. Of the several types of machine learning algorithms, two of the most common ones are discussed here.
Supervised Learning - How many runs will India score in the next game?
Me: Hey, can you predict how many runs India will score in the next game?
ML Bot: Of course, I can. Can you give me some “data” so that I can give you an accurate answer? Remember, my answer will depend on the quality of the data you offer. If you provide me with garbage data, you’ll get a useless answer.
Me: Hmm, I think I know what exactly you’re asking. I’ll give you the following data on all of India’s previous matches:
- Players (no. of matches, runs, wickets, catches, experience)
- Ground (location, weather, boundary length, pitch condition)
- Match details (Toss, batting first, opposition, type of match, etc.)
ML Bot: That’s a lot of data. Don’t forget to give me the runs scored by India too. I need it the most as that’s what I’m predicting for you.
Me: Sure, here’s all the data you wanted. Now get me something useful.
ML Bot: I tried several techniques and built a model that gives you the least error. Take this model and input all the relevant data. The model outputs its prediction on how much India will score.
This is supervised learning in 2 minutes. You give the machine some data to learn from, train it to build a reasonable model, and give it new data to predict something. The course talks a lot about How to build a model, how to know if your model is performing well, and how to boost the performance. For a model, performance usually means high accuracy in prediction and getting less error on the test (unseen) data.
Unsupervised Learning - Cocktail Party Problem
In unsupervised learning, we get unlabelled data. Think of the same example as above. In case of unsupervised learning, you have all the data except the runs scored by India. Can you still predict the score India will make? NO. Here, the task is to make structures or patterns in data rather than to predict something. Let’s consider the Cocktail party problem. In a cocktail party, you hear voices all around, and the human brain can’t comprehend every single one of them. The beauty of Machine learning algorithms is that they can take this cluttered audio data as an input and separate the voices. This separation can be achieved with a single line of code in Matlab/Octave. Cocktail party problem is an example of an Unsupervised Learning problem. Another typical example you see is Clustering.

2. Bias and Variance
When defining the Machine Learning problem above, we used the term data and building a model very loosely. What if I have too little data? What if I have too much data, and I tried to fit every single data point precisely in my model? This is a vast and fascinating topic that I may not be able to do enough justice in this article. Let me introduce bias and variance and the beautiful tradeoff between them.
Bias - The difference between the prediction of our model and the correct value that we are trying to predict is called bias. Models with high bias pay little attention to the training data and oversimplify the model. This usually results in Underfitting.
Variance - Variance is the variability of model prediction for a given data point. A model with high variance pays a lot of attention to the training data and may not generalize well for the data which it hasn’t seen before. Therefore, high variance models perform very well on training data but have high error rates on test data. This usually results in Overfitting.
The figure below gives a visual cue to the discussion.

A fair amount to training your model goes into doing the right bias and variance tradeoff such that our model performs well on both our train data and generalizes well even for our test data.
3. Should we always care about accuracy?
“Tested positive for COVID 19”. You might be hearing all about COVID testing in the news these days. The test itself can be termed as a Machine Learning model. It takes your medical data and predicts an output saying COVID positive or negative. Imagine that I built a model to test COVID, and all I’m doing is to return negative irrespective of what my input is. Can you guess what my accuracy is?
99.98% (as of today)
Isn’t it an unbelievable accuracy? I only go wrong for 1 in 10,000 tests. But is it a good model? NO! It’s a terrible model. Where did we go wrong?
Our dataset is skewed. Accuracy is a useful metric when we have a balanced dataset (50% positive and 50% negative). Here, we got about 99.98% negative samples and only 0.01% positive samples. How do we measure the performance of our model here?
Confusion Matrix
One way to analyze the performance of such models is to use a Confusion Matrix. The confusion matrix for our COVID example looks like the table below.

Let’s understand how to use this table.
True Positive: You have COVID Positive, and the model outputs positive.
True Negative: You have COVID Negative, and the model outputs negative.
False Positive: You have COVID Negative, and yet, the model outputs positive.
False Negative: You have COVID Positive, and yet, the model outputs negative.
The last two are the scary quadrants to be in, and both have different costs. In the case of COVID, false positives are scary and false negatives are even more frightening. Any efficient model should try to minimize both False Positives and False Negatives. There are more attributes that people measure using these attributes like Precision, Recall, Sensitivity, F1 Score, etc.; You can read more about these here.
What Next?
If you’re interested to learn more, here are a few options:
- Enroll and check out the full course or check out well-compiled class notes here
- The assignments of this course are based on Octave/Matlab, which isn’t the students’ favorite when it comes to ML. You can find the Python equivalent here
- If you’re not a techie, consider enrolling in “AI for Everyone” by Andrew Ng
2 Hacks to do courses on Coursera for free
Before I begin talking about the “hacks,” here are a few courses that are available for free on Coursera during COVID-19. Another impressive list of free classes from Coursera is published by Class Central here. If you’re like me, once you do these free courses, you’d be excited to dive into more courses and realize the ones you want are not free. Here are two hacks that help you do almost any course in Coursera for free.
Hack 1 - Financial Aid
As a college student, this was the most viable option to do free courses on Coursera. I did 14 certificate courses on Coursera in my 3rd year of college using Financial Aid, and that was an immense value add for me in my interviews. Most courses in Coursera can be done through Financial Aid for free if you’re eligible. Here’s how you do it.
You cannot enroll in a specialization directly with Financial Aid. You can apply to Financial Aid of each course in the specialization separately.
Open the course you wish to enroll in and click on “Financial aid available.”

Click on the link below to fill the application.

Fill the necessary fields, and please be honest. They ask for your salary in USD, and unless you’re not earning a six-digit paycheck, you’ll most likely receive the Financial Aid.
This process takes about two weeks. So, please be patient with this option.
Also, if you apply for Financial Aid, don’t start the free trial. Your financial aid application gets auto-canceled if you do so.
Hack 2 - Audit till you’re ready to trial
If you’re not a college student or your Financial Aid application gets rejected due to some reason (this is pretty rare), you can still do courses for free. This hack requires more hard work and determination, though. Well, there’s tradeoff everywhere :D I’m sharing the exact steps I followed to earn Business Foundations Specialization from Coursera for free. So yes, even this hack is tried and tested.
- Pick the specialization you wish to do.
- Audit every course in the specialization at your own pace. DO NOT start Free Trial for any of the courses.
- Watch the lectures and do the graded assignments.
- For most of the courses, graded assignments are visible to the learner. Do every quiz problem and mark your answers (Coursera saves your answers even if you close the assignment and come back again).
- You can’t submit the quiz when you access the course in an audit mode. Skip that part and just save your answers.
- Steps 4 & 5 are critical. Please do not skip them.
- Repeat steps 3-6 for EVERY course in the specialization.
- After step 7 is done, start your one week free trial for the specialization.
- Go to every quiz from Step 4 and SUBMIT your quizzes. Retake them if you fail to cross the bar in any quiz, and remember, you have one week to complete.
1 Question
Andrew NG says, “AI is the new electricity.” Just how electricity transformed every industry a century ago, Artificial Intelligence (AI) is transforming every industry, and this is just the beginning. Think 2030! How do you see AI and ML impacting your current industry in 10 years? Post your thoughts in the comments.
If you like my newsletter, please subscribe here and let me know your feedback! I’d love to hear from you.