Posts

How to Calculate a Vector's Magnitude (The Easy Way)

Image
How to Calculate a Vector's Magnitude (The Easy Way) Alright, so in our last video and post , we established that a simple list of numbers, like [3, 4] , is actually a vector with a magnitude (length) and a direction. It’s the fundamental building block of machine learning. So, how do we actually figure out its length? The good news is, we already know how to do it. Watch the video below for a quick visual explanation, then read on for the code and details. The Intuition: It’s Just a Triangle Let's go back to our vector v = [3, 4] . Visually, it’s an arrow pointing from the origin to the point (3, 4). If we draw a line down from that point to the x-axis, we create a simple right-angled triangle. The base is 3 units, the height is 4 units. The vector is the hypotenuse. We can find the length of the hypotenuse using the Pythagorean Theorem, which you probably remember from school  a² + b² = c² So, the magni...

What is a Vector? The True Building Blocks of Machine Learning

Image
What is a Vector? (From a Developer's Perspective) As a developer, you use arrays and lists every single day. But what if I told you that a simple list, like [3, 4] , is the single most important object in all of machine learning? We call it a vector , and today, we're going to decode what that really means. This is the first post in our foundational series on the math behind machine learning. Watch the video below for a quick visual introduction, then read on for a deeper dive into the code and concepts. From a Point to an Arrow Let's take our list, [3, 4] . On a simple 2D graph, this represents a point: 3 units to the right on the x-axis, and 4 units up on the y-axis. But when we treat this as a vector, it’s not just a point. We think of it as an arrow starting from the origin at (0,0) and pointing directly to that point. This is the key difference. A simple list [3, 4] becomes a vector when we thin...

What are the Measures of Variability in Statistics?

What are the Measures of Variability in Statistics? Data is everything in AI today. Knowing the middle value—like mean or median—is good, but we also need to know how much the data spreads. Let's take a look about different measures of variability: range, variance, standard deviation, and interquartile range. This is in continuation to understanding Central Tendency of data (If you have not already read that post, Have a quick look at “ What is Central Tendency? ”).  What is Variability? Variability shows how far data points are from each other or the center. For example, If we say a data set has a mean of 11.4 doesn’t tell us if numbers are close to it or all over. In AI, spread matters—big swings might mean bad data for a model. For example, In any application different job run times spread could show system issues. We measure variability with: Range Variance Standard Deviation Interquartile Range Let’s use...

What is Computer Vision?

What is Computer Vision? AI’s Eyes Explained Computer vision’s how AI sees—turning pixels into meaning. It’s behind self-driving cars, face unlocks, even OCR on your scanner. Welcome to Decoding Complexities . This post digs into what computer vision is, how it works with neural networks, and why it matters.  No fluff—let’s break down the tech and see it in action. Computer Vision Basics Computer vision’s a chunk of AI that processes images or video—think eyes for machines. It’s not just snapping pics; it’s understanding them. Pixels go in—numbers representing color or brightness—and AI spits out labels like “cat” or “stop sign.” Key tasks it handles: Image classification—tag a pic as “dog” or “car.” Object detection—spot and box multiple things in one frame. Segmentation—outline exact shapes, pixel by pixel. It’s deep learning’s playground—neural networks crunch the data. Let’s see how. How It Works: Th...

What is Central Tendency? And, How do we measure it?

What is Central Tendency? In the age of Artificial Intelligence, World revolves around data. Understanding the data is a key. When working with numerical data, at times we would want to represent whole data set with a single value (like average of the data) that we may call "Central Value" or "Middle Value". How do we measure Central Value or Central Tendency? There are different ways to measure the central value of the data provided. This could vary depending on the how we want to look at the data. Like, Do we need to calculate an average of the data? Do we need to split the data into two equal parts? Do we need to identify the value that occurred most of the time in data? Based on what we need to look at, Below are the different measures. Mean Median Mode Let's now look at what each measure is and how do we calculate mean with an example. Mean Mean ...

What is Deep Learning? Beyond the Basics of AI

What is Deep Learning? Beyond the Basics of AI AI’s everywhere—unlocking your phone, suggesting playlists, even driving cars. But how does it get *so* smart? Enter deep learning—a game-changer in artificial intelligence. Welcome to Decoding Complexities , where we unravel tech’s toughest puzzles. If you read “What Are Neural Networks?” you’ve brushed against this. Now, we’re going deeper. In this post, we’ll decode what deep learning is, how it powers AI’s wildest feats, and why it’s more than just buzz. From self-driving Teslas to ChatGPT, it’s the engine behind the magic. Let’s break it down—ready? Deep Learning: The Basics Deep learning (DL) is a subset of machine learning—itself a chunk of AI. Remember neural networks from my last post? DL cranks them up—think neural networks on steroids. It’s all about *deep* neural networks—piles of layers that dig into data to find patterns no human could spot. Here’s the gist: More Layers: Regula...

Load All Subfile

Load All Subfile in IBM i: Decoding a Classic Subfiles are a core concept in IBM i programming—built for showing multiple records on a screen fast. Load All Subfile is a workhorse type every coder should know. Welcome to Decoding Complexities . This post breaks down what Load All is, how it runs, and throws in a full free-format RPGLE example to prove it. No nonsense—let’s get into the mechanics, quirks, and code. Subfile Rundown Subfiles in IBM i handle lists or tables on green screens—think RPG and DDS at their best. Three types dominate: Load All Subfile—dumps everything at once. Expandable Subfile—loads on demand ( example here ). Single Page Subfile—one page, no extras. Message Subfiles show alerts— more here . Load All’s the focus today—simple, heavy, and worth decoding. Load All Subfile: The Mechanics Load All Subfile writes all records to the buffer upfront, then displays them. SFLSIZ (buffer size...