Latest / CyberSecurity Summary / Data Science from Scratch: First Principles with Python
Transcript
- 0:00Speaker 1: Imagine you're managing a nationwide campaign, right, Okay, you have
- 0:05Speaker 1: this massive database, like a million potential voters, but you
- 0:09Speaker 1: only have the time and the budget to knock on
- 0:11Speaker 1: I don't know, ten thousand.
- 0:13Speaker 2: Doors, right, extremely limited resources.
- 0:15Speaker 1: Exactly, So how do you mathematically guarantee that you're knocking
- 0:18Speaker 1: on the exact right ones? Or or take a massive
- 0:22Speaker 1: retailer like Target.
- 0:23Speaker 2: Oh yeah, the famous pregnancy example.
- 0:25Speaker 1: Yes, how do they know a customer is pregnant and
- 0:28Speaker 1: can start sending them coupons for baby clothes before that
- 0:32Speaker 1: person has even told their own family.
- 0:34Speaker 2: I mean it sounds like corporate espionage or literal mind reading,
- 0:38Speaker 2: it really does, But it's actually just recognizing patterns in
- 0:41Speaker 2: you know, seemingly mundane data like unscented lotion purchases suddenly
- 0:46Speaker 2: correlating with a second trimester, or, in the case of
- 0:49Speaker 2: the twenty twelve Obama campaign, finding the exact combination of
- 0:53Speaker 2: demographic data and pass voting behavior that signals that a
- 0:57Speaker 2: person just needs a very slight nudge to actually show
- 0:59Speaker 2: up at the bulls, Which.
- 1:00Speaker 1: Is wild, right, because we see the end results of
- 1:02Speaker 1: these models every single day. You tap a glossy button
- 1:05Speaker 1: on a smartphone, a little progress bar spins, and an
- 1:09Speaker 1: app confidently tells you who to date, what to buy,
- 1:13Speaker 1: what movie to watch next.
- 1:14Speaker 2: Yeah, it's curated reality exactly.
- 1:16Speaker 1: There's this expectation of seamless magic. We like things to
- 1:20Speaker 1: be hidden behind a sleek interface.
- 1:22Speaker 2: Which is exactly why so many people get a massive
- 1:25Speaker 2: shock when they actually step into the discipline of data
- 1:28Speaker 2: science itself. Oh for sure, because that glossy interface it's
- 1:32Speaker 2: entirely stripped away. You are suddenly looking at a landscape
- 1:35Speaker 2: that is raw, messy and honestly totally unforgiving. Yeah, and
- 1:39Speaker 2: a concerning number of practitioners today are they're overly reliant
- 1:44Speaker 2: on shiny, prepackaged libraries.
- 1:46Speaker 1: The black boxes.
- 1:48Speaker 2: Exactly. They plug data into a black box, Yeah, and
- 1:50Speaker 2: they just trust whatever comes out, without having any idea
- 1:53Speaker 2: how the underlying engine actually functions.
- 1:55Speaker 1: Well, that is the exact trap we are dismantling today.
- 1:58Speaker 1: Welcome to our deep dive into Jowel gris Verus book
- 2:00Speaker 1: Data Science from Scratch First Principles with Python.
- 2:03Speaker 2: It's a fantastic text.
- 2:05Speaker 1: It really is. And our mission for this deep dive
- 2:08Speaker 1: is to basically throw out the automated frameworks. No massive
- 2:13Speaker 1: black box libraries doing the heavy lifting for us. We
- 2:16Speaker 1: are going to look at the raw.
- 2:18Speaker 2: Mechanics right down to the studs.
- 2:20Speaker 1: Exactly. By the end of our conversation, you are going
- 2:22Speaker 1: to understand how fundamental algorithms process information. We're moving from
- 2:27Speaker 1: basic data structures into the mechanics of visualization, all the
- 2:31Speaker 1: way down to the bare metal of linear algebra.
- 2:34Speaker 2: Because data science isn't about memorizing syntax to import a
- 2:38Speaker 2: machine learning library, right, It's about answering questions that no
- 2:41Speaker 2: one has even thought to ask yet. Yeah, and those
- 2:44Speaker 2: answers are buried in this massive glut of everyday information.
- 2:49Speaker 2: You can only extract them if you fundamentally understand the
- 2:51Speaker 2: tools you're holding.
- 2:52Speaker 1: Okay, let's unpack this because before we look at a
- 2:55Speaker 1: single line of actual code, the book sets up this
- 2:57Speaker 1: brilliant hypothetical sandbox for us to play in the startup. Yeah,
- 3:01Speaker 1: you've just been hired a data science sstor, which is
- 3:04Speaker 1: a fictional social network built exclusively for data scientists.
- 3:08Speaker 2: I mean, it's a great framing device. So on your
- 3:12Speaker 2: very first day, the VP of networking drops a massive
- 3:15Speaker 2: data dump on your desk as they do, right, and
- 3:18Speaker 2: gives you your first assignment identify the key connectors among
- 3:22Speaker 2: the users. But this data isn't sitting in some neat,
- 3:26Speaker 2: easily searchable database.
- 3:27Speaker 1: No it's not.
- 3:28Speaker 2: It is raw Python data structures. You get a list
- 3:31Speaker 2: of users where each person is represented by just a
- 3:34Speaker 2: simple dictionary.
- 3:35Speaker 1: Right. So I'm looking at this list in the book,
- 3:37Speaker 1: and it's just basic pairs. User ID zero is named hero,
- 3:40Speaker 1: User ID one is done, just raw text, yep. And
- 3:43Speaker 1: alongside that you get the friendship data. But it's not
- 3:46Speaker 1: a visual web of connections. It's just a list of
- 3:49Speaker 1: tuples exactly.
- 3:50Speaker 2: And a tuple is just an immutable or unchangeable sequence
- 3:53Speaker 2: of elements. In this case, it's just a pair of IDs. Okay,
- 3:56Speaker 2: So if you're as of friends with done, the data
- 3:58Speaker 2: just shows a tuple parenthesis zero coma one parenthesis. That
- 4:02Speaker 2: is your entire social graph. It's entirely abstract.
- 4:05Speaker 1: So if I'm tasked with finding the most important person
- 4:08Speaker 1: in this abstract graph, my immediate instinct is to just
- 4:13Speaker 1: I don't account who has the most tupuls with their
- 4:15Speaker 1: ID in it, just do a raw headcount.
- 4:17Speaker 2: And that is the concept of degree centrality. You're simply
- 4:19Speaker 2: asking who has the most direct connections, you sum them up,
- 4:23Speaker 2: sort the list, and whoever is at the top is
- 4:26Speaker 2: theoretically your most central figure.
- 4:28Speaker 1: But I'm looking at that and thinking that's just high
- 4:30Speaker 1: school popularity pretty much. Yeah, it's measuring who sits with
- 4:34Speaker 1: the most people at lunch. But does having a high
- 4:37Speaker 1: raw headcount actually make you the most critical node in
- 4:40Speaker 1: a flow of information?
- 4:41Speaker 2: It rarely does, and Grease highlights this exact flaw by
- 4:45Speaker 2: introducing an anomaly in the data Sciencestor.
- 4:47Speaker 1: Network right the Dune and Thor situation exactly.
- 4:50Speaker 2: So, if you look at the raw numbers, the user Done,
- 4:53Speaker 2: who is ID one, has three direct friends, but another
- 4:57Speaker 2: user Thor ID four, only has two. So if you
- 5:00Speaker 2: blindly run a degree centrality algorithm, it ranks Done as
- 5:04Speaker 2: more important than Thor.
- 5:05Speaker 1: Wait, but if I actually map out these connections visually,
- 5:09Speaker 1: Thor is sitting dead in the middle of a chasm.
- 5:11Speaker 1: He's the only link bridging two completely separate, isolated clusters
- 5:16Speaker 1: of users.
- 5:16Speaker 2: Precisely, if Done leads the network, his three friends can
- 5:20Speaker 2: still talk to each other through other paths WHOA. But
- 5:23Speaker 2: if Thor leads a network, it literally breaks in half.
- 5:26Speaker 2: The flow of information stops entirely. Thor is a bottleneck. Intuitively,
- 5:31Speaker 2: that makes him far more critical to the network than
- 5:33Speaker 2: Done despite having fewer direct friends.
- 5:36Speaker 1: So if I just used a prepackaged function that calculates popularity,
- 5:40Speaker 1: I would have handed my boss the wrong name on
- 5:41Speaker 1: day one.
- 5:42Speaker 2: You would have And that proves why you can't blindly
- 5:45Speaker 2: trust a default metric. You have to look at the
- 5:47Speaker 2: structure of the data. You have to build functions that
- 5:50Speaker 2: look at say mutual friends or shared interest. And to
- 5:53Speaker 2: build those functions you have to use the language, in
- 5:55Speaker 2: this case Python, But you don't just write Python. The
- 5:59Speaker 2: book Stress is right pythonic.
- 6:00Speaker 1: Code, which is a whole different mindset. And I noticed
- 6:02Speaker 1: the book adhees specifically to Python two point seven, which,
- 6:06Speaker 1: while it introduces some serious quirks into how we handle data.
- 6:09Speaker 2: Oh the division quirk.
- 6:11Speaker 1: Yes, if I open Python two point seven and type
- 6:14Speaker 1: five divided by two, it doesn't give me two point five.
- 6:16Speaker 1: It spits out two.
- 6:17Speaker 2: Because of how it handles integer division, it truncates the
- 6:21Speaker 2: decimal entirely unless you explicitly tell the environment to use
- 6:25Speaker 2: floating point math.
- 6:26Speaker 1: Which seems so counterintuitive.
- 6:29Speaker 2: It is you literally have to type from future import
- 6:31Speaker 2: division to make basic math behave the way human expects
- 6:35Speaker 2: it to. It's I mean, it's a harsh reminder that
- 6:38Speaker 2: the underlying environment shapes the reality of your data.
- 6:41Speaker 1: That feels incredibly rigid, but honestly not as rigid as
- 6:43Speaker 1: white space formatting. Oh yeah, I'm used to seeing code
- 6:46Speaker 1: wrapped in curly braces or having explicit end statements, but
- 6:50Speaker 1: Python relies entirely on indentation.
- 6:52Speaker 2: Right. It forces you to write readable code. There's no
- 6:55Speaker 2: visual clutter. But the trade off is that it's strictly enforced.
- 6:59Speaker 1: Meaning if you mess up a space.
- 7:01Speaker 2: If you're copying and pasting a block of logic to analyze, say,
- 7:04Speaker 2: user salaries, and you have one accental space, the entire
- 7:08Speaker 2: script crashes. It forces discipline, but the reward for that
- 7:12Speaker 2: discipline is access to incredibly elegant tools right out of
- 7:16Speaker 2: the box, things like default, picked encounter.
- 7:19Speaker 1: Okay, let's start there, because I want to understand the
- 7:21Speaker 1: mechanics of why these are so vital. Let's say my
- 7:24Speaker 1: next task at data Sciencestor is to figure out what
- 7:28Speaker 1: our users care.
- 7:29Speaker 2: About, Okay, finding their interests?
- 7:31Speaker 1: Right, I want to count how many times specific words
- 7:34Speaker 1: show up in their profile bios words like hadoop or
- 7:38Speaker 1: psychic learn. If I use a standard Python dictionary to
- 7:41Speaker 1: keep a running tally, how does that actually execute?
- 7:44Speaker 2: It's incredibly clunky. A standard dictionary throws a literal error
- 7:48Speaker 2: if you try to modify a key that doesn't exist yet.
- 7:50Speaker 2: Oh really yeah, So as your program reads the word
- 7:53Speaker 2: hadoop for the very first time, you have to write
- 7:55Speaker 2: logic that says, check if hadoop is in the dictionary.
- 7:58Speaker 2: It isn't. Okay, create the key hadoop and set the
- 8:01Speaker 2: value to one.
- 8:01Speaker 1: That sounds exhausting.
- 8:03Speaker 2: It is. Oh look, the next word is hadoop again.
- 8:05Speaker 2: Check if it exists, yes, okay, increment the value by one.
- 8:10Speaker 1: You are writing multiple lines of repetitive safety checks just
- 8:12Speaker 1: to count words. That seems like a massive waste of
- 8:15Speaker 1: processing time and just human effort.
- 8:18Speaker 2: It totally is enter default dict. It intercepts that missing
- 8:22Speaker 2: key error. If you ask it to modify hodup and
- 8:25Speaker 2: a dupe isn't there, It gracefully creates it on the fly,
- 8:29Speaker 2: assigns it a default value like zero, and then lets
- 8:33Speaker 2: your code increment it. It removes all the boilerplate safety
- 8:36Speaker 2: checks that.
- 8:37Speaker 1: Is so much cleaner, and then counter takes that a
- 8:40Speaker 1: step further.
- 8:40Speaker 2: Right, Yes, counter is a subclass designed specifically for this
- 8:44Speaker 2: exact problem. You just handed a raw list of a
- 8:47Speaker 2: million words, and in one single line of code, it
- 8:50Speaker 2: absorbs the list and spits out a map dictionary of frequency.
- 8:54Speaker 1: It transforms a multi step, error prone loop into a
- 8:57Speaker 1: single elegant command exactly. Oh wait, you just casually mentioned
- 9:01Speaker 1: a list of a million words. When we're dealing with
- 9:03Speaker 1: data at scale, moving a million items around has to
- 9:06Speaker 1: cause problems, huge problems. Like if I try to assign
- 9:09Speaker 1: a list of a million numbers to a variable, Python
- 9:12Speaker 1: is literally allocating memory for all one million of those
- 9:15Speaker 1: numbers instantly, right correct, And if.
- 9:17Speaker 2: Your data set is large enough, your machine will completely choke.
- 9:21Speaker 2: It runs out a RAM and crashes. This is where
- 9:24Speaker 2: the book introduces the concept of lazy.
- 9:27Speaker 1: Evaluation using generators.
- 9:29Speaker 2: Specifically using generators.
- 9:31Speaker 1: I always picture this well, it's like watching a movie.
- 9:34Speaker 1: If I use a standard list, it's like downloading a
- 9:37Speaker 1: massive four K movie file to my hard drive. I
- 9:40Speaker 1: can't watch a single second of it until the entire
- 9:42Speaker 1: one hundred gigabyte file is sitting in my memory.
- 9:45Speaker 2: That's a perfect analogy, but.
- 9:46Speaker 1: A generator is like streaming it. I'm just pulling the
- 9:48Speaker 1: exact frame I need, exactly when I need it, and
- 9:51Speaker 1: then discarding it to make room for the next frame.
- 9:53Speaker 2: That is an excellent way to visualize it. A generator
- 9:56Speaker 2: yields values one at a time. It pauses its state,
- 10:00Speaker 2: waits for you to ask for the next value, and
- 10:02Speaker 2: only computes what is strictly necessary in that moment.
- 10:05Speaker 1: Which is incredibly memory efficient. Extremely Okay, But if streaming
- 10:09Speaker 1: is so much lighter on my system, why am I
- 10:11Speaker 1: ever downloading the file? Like? Why wouldn't I use a
- 10:14Speaker 1: generator for absolutely everything in my data pipeline?
- 10:17Speaker 2: Ah? Because a generator is ephemeral. You can only iterate
- 10:20Speaker 2: through it once.
- 10:21Speaker 1: Wait, really, once I read it, it's just gone.
- 10:24Speaker 2: Exactly. If you have a massive data set of user
- 10:27Speaker 2: interactions and you need to loop through it to find
- 10:30Speaker 2: the average, and then loop through it again to find
- 10:32Speaker 2: the standard deviation, a generator will be completely exhausted after
- 10:36Speaker 2: that first pass.
- 10:37Speaker 1: Oh wow, I didn't realize that.
- 10:39Speaker 2: Yeah, you would have to recompute the entire stream from
- 10:41Speaker 2: scratch for the second pass. So the engineering challenge is
- 10:45Speaker 2: constantly balancing memory efficiency against how many times you actually
- 10:49Speaker 2: need to interact with that specific data set.
- 10:51Speaker 1: Okay, all of this, the dictionaries, the generators, it's beautiful logic.
- 10:56Speaker 1: But all of these elegant Python tools are really just
- 10:59Speaker 1: for us, the develops. Sure, if I take a default
- 11:01Speaker 1: dict full of raw frequencies and drop it on the
- 11:04Speaker 1: VP of networking's desk, their eyes are going to glaze over.
- 11:07Speaker 1: You have to translate those numbers into a visual space, which.
- 11:10Speaker 2: Brings us to the visual translation layer matt plotlib.
- 11:13Speaker 1: The book touches on the standard toolkit, you know, bar
- 11:17Speaker 1: charts for buckets of discrete data, line charts for continuous trends,
- 11:21Speaker 1: scatterplots for pairing two variables together to see if they correlate.
- 11:25Speaker 1: The basics, right, but we don't need to dwell on
- 11:27Speaker 1: what a line chart is. What's interesting is that the
- 11:31Speaker 1: book spends a very specific amount of time warning the
- 11:33Speaker 1: reader about the mechanics of visual deception.
- 11:36Speaker 2: Yes, the trap of the misleading act axis. Yeah, when
- 11:39Speaker 2: you're translating raw numbers into a visual space, you are
- 11:41Speaker 2: essentially creating a narrative, and that narrative is incredibly easy
- 11:45Speaker 2: to manipulate.
- 11:46Speaker 1: Here's where it gets really interesting. The example Groose uses
- 11:49Speaker 1: is brilliant. Let's say we are tracking how many times
- 11:52Speaker 1: the phrase data science is mentioned on user profiles YEP.
- 11:55Speaker 1: The data shows that in twenty thirteen there were five
- 11:58Speaker 1: hundred mentions. In twenty fourteen there were five hundred and
- 12:01Speaker 1: five mentions.
- 12:02Speaker 2: That is an increase of exactly five Right.
- 12:04Speaker 1: So if you plot those two bars on a chart
- 12:06Speaker 1: and you start your YAG access at zero, the difference
- 12:09Speaker 1: between five hundred and five oh five is basically imperceptible.
- 12:12Speaker 2: It looks like a flatline. The narrative there is growth
- 12:15Speaker 2: has completely stagnated.
- 12:17Speaker 1: But what if I want my boss to think I'm
- 12:18Speaker 1: doing an amazing job growing the platform. I go into
- 12:22Speaker 1: my plotting tool and I manually force the axis to
- 12:25Speaker 1: start at four ninety nine and end at five.
- 12:26Speaker 2: Oh six, And suddenly the twenty fourteen bar is towering
- 12:30Speaker 2: over the twenty thirteen bar. It visually implies this massive
- 12:35Speaker 2: explosive increase.
- 12:37Speaker 1: It's the visual equivalent of taking a photo of a puddle,
- 12:40Speaker 1: cropping it incredibly tight so you can't see the edges,
- 12:43Speaker 1: and trying to convince the viewer it's the ocean.
- 12:45Speaker 2: That's exactly what it is.
- 12:46Speaker 1: If it is that easy to lie with data. How
- 12:49Speaker 1: can anyone trust a chart in a corporate presentation.
- 12:52Speaker 2: Well, what's fascinating here is this vulnerability is exactly why
- 12:56Speaker 2: the premise of the book is so vital. How So,
- 12:58Speaker 2: when you use black box visualization libraries, they often auto
- 13:02Speaker 2: scale the axes based on the minimum and maximum values
- 13:05Speaker 2: of the data provided. Oh, I see a tool might
- 13:08Speaker 2: automatically crop the access to four ninety nine without any
- 13:11Speaker 2: malicious intent, just to save space on the screen.
- 13:13Speaker 1: So the software might accidentally lie to.
- 13:15Speaker 2: Me, yes, or a human might do it intentionally to
- 13:18Speaker 2: sell you a false narrative. But when you learn Matt
- 13:21Speaker 2: plotlib from scratch and you physically write the code to
- 13:24Speaker 2: define the axis limits, you see how it works exactly.
- 13:28Speaker 2: You internalize the mechanics of how the visual is constructed.
- 13:31Speaker 2: You train your brain to instantly look at the axis
- 13:35Speaker 2: before you let the shape of the line influence your judgment.
- 13:38Speaker 2: You're basically immunizing yourself against bad data science.
- 13:41Speaker 1: I love that immunizing yourself, But I want to push
- 13:43Speaker 1: deeper into the actual geometry of what we're doing here.
- 13:46Speaker 2: Okay, let's do it.
- 13:46Speaker 1: When we take two variables. Let's say we're plotting a
- 13:50Speaker 1: user's number of friends against the minutes they spend on
- 13:53Speaker 1: the site. Every day we put a dot on a
- 13:56Speaker 1: scatter flot, we are essentially placing a vector in a
- 13:59Speaker 1: mathematic space.
- 14:00Speaker 2: Correct and to truly grasp how algorithms find patterns in
- 14:04Speaker 2: that space, we have to strip away the Python syntax,
- 14:08Speaker 2: strip away the visual charts, and look at the hidden
- 14:10Speaker 2: architecture that runs the entire.
- 14:12Speaker 1: Discipline, which is linear algebra.
- 14:15Speaker 2: The dreaded linear algebra.
- 14:16Speaker 1: That is the phrase that makes half the room breakout
- 14:18Speaker 1: in a cold sweat.
- 14:19Speaker 2: I know, I know.
- 14:20Speaker 1: But abstractly, vectors are just objects that can be added
- 14:23Speaker 1: together or multiplied by scalers to form new vectors.
- 14:27Speaker 2: And concretely, for our purposes anyway, there are simply points
- 14:30Speaker 2: in a finite dimensional space. Representing user data as vectors
- 14:35Speaker 2: is the foundational trick of machine learning. The text gives
- 14:38Speaker 2: a very grounding example a person's physical attributes. You have
- 14:43Speaker 2: a list of three numbers seventy one, seventy and.
- 14:46Speaker 1: Forty meaning seventy inches tall, one hundred and seventy pounds,
- 14:49Speaker 1: and forty years.
- 14:50Speaker 2: Old exactly, And Python is just a list. But mathematically
- 14:54Speaker 2: it is a single coordinate in three dimensional space.
- 14:57Speaker 1: Okay, so I have this coordinate. But the book forces
- 14:59Speaker 1: a to actually do math with these lists from scratch.
- 15:02Speaker 1: If I want to add two user vectors together, I
- 15:05Speaker 1: can't just put a plus sign between two Python lists.
- 15:08Speaker 2: No, it doesn't work like that. By thought would just
- 15:10Speaker 2: stick the two lists together and in right.
- 15:12Speaker 1: So the book introduces the zip function. Walk me through
- 15:14Speaker 1: the mechanics of that.
- 15:15Speaker 2: Vectors must be added component wise. The first element of
- 15:18Speaker 2: vector A adds to the first element of vector B.
- 15:22Speaker 2: So if vector A is one two and vector B
- 15:24Speaker 2: is two one, the zip function acts like a physical zipper.
- 15:29Speaker 2: It takes the first element from both lists, the one
- 15:31Speaker 2: and the two, and binds them into a pair. Then
- 15:34Speaker 2: it takes the second elements the two in the one
- 15:36Speaker 2: and binds them.
- 15:37Speaker 1: And once they're paired up, the book uses a list
- 15:39Speaker 1: comprehension to iterate through those pairs, add them together, and
- 15:43Speaker 1: spit out a new vector three three.
- 15:46Speaker 2: From there you build a function for the dot product,
- 15:49Speaker 2: which is just multiplying those matching pairs and summing up
- 15:52Speaker 2: the total.
- 15:52Speaker 1: Let me stop you right there, because I understand the
- 15:55Speaker 1: mechanics of what you just described, But why are we
- 15:58Speaker 1: doing it? Why does an algorithm care about the sum
- 16:01Speaker 1: of multiplied components.
- 16:03Speaker 2: Because the dot product gives you the magnitude of a vector,
- 16:06Speaker 2: and more importantly, it allows you to calculate the angle
- 16:09Speaker 2: between two vectors.
- 16:10Speaker 1: And why does the angle matter?
- 16:12Speaker 2: This is how algorithms determine similarity. If you plot the
- 16:15Speaker 2: interest of two users as massive vectors, and you calculate
- 16:18Speaker 2: the cosine of the angle between them using the dot product,
- 16:21Speaker 2: the math tells you exactly how similar those two people are.
- 16:24Speaker 2: A small angle means their vectors are pointing in the
- 16:27Speaker 2: exact same direction. They like the exact same things. That
- 16:31Speaker 2: is literally how Acupid knows who you should date.
- 16:34Speaker 1: That is fascinating, But I have to be completely honest here.
- 16:38Speaker 1: I'm looking at the sheer amount of code it takes
- 16:40Speaker 1: to build a vector ad function from scratch using zip
- 16:44Speaker 1: and list comprehensions. Highly optimized libraries like numpi can execute
- 16:50Speaker 1: vector addition across millions of data points in a fraction
- 16:53Speaker 1: of a millisecond.
- 16:54Speaker 2: Well absolutely so, groose.
- 16:55Speaker 1: Forcing us to manually zip lists together feels a bit
- 16:59Speaker 1: like hazing. Are we doing this?
- 17:01Speaker 2: It's a fair question, but think of it this way.
- 17:03Speaker 2: If you don't understand basic arithmetic, a pocket calculator seems
- 17:07Speaker 2: like a magic box. You punch in some numbers and
- 17:09Speaker 2: it spits out the truth, right. But if you accidentally
- 17:12Speaker 2: hit the division key instead of the multiplication key, the
- 17:15Speaker 2: calculator will spit out a completely absurd answer.
- 17:17Speaker 1: And because I don't intuitively understand the math, I wouldn't
- 17:20Speaker 1: even realize the answer is absurd. I'd just trust the
- 17:23Speaker 1: screen exactly.
- 17:25Speaker 2: Relying on numbpi without understanding linear algebra is the exact
- 17:30Speaker 2: same danger, but on a massive scale. When everything works,
- 17:34Speaker 2: you're fine. But what happens when you encounter the curse
- 17:38Speaker 2: of dimensionality? The what the cursive dimensionality? What happens when
- 17:42Speaker 2: you're dealing with data in one hundred dimensions and the
- 17:44Speaker 2: distance between all your points mathematically approaches uniformity, breaking your
- 17:50Speaker 2: predictive model.
- 17:51Speaker 1: The black box isn't going to tell me why it broke.
- 17:53Speaker 2: No, it won't, And because you don't understand the arithmetic
- 17:56Speaker 2: of the vector space, you won't know how to fix it.
- 17:59Speaker 2: You won't realize as your data is behaving absurdly, building
- 18:02Speaker 2: it from scratch builds your mathematical intuition. It ensures you
- 18:06Speaker 2: remain the mechanic, not just a passenger.
- 18:08Speaker 1: That perfectly encapsulates this entire journey. I mean, we started
- 18:11Speaker 1: today looking at a raw, confusing data dump from data Sciencestor.
- 18:16Speaker 1: We realized that default metrics like degree centrality can completely
- 18:19Speaker 1: blind us to the actual structural reality of a network.
- 18:22Speaker 2: We tamed that raw data using the strict elegance of
- 18:25Speaker 2: Python learning, the mechanical advantage of tools like default dick
- 18:29Speaker 2: to skip boilerplate logic, and lazy generators to keep our
- 18:33Speaker 2: systems from crashing under the weight of massive lists.
- 18:35Speaker 1: We took those insights and visualized them, digging into the
- 18:38Speaker 1: mechanics of the axis so we could actively defend ourselves
- 18:41Speaker 1: against manipulated narratives. Yes, and finally, we translated our users
- 18:46Speaker 1: into mathematical vectors, exploring the literal architecture of similarity that
- 18:51Speaker 1: powers every recommendation engine on Earth.
- 18:53Speaker 2: Knowing these first principles is your shield. Whether you were
- 18:57Speaker 2: analyzing your own company's user behavior preparing for a high
- 19:00Speaker 2: level strategy meeting, We're just trying to navigate a world
- 19:03Speaker 2: driven by algorithms. Understanding the how protects you against the hype.
- 19:08Speaker 1: I want to leave you with a final thought to
- 19:10Speaker 1: chew on something that stretches beyond the scope of Python
- 19:12Speaker 1: two point seven. Okay, we've spent this entire deep dive
- 19:16Speaker 1: manually building these models so we can truly comprehend the
- 19:19Speaker 1: how and the why. When we talk about a three
- 19:22Speaker 1: dimensional vector of height, weight, and age, our human brains
- 19:26Speaker 1: can picture it. We can imagine that dot floating in
- 19:29Speaker 1: a room.
- 19:30Speaker 2: But the bleeding edge of this field isn't operating in
- 19:32Speaker 2: three dimensions exactly.
- 19:34Speaker 1: Modern neural networks and depth learning systems are analyzing patterns
- 19:38Speaker 1: across millions of dimensions simultaneously.
- 19:40Speaker 2: Yeah, it's unfammable.
- 19:41Speaker 1: They are finding mathematical correlations in vector spaces that no
- 19:45Speaker 1: human mind can actually visualize or comprehend. So the provocative
- 19:49Speaker 1: question is this, as these self learning algorithms become infinitely
- 19:54Speaker 1: more complex, will we eventually reach a threshold where even
- 19:58Speaker 1: the mechanics, the people who build system from absolute scratch,
- 20:02Speaker 1: can no longer truly understand the why behind the insights
- 20:06Speaker 1: the machine produces.
- 20:07Speaker 2: We're moving from an era of tools we fully comprehend
- 20:10Speaker 2: to an era of intelligences we merely point in a direction.
- 20:14Speaker 1: We might end up right back where we started on
- 20:15Speaker 1: day one, staring at an unimaginably massive humming engine block
- 20:21Speaker 1: and having absolutely no idea why it's moving. Thank you
- 20:24Speaker 1: for joining us on this deep dive into the foundations
- 20:26Speaker 1: of data science.