---
title: "Is machine learning hard? Not always - The Intercom Blog"
description: "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."
---

# Is machine learning hard? Not always - The Intercom Blog

[Intercom](https://yomu.fyi/company/intercom) · Oct 13, 2026

**Type:** Explainer

## 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.

**Tags:** [Machine Learning](https://yomu.fyi/topic/machine-learning), [Recommendation Systems](https://yomu.fyi/topic/recommendation-systems), [Ruby](https://yomu.fyi/topic/ruby)

- Source: [Intercom](https://www.intercom.com/blog/machine-learning-way-easier-than-it-looks)
- Source URL: https://www.intercom.com/blog/machine-learning-way-easier-than-it-looks
- Ingested by Yomu: 2026-10-13T18:00:40.144Z

[Read original post](https://www.intercom.com/blog/machine-learning-way-easier-than-it-looks)
