IntercomExplainer
Is machine learning hard? Not always - The Intercom Blog
Summary
The post argues that machine learning does not always require advanced mathematics and, as described by Intercom’s Fergal Reid, is about systems that improve with more training data. It contrasts a naive keyword-matching approach in Ruby for a ‘You might also like’ feature, which produced irrelevant results, with a basic machine learning method using K-Means clustering. The machine learning approach first represents each blog post as a binary vector indicating the presence of each word from the entire corpus. The K-Means algorithm then iteratively assigns each post to the nearest cluster center and recalculates centers as the average of assigned posts until assignments stabilize. The post demonstrates that roughly 40 lines of Ruby code can produce relevant recommendations and encourages readers to try libraries like Scikit Learn.
Context
The post targets developers who are intimidated by machine learning and shows a practical example of using K-Means clustering to recommend related blog posts, contrasting it with a naive keyword-matching approach.
Approach / What changed
Represent blog posts as binary vectors indicating word presence, then apply the K-Means clustering algorithm to group similar posts and use cluster membership for recommendations.
Takeaways
Machine learning can be applied to well-defined problems where performance improves with more training data, without requiring advanced mathematics.
A simple K-Means clustering algorithm, implemented in about 40 lines of Ruby, can produce relevant content recommendations by clustering binary word-presence vectors.
The K-Means algorithm iteratively assigns items to the nearest cluster center and recalculates centers as the average of assigned items until assignments stabilize.
FAQ
What is the K-Means clustering algorithm?
K-Means is an algorithm that groups data points into K clusters by iteratively assigning each point to the nearest cluster center and recalculating centers as the average of assigned points until assignments stop changing.
How can I represent text data for machine learning?
You can represent each document as a binary vector where each element indicates the presence (1) or absence (0) of a word from the entire corpus, allowing mathematical operations like distance calculation.
What resources can help get started with machine learning?
The post recommends Python's Scikit Learn library, the book 'Programming Collective Intelligence' by Toby Segaran, and Andrew Ng's Coursera course.
Source and freshness
- Source
- intercom.com
- Published
- Added to Yomu
Summaries are generated from the original by a language model. Check the original before relying on it.
Keep reading
Related reading
The Good Stuff
Paid picks we use ourselves. Links carry a referral code — a subscription through one earns us a commission at no extra cost to you.
The best engineering reads, once a week
One useful email. Unsubscribe anytime.