AI Foundation Series: The Day I Realised Everything is a Number

When we talk about Artificial Intelligence, we usually jump straight to talking about “thinking machines” or digital brains. But this week, as I sat down for my first 8-hour block of AI study, I realized the truth is much weirder and much more logical.

To an AI, my morning tea and a $500,000 house in California are essentially the same thing. They are just Vectors.

eucladian distance

The “Aha!” Moment: The Vector

Before an AI can “reason,” it has to “measure.” I learned that AI doesn’t “see” a house. It sees a list of features. In my first lab session using Google Colab, I represented two houses as simple lists of numbers, which programmers call Arrays.

  • House A: 3 bedrooms, 1500 sq. ft, 5 miles from downtown → [3, 1500, 5]
  • House B: 2 bedrooms, 800 sq. ft, 12 miles from downtown → [2, 800, 12]

In Python, it looks like this:

image

Calculating “Vibes” with Math

The most fascinating part of this first session was learning how AI determines if two things are “similar.” It doesn’t “feel” the vibe of the house; it calculates the Euclidean Distance.

Think back to high school geometry (the Pythagorean theorem). If you plot these houses on a graph, the distance between the two dots tells the AI how similar they are. If the distance is small, the houses are similar. If it’s huge, they are worlds apart.

I ran a quick calculation in my notebook:

image

The result? A “Difference Score” of 700.04.

The Takeaway

This was my first real lesson: AI is just high-speed geometry. Whether it’s Netflix recommending a movie or a self-driving car identifying a pedestrian, the underlying process is the same:

  1. Turn the world into a list of numbers (Vectors).
  2. Plot those numbers in a massive, invisible space.
  3. Calculate the distance between them.

My “Breaking” Experiment

To see how fragile this logic is, I tried a “stress test.” I created a third house with 5,000 bedrooms. Suddenly, the “distance” exploded. This taught me a vital lesson for next week: Data Cleaning. If I feed an AI “garbage” numbers, the geometry breaks, and the “brain” fails.

Next Week: I’ll be moving from comparing two houses to analyzing a dataset of 20,000 California homes. We’re going from simple math to actual Machine Learning.

image

Github Repo: https://github.com/ankitsrivastava/ai-foundation-series/blob/main/AI_foundation_Series.ipynb?short_path=5388780

1 thought on “AI Foundation Series: The Day I Realised Everything is a Number”

  1. Pingback: AI Foundation Series: The Ghost in the Data: My First 17,000 Houses - CareerFlow Academy

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top