Thoughts on CS7646: Machine Learning for Trading

The 2019 spring term ended a week ago and I’ve been procrastinating on how ML4T (and IHI) went. I’ve known all along that writing is DIFFICULT, but recently it seems significantly more so.

Perhaps its because I’ve noticed this blog has been getting a lot more traffic recently. This includes having Prof Thad Starner commenting on my post for his course on Artificial Intelligence. This has increased my own expectations of my writing, making it harder for me to start putting pen to paper.

To tackle this, I looked to the stoicism techniques (i) to decide if something is within my locus of control, and (ii) to internalise my goals. Is it within my control how much traffic my writing receives? No. Is it within my control how much feedback I get on my writing? No.

Instead, what is within my control is writing in a simple and concise to share my views on the classes, so others can learn from them and be better prepared when they take their own classes. This has been the goal from the start—I guess I lost track or forgot about it over time, and got distracted by other metrics.

With that preamble, lets dive into how the ML4T course went.

Why take the course?

My personal interest in data science and machine learning is sequential data, especially on people and behaviour. I believe sequential data will help us understand people better as it includes the time dimension.

In my past roles in human resource and e-commerce, I worked with sequential data to identify the best notifications to send a person. For example, you would suggest a phone case after a person buys a phone, but not a phone after a person buys a phone case. Similarly, in my current role in healthcare, a great way to model a patient’s medical journey and health is via sequential models (e.g., RNNs, GRUs, transformers, etc). I’ve found that this achieves superior results in predicting hospital admissions and/or disease diagnosis with minimal feature engineering.

Thus, when I heard about the ML4t course, I was excited to take it to learn more about sequential modelling—stock market data is full of sequences, especially when technical analysis was concerned. In addition, framing the problem and data from machine and reinforcement learning should provide useful lessons that can be applied in other datasets as well (e.g., healthcare).

Continue reading


Thoughts on CS6601: Artificial Intelligence

Happy holidays! Have just completed the exceptionally difficult and rewarding course on artificial intelligence, just as my new role involved putting a healthcare data product into production (press release here). The timing could not have been better. The combination of both led to late nights (due to work) and weekends completely at home (due to study).

Why take this course?

I was curious about how artificial intelligence would be defined in a formal education syllabus. In my line of work, the term “Artificial Intelligence” is greatly overhyped, with snake oil salesmen painting pictures of machines that learn on their own, even without any new data, sometimes, without data at all. There are also plenty of online courses on “How to do AI in 3 hours” (okay maybe I’m exaggerating a bit, it’s How to do AI in 5 hours).

Against this context, I was interested to know how a top CS and Engineering college taught AI. To my surprise, it included topics such as adversarial search (i.e., game playing), search, constraint satisfaction, logic, optimzation, Bayes networks, just to name a few. This increased my excitement in learning about the fundamentals of using math and logic to solve difficult problems.

In addition, the course had a very good reviews (4.2 / 5, one of the highest), with a difficulty of 4.3 / 5, and average workload of 23 hours a week. Based on these three metrics, AI was rated better, more difficult, and requiring more time than Machine Learning, Reinforcement Learning, and Computer Vision—challenge accepted! It was one hell of a ride, and I learnt a lot. However, if I had to go back in time, I’m not sure if I would want to put myself through it again.

What’s the course like?

The course is pretty close to the real deal on AI education. Readings are based on the quintessential AI textbook “Artificial Intelligence”, co-authored by Stuart Russell and Peter Norvig. The latter is a former Google Search Director who also guest lectures on Search and Bayes Nets. Another guest lecturer is Sebastian Thrun, founder of Udacity and Google X’s self-driving car program. The main lecturer, Thad Starner, is an entrance examiner for the AI PhD program and draws from his industry experience at Google (where he led the Google Glass development) when structuring assignments.

Continue reading

Thoughts on CS7641: Machine Learning

I haven’t had time to write the past few months because I was away in Hangzhou to collaborate and integrate with Alibaba. The intense 9-9-6 work schedule (9am – 9pm, 6 days a week) and time-consuming OMSCS Machine Learning class (CS7641) left little personal time to blog.

Thankfully, CS7641 has ended, and the Christmas holidays provide a lull to share my thoughts on it.

Why take this class?

Why take another machine learning course? How will it add to my experience in applying machine learning on real world problems?

Truth be told, I am victim to imposter syndrome. Most of my machine learning knowledge and skills are self-taught, based on excellent MOOCs including those by Andrew Ng and Trevor Hastie and Rob Tibshirani. CS7641 provided an opportunity to re-visit the fundamentals from a different perspective (focusing more on algorithm parameter and effectiveness analysis).

Screen Shot 2017-12-27 at 22.00.16.png

Impact of the C parameter on SVM’s decision boundary

Additionally, CS7641 covers less familiar aspects of machine learning such as randomised optimisation and reinforcement learning. These two topics were covered at an introductory, survey level, and provided sufficient depth to understand how these algorithms work, and how to apply them effectively and analyse outcomes.

Screen Shot 2017-12-27 at 22.02.42.png

Effectiveness of randomised optimisation algorithms on the travelling salesman problem (randomised hill climbing, simulated annealing, genetic algorithm, MIMIC)

Continue reading

Thoughts on CS6476: Computer Vision

I recently completed my first course for the Georgia Tech OMSCSComputer Vision—and wanted to share some thoughts I had on it.

Why choose this course?

I recently built APIs for image classification and reverse image search using deep learning libraries. Through the process, I gained an understanding of how images work as a data structure, and how to apply machine learning on them to build useful data products.

Nonetheless, there was a yearning to get a more in-depth understanding of the fundamentals of working with images. In addition, there are plenty of other useful applications for image and video, and the course seemed to provide a broad overview.

What specific CV applications were covered?

The class covered several CV algorithms, and how to apply them to solve simple problems, including:

  • Detecting lines and circles, including counting the total value of currency (Hough)
  • Measuring depth from multiple images (Window-based stereo matching)
  • Detecting features to match images/stitch a panorama (Harris, SIFT, RANSAC)
  • Detecting movements of objects across multiple images (Optical flow)
  • Tracking movements of subjects in videos (Particle filters)
  • Classifying motion in videos (Motion history images)

Here’s an example of detecting circles to count the total value of coins in an image. The algorithm is built solely on Numpy while we used OpenCV libraries to draw circles.


Continue reading

Product Categorization API Part 3: Creating an API

This post is part 3—and the last—of the series on building a product classification API. The API is available for demo here. Part 1 and 2 are available here and here.

In part 1, we focused on acquiring the data, and cleaning and formatting the categories. Then in part 2, we cleaned and prepared the product titles (and short description) before training our model on the data. In this post, we’ll focus on writing a custom class for the API and building an app around it.

The desired end result is a webpage where users can enter a product title and get the top three most appropriate categories for it, like so.


Continue reading

Image search is now live!

After finishing the image classification API, I wondered if I could go further. How about building a reverse image search engine? You can try it out here: Image Search API

What is reverse image search?

In simple terms, given an image, reverse image search finds other similar images—this would be helpful in searching for similar looking products.

How do I use it?

“My son has this plushie he really likes, but I don’t know what the name is… How can I find similar plushies?”


Continue reading

Product Classification API Part 2: Data Preparation

This post is part 2 of the series on building a product classification API. The API is available for demo here: Part 1 available here; Part 3 available here.

In part 1, we focused on data acquisition and formatting the categories. Here, we’ll focus on preparing the product titles (and short description, if you want) before training our model.

Continue reading