<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by kipngeno koech on Medium]]></title>
        <description><![CDATA[Stories by kipngeno koech on Medium]]></description>
        <link>https://medium.com/@kkipngenokoech?source=rss-92206f27f3c4------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*nhoBMdEKlfaU3bbQVX26DA.jpeg</url>
            <title>Stories by kipngeno koech on Medium</title>
            <link>https://medium.com/@kkipngenokoech?source=rss-92206f27f3c4------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 00:06:12 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@kkipngenokoech/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[RECAP, Explained: How π*₀.₆ Turns Advantage Conditioning Into a VLA That Learns From Experience]]></title>
            <link>https://kkipngenokoech.medium.com/recap-explained-how-%CF%80-%E2%82%80-%E2%82%86-turns-advantage-conditioning-into-a-vla-that-learns-from-experience-bd3da2b2911f?source=rss-92206f27f3c4------2</link>
            <guid isPermaLink="false">https://medium.com/p/bd3da2b2911f</guid>
            <category><![CDATA[recaps]]></category>
            <category><![CDATA[reinforcement-learning]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[robotics]]></category>
            <category><![CDATA[deep-reinforcement]]></category>
            <dc:creator><![CDATA[kipngeno koech]]></dc:creator>
            <pubDate>Tue, 30 Jun 2026 12:28:00 GMT</pubDate>
            <atom:updated>2026-06-30T12:28:00.507Z</atom:updated>
            <content:encoded><![CDATA[<p>A technical walk through the method behind Physical Intelligence’s π*₀.₆ — the preliminaries, the distributional critic, and the advantage-conditioning objective — with the key equations explained plainly.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*izVRFPHlEslHUhF2DEzzAA.png" /></figure><p>Vision-language-action (VLA) models are usually trained by imitation, which caps them at the quality of their demonstrations and gives them no way to learn from their own failures. RECAP (RL with Experience and Corrections via Advantage-conditioned Policies) is Physical Intelligence’s recipe for breaking that ceiling: pre-train a generalist VLA with offline RL, then specialize it on-robot using autonomous rollouts and human corrections. The resulting model, π*₀.₆, folds laundry in real homes, assembles boxes, and makes espresso — more than doubling throughput and roughly halving failure rate on the hardest tasks.</p><p>This post focuses on how the method works, building from the RL preliminaries up to the actual training objective.</p><h3>1. The RL setup, precisely</h3><p>A policy π(aₜ | oₜ) is a distribution over actions aₜ given an observation oₜ. Rolling it out produces a trajectory:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/665/1*Vp70q5UDpXQcnhjYk9T_QQ.png" /></figure><p>an alternating sequence of observations and actions. Note the asymmetry: T+1 observations, T actions — the episode begins and ends on an observation.</p><p>The probability of a trajectory under the policy is the trajectory distribution, induced jointly by the policy and the environment’s dynamics p(oₜ₊₁ | oₜ, aₜ):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/987/1*aO2FK0xWtrK7_FB2aKbydQ.png" /></figure><p>Two sources of randomness interleave here — the policy (which you control) and the dynamics (which you don’t). The clean product form holds only under the Markov assumption that oₜ is a valid state; the paper flags this as a standard robotic-RL simplification, not literally true for a robot with occlusions and momentum.</p><p>A per-step reward r(oₜ, aₜ) = rₜ accumulates into the return R(τ) = Σₜ rₜ. The paper uses no discount factor (γ = 1) — its episodes are finite-horizon, so the sum converges without one, and it doesn’t want to artificially prefer earlier reward. The objective is expected return:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/558/1*4xbFRjlTqgohrPJX_sBx1A.png" /></figure><p>The thing to notice: π appears twice — inside R(τ) (better actions earn more reward) and inside ρπ (the policy also changes which trajectories occur). Optimizing π reshapes the very distribution you’re averaging over. That’s what makes RL harder than supervised learning.</p><p>The value function is expected reward-to-go from a state, Vπ(oₜ) = E[Σ_{t′≥t} r_{t′}], and the advantage measures how much a specific action beats that baseline, as an n-step estimate:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uCYdbsLD1RAELoYhBTP3UA.png" /></figure><p>Read it as (estimated return if you take aₜ) − (baseline value of being at oₜ). The N-step truncation — trust N real rewards, then bootstrap with V — is a bias/variance dial between pure Monte-Carlo (N→∞, unbiased, high variance) and one-step TD (N=1, low variance, biased).</p><h3>2. Regularized RL: the theoretical hook</h3><p>Pure reward maximization on a fixed dataset is dangerous: train many gradient steps and the policy drifts into regions the data can’t support, exploiting estimation errors. The fix is regularization — improve reward while staying close to a reference policy π_ref (typically the behavior policy that collected the data):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AGmp6RIssnq64YWpYiF_uQ.png" /></figure><p>β controls leash tightness. For KL divergence there’s the classic closed form:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/887/1*dXY7c_KZGO1SaoXyWsxBmw.png" /></figure><p>i.e. “the reference policy, reweighted toward high-advantage actions” (the basis of AWR/MARWIL/MPO).</p><p>RECAP uses a related, less common form. Define improvement probability p(I | A) = g(A)/∫g(A′)da′ for any monotonically increasing g, and set:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/873/1*w8EUhguC0TI7nphuN4xMOQ.png" /></figure><p>This π̂ carries a provable improvement guarantee: J(π̂) ≥ J(π_ref). That guarantee is the bedrock that lets RECAP loop safely. Finally, you project this closed form onto a trainable network by minimizing KL(π̂, π_θ).</p><h3>3. The distributional value function (the critic)</h3><p>RECAP represents Vπref as a multi-task distributional value function p_φ(V | oₜ, ℓ) over B = 201 discretized bins, conditioned on observation and language command ℓ. It shares the VLA’s architecture but uses a smaller VLM backbone.</p><p>Training turns value regression into classification: discretize the empirical return Rₜ(τ) = Σ_{t′≥t} r_{t′} into bins, then minimize cross-entropy. Why distributional rather than a single regressed number?</p><ul><li>Stability — cross-entropy classification is far more stable to optimize than regression at scale.</li><li>Uncertainty — a histogram can express “I’m unsure” (wide spread) vs. “confident” (sharp peak).</li><li>Multimodality — states that lead to either success or failure get two honest peaks instead of a misleading average.</li></ul><p>Concretely, the reward they use is steps-to-success, normalized to (−1, 0) with 0 = completion. So the critic predicts a distribution over time-to-completion — which is exactly why it “detects failures and judges expected time to task completion.”</p><p>Critical detail when scoring data: to get a scalar value from the histogram you take its expected value (probability-weighted mean of the bins), not the argmax / tallest bin. Taking the peak would throw away the spread the distributional critic exists to capture. The advantage then follows from the n-step formula — query the critic at oₜ and at o_{t+N}, add the real rewards in between, subtract. The advantage is computed, never read off as a bin.</p><p>So the representations compress in stages: distribution (critic output) → scalar (expected value) → advantage (a number) → tag (one bit).</p><h3>4. Policy extraction via advantage conditioning</h3><p>The method needs a policy-extraction step that (a) uses diverse off-policy data — demos, interventions, and rollouts from current and past policies; (b) scales to large VLAs, including flow-matching/diffusion action heads with no tractable log-likelihood; and (c) uses both good and bad data. Policy gradients fail (b); weighted regression (AWR/CRR) effectively discards much of the data via filtering. RECAP instead uses advantage conditioning: train on all data with plain supervised learning, but add an input indicating how optimal each action is.</p><p>Applying Bayes’ rule to the improvement probability gives an equivalent closed form (most closely related to CFGRL):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/959/1*FwBmIKDm4c-09lPwiQ_KYA.png" /></figure><p>For the special case β = 1 this collapses to simply π̂ = π_ref(a | I, o, ℓ). So you can represent the improved policy without ever explicitly modeling p(I | A) — you just need a policy that can produce actions both with and without the conditioning variable I. This is exactly the classifier-free guidance idea.</p><p>The conditioning variable is binary, defined by thresholding the advantage:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/694/1*jixXeUyQkUa-TQxlKgDdWA.png" /></figure><p>with a task-dependent threshold ε_ℓ. (The paper prefers tuning this threshold over tuning a test-time guidance weight β, since high CFG weights drive actions to the corners of their support and don’t affect the autoregressive part of the model.)</p><p>The policy objective is a classifier-free-guidance-style negative log-likelihood — modeling the action both unconditioned and conditioned on I:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mf6MaGdLjXCijGz68R82EA.png" /></figure><p>where α trades off the two terms. At inference, you condition on I = True to elicit the improved behavior.</p><p>A few implementation notes worth carrying:</p><ul><li>The dataset D_πref is everything — all demonstrations plus all autonomous attempts. So π_ref is a mixture of human behavior and previously deployed policies, and the advantage tag is what sorts good from bad across that mixture. Both critic and policy train on this full pool — the policy needs the labeled-bad rollout actions to give the tag meaning.</li><li>Human corrections are forced to I = True, on the assumption that expert interventions are always good actions — a cheap, high-quality signal injection.</li><li>π*₀.₆’s action head produces both discrete and continuous outputs (continuous via flow matching), so the real objective combines a likelihood for discrete tokens with the flow-matching objective for continuous actions.</li></ul><h3>5. The full method</h3><p>RECAP reduces to three subroutines (Algorithm 1), repeated:</p><ol><li>Collect autonomous rollouts (with optional expert corrective interventions), labeling outcomes.</li><li>Train the value function (Eq. 1, distributional cross-entropy).</li><li>Train the policy via advantage conditioning (Eq. 3).</li></ol><p>The only thing that changes between stages is the data fed to each subroutine. Pre-training runs steps 2–3 on the full demonstration dataset (tens of thousands of hours across many robots and tasks). Then each task’s specialist runs steps 1–3 with added autonomous data — specialists are fine-tuned from the pre-trained model, while the final generalist is trained from scratch on the union.</p><h3>Why the design choices line up</h3><p>Every piece earns its place against the three criteria:</p><ul><li>Diverse off-policy data → handled by training on the full pool with honest good/bad tags rather than filtering.</li><li>Scales to flow-matching VLAs → advantage conditioning needs no tractable log-likelihood ratio; it’s plain conditional supervised learning plus a flow-matching term.</li><li>Uses good and bad data → the binary indicator lets failures train the model as labeled negatives, instead of being discarded.</li></ul><p>The result is a self-improvement flywheel with a provable per-iteration improvement guarantee underneath it — which is what lets a VLA keep getting better from real-world deployment rather than plateauing at imitation quality.</p><p>Equations and framing follow the π*₀.₆ paper (Physical Intelligence, 2025); see the original for full implementation details, ablations, and experimental results.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bd3da2b2911f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How I Finally Understood “Robots That Learn From Experience”]]></title>
            <link>https://kkipngenokoech.medium.com/how-i-finally-understood-robots-that-learn-from-experience-5312f5d3a49a?source=rss-92206f27f3c4------2</link>
            <guid isPermaLink="false">https://medium.com/p/5312f5d3a49a</guid>
            <category><![CDATA[robotics]]></category>
            <category><![CDATA[reinforcement-learning]]></category>
            <category><![CDATA[world-action-models]]></category>
            <category><![CDATA[vla]]></category>
            <category><![CDATA[recaps]]></category>
            <dc:creator><![CDATA[kipngeno koech]]></dc:creator>
            <pubDate>Wed, 24 Jun 2026 09:03:33 GMT</pubDate>
            <atom:updated>2026-06-24T09:04:25.162Z</atom:updated>
            <content:encoded><![CDATA[<p><em>A plain-language walk through Physical Intelligence’s π*₀.₆ paper — no RL background required.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dQEIMpczvpvLdmqeasnTZg.png" /></figure><p>I spent an afternoon picking apart a robotics paper called <a href="https://arxiv.org/abs/2511.14759">π*₀.₆: a VLA That Learns From Experience</a>, from Physical Intelligence. It’s a dense paper, but the core idea is genuinely simple and kind of beautiful once it clicks. This is the explanation I wish I’d had at the start — built up one piece at a time, the way I actually came to understand it.</p><p>No equations until the very end, and even then only one. Just the intuition.</p><h3>The problem it’s trying to solve</h3><p>Most robots that use big “vision-language-action” models (VLAs — think of them as the robot equivalent of a chatbot, but the output is motor commands instead of text) are trained by <strong>imitation</strong>. You record a bunch of humans doing a task — folding laundry, making coffee — and the robot learns to copy them.</p><p>This works, but it hits a wall. Copying demonstrations means the robot is only ever as good as the demos, and it never learns from its <em>own</em> mistakes. If it fumbles a fold, nothing tells it “that was bad, do it differently.” It just keeps fumbling in the same way.</p><p>What you really want is a robot that gets <em>better the more it practices</em> — that learns from experience, including its own failures. That’s what this paper is about.</p><h3>First, what even is a “trajectory”?</h3><p>Before any of the clever stuff, you need one idea: the <strong>trajectory</strong>.</p><p>A trajectory is just the recording of one complete attempt at a task. The robot looks at the scene (an <em>observation</em>), takes an <em>action</em>, the world changes, it looks again, acts again — and this loop continues until the task ends. The trajectory is the full log of that: every observation and every action, in order.</p><p>The mental model I landed on: <strong>the robot is forgetful, the trajectory is the memory.</strong> When the robot decides what to do, it mostly just looks at what’s in front of it right now. But the trajectory keeps the whole story of what happened, start to finish. And that stored story is what you learn from <em>later</em>.</p><p>This matters because everything else is built on top of trajectories. One run of the robot = one trajectory. A hundred runs = a hundred trajectories.</p><h3>A subtle thing about data that tripped me up</h3><p>Here’s something I got wrong at first, and it’s worth slowing down on.</p><p>If you collect 100 episodes of your robot attempting a task, you have 100 trajectories. I assumed that <em>was</em> “the distribution” of behavior. It isn’t.</p><p>The 100 episodes are a <strong>sample</strong>. They’re like rolling a die 100 times and writing down the results. The underlying <em>rule</em> — “this robot, in this situation, tends to do X” — is the real distribution. Your 100 rolls are just evidence of it. Run the robot again and you’d get a different 100, even though the rule behind them is the same.</p><p>Why does this hair-splitting matter? Because the whole challenge of the paper is this: you collect data using one version of your robot, but you want to train a <em>better</em> version. So you’re always reasoning about a policy you don’t have data from yet, using data from a policy you’ve moved past. Keeping “the data” and “the rule that generated it” separate is what makes that make sense.</p><h3>The reward: how does the robot know what’s good?</h3><p>To learn from experience, the robot needs to know whether an attempt went well. That’s the <strong>reward</strong>.</p><p>The good news: you don’t need anything fancy. At its simplest, the reward is just a label on each attempt — <strong>did the task succeed or not?</strong> Success = 1, failure = 0. That single bit, attached to the end of an episode, is enough to get started.</p><p>In practice you record a bunch of the robot’s own attempts, and then someone labels each one. You can do this by hand (accurate but slow) or with an automated checker (scales but can be wrong). Early on, by hand is the safe choice — because everything downstream depends on these labels being right.</p><p>And here’s the thing I kept having to remind myself: <strong>the failures are the point.</strong> Demonstrations are all successes, so they can’t teach “don’t do that.” The robot’s own messy attempts — the ones where it drops the towel or knocks over the cup — are where the real learning signal lives. You <em>want</em> the failures in your data.</p><h3>The critic: turning one label into a thousand lessons</h3><p>There’s a gap, though. Your reward is one label at the <em>end</em> of an episode (“succeeded” or “failed”). But an episode is hundreds of little actions. How do you know <em>which</em> actions were the good or bad ones?</p><p>This is where the <strong>critic</strong> comes in. The critic is a second model — a smaller sibling of the robot’s brain — with a different job. Instead of deciding what to do, it looks at a situation and predicts: <strong>“from here, how likely is this to end well?”</strong></p><p>Think of it as a running “how’s it going?” gauge. As the robot works, the critic’s reading goes up when things look promising and drops when the robot makes a mess. That’s how a single success/fail label at the end gets spread back across every moment of the episode — the critic learns to predict the outcome <em>before</em> it happens.</p><p>Two things I found neat:</p><ul><li>The critic is trained on <strong>everything</strong> — the human demos <em>and</em> the robot’s own attempts, successes and failures all pooled together. It has to see both to learn the contrast between “going well” and “going badly.” A critic that only ever saw successful demos would think everything is fine, always.</li><li>It’s deliberately <strong>smaller</strong> than the main robot model. Judging “how’s it going?” is easier than deciding “what do I do next?”, so it doesn’t need to be as big.</li></ul><h3>The advantage: was that specific move better than average?</h3><p>Now the payoff. Once you have the critic, you can ask a sharper question about any individual action:</p><blockquote><em>Was this action </em><strong><em>better or worse than what the robot would normally do</em></strong><em> in that situation?</em></blockquote><p>That comparison is called the <strong>advantage</strong>. The critic tells you the “par for the course” from a given spot. The advantage measures how much a particular move beat that par, or fell short of it.</p><ul><li>Did better than expected → good move, do more of it.</li><li>Did worse → bad move, do less.</li></ul><p>The reason it’s a <em>comparison</em> rather than a raw score is what makes it useful. “I got a reward of 7” means nothing on its own — was 7 good? Only if you expected less than 7. The advantage strips out “how good the situation was” and isolates “how good your <em>choice</em> was.” That’s exactly the signal you want for getting better.</p><blockquote><em>A worry I had: if you train the critic on your data and then use that same critic to score the same data, isn’t that circular — won’t it just memorize? It feels like it, but it isn’t. The critic learns the </em>average<em> outcome at each situation; the advantage measures how a </em>specific<em> action deviates from that average. Those are different quantities. And funnily enough, if the critic </em>did<em> just memorize everything perfectly, the advantages would all collapse to zero and you’d get </em>no<em> signal — so overfitting here produces silence, not lies.</em></blockquote><h3>The actual trick: just tell the robot</h3><p>Here’s the move that made me sit back. You’ve now got, for every action in your data, a label: good or bad (advantage above a threshold, or not). What do you do with it?</p><p>The obvious idea is to throw away the bad actions and only train on the good ones. The paper does something cleverer: it <strong>keeps everything and just tells the robot the label.</strong></p><p>During training, every example gets tagged — “this action was good” or “this action was bad” — and that tag is fed to the robot as an extra input, like an added note on the instruction. The robot learns the association: <em>when the note says “good,” produce moves like these; when it says “bad,” those.</em></p><p>Then at runtime, you simply <strong>set the note to “good”</strong> and ask the robot to act. It produces the good behavior, because it learned what “good” looks like — including by contrast with what “bad” looks like.</p><p>This is why the failures were never wasted. The robot isn’t told to imitate the bad actions — it’s shown them <em>labeled as bad</em>. Mistakes become examples of what not to do, which is something pure imitation can never give you.</p><p>(One detail: the tag is just a single yes/no bit — “was this an improvement or not?” — not some elaborate score. Simple on purpose.)</p><h3>Putting it on a loop</h3><p>Stack all that up and you get a cycle that improves itself:</p><ol><li><strong>Run the robot</strong> on the task and record its attempts (ask for “good” behavior).</li><li>Optionally, let a human <strong>grab control mid-task to correct</strong> a mistake — those corrections are gold, and get marked “good” automatically.</li><li><strong>Label</strong> the attempts: success or failure.</li><li><strong>Retrain the critic</strong> on everything collected so far — now it has real failures to learn from.</li><li><strong>Re-tag and retrain the robot</strong> with the refreshed good/bad labels.</li><li><strong>Repeat.</strong></li></ol><p>Each lap, the robot gets a little better, which means it generates better (and differently-flawed) attempts, which sharpens the critic, which improves the robot again. That flywheel is the whole “learns from experience” promise.</p><p>And it works on genuinely hard things: in the paper, the fully-trained robot folds laundry in real homes, assembles boxes, and pulls espresso shots on a professional machine — <strong>doubling throughput and roughly halving the failure rate</strong> on the toughest tasks.</p><h3>The one equation, now that it’s harmless</h3><p>There’s a single formula at the heart of all this, and after the walk-through it reads like a sentence:</p><blockquote><strong><em>improved robot ≈ current robot, nudged toward the actions that beat the baseline.</em></strong></blockquote><p>That’s it. Everything else — the critic, the advantage, the good/bad tag, the loop — is machinery for computing that nudge safely from a pile of demonstrations and messy real-world attempts. The genius isn’t in any one piece; it’s in how cleanly they fit together so a robot can keep getting better the more it practices.</p><p><em>This is my own working understanding of the π*₀.₆ paper, written to make the ideas approachable. For the real thing — equations, experiments, and all — read the </em><a href="https://arxiv.org/abs/2511.14759"><em>original paper</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5312f5d3a49a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Aesop’s Fables The man, the boy & the donkey]]></title>
            <link>https://kkipngenokoech.medium.com/aesops-fables-the-man-the-boy-the-donkey-8c4b66246279?source=rss-92206f27f3c4------2</link>
            <guid isPermaLink="false">https://medium.com/p/8c4b66246279</guid>
            <category><![CDATA[stoicism]]></category>
            <category><![CDATA[tales]]></category>
            <category><![CDATA[fable]]></category>
            <category><![CDATA[aesops-fables]]></category>
            <category><![CDATA[aesop]]></category>
            <dc:creator><![CDATA[kipngeno koech]]></dc:creator>
            <pubDate>Fri, 21 Mar 2025 11:48:27 GMT</pubDate>
            <atom:updated>2025-03-21T11:48:27.391Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/506/1*zKqs_LGt29nbhCAsehvl1w.png" /></figure><p>A man and his son were taking their donkey to market when a passerby scoffed, “You fools! What’s a donkey for if not riding?”</p><p>Taking the hint, the man let his son hop on. But soon, a group of men sneered, “Look at that spoiled brat, making his poor father walk!”</p><p>Feeling judged, the man swapped places with his son. Not long after, two women clucked, “Shame on that lazy oaf! Letting his little boy trudge along like that.”</p><p>Now thoroughly confused, the man hoisted his son up onto the donkey with him. By the time they reached town, people pointed and laughed, “Have some mercy! That poor donkey is carrying both of you!”</p><p>At their wit’s end, the man and his son devised a <em>brilliant</em> solution: tie the donkey’s legs to a pole and carry it instead!</p><p>This, of course, drew even more laughter. But as they crossed a bridge, the donkey — understandably unimpressed — kicked free, sending itself tumbling into the river, where it drowned.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/495/1*nUxHhRMoD7N1D6JvZXbW6g.png" /></figure><p>An old man, shaking his head, chuckled, “Well, let that be a lesson: try to please everyone, and you’ll lose your donkey.”</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8c4b66246279" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[THE FIVE GOOD ROMAN EMPERORS]]></title>
            <link>https://kkipngenokoech.medium.com/the-five-good-roman-emperors-0a33b506bfb4?source=rss-92206f27f3c4------2</link>
            <guid isPermaLink="false">https://medium.com/p/0a33b506bfb4</guid>
            <category><![CDATA[stoicsm]]></category>
            <category><![CDATA[stoicism]]></category>
            <category><![CDATA[marcus-aurelius]]></category>
            <category><![CDATA[rome]]></category>
            <category><![CDATA[roman-emperors]]></category>
            <dc:creator><![CDATA[kipngeno koech]]></dc:creator>
            <pubDate>Mon, 03 Mar 2025 21:18:21 GMT</pubDate>
            <atom:updated>2025-03-03T21:18:21.572Z</atom:updated>
            <content:encoded><![CDATA[<h4>The Golden Age of Rome</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*egLES2H9YYMckwcBT9Dggw.jpeg" /></figure><p>The Roman Empire stood at a crossroads in the year <strong>96 CE</strong>. The tyrannical reign of Domitian had ended in bloodshed, leaving the Senate and the people yearning for stability. Into this uncertain moment stepped <strong>Nerva</strong>, an elderly senator with a quiet demeanor but a steely resolve. The Senate proclaimed him emperor, hoping he would restore order. Nerva, though not a military man, understood the need for unity. He pardoned political exiles, eased taxes, and, most importantly, made a decision that would shape the empire’s future: he adopted <strong>Trajan</strong>, a brilliant general from Hispania, as his successor. Nerva’s reign was short, but his wisdom in choosing a capable heir set the stage for a new era.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/984/1*Ae-Y0Q2LpuUfoFKmj23GZA.jpeg" /></figure><p><strong>The Conqueror: Trajan</strong></p><p>When Nerva died in 98 CE, Trajan ascended to the throne. He was a man of action, a soldier who had earned the loyalty of his troops. Unlike Nerva, Trajan was not content with mere stability - he sought to expand the empire to its greatest glory. He marched into Dacia (modern-day Romania), a land rich in gold and resources, and after years of fierce battles, he brought it under Roman control. The spoils of war funded grand projects in Rome, including the magnificent <strong>Trajan’s Forum</strong> and the towering <strong>Trajan’s Column</strong>, which still stands today, telling the story of his victories.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*VnpVSnZ_RAORgFhpTKynNg.jpeg" /></figure><p>Trajan was not just a conqueror; he was a builder and a leader who cared for his people. He implemented programs to feed the poor and improve infrastructure across the empire. When he died in 117 CE, the empire stretched from Britain to Mesopotamia, and Rome was at the height of its power.</p><p><strong>The Architect: Hadrian</strong></p><p>Trajan’s successor, <strong>Hadrian</strong>, was a different kind of ruler. Where Trajan had expanded, Hadrian sought to consolidate. He traveled tirelessly across the empire, inspecting its borders and fortifying its defenses. In Britain, he ordered the construction of <strong>Hadrian’s Wall</strong>, a massive barrier that marked the northern limit of Roman territory. In Rome, he rebuilt the <strong>Pantheon</strong>, creating a masterpiece of architecture that still inspires awe.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*2rSiBbbX_J26mZK53CS0MA.jpeg" /></figure><p>Hadrian was a man of culture and intellect, deeply influenced by Greek philosophy and art. He surrounded himself with poets, philosophers, and architects, leaving a legacy of beauty and innovation. Yet, his reign was not without sorrow. His beloved companion, <strong>Antinous</strong>, died tragically, and Hadrian mourned him deeply, erecting statues and cities in his honor. When Hadrian passed in 138 CE, he left behind an empire that was stronger, more unified, and more culturally vibrant.</p><p><strong>The Peacemaker: Antoninus Pius</strong></p><p>Hadrian’s chosen successor, <strong>Antoninus Pius</strong>, was a man of moderation and piety. His reign was marked by an unusual peace - no major wars, no grand conquests. Instead, Antoninus focused on governing wisely and justly. He reformed the legal system, ensuring fairness for all citizens, and invested in public works, from roads to aqueducts.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zlcqSjeFPOwDkQV6GTSDtA.jpeg" /></figure><p>Antoninus was a quiet emperor, but his steady hand kept the empire prosperous. He earned the title <strong>”Pius”</strong> for his devotion to duty and his loyalty to Hadrian’s memory. When he died in 161 CE, the empire was at peace, but the winds of change were stirring.</p><p><strong>The Philosopher-King: Marcus Aurelius</strong></p><p>The last of the Five Good Emperors, <strong>Marcus Aurelius</strong>, was a man of contradictions. A Stoic philosopher who wrote deeply personal reflections on virtue and duty, he was also a warrior-emperor who spent much of his reign on the battlefield. He faced invasions from the Parthians in the east and the Germanic tribes in the north, as well as a devastating plague that swept through the empire.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*CWgGPogB5QSYcFfPRiNodA.jpeg" /></figure><p>Despite these challenges, Marcus Aurelius ruled with wisdom and compassion. His writings, collected in <strong>Meditations</strong>, reveal a man striving to live a life of integrity and service. Yet, his reign also marked the end of an era. Unlike his predecessors, Marcus Aurelius chose his son, <strong>Commodus</strong>, as his successor - a decision that would have dire consequences for Rome.</p><p><strong>The End of an Era</strong></p><p>When Marcus Aurelius died in 180 CE, the golden age of the Five Good Emperors came to an end. Their reigns had been a time of stability, prosperity, and enlightened leadership, but the empire would soon face darker days. Commodus, with his erratic behavior and neglect of governance, ushered in a period of decline.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/250/1*yN5PtRZe5sAi9qo0Fo_qGg.jpeg" /><figcaption>comodus</figcaption></figure><p>Yet, the legacy of the Five Good Emperors endured. They had shown that wise leadership, merit-based succession, and a commitment to the common good could create an era of unparalleled greatness. Their stories remind us that even in the face of challenges, the best of human potential can shine through.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0a33b506bfb4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Amor fati]]></title>
            <link>https://kkipngenokoech.medium.com/amor-fati-007bcddd216b?source=rss-92206f27f3c4------2</link>
            <guid isPermaLink="false">https://medium.com/p/007bcddd216b</guid>
            <category><![CDATA[philosophy]]></category>
            <category><![CDATA[amor-fati]]></category>
            <category><![CDATA[friedrich-nietzsche]]></category>
            <category><![CDATA[seneca]]></category>
            <category><![CDATA[marcus-aurelius]]></category>
            <dc:creator><![CDATA[kipngeno koech]]></dc:creator>
            <pubDate>Fri, 21 Feb 2025 08:06:52 GMT</pubDate>
            <atom:updated>2025-02-21T08:06:52.571Z</atom:updated>
            <content:encoded><![CDATA[<p>On December 7, 1914, a building in West Orange, New Jersey, was engulfed in flames. Rushing to his father, a son delivered devastating news — years of research, prototypes, and invaluable work by the man who revolutionized the light bulb had been reduced to ashes. However, Thomas Edison remained unfazed. Instead of lamenting the loss, he turned to his son and said, <strong>“Go get your mother and friends. They must come see this — there will never be another fire like it.”</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/487/1*hvQkFg7QsET4eEPTjpg3Tw.jpeg" /><figcaption>source: Medium</figcaption></figure><p>In an interview, Thomas Edison reflected on that moment, acknowledging that there was nothing he could do — his lab was already consumed by flames, and that was the undeniable reality. Instead of lamenting the loss, he simply accepted it and resolved to begin again. He did not complain or dwell on misfortune. <strong>Amor fati</strong> — he embraced what life handed him and understood that he had the power to start anew.</p><h4>WHAT IS AMOR FATI?</h4><p><em>Amor fati</em> is a Latin phrase meaning “love of fate.” It embodies the idea of fully accepting and embracing everything that happens in life — both good and bad — as necessary and meaningful. This concept was first popularized by the Stoic philosophers, particularly Epictetus, Seneca, and Marcus Aurelius, and later embraced by Friedrich Nietzsche. It encourages individuals to not only endure hardships but to see them as essential parts of their journey, shaping them into who they are meant to become.</p><p><strong>Epictetus</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/763/1*1qEF24_adWoMmjS8WyxHlA.jpeg" /><figcaption>source: Medium</figcaption></figure><p>Epictetus’ early years were marked by hardship, as he was born into slavery. One day, while being transported to Rome, the soldiers began twisting his leg — what they thought was playful behavior, but it was painful for Epictetus. He warned them, “Be careful, you’re going to break it.” Despite his warnings, the leg eventually snapped. When it did, Epictetus simply responded, “I told you, now you’ve broken it.” Without complaint, he calmly went on to find crutches, accepting the situation as it was.</p><p>It’s a powerful reminder: Accept the cards that life deals you!</p><h4>Seneca</h4><p>Around 65 CE, Seneca was accused of being involved in a conspiracy to assassinate Nero, known as the Pisonian Conspiracy. Although there is little evidence to support the charge, Nero, paranoid and increasingly tyrannical, ordered that Seneca be executed. The emperor’s command was that Seneca should take his own life.</p><p>Seneca’s response to this death sentence was remarkable. True to his Stoic principles, he accepted his fate without complaint. According to historical accounts, he faced his execution with the calmness and dignity that characterized his entire life. In his final moments, he embraced the teachings he had spent his life spreading — accepting that death, like all things, was inevitable and beyond his control.</p><p>Instead of pleading for mercy or trying to escape his fate, Seneca chose to die on his own terms. The most famous account of his death describes how he slit his own wrists, then took poison, and when neither method immediately succeeded in ending his life, he immersed himself in a hot bath to accelerate the process. Even in his dying moments, he showed <em>amor fati</em>, accepting the situation and facing it with composure.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YxAQzanyrikazTvSWX8o7A.jpeg" /><figcaption>source: Ancient World Magazine</figcaption></figure><p>What’s even more striking is how Seneca found solace in his philosophy during this time. His last letters and writings reflect a man who, despite the injustice of his situation, remained firm in his belief that the events unfolding were part of a larger plan that he could not control. He had no fear of death because he had spent his life preparing for it as a natural part of existence. In his mind, dying at Nero’s command was simply another challenge to meet with dignity, and he approached it with the same philosophical clarity that had guided him through life.</p><p>Seneca’s death is, in a sense, a perfect illustration of <em>amor fati</em> — the acceptance and love of one’s fate, even when it seems cruel or unjust. He did not resist his death or lament the life he had lived. Instead, he embraced the final chapter of his life as part of his journey, accepting it as necessary and meaningful within the context of his beliefs. His death, like everything else, was part of the fate he had come to love and accept.</p><h4>CLOSING CURTAINS</h4><p>So dear readers, accept the cards that life deals with you and work with them! Amor Fati :)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/203/1*NU8QoDtanLQT16-Nd4p6Ww.jpeg" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=007bcddd216b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Appointment in Samara]]></title>
            <link>https://kkipngenokoech.medium.com/the-appointment-in-samara-704e3b8c537e?source=rss-92206f27f3c4------2</link>
            <guid isPermaLink="false">https://medium.com/p/704e3b8c537e</guid>
            <category><![CDATA[philosophy]]></category>
            <category><![CDATA[fable]]></category>
            <category><![CDATA[stoicism]]></category>
            <category><![CDATA[death]]></category>
            <category><![CDATA[memento-mori]]></category>
            <dc:creator><![CDATA[kipngeno koech]]></dc:creator>
            <pubDate>Thu, 02 Jan 2025 11:28:33 GMT</pubDate>
            <atom:updated>2025-01-02T11:29:01.561Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*olkdRfrNuc2riQPR" /><figcaption>source: Generated from ChatGPT</figcaption></figure><p>There was a merchant in Bagdad who sent his servant to market to buy provisions and in a little while the servant came back, white and trembling, and said, Master, just now when I was in the marketplace I was jostled by a woman in the crowd and when I turned I saw it was Death that had jostled me.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*n1DF857YMP-pm2pp" /><figcaption>source: Generated by the Author using ChatGPT</figcaption></figure><p>She looked at me and made a threatening gesture; now, lend me your horse, and I will ride away from this city and avoid my fate. I will go to Samarra and there Death will not find me. The merchant lent him his horse, and the servant mounted it, and he dug his spurs in its flanks and as fast as the horse could gallop he went.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*qb9WRZ4FHjqP8p_f" /><figcaption>source: Generated by Author using ChatGPT</figcaption></figure><p>Then the merchant went down to the marketplace and he saw me standing in the crowd and he came to me and said, Why did you make a threating gesture to my servant when you saw him this morning? That was not a threatening gesture, I said, it was only a start of surprise.</p><p>I was astonished to see him in Bagdad, for I had an appointment with him tonight in Samarra.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=704e3b8c537e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[And with that, the 2024 season comes to an End]]></title>
            <link>https://kkipngenokoech.medium.com/and-with-that-the-2024-season-comes-to-an-end-b797a3fdce5c?source=rss-92206f27f3c4------2</link>
            <guid isPermaLink="false">https://medium.com/p/b797a3fdce5c</guid>
            <category><![CDATA[2025]]></category>
            <category><![CDATA[philosophy]]></category>
            <category><![CDATA[2024]]></category>
            <category><![CDATA[stoicism]]></category>
            <category><![CDATA[marcus-aurelius]]></category>
            <dc:creator><![CDATA[kipngeno koech]]></dc:creator>
            <pubDate>Mon, 30 Dec 2024 10:13:56 GMT</pubDate>
            <atom:updated>2024-12-30T10:13:56.017Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/612/1*FMq5aO5Vg9HgVZ7Uh_gF_Q.jpeg" /></figure><p>Over 2000 years ago, some of the greatest minds laid down principles and virtues that still resonate today. In 2024, I found myself returning to these timeless teachings, using them as a guide to navigate life’s challenges and aspirations. This year, I lived by the wisdom of a lot of philosophers and here are my top drives, four <strong>philosophers</strong>, four <strong>stories</strong>:</p><h4>Marcus Aurelius</h4><p>Born on April 6th, 121 AD, Marcus Aurelius was the 16th Roman emperor and a Stoic philosopher. Known for his writings in <em>Meditations</em>, he offered profound reflections on resilience, control, and the pursuit of virtue. Regarded as the last of the Five Good Roman Emperors, his reign was marked by wisdom, justice, and a deep commitment to self-discipline.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dstuQIU8Ry35Zk_6M9zJhA.jpeg" /></figure><p>A compelling story about Marcus Aurelius involves a slave who followed him throughout the day. The slave’s task was simple but profound: he would whisper in Marcus’ ear, “<strong>Remember, you are only a man</strong>.”</p><blockquote>Memento mori: You could leave life right now, let that determine how you think and live for the rest of your life</blockquote><p>This reminder of human mortality and impermanence helped Marcus stay grounded. Despite being an emperor with immense power, he was constantly reminded of his role in the larger universe - one that is fleeting and beyond his control.</p><p>This story teaches me the importance of humility and staying connected to reality. It also reminds me that no matter how successful or powerful one may become, it’s vital to remain aware of our limitations and the brief nature of life.</p><p>Whenever I’m caught up in the demands of life or my own ambitions, I try to recall this reminder. Like Marcus, I remind myself that in this moment, I can only do my best - and that’s enough.</p><h4>Diogenes, the cynic</h4><p><strong>“He has the most who is most content with the least.”</strong></p><p>Diogenes of Sinope, known as Diogenes the Cynic, was a philosopher who lived a life of radical simplicity, rejecting materialism and societal expectations. One of the most iconic stories of his life involves his encounter with Alexander the Great.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uf-6d1KKQlqqSzTvvF2fhA.jpeg" /></figure><p>As the story goes, Alexander approached Diogenes, who was basking in the sun, and offered to grant him any wish. Diogenes, unfazed by the presence of the most powerful man in the world, simply replied, <em>“Yes, stand out of my sunlight.”</em></p><p>This incident has always fascinated me. It’s a powerful reminder of how true contentment comes not from power, possessions, or status, but from freedom and self-sufficiency. Diogenes had no need for what Alexander could offer because he already had everything he wanted — peace in the moment and freedom from desires.</p><p>Whenever I’ve found myself tempted by ambition or weighed down by unnecessary wants, I’ve reflected on this story. It reminds me that the greatest riches lie in appreciating the simplicity of life and in maintaining the courage to live authentically, no matter the circumstances.</p><h4>Epictetus</h4><p>Epictetus was born around 55 AD in Hierapolis (modern-day Turkey) and spent much of his life as a slave in Rome. Despite his harsh circumstances, he became one of the most influential Stoic philosophers. His teachings focused on the idea that true freedom is found not in external circumstances, but in the way we choose to respond to them.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EyETwB1zt4P8K6DbmjTzQA.jpeg" /></figure><p>One of the most memorable stories about Epictetus involves his beautiful lamp, which became a powerful lesson in detachment and resilience.</p><p>“Something similar happened to me also the other day. I keep an iron lamp by the side of my household gods, and, on hearing a noise at the window, I ran down. I found that the lamp had been stolen. I reflected that the man who stole it was moved by no unreasonable motive. What then? To-morrow, I say, you will find one of earthenware. <strong>Indeed, a man loses only that which he already has</strong>. “I have lost my cloak.” Yes, for you had a cloak. “I have a pain in my head.” You don’t have a pain in your horns, do you? Why, then, are you indignant? For our losses and our pains have to do only with the things which we possess.”</p><h4><strong>Zeno of Citium</strong></h4><p>Zeno of Citium, born around 334 BC in Cyprus, was a merchant who turned philosopher after a transformative event. Legend has it that Zeno was shipwrecked and lost all his possessions. Stranded in Athens, he stumbled upon a bookshop where he read the works of Socrates and was inspired to pursue philosophy.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-wh-jJlpCecGRCv_ZLOcxA.jpeg" /></figure><p>One of the most famous anecdotes about Zeno involves a cup. A servant had broken one of Zeno’s cups, and when the servant confessed, Zeno simply remarked, <em>“Why are you so upset? The cup was always breakable. Its nature is to be broken someday.”</em></p><p>This story beautifully illustrates the Stoic mindset: understanding the impermanence of material things and accepting their eventual loss. For Zeno, this wasn’t a call to nihilism but rather an encouragement to live without undue attachment, appreciating things for what they are while they last.</p><h4>curtains closing</h4><p>These stories, passed down over millennia, remind us of the simplest yet most profound truths about life. We will lose things. We will lose people. The reality is, the moment we acquire something - whether a possession, a relationship, or a moment of joy - we know deep down that it is not permanent. It has happened before; it will happen again.</p><p>And yet, the wisdom of these philosophers teaches us how to live amidst this impermanence:</p><p>Like Diogenes, we can hunger for the sun and find contentment in life’s simplest blessings.<br>Like Marcus Aurelius, we can remember that we are only human, living in this brief instant, and that is all we have.<br>Like Epictetus, we can accept that we can only lose what we already possess and let go of attachment to the material.<br>And like Zeno of Citium, we can remind ourselves that the cup was always breakable — it was going to break someday.</p><p>Each story calls us to live fully in the present, appreciating what we have while it’s here and finding strength to move forward when it’s gone.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*e9V5CfUmlPOaggfReTEjnw.jpeg" /></figure><p>ciao 2024 👋</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b797a3fdce5c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Decoding Heartbeats: Unveiling the Rhythm with Fourier Analysis part 1]]></title>
            <link>https://kkipngenokoech.medium.com/decoding-heartbeats-unveiling-the-rhythm-with-fourier-analysis-0dddd360dd90?source=rss-92206f27f3c4------2</link>
            <guid isPermaLink="false">https://medium.com/p/0dddd360dd90</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[ecg]]></category>
            <category><![CDATA[signal-processing]]></category>
            <category><![CDATA[frequency-domain-analysis]]></category>
            <category><![CDATA[time-domain-analysis]]></category>
            <dc:creator><![CDATA[kipngeno koech]]></dc:creator>
            <pubDate>Tue, 24 Dec 2024 02:54:52 GMT</pubDate>
            <atom:updated>2024-12-24T03:09:58.349Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/297/1*GqMpQ4EkoE8MYFaoHOw3Uw.jpeg" /></figure><p>From our <a href="https://medium.com/@kkipngenokoech/signal-processing-101-the-magic-behind-modern-day-technology-bb1605b6d83f"><em>first article</em></a> in this series, we learnt that signals can be either in frequency domain or time domain. Time domain we said, was a representation of signals as a function of time while frequency domain represents the same signal as a function of its constituent frequencies.</p><p>Fourier analysis transforms the signal from the time domain to the frequency domain.</p><h4>TIME DOMAIN</h4><p>In the time domain, a signal shows how a specific quantity, such as voltage or sound, changes over time. Take the ECG (Electrocardiogram) as an example - the waveform often depicted in movies before someone dies. The amplitude of this signal reflects the strength of the heart’s electrical activity or mechanical function during each heartbeat. When a person passes away, the waveform flattens because the heart has stopped functioning. At that moment, the amplitude becomes zero, signaling the cessation of heart activity.</p><p>The <strong>ECG</strong> is actually a perfect example of a composite signal. The amplitude represents the voltage generated by electrical impulses as the heart relaxes and contracts. Each heartbeat produces a characteristic waveform due to this electrical activity in the heart which can be broken down into:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TS3laArMp605gdAUbRXFzw.jpeg" /><figcaption><a href="https://www.google.com/url?sa=i&amp;url=https%3A%2F%2Fcardiology.com.sg%2F12-lead-ecg%2F&amp;psig=AOvVaw1ZSRKmFnOj7YmU06e_0SQq&amp;ust=1735092589090000&amp;source=images&amp;cd=vfe&amp;opi=89978449&amp;ved=0CBcQjhxqFwoTCOjJ2t2pv4oDFQAAAAAdAAAAABA3">source</a></figcaption></figure><p>1. <strong>P wave</strong> - atrial depolarization, the electrical impulse triggering the atria to contract<br>2. <strong>QRS complex -</strong> ventricular depolarization - the electrical impulse triggering the ventricles to contract<br>3. <strong>T wave </strong>- ventricular repolarization - the recovery phase of the ventricles.</p><blockquote><strong>note</strong>: The larger the amplitude the stronger the electrical activity in the heart.</blockquote><p>The frequencies and amplitudes of an ECG signal for a healthy human being depend on the individual’s physiology and can vary slightly.</p><p>The heart rate frequency (main signal), for most healthy adults is 55- 85 beats per minute, in which when you convert to frequency (divide by 60 to get per second), it is like <strong><em>0.6 Hz - 2 Hz</em></strong>. <em>(if your heartbeat is 60 per minute, then the frequency is 1 Hz).</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*fzs7P_2s14AWJRGhiOEcXQ.jpeg" /></figure><p>My heartbeat at the time of writing this blog is 74 beats per minute, that is like a frequency of <strong>1.23 Hz.</strong></p><p>ECG provides a detailed record of electrical activity of the heart during each heartbeat. The ECG signal records the electrical impulses that trigger heartbeats, and each cycle of the ECG corresponds to one heartbeat.</p><p>The ECG signal is a composite of at least three main components (P wave, QRS complex, T wave), along with potential noise. By applying Fourier analysis, we can decompose this signal into its individual frequency components, enabling us to separate and examine the heart-related signals from any noise present.</p><h4>Frequency domain ( A high level overview of Fourier Analysis)</h4><p>Fourier analysis is a mathematical technique used to transform a signal from the time domain to the frequency domain as alluded to earlier. This transformation allows us to understand the different frequency components that make up a signal.</p><p>In the case of an ECG (Electrocardiogram) signal, Fourier analysis helps us break down the complex waveform into individual frequencies, making it easier to study the various components of the heart’s electrical activity and separate it from noise</p><p>The ECG waveform typically consists of key components like the <strong>P wave</strong>, <strong>QRS complex</strong>, and <strong>T wave</strong>, each representing a phase of the heart’s electrical activity.</p><p>Fourier Transform converts the ECG signal from the time domain (where we observe how the signal changes over time) to the frequency domain (where we observe how the signal is made up of different frequency components).</p><p>This is done using the <strong>Fast Fourier Transform (FFT)</strong> algorithm ( we will look into this in the next blog), which efficiently computes the frequencies present in the signal. The result of the Fourier Transform is a spectrum that shows the magnitude of each frequency component in the signal.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/540/1*4QTvJNX2XsQlSJQQXbFLDg.png" /><figcaption><a href="https://www.google.com/url?sa=i&amp;url=https%3A%2F%2Fwww.nti-audio.com%2Fen%2Fsupport%2Fknow-how%2Ffast-fourier-transform-fft&amp;psig=AOvVaw2dlRmPYf0S49odzT9MgPcB&amp;ust=1735094889846000&amp;source=images&amp;cd=vfe&amp;opi=89978449&amp;ved=0CBcQjhxqFwoTCLCo2Kiyv4oDFQAAAAAdAAAAABAE">source</a></figcaption></figure><p>The electrical activities of the heart (P wave, QRS complex, T wave) occupy a specific range of frequencies:</p><ul><li><strong>QRS complex</strong>: The largest and fastest electrical activity, often containing frequencies between <strong>10–50 Hz</strong>.</li><li><strong>P and T waves</strong>: These slower, lower-frequency activities typically range from <strong>0.5–10 Hz</strong>.</li></ul><p><strong>Noise</strong>: High-frequency noise (from muscle activity or electrical interference) can appear in the spectrum and be filtered out to focus on the relevant heart signal.</p><p><strong>conclusion</strong></p><p>Fourier analysis helps transform the ECG signal from the time domain, where we see how the signal varies over time, to the frequency domain, where we can study the different frequencies that make up the signal. This allows us to isolate the heart’s electrical components, filter out noise, and gain deeper insights into heart health and rhythm abnormalities.</p><p>In the next article, we’ll dive into a hands-on Fourier analysis of heart data and explore the insights we can gain from both the time and frequency domains. Hopefully, the concepts of the time and frequency domains are starting to make more sense. See you in the next blog!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0dddd360dd90" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Signal processing 101: The Magic Behind Modern Day Technology]]></title>
            <link>https://kkipngenokoech.medium.com/signal-processing-101-the-magic-behind-modern-day-technology-bb1605b6d83f?source=rss-92206f27f3c4------2</link>
            <guid isPermaLink="false">https://medium.com/p/bb1605b6d83f</guid>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[signal]]></category>
            <category><![CDATA[signal-processing]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[time-domain-analysis]]></category>
            <dc:creator><![CDATA[kipngeno koech]]></dc:creator>
            <pubDate>Mon, 23 Dec 2024 17:58:46 GMT</pubDate>
            <atom:updated>2024-12-23T17:58:46.897Z</atom:updated>
            <content:encoded><![CDATA[<h4>A gentle introduction to signals</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/550/1*5amD3TZDM_HxqG4t7mNpAw.jpeg" /></figure><p>Signals are the magic behind our digital lives, they power the technologies that connect us, entertain us and even that save lives. But what exactly is a signal?</p><p>Wi-Fi is signals, phone calls are signals, YouTube and Netflix are signals. Even the GPS guiding you on a road trip or the smart assistant playing your favorite music relies on signal. There is barely almost nothing we can’t link to signals. But what exactly is a signal? I dare ask again!</p><h4>What is a signal?</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/770/1*D9Qog8uQECGNm96KivDtpw.jpeg" /></figure><p>According to oxford dictionary, a signal is a series of <strong>electrical waves </strong>that carry <strong>sounds</strong>, <strong>pictures </strong>or <strong>messages</strong>, for example to a radio, television or mobile phone.</p><p>In its basic form though is a way of sending information from one place to another. When you talk to someone, the sound of your voice becomes a signal. When you send an ‘hi’ to your friend, your phone converts this text into a digital 1 or 0 signals and sends it over the internet.</p><h4>Signal Parameters</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/569/1*sqbaTyJ1a2HuD2M6sroZYA.png" /></figure><p>Signal parameters define the essential characteristics of a signal, particularly in the context of sinusoidal (sine wave) signals, which are common in electrical engineering. These are the common parameters:</p><ol><li>Amplitude</li><li>Period</li><li>Frequency</li><li>Phase shift</li><li>Angular frequency</li></ol><h4>Amplitude</h4><p>This describes the maximum strength or intensity. This is the key factor that determines the quality and strength of a signal. In sound waves/signals it corresponds to the loudness. In light waves, the amplitude relates to brightness. In electrical signals, amplitude represents voltage or current levels.</p><h4>Period</h4><p>This is the amount of time it takes for a signal to complete one full cycle of its waveform. It is the reciprocal of the signal’s frequency and represents the duration of one repetition of the wave.</p><p>In communication systems, this determine how fast data can be transmitted.</p><h4>Frequency</h4><p>To a five year old child, I would say, frequency is how often something repeats. If we say a wave is 3hz, it means it repeats 3 times per second.</p><p>This refers to the number of cycles or oscillations of a periodic signal that occurs per unit time typically measured in <strong>Hz. </strong>Higher signals oscillate more rapidly and complete more cycles in the same amount of time.</p><h4>Frequency spectrum</h4><p>Every signal can be decomposed into a spectrum using tools like fourier transform. With these you can see the different frequency components that make up a signal.</p><p><strong>Bandwidth </strong>is the range of frequencies within which a signal energy is concentrated.</p><p>A signal can be viewed as a composition of a number of sinusoidal signals with varied amplitude, frequency and phase. Any complex signal (even if it seems irregular or complicated) can be broken down into a sum of simpler sinusoidal signals. This concept is central to the <strong>Fourier Transform </strong>and the Fourier Series, which are mathematical techniques used in signal processing to analyze and represent signals in terms of their frequency components.</p><h4>Time-domain and Frequency domain</h4><p>There are two ways to represent a signal, time domain &amp; frequency domain, and each provide different information about the signal</p><h4>Time domain</h4><p>This shows how the signal behaves over time. it focuses on the the signal amplitude change with respect to time. It displays the actual signal as it varies over time.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/465/1*ouNt_76rhf50uUJR1_CfJA.gif" /></figure><p>We normally use time domain when we need to show how the signal varies/evolves over time.</p><h4><strong>Frequency domain</strong></h4><p>It is shows how the signal is composed of various frequencies and their corresponding amplitudes. It focuses on how much energy is present at each frequency.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/560/1*5Z1Fm-tsIBCP7et95Rcddw.png" /></figure><p>In the frequency domain, the signal is decomposed into frequency components.</p><h4>conclusion</h4><p>Signals are the unseen backbone of our connected world, powering advancements across diverse fields. Understanding signals and how they are processed offers valuable insights into the technologies that shape our daily lives. From streaming and navigation to communication and healthcare, signals are at the core of modern innovation, driving us toward a future filled with endless possibilities.</p><p>In future articles, we’ll explore signal processing in greater detail and uncover its role in shaping our everyday experiences.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bb1605b6d83f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Paradox of Time: The Shortness and Length of Life]]></title>
            <link>https://kkipngenokoech.medium.com/the-paradox-of-time-the-shortness-and-length-of-life-37376f00a2b2?source=rss-92206f27f3c4------2</link>
            <guid isPermaLink="false">https://medium.com/p/37376f00a2b2</guid>
            <dc:creator><![CDATA[kipngeno koech]]></dc:creator>
            <pubDate>Thu, 24 Oct 2024 11:21:26 GMT</pubDate>
            <atom:updated>2024-10-24T11:22:09.706Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>“It is not that we have a short time to live, but that we waste a lot of it. Life is long enough, and a sufficiently generous amount has been given to us for the highest achievements if it were all well invested. But when it is wasted in heedless luxury and spent on no good activity, we are forced at last by death’s final constraint to realize that it has passed away before we knew it was passing. So it is: we are not given a short life but we make it short, and we are not ill-supplied but wasteful of it. Life is long if you know how to use it.”</blockquote><blockquote>- On the shortness of life, Seneca</blockquote><h4>Introduction:</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/614/1*Kv-flT6GGft5yMjUtY2XaQ.png" /></figure><p>Time is a universal constant, yet it is experienced differently by each individual. In <strong>On the Shortness of Life</strong>, Seneca presents a compelling argument: <em>life is neither inherently short nor long, but the quality of how we use it determines our perception of time</em>. The paradox lies in the fact that while time passes at the same rate for everyone, some feel that life is too short, while others find it abundant. Seneca’s wisdom suggests that the real issue is not how much time we have, but how we choose to spend it.</p><h4><strong>The Illusion of Time’s Shortness:</strong></h4><p>In our modern world, it’s easy to feel like there’s never enough time. From constant deadlines, busy schedules, and the overwhelming demands of life, many people find themselves wondering, <em>Where did all the time go</em>?. This illusion of time flying by can be traced back to the very distractions that Seneca warned against - frivolous pursuits, luxury, and mindless activities. He argued that when we spend our time without purpose or reflection, it slips through our fingers unnoticed, making life appear shorter than it truly is.</p><p>This illusion arises because of a lack of mindfulness. <strong>When we are not present in our actions or aware of the passing moments, we fail to appreciate the time that we have</strong>. Distractions and trivial pursuits rob us of the ability to savor life fully, making the days seem to vanish too quickly.</p><h4>Life is Long if You Know How to Use It:</h4><p>Seneca’s paradoxical statement, “<em>Life is long if you know how to use it</em>,” provides the solution to the illusion of shortness. He suggests that when we invest our time in meaningful and purposeful activities — such as pursuing wisdom, cultivating virtues, and reflecting on our experiences — life expands. Time feels abundant when it is well-spent.</p><p>Purpose and intentionality are at the heart of this idea. Seneca encourages us to reflect on how we allocate our time and urges us to be deliberate in our actions. The <strong>quality </strong>of time, rather than its <strong>quantity</strong>, becomes the defining factor of a fulfilled life. In this sense, even a short life can feel long if it is lived with purpose, while a long life may feel fleeting if wasted.</p><h4>The Psychological Experience of Time:</h4><p>The Stoic approach to time highlights a fundamental truth in psychology - our experience of time is subjective. Studies in psychology have shown that time appears to pass more quickly when we are engaged in routine, unremarkable tasks, but it seems to slow down during moments of novelty, deep concentration, or emotional intensity. This explains why days filled with routine can blur into one another, making weeks or years seem to fly by, whereas meaningful or challenging experiences are remembered vividly and expand our perception of time.</p><p>Seneca’s advice is aligned with this psychological insight: to slow down our experience of time, we must break free from the routines and distractions that dull our senses. Engaging in activities that challenge us, provide growth, or give us a sense of accomplishment can help us reclaim time and make life feel fuller.</p><h4>The Fear of Time Running Out:</h4><p>Another aspect of this paradox is the fear many people feel as they grow older - that time is running out. Seneca argues that this fear stems from the awareness of time wasted rather than a genuine lack of time. When individuals reflect on their lives and see wasted opportunities, they feel the weight of time’s passage more heavily. However, those who have lived with purpose and intention do not fear the end, for they know they have made the most of their time.</p><p>This insight can be profoundly liberating. By focusing on the present and making deliberate choices about how to spend time, we can reduce the anxiety of time slipping away. Each moment becomes an opportunity for growth, reflection, or action, and even in the face of mortality, we can feel fulfilled.</p><h4>Practical Applications:</h4><p>To apply Seneca’s wisdom and escape the paradox of time’s shortness, consider these practical steps:</p><p>1. <strong>Mindfulness in Action</strong>: Cultivate awareness of how you are spending your time. Are you engaged in activities that align with your values and goals, or are you caught up in distractions?<br> <br>2. <strong>Prioritize Meaningful Work</strong>: Focus on tasks and projects that contribute to long-term growth or personal fulfillment, rather than fleeting pleasures or shallow engagements.</p><p>3. <strong>Limit Distractions</strong>: Identify the activities that drain your time without adding value. These could include excessive social media use, binge-watching, or procrastination. Replace them with enriching activities like reading, learning, or spending time with loved ones.</p><p>4. <strong>Reflect Regularly</strong>: Set aside time each day or week for reflection. Consider how you’ve spent your time and whether it aligns with your broader goals. This can help you stay focused and ensure that your days are not slipping by unnoticed.</p><p>5. <strong>Embrace Memento Mori</strong>: Recognize that time is finite, and use this awareness not to fear death but to inspire a more intentional use of the present moment.</p><blockquote>Curtains close:<br>Seneca’s paradox about the length of life invites us to reconsider how we view time. Life is only short when it is wasted, but it becomes long and meaningful when used wisely. By being intentional about how we spend our days and focusing on what truly matters, we can expand our perception of time and live with a greater sense of fulfillment. Time may be a fleeting resource, but by living purposefully, we can ensure that it is not wasted.</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=37376f00a2b2" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>