Wednesday, November 08, 2017

On Machine Learning and my realizations thereof

I promised to myself that this will not become a technical blog, so I am not going to talk about the details of machine learning. Just to let people know the backstory, Artificial Intelligence is a subject that interests me and there was a time when I planned a career in academics and thought that is the subject I would pursue. But then things turned out differently and I went towards a career in software. However, Coursera has shown me time and again, that if I want to learn something, the Universe would help me do so. I took courses in Physics from there too. This year after listening to Dr. Fei-Fei Li's keynote speech at the Grace Hopper Conference, I decided to start studying machine learning. The course I found is from Dr. Andrew Ng and without any exaggeration it is so far the toughest course I have ever taken, physically or virtually!

The first week was overwhelming. After a whole day at work, in the evening I started the course and I felt like my brain would just explode. Without any fluff, he dived straight into math. Algebra had never been my strong point so I gasped when I saw a lot of linear algebra sitting there. And it just wasn't algebra. Literally all the math I had learned, including geometry, co-ordinate geometry (also 3D), trigonometry, and even probability and statistics are being used everyday in a matter of fact way. One thing I must admit, even though I did not realize it when I learned these in high school, I actually did spend a lot of time practicing these. My parents would still say I should have spent some more time studying, but now I know these stuff has got firmly etched in my brain somewhere that even though the surface may accumulate some "dust" over the years, they would not be forgotten. It has become like muscle memory :)

The second part of the problem is programming. Thing with math and programming both is unless you get it right, it won't work. You can yell at yourself, or at the code (or math) but it still won't work. (Cursing in Bengali doesn't help either, I have tried.) So when I had to solve equations and put them in MATLAB (a language I barely ever touched in undergrad, and then never after) I was initially in terrible shape. For a few days I just scratched my head and tried to remember why exactly I decided to take this course. But there is one thing I did not do. I did not give up. This is an unpaid online course which just takes one click to give up. I told myself if I cannot do anything by Sunday, then I will stop taking this class, but until then I will try. That Sunday morning, I had cold hands and I was frantically going over the mentor's notes to understand the problems. Slowly things got better, programs compiled, they showed expected values. Then I ran test cases on them. Those gave right answers as well. Then I submitted my work, and as science is supposed to work, I got full points!

Nobody saw my happy dance for five straight minutes after that!

From the next week, things got better. I understood approximately how much time I need to allot for the programming assignments. I also decided to tackle the problems each day rather than keeping everything for the end of the week.

There has been another realization about the thing called impostor syndrome. As the society we grew up in is silent about achievements but vocal towards failures, we have been conditioned into thinking that failures are our direct responsibilities. Like, as students, if we did poorly on a test it was because we didn't study enough. But if we did well, it was received with a "that's ok, try to do better next time". So we still generally undermine ourselves. As this course is tough and it is from Stanford, to be honest, I initially felt very stupid. Then I felt that maybe the problems are not very tough, it is just taking me time to figure it out. Finally after submitting them, I looked at the Github repos of some mentors and saw that their solutions are less optimized than mine (it would take more time to run their programs than mine) and that they have not used the concepts like vectorization which was taught in class. That made me realize that I actually got the concepts, and I know better than some others! Being able to work in MATLAB also boosted my confidence that we don't really have to learn a new language now, we just need to learn the syntax.

Difficult challenges are a treat to the logical brain! Need to start reading about Neural Networks now... happy learning :)