<?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 Ankush Agarwal on Medium]]></title>
        <description><![CDATA[Stories by Ankush Agarwal on Medium]]></description>
        <link>https://medium.com/@ankushbansal9201?source=rss-b7c59b350f5b------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*H_dDKsbZ9PRJzYS6</url>
            <title>Stories by Ankush Agarwal on Medium</title>
            <link>https://medium.com/@ankushbansal9201?source=rss-b7c59b350f5b------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 04:33:00 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ankushbansal9201/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[You never see all the cards until it’s too late to change them.]]></title>
            <link>https://medium.com/@ankushbansal9201/you-never-see-all-the-cards-until-its-too-late-to-change-them-744af676e286?source=rss-b7c59b350f5b------2</link>
            <guid isPermaLink="false">https://medium.com/p/744af676e286</guid>
            <category><![CDATA[vlsi-physical-design]]></category>
            <category><![CDATA[semiconductor-technology]]></category>
            <category><![CDATA[engineering]]></category>
            <category><![CDATA[poker]]></category>
            <category><![CDATA[vlsi-design]]></category>
            <dc:creator><![CDATA[Ankush Agarwal]]></dc:creator>
            <pubDate>Wed, 21 Oct 2026 13:01:13 GMT</pubDate>
            <atom:updated>2026-10-21T13:01:13.500Z</atom:updated>
            <content:encoded><![CDATA[<p>In Part 1, 8 Ball Pool showed us the physical side of chip design. In Part 2, chess showed us the strategic side. But chess had one big cheat: <strong>both players see the whole board. </strong>Chip design doesn’t work like that.</p><p>When you place the first macro, you don’t know the final wire delays. When you plan the floorplan, you only have a rough idea of congestion. You’re deciding with <strong>partial information</strong>, and the real numbers arrive only after the decisions are locked in. <strong>That’s not chess. That’s poker. </strong>This is Part 3 of my “<em>games meet physical design”</em> series.</p><p>[Something that I realized was that “A timing path looked fine at placement and fell apart after routing. I’d been playing with a hand on an estimate and calling it a fact. ”] Here’s the mapping.</p><p><strong>Part 3 · Games × Physical Design</strong></p><p>What poker taught me about chip design</p><p><em>You never see all the cards</em></p><p><em>until it’s too late to change them.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HI6sprnfYMqWZ7w9UQYwbg.jpeg" /></figure><h3>1. The four streets are the PD flow</h3><p>Texas Hold’em reveals information in stages, and each stage maps neatly onto the flow:</p><ul><li><strong>Pre-flop = floorplanning:</strong> almost no information, big commitments.</li><li><strong>Flop = placement:</strong> more information, and you can still adjust.</li><li><strong>Turn = CTS and optimization:</strong> the picture sharpens, but your options narrow.</li><li><strong>River = routing and signoff:</strong> every card is visible, and you can’t change anything.</li></ul><p><strong><em>Lesson:</em></strong><em> At every stage you learn more and can do less. The skill is making good decisions before the information arrives.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/943/1*Sv95dxVX4cv9e_46C_Hycw.jpeg" /></figure><h3>2. Early estimates are your reads</h3><p>Early in the flow, you rely on <strong>wire load models, rough congestion maps, and estimated parasitics</strong>, like estimating an opponent’s range from how they bet. After detailed routing, you have real extracted parasitics, which is the equivalent of seeing the river card.</p><p>Experienced engineers know that <strong>early numbers are guesses, not facts.</strong> Treat them like reads: useful, but never certain.</p><h3>3. Bluffing yourself is trusting optimistic numbers</h3><p>In poker, the most dangerous bluff is the one you believe. In PD, it’s an early timing report that looks clean because the model was optimistic. If you stop questioning it, you’ll call a big bet with a weak hand.</p><p><strong><em>Lesson:</em></strong><em> The most dangerous estimate is the one you stopped doubting.</em></p><h3>4. Position is information</h3><p>In poker, acting last is a huge advantage, because you see what everyone else does first. In PD, <strong>later stages have more information</strong>: post-route timing is far more trustworthy than pre-placement timing.</p><p>But here’s the twist. In poker, you can choose to wait. In chips, <strong>you have to commit early whether you’re ready or not.</strong> The engineers who do well are the ones who make the best use of the little information they have at floorplan.</p><h3>5. Variance is process variation</h3><p>A good player can play perfectly and still lose a hand to bad luck. Chips face the same thing through <strong>OCV and process variation</strong>. You design to survive the bad draws, not just the average one.</p><h3>6. Playing all the corners is playing the range</h3><p>Good poker isn’t about one hand; it’s about playing well against <strong>all</strong> possible hands. <strong>Multi-corner, multi-mode (MCMM)</strong> analysis is the same idea: you don’t optimize for one PVT corner; you make sure the design survives the full range.</p><p>Over-optimizing for one corner is like tailoring your strategy to a single opponent’s single hand.</p><h3>7. Pot odds are the cost-benefit of an ECO</h3><p>Should you call? Compare the cost with the potential reward. Should you spend three days on one violation? Weigh the schedule, area, and power cost against what you gain.</p><p>Good engineers (and good players) think in <strong>expected value</strong>, not hope.</p><h3>8. Counting outs is counting your remaining knobs</h3><p>In poker, “outs” are the cards that improve your hand. In PD, they’re the <strong>fixes you have left</strong>: cells to upsize, Vt swaps, useful skew, buffer insertion, and a placement tweak. When the list is long, you can stay calm. When it’s down to one or two, you know you’re in trouble.</p><p><strong><em>Lesson:</em></strong><em> Count your outs before you commit more chips.</em></p><h3>9. Bet sizing is cell sizing</h3><p>A good player doesn’t bet everything on every hand. A good engineer doesn’t upsize every cell on every path. Oversizing buys timing but costs <strong>area, power, and routing resources</strong>. The right size is the smallest bet that gets the job done.</p><h3>10. Bankroll management is your PPA budget</h3><p>Pros don’t risk their whole bankroll on one hand. PD teams don’t blow the entire area budget on one block. Every optimization draws from a shared budget of <strong>power, area, and schedule</strong>, so spend it deliberately.</p><h3>11. Knowing when to fold is knowing when to restart</h3><p>The <strong>sunk cost fallacy</strong> hurts at the table and in the lab. After days of ECOs on a bad floorplan, the strongest move might be to fold and re-run with a better one.</p><p>Staying in because you’ve already invested so much is how big losses happen.</p><p><strong><em>Lesson:</em></strong><em> “I’ve already spent three days on this” is not a reason to spend a fourth.</em></p><h3>12. Don’t be results-oriented</h3><p>A player who wins a hand with a bad decision didn’t play well, they got lucky. A design that closes timing once, through one lucky seed or a lucky tool run, isn’t necessarily a <strong>robust</strong> design.</p><p>Judge your methodology by how it holds up over many runs, not by one good result.</p><h3>13. Tilt is debugging at 2 a.m.</h3><p>Tilt is making emotional decisions after a bad beat. Every engineer has made a rushed change at 2 a.m. and regretted it. When you notice you’re on tilt, <strong>stop.</strong> Take a break, review the data, then act.</p><h3>14. Tells are early warning signs</h3><p>Experienced players read subtle patterns. Experienced PD engineers read them too: a creeping <strong>WNS trend</strong>, a hotspot growing in the congestion map, a power number that keeps rising between runs.</p><p>The report tells you something before the failure does, if you’re watching.</p><h3>15. Going all-in is tapeout</h3><p>Mask sets are extremely expensive, and there’s no calling it back. You push the chips in only when you’ve checked everything you can: signoff timing, DRC, LVS, IR drop, and the corners.</p><p>All-in is fine when the hand is checked. It’s gambling when it isn’t.</p><h3>Quick reference table</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UL4PZrlPH06sRqnrIBQk5w.jpeg" /></figure><h3>Where the analogy breaks (an honest note)</h3><p>Poker is <strong>adversarial</strong>: your opponents bluff, deceive, and adapt to you. Physics doesn’t do any of that. It’s indifferent, and that’s what makes it unforgiving. You can’t mislead it, and you can’t outsmart it; you only prepare for it.</p><p>Poker also has a mix of skill and luck, while in chip design the “luck” is really <strong>uncertainty you failed to model.</strong> Process variation is not random bad luck. It’s a distribution you can plan for.</p><p>And while poker is about beating other people, chip design is about balancing <strong>power, performance, and area</strong> against a set of constraints.</p><p>But the mindset transfers: <strong>decide well with incomplete information, know your odds, and know when to fold.</strong></p><p>Pool taught us position, chess taught us planning, and poker teaches us something harder: <strong>how to commit when you can’t see everything.</strong></p><p>In poker, the cards are random. In chips, the cards are physics, which makes the mistakes entirely yours.</p><p><em>Which poker concept do you think maps best to chip design? Drop it in the comments.</em>♠️</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=744af676e286" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Every tempo, capture and check counts. Every picosecond too.]]></title>
            <link>https://medium.com/@ankushbansal9201/every-tempo-capture-and-check-counts-every-picosecond-too-738d6f62d4a1?source=rss-b7c59b350f5b------2</link>
            <guid isPermaLink="false">https://medium.com/p/738d6f62d4a1</guid>
            <category><![CDATA[semiconductor-technology]]></category>
            <category><![CDATA[vlsi-physical-design]]></category>
            <category><![CDATA[chess]]></category>
            <category><![CDATA[vlsi-design]]></category>
            <category><![CDATA[engineering]]></category>
            <dc:creator><![CDATA[Ankush Agarwal]]></dc:creator>
            <pubDate>Sat, 10 Oct 2026 12:33:42 GMT</pubDate>
            <atom:updated>2026-10-10T12:35:35.149Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OKP5XMmOSfh7tPdn8vSZdA.png" /></figure><p>Chess players have an old saying: &quot;The<strong> opening is where you plan, the middlegame is where you fight, and the endgame is where you convert.”</strong></p><p>While playing chess, I realized, &quot;How about I replace those words with <strong><em>&#39;floor plan,&#39; &#39;place-and-route,&#39; and &#39;signoff&#39;?&quot; </em></strong>And that&#39;s when the connection clicked. I have described the life of a chip.</p><p>I’m a VLSI master&#39;s student, and this is Part 2 of my <strong><em>games meet physical design</em></strong> series. “In this series I tried to connect the sports/games with the analogy of physical design.&quot; In Part 1, <strong>8 Ball Pool</strong> showed us the <strong>physical</strong> side of PD: <em>position, congestion, and power.</em> Now, <strong>chess </strong>is the <strong>strategic</strong> side: <em>planning, trade-offs, and long-term consequences.</em> Here’s the mapping.</p><h3>1. The opening is floorplanning</h3><p>Control the center, develop your pieces, and don’t move the same piece twice.</p><p>In physical design, you place macros sensibly, plan the power grid, and set up pin placement so everything has room to work. A bad opening doesn’t lose the game immediately. It just makes each of the next 40 moves harder, the way a bad floorplan makes every later stage harder.</p><p><strong><em>Lesson:</em></strong><em> Nobody wins a game in the opening, but plenty of people lose it there.</em></p><h3>2. Opening theory is your reference flow</h3><p>Strong players don’t invent the first ten moves from scratch. They lean on decades of proven theory.</p><p>Good engineers do the same with <strong>foundry reference flows, vendor-recommended scripts, and tested methodology</strong>. Your team’s flow is opening theory: it encodes years of other people’s mistakes so you don’t have to repeat them. Deviate on purpose, with a reason, not by accident.</p><p><strong><em>Lesson:</em></strong><em> Know the book before you leave it.</em></p><h3>3. Pawn structure is your power grid and clock skeleton</h3><p>Pawns can’t move backward, which makes pawn structure the long-term, nearly irreversible foundation of the position. You can adjust it, but every change leaves permanent weaknesses behind.</p><p>The <strong>power grid and clock tree skeleton</strong> work the same way. You can tweak them, but you can’t casually redo them in the final week.</p><p><strong><em>Lesson:</em></strong><em> Know which decisions are reversible and which ones are pawn moves.</em></p><h3>4. King safety is power integrity</h3><p>Strong players castle early because an exposed king loses games. In a chip, the “king” is anything that must stay stable: clean power delivery, controlled IR drop, and a quiet clock.</p><p>You protect it with <strong>decaps, a strong grid, and shielding</strong>, long before the attack comes. And just as a chess player looks for weak squares around the king, a PD engineer hunts for <strong>IR-drop hotspots</strong>: places where the grid is thin and the switching is heavy.</p><h3>5. Tempo is timing slack</h3><p>In chess, one tempo (a single move) can decide a game. In PD, a few picoseconds of slack can decide whether a path passes.</p><p>Both are about <strong>not wasting moves</strong> when every unit counts. A critical path with 3 ps of positive slack and one with 3 ps of negative slack look almost identical on paper, but only one of them tapes out.</p><h3>6. Sacrifices are PPA trade-offs</h3><p>Sometimes a pawn sacrifice gives you an opportunity to convert the game in your favor. In PD, you upsize cells, add buffers, or swap in low-Vt cells (spending area and power) to buy timing.</p><p>The question is always the same: <strong>is what I’m getting worth what I’m paying?</strong> A sacrifice without compensation is just a blunder, and a buffer that doesn’t fix the path is just wasted power.</p><h3>7. Pins and skewers are constrained cells</h3><p>In chess, a pinned piece can’t move without exposing something more valuable behind it.</p><p>PD has these too. A cell on a critical path, sitting next to a hard macro or tied to a tight hold constraint, <strong>can’t be moved or resized</strong> without breaking something behind it. Before you touch it, ask: <em>what is it protecting?</em></p><h3>8. A fork is a fix that solves two violations at once</h3><p>A knight fork attacks two pieces in one move. Every ECO engineer dreams of the same thing: <strong>one change that fixes two problems</strong>, like one buffer that cleans up both a slew violation and a setup path.</p><p>Those are the most satisfying moves in either game, and they come from seeing the whole board instead of one square.</p><h3>9. Zugzwang is the setup-hold squeeze</h3><p>Zugzwang is when any move you make worsens your position. Every timing engineer knows this feeling: fix a setup violation and you create a hold violation; fix the hold and setup breaks again. You’re out of free moves.</p><p><strong>Lesson:</strong> When every local fix makes things worse, the problem isn’t the move. It’s the position. Go back further.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LTZp-ixIwsQQt76Y4IH09A.png" /></figure><h3>10. Open files are routing channels</h3><p>Rooks love open files, and wires love open tracks. Blocked pieces behind a pawn chain look a lot like <strong>cells trapped in a congested region</strong> with no way out.</p><p>The fix is the same in both: open lines. Free up a file, or free up tracks, with cell padding, lower local utilization, or a shifted macro.</p><h3>11. Time control is your tapeout schedule</h3><p>Chess has a clock. So does your project. And the pattern is identical: players don’t lose from lack of skill, but they sometimes lose in <strong>time trouble </strong>when a rushed move replaces a calculated one.</p><p>The last week before tapeout is time trouble. That’s when people skip checks, push untested ECOs, and forget to re-run verification. The best players manage the clock from move one, not move forty.</p><p><strong>Lesson:</strong> Time pressure doesn’t create blunders. It reveals the sloppiness you were already carrying.</p><h3>12. Engines are EDA tools, blunder checks are DRC/LVS</h3><p>Stockfish finds moves no human would see, just like a modern placer or router. But a good player still checks for blunders before pressing send.</p><p><strong>DRC and LVS are your blunder check</strong>, and signoff is the touch-move rule: once you commit, you can’t take it back. The engine suggests you are still responsible for the move.</p><h3>14. Threefold repetition is the endless ECO loop</h3><p>A draw by repetition happens when both sides cycle through the same moves. Ever fixed a violation, created another, fixed that, and landed back on the first one?</p><p>That’s repetition. The way out is to <strong>change the plan, not repeat the move.</strong> Sometimes that means going back to the floor plan or placement instead of patching routing for the fifth time.</p><h3>15. The Endgame technique is closing the last violations</h3><p>Converting a winning position is a skill of its own. Beginners get a huge advantage and then fail to convert it.</p><p>The last 50 violations of a project feel the same. The design is nearly done, but each fix is delicate, and one careless ECO can bring back a hundred violations. Convert patiently: <strong>small, verified, reversible moves.</strong></p><h3>16. Post-game analysis is the post-mortem</h3><p>After every serious game, strong players review it with an engine and ask: <em>where did it go wrong, and why?</em> After every tapeout, good teams do the same.</p><p>Which decision hurt us? Which stage caught the problem too late? What would we do differently in the floorplan next time? <strong>You only improve if you study your losses.</strong></p><h3>17. Checkmate is tapeout</h3><p>It’s final. No takebacks, and the opponent (physics) doesn’t offer a draw.</p><h3>Quick reference</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/989/1*5Jw1zKVJGlufDoRBMJTqKw.png" /></figure><h3>Where the analogy breaks (an honest note)</h3><p>Chess is a game of <strong>perfect information</strong>: both players see the entire board at all times. Chip design is not. Early in the flow you are working with wire load models, rough congestion estimates, and guesses about parasitics that you will only truly know after routing. (That’s a story for Part 3, when we sit down at a poker table.)</p><p>Chess also has two players, fixed rules, and a clear winner. Chip design has no opponent, only physics and constraints, and “winning” means balancing power, performance, and area, not beating anyone. But the mindset transfers: <strong>think long-term, respect irreversible decisions, and don’t rush the last move.</strong></p><p>In chess you lose when you run out of good moves. In PD you lose when you run out of slack.</p><p>So, the next time you’re staring at a timing report that feels like zugzwang, remember the grandmasters’ advice: <em>don’t look for a better move; look for a better position.</em></p><p>And if you’ve ever blundered a game or an ECO in the last ten minutes before the deadline, you already know both games are the same lesson in disguise.</p><p><em>Which chess concept do you think maps best to chip design? Drop it in the comments. The best ones might make it into a follow-up.</em> ♟️👑</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=738d6f62d4a1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Every shot is a physical design decision. Every foul is a DRC violation.]]></title>
            <link>https://medium.com/@ankushbansal9201/every-shot-is-a-physical-design-decision-every-foul-is-a-drc-violation-58b63a4120f4?source=rss-b7c59b350f5b------2</link>
            <guid isPermaLink="false">https://medium.com/p/58b63a4120f4</guid>
            <category><![CDATA[semiconductor-technology]]></category>
            <category><![CDATA[vlsi-design]]></category>
            <category><![CDATA[8-ball-pool]]></category>
            <category><![CDATA[vlsi-physical-design]]></category>
            <category><![CDATA[engineering]]></category>
            <dc:creator><![CDATA[Ankush Agarwal]]></dc:creator>
            <pubDate>Tue, 06 Oct 2026 11:59:15 GMT</pubDate>
            <atom:updated>2026-10-06T11:59:15.196Z</atom:updated>
            <content:encoded><![CDATA[<p>I’m doing my master&#39;s in <strong>VLSI</strong> with a keen interest in physical design, and I found a unique combination between the sports/games and P.D. that I’ve been playing lately. So, I decided to start a series where I‘m sharing my thoughts on how every game reminds me of my subject. So the first sport on my list is <strong>“8-Ball Pool.&quot;</strong></p><p>Since I’ve been spending my breaks on 8-Ball Pool. At some point it hit me: I wasn’t relaxing; I was doing physical design with a cue stick. Same thinking, same mistakes, same frustration when one bad decision ruins everything that comes after.</p><p>I realize that the game itself aligns with the whole physical design flow. Here’s the mapping I found.</p><h3>1. The break shot is your floorplan</h3><p>In pool, the break decides how the balls spread. A good break opens the table and gives you options. A bad one leaves clusters and no clear path.</p><p>In physical design, <strong>floorplanning</strong> works the same way. Where you place macros, how you shape the die, and how you plan the power grid decide how easy or painful everything downstream will be. A poorly placed SRAM block can create routing congestion that no tool can fully rescue later.</p><p><strong><em>Lesson: </em></strong><em>The first decision has the longest shadow. You can’t fix a bad floorplan with a clever shot (or a clever router) later.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/447/1*4QrqBS1RHexkUEsuCL4hKA.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/470/1*jc_8vRPFG3u_jbMVFXr-5A.jpeg" /><figcaption>8-Ball Pool table with Clean Floorplanning</figcaption></figure><h3>2. Solids vs. stripes: choosing your constraints early</h3><p>Once you pocket your first ball, you’re committed to solids or stripes. You can’t switch halfway.</p><p>Early in a design flow, you commit to <strong>constraints</strong>, <strong>clock targets, and the power/performance/area trade-off</strong>. Chase maximum frequency, and you’ll pay in power and area. Choose wisely, because you’re living with it until tapeout.</p><h3>3. Position play is placement</h3><p>Beginners think about the ball they’re hitting. Good players think about where the cue ball ends up.</p><p><strong>Placement</strong> is the same. Placing a cell isn’t just about the cell; it&#39;s about the connections, its neighbors, and the wirelength it creates. A placer minimizes total wirelength much like a good player minimizes how much they have to fight the table on the next shot.</p><p><strong><em>Lesson: </em></strong><em>Think two or three shots ahead. A “good” local move can create a terrible global result.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Adkudnlzlv_lI-KmJeNIIA.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/418/1*YwQ-1t114Es_bdKu4Z37-g.png" /><figcaption>Pool table with scattered balls and placement of different blocks on chip</figcaption></figure><h3>4. A cluster of balls is a congestion hotspot</h3><p>Remember when five balls are glued together near a pocket and you can’t get a clean shot? That’s <strong>routing congestion</strong>: too many wires wanting the same limited tracks in the same region.</p><p>How do we fix it? Spread things out, with cell padding, lower local utilization, or moving blocks. Pool players do it with a break shot or a safety. Same idea: make room before you need it.</p><h3>5. Shot power is timing: setup and hold</h3><p>This one is my favorite.</p><p>• <strong>Too soft: </strong>the ball doesn’t reach the pocket in time. That’s a <strong>setup violation</strong>, where data arrives too late.</p><p>• <strong>Too hard: </strong>the cue ball overshoots, flies off, or scratches. That’s a <strong>hold violation</strong>, where data arrives too early and corrupts the next state.</p><p>Perfect timing isn’t “as fast as possible.” It’s <strong>arriving inside the window</strong>. Clock skew is like a wobbly cue arm: a little is tolerable, but too much breaks everything.</p><h3>6. Scratches and fouls are DRC and LVS errors</h3><p>A scratch gives your opponent a ball-in-hand. A <strong>DRC (Design Rule Check)</strong> violation sends you back to fix the layout. A foul is a rule you broke. A short circuit is two balls where only one should be.</p><p>You might make a beautiful shot, but if it breaks the rules (like potting the cue ball too), it doesn’t count. Signoff is unforgiving, and the foundry won’t take your chip with a “but my wire was almost fine.”</p><h3>7. Bank shots are detour routing</h3><p>Sometimes the direct path is blocked, so you bounce off the cushion. In <strong>routing</strong>, blocked tracks, macros, and congestion force detours. A detour costs extra wirelength, extra delay, and extra risk.</p><p>One twist: pool lets you shoot at any angle, but chip routing is <strong>Manhattan</strong>, with only horizontal and vertical wires on alternating metal layers. It’s like playing pool, where every shot must be at a right angle.</p><h3>8. Safety shots are ECOs</h3><p>When you can’t make a good shot, you play safe, leaving your opponent a hard position. In design, this is an <strong>ECO (Engineering Change Order)</strong>: small, careful fixes late in the flow that don’t disturb the rest of the design.</p><p>Late in a project, you don’t redo the whole table. You make the smallest change that fixes the problem.</p><h3>9. The 8-ball is timing closure</h3><p>Pocket all your balls, and you still have to sink the 8 ball. Pocket it early and you lose instantly.</p><p><strong>Timing closure</strong> is the 8-ball of physical design. You can finish placement, CTS, and routing, but if the critical path doesn’t meet timing at signoff, nothing else matters. It’s usually the last, hardest, and most nerve-racking shot.</p><h3>10. Practice is iteration</h3><p>Nobody gets good at pool in one game. Nobody closes timing in one run. Both are iterations: try, observe, adjust, and repeat. Each failed run teaches you where the congestion, the skew, or the weak spot is.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/626/1*sgDAWSqM5qYsqznisPfqUA.png" /><figcaption>Explained Analogy of the words</figcaption></figure><h3>Where the analogy breaks (an honest note)</h3><p>8-Pool is turn-based, and you control one ball at a time. Chip design is millions of cells and thousands of constraints optimized at once, with tools doing most of the heavy lifting. And pool has a winner and a loser, while chips optimize Power, Performance, and Area all together, with no single “win.”</p><p>These are just my thoughts, which help me stay connected to my subject even at the time when I’m playing. I know neither “VLSI” nor “8-Ball Pool” can help me achieve excellence in each other. But the mindset transfers: <strong>plan ahead, respect the rules, and stay calm on the last shot.</strong></p><p>Next time you’re stuck on a hard shot, think like a physical design engineer: Where is the congestion? What’s the critical path? What will the next shot look like?</p><p>And next time you’re debugging a timing report at 2 a.m., remember: it’s just the 8 ball.</p><p><em>Got a pool-and-chips analogy of your own? Drop it in the comments. 🎱</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=58b63a4120f4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Diabetes is Silent. AI doesn’t have to be.]]></title>
            <link>https://medium.com/@ankushbansal9201/diabetes-is-silent-ai-doesnt-have-to-be-6b910bd1be2d?source=rss-b7c59b350f5b------2</link>
            <guid isPermaLink="false">https://medium.com/p/6b910bd1be2d</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[medical-imaging]]></category>
            <category><![CDATA[explainable-ai]]></category>
            <category><![CDATA[healthcare]]></category>
            <dc:creator><![CDATA[Ankush Agarwal]]></dc:creator>
            <pubDate>Sun, 01 Feb 2026 20:27:31 GMT</pubDate>
            <atom:updated>2026-02-01T20:27:31.631Z</atom:updated>
            <content:encoded><![CDATA[<p><em>In this article we are going to see how machine learning can help to predict the diabetes and eye diseases early.</em></p><p>Diabetes is also known as a silent killer, it creeps in quietly in the body and damages the internal organ slowly and by the time someone gets to know the damage is irreversible. There are various consequences of the diabetes such as skin disease, cardiovascular disease but it has a major impact on eye diseases such as vision loss, cataract, diabetic retinopathy. There are various traditional ways of detecting the diabetes and eye disorder but they are slow and expensive.</p><p>That’s why inclusion on AI will helps us to design a model which is able to detect the diabetes and eye disorder in mean time.</p><p>This article will take you through the dual stage, explainable AI system:</p><ol><li>Prediction of diabetes using SVM algorithm on clinical dataset.</li><li>Prediction of eye disorder using EfficientNetB5 CNN architecture on retinal fundus images.</li></ol><p><em>But first we need to know why there’s a need for such a system</em></p><p>There’s a table given below which indicates the number of population suffering from diabetes. Approximately 500 million are living with diabetes today and this number is projected to increase upto 700 million by 2045. In India alone almost 50+ million people will get affected by diabetes till 2045 and that is very much concerning. Some reports says nearly 1 in 3 diabetic patient shows symptoms of retinopathy. That’s why a robust model which helps us to tackle this problem in necessary.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/488/1*q7NJs9czcb9air4fr_oziQ.png" /><figcaption><strong>Fig. 1:</strong> Top 10 countries or territories for number of adults (20–79 years) with diabetes in 2021 and 2045</figcaption></figure><p><em>The core idea behind making a dual stage explainable AI system is:</em></p><p>Both diabetes and eye disorders will get be predicted, integrating the explainable AI part will increase the interpretability of the system which helps in gain the trust and make the system understandable to the patients.</p><p><strong>STAGE 1: Diabetes Prediction (Clinical Data)</strong></p><p>In the first stage, I’m using <strong>Support Vector Machine </strong>(SVM), testing different kernels (linear, polynomial, RBF and sigmoid) to check which kernel gives the highest accuracy. And <strong>Radial Basis Function</strong> (RBF) is the stand out perform among the others. Giving ~<strong>90% accuracy.</strong></p><p>Introducing the concept of<strong><em> explainability AI</em></strong> makes the model shine among the rest of the previous works. As we know in the field of medical Accuracy alone can’t save the patients, they need a trusted system. That’s why this system integrates <strong>SHAP and LIME.</strong></p><p><strong>SHAP (Global + Local insight)</strong></p><p><strong>Shapely additive explanation</strong> is a method that helps us to understand how a machine learning model makes decisions. It tells us how much each input (feature) is helping the final prediction. Interpreting models in machine learning is an important part and SHAP provides a robust method to interpret model prediction by making attributes of importance scores to input feature.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/484/1*0vmmDKzfLjrETZ6KklFMUA.png" /><figcaption><strong>Fig. 2:</strong> SHAP summary plot of the dataset</figcaption></figure><p>The summary plot mentioned in fig. 2 revealed that <strong>polyuria</strong> and <strong>polydipsia</strong> were the two most influential predictors, with high feature values consistently pushing the model toward a positive diabetes diagnosis. Symptoms such as <strong>sudden weight loss</strong>, <strong>polyphagia</strong>, and <strong>visual blurring</strong> also showed strong positive SHAP contributions, indicating their significant association with higher predicted risk. Conversely, features like <strong>gender</strong>, <strong>alopecia</strong>, and <strong>muscle stiffness</strong> demonstrated relatively lower impact, contributing minimally to the model’s final decisions. The color gradient across the plot highlighted that high-intensity symptoms (represented in red) generally resulted in positive model output shifts, whereas low-intensity or absent symptoms (blue) pulled predictions toward the negative class.</p><p><strong>LIME (Patient-Level Explanation)</strong></p><p><strong>Local interpretable Model-agnostic Explanations</strong> is a very popular technique in explainable AI which explains why the model makes a specific decision by highlighting which input feature had the strongest influence. The most beautiful feature of it that it can be applied to any machine learning model regardless of its internal structure.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/502/1*bV1mple19gqTh0o31eXt_A.png" /><figcaption><strong>Fig. 3:</strong> LIME Explanation of Patient 15 from dataset</figcaption></figure><p>By taking a representative test sample (Patient 15) shown in the fig. 3 offered a clear, case-level interpretation of the model’s decision-making process. The analysis showed that <strong>polyuria</strong>, <strong>polydipsia</strong>, <strong>sudden weight loss</strong>, and <strong>gender</strong> contributed positively to the model’s prediction, pushing the output toward a diabetic classification. These features received the highest positive weights, indicating that their presence or intensity significantly influenced the model’s confidence. In contrast, symptoms such as <strong>irritability</strong>, <strong>itching</strong>, and <strong>genital thrush</strong> appeared with negative contributions, meaning their observed values nudged the model toward a non-diabetic outcome for this specific patient.</p><p>Together, SHAP and LIME provides a dual perspective on the model’s decision making process giving importance to the feature globally and provides patient level reasoning locally.</p><p><strong>STAGE 2: Eye Disease Prediction( Fundus Images)</strong></p><p>After predicting the diabetes, now we move to the next stage. In the second stage we are going to predict the eye diseases using EfficientNETB5 Convolutional neural network.</p><p>Why this is the best CNN architecture, as gives us the training <strong>accuracy of ~95% and validation accuracy of ~92%. </strong>These training results makes it the best CNN architecture. Using softmax probabilities, the model not only classify but it ranks the likely occurrence of different eye disease.</p><p>During training we were able to get the results for both eyes Fundus images (left and right) and because of “softmax” activation function which was used in the output layer, we were able to get the probabilities of different eight classes, although we were not able to get the dominant feature for now, but we considered the class which has the highest probability as the dominant feature. In both the cases the class <strong>“Normal”</strong> has the highest probability for these particular pair of image. The classification is clearly visible in the images provided below in the form of results.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/458/1*a7Nqbb64wMVOJLwcD4oBsw.png" /><figcaption><strong>Fig. 4:</strong> Right eye fundus image with probabilities of different class</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/463/1*PGLzlY5qz14jnrgx5Bw1zw.png" /><figcaption><strong>Fig. 5:</strong> Left eye fundus image with probabilities of different class</figcaption></figure><p><strong>CONCLUSION</strong></p><p>This system just doesn’t predict disease. It tries to connect the systemic disease (diabetes) with organ-specific damages (eyes), balancing both the performance and interpretability, avoiding dataset biasness. And finally it carries potential to solve the real major world problems.</p><p><strong>What’s next can be done here?</strong></p><p>Exploring the way of integrating both models into a unified predictive pipeline capable of simultaneously assessing systemic and ocular health, along with adding explainable AI with ocular dataset which makes it interpretable, unique, and useful for clinical treatment in medical field ultimately contributing to more comprehensive and proactive patient care.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6b910bd1be2d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[THE PAST OF ARTIFICIAL INTELLIGENCE]]></title>
            <link>https://medium.com/@ankushbansal9201/the-past-of-artificial-intelligence-71dbf65ea9b7?source=rss-b7c59b350f5b------2</link>
            <guid isPermaLink="false">https://medium.com/p/71dbf65ea9b7</guid>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[evolution]]></category>
            <dc:creator><![CDATA[Ankush Agarwal]]></dc:creator>
            <pubDate>Sat, 13 Sep 2025 11:32:07 GMT</pubDate>
            <atom:updated>2025-09-13T11:32:07.891Z</atom:updated>
            <content:encoded><![CDATA[<p>I was just randomly reading a book named “<strong><em>Artificial intelligent a modern</em></strong><em> </em><strong><em>approach</em></strong><em>” </em>by Stuart J. Russell and Peter Norvig and a thought came into my mind which was “<strong>Everyone is saying that Artificial Intelligence is the future but no one is talking about the past of AI” </strong>and this thought made me more curious, so I researched more about it and tries to find out the answer of few of my questions, I hope some of them do align with yours too.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/527/1*6wen8w--uLKTdm0QC95Z5A.png" /></figure><p><strong><em>QUES 1) WHAT EXACTLY AI IS AND WHAT IS THE HISTORY OF AI?</em></strong></p><p>We call ourselves Homo sapiens — man the wise — because our intelligence is so important to us. For thousands of years, we have tried to understand how we think and act — that is, how our brain, a mere handful of matter, can perceive, understand, predict, and manipulate a world far larger and more complicated than itself. The field of artificial intelligence, or AI, is concerned with not just understanding but also building intelligent entities — machines that can compute how to act effectively and safely in a wide variety of novel situations.</p><p>At its heart, Artificial Intelligence is an attempt to build machines that think, reason, learn and adapt just like humans. It is to establish intelligent agents, which sense the environment and act so as to maximize the chances of achieving their goals. AI has deeper roots than you may think. Stories and myths from the ancient world were rife with artificial beings.</p><p>There are 4 approaches given by the people of earlier time to understand the basic meaning of artificial intelligent, which are:-</p><p><strong>1)</strong> <strong>ACTING HUMANLY: The Turing Test Approach</strong></p><p>The Turing test, proposed by Alan Turing (1950), was designed as a thought experiment that consists of a philosophical vagueness of the question “Can a machine think?” A computer passes the test if a human interrogator, after posing some written questions, cannot tell whether the written responses come from a person or a computer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/392/1*YMeUvVSLmFCQG3ZPY3k3qQ.png" /></figure><p><strong>2) THINKING HUMANLY: The cognitive modeling approach</strong></p><p>This approach came into the picture to solve one of the main question and that was “To say that a program thinks like a human, we must know how humans think.” So, we can learn about human thoughts in three way:-</p><p><strong>Introspection</strong>-&gt; — trying to catch our own thoughts as they go by</p><p><strong>Psychological experiments</strong>-&gt; observing a person doing some action</p><p><strong>Brain imaging</strong>-&gt;observing the brain in action</p><p>Once we have a sufficiently precise theory of the mind, it becomes possible to express the theory as a computer program. If the program’s input–output behavior matches corresponding human behavior, that is evidence that some of the programs mechanisms could also be operating in humans.</p><p><strong>3) THINKING RATIONALLY: The “laws of thought” approach</strong></p><p>The Greek philosopher <strong>Aristotle</strong> was one of the first to attempt to codify “right thinking” — that is, irrefutable reasoning processes. His syllogisms provided patterns for argument structures that always yielded correct conclusions when given correct premises. The canonical example starts with Socrates is a man and all men are mortal and concludes that Socrates is mortal. These laws of thought were supposed to govern the operation of the mind; their study initiated the field called <strong>logic.</strong></p><p>Later in 19th century, logic was developed and used to build intelligent machines based on logical reasoning, but the logic assumes that everything we know with certainty, however it doesn’t applicable in real life problems.</p><p>So probability helps to fill this gap. Probability and logic help us to think but they don’t automatically tell us how to act. For that we need a rational action.</p><p><strong>4) ACTING RATIONALLY: The rational agent approach</strong></p><p>An agent is just something that acts. Of course, all computer programs do something, but computer agents are expected to do more: operate autonomously, perceive their environment, persist over a prolonged time period, adapt to Do the right thing Standard model Limited rationality change, and create and pursue goals. A rational agent is one that acts so as to achieve the best outcome or, when there is uncertainty, the best expected outcome.</p><p>The rational-agent approach to AI has two advantages over the other approaches. First, it is more general than the “laws of thought” approach because correct inference is just one of several possible mechanisms for achieving rationality. Second, it is more amenable to scientific development.</p><p>Aristotle (384–322 BCE) was the first to formulate a precise set of laws governing the rational part of the mind. He developed an informal system of syllogisms for proper reasoning, which in principle allowed one to generate conclusions mechanically, given initial premises. Ramon Llull (c. 1232–1315) devised a system of reasoning published as Ars Magna or The Great Art (1305). Llull tried to implement his system using an actual mechanical device: a set of paper wheels that could be rotated into different permutations.</p><p>In his 1651 book Leviathan, Thomas Hobbes (1588–1679) suggested the idea of a thinking machine, an “artificial animal” in his words, arguing “For what is the heart but a spring; and the nerves, but so many strings; and the joints, but so many wheels.” He also suggested that reasoning was like numerical computation: “For ‘reason’ …is nothing but ‘reckoning,’ that is adding and subtracting.” Dualism Empiricism Induction It’s one thing to say that the mind operates, at least in part, according to logical or numerical rules, and to build physical systems that emulate some of those rules.</p><p><strong><em>QUES 2) HOW IT STARTED AND WHAT WAS THE TRANSITION PERIOD AND HOW IT GOT THE HYPE?</em></strong></p><p><strong>The inception of artificial intelligence, early enthusiasm, great expectations</strong></p><p>The first work that is now generally recognized as AI was done by Warren McCulloch and Walter Pitts (1943). Inspired by the mathematical modeling work of Pitts’s advisor Nicolas Rashevsky (1936, 1938), they drew on three sources: knowledge of the basic physiology and function of neurons in the brain; a formal analysis of propositional logic due to Russell and Whitehead; and Turing’s theory of computation.</p><p>Two undergraduate students at Harvard, Marvin Minsky (1927–2016) and Dean Edmonds, built the first neural network computer in 1950. The SNARC, as it was called, used 3000 vacuum tubes and a surplus automatic pilot mechanism from a B-24 bomber to simulate a network of 40 neurons.</p><p>However, Alan Turing’s vision was the most influential. He gave lectures on the topic as early as 1947 at the London Mathematical Society and articulated a persuasive agenda in his 1950 article “Computing Machinery and Intelligence.” Therein, he introduced the Turing test, machine learning, genetic algorithms, and reinforcement learning.</p><p>The early years of AI, often called the “Golden Years” (1956–1974), saw significant breakthroughs. Programs like the Logic Theorist (1956) by Allen Newell, Herbert Simon, and J.C. Shaw, proved mathematical theorems, and ELIZA (1966) by Joseph Weizenbaum simulated a psychotherapist. There was immense enthusiasm and a belief that human-level AI was just around the corner. Funding poured in, and the media began to take notice.</p><p><strong>A dose of reality</strong></p><p>The following statement by Herbert Simon in 1957 is often quoted:</p><p><em>“It is not my aim to surprise or shock you — but the simplest way I can summarize is to say that there are now in the world machines that think, that learn and that create. Moreover, their ability to do these things is going to increase rapidly until — in a visible future — the range of problems they can handle will be coextensive with the range to which the human mind has been applied.”</em></p><p>Simon predicted that within 10 years, computers would beat humans in chess and prove major theorems. These came true in about 40 years instead, as early AI, though good on simple tasks, failed on harder problems.</p><p>There were two main reasons for this failure. The first was that many early AI systems were based primarily on “informed introspection” as to how humans perform a task, rather than on a careful analysis of the task, what it means to be a solution, and what an algorithm would need to do to reliably produce such solutions.</p><p>The second reason for failure was a lack of appreciation of the intractability of many of the problems that AI was attempting to solve.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/466/1*54GmLgGcLXBcO6jreTBjSw.png" /></figure><p><strong>Expert systems</strong></p><p>The picture of problem solving that had arisen during the first decade of AI research was of a general-purpose search mechanism trying to string together elementary reasoning steps to find complete solutions.</p><p>The first successful commercial expert system, R1, began operation at the Digital Equipment Corporation (McDermott, 1982). The program helped configure orders for new computer systems; by 1986, it was saving the company an estimated $40 million a year.</p><p>The widespread growth of applications to real-world problems led to the development of a wide range of representation and reasoning tools. Some were based on logic — for example, the Prolog language became popular in Europe and Japan, and the PLANNER family in the United States.</p><p>In 1981, the Japanese government announced the “Fifth Generation” project, a 10-year plan to build massively parallel, intelligent computers running Prolog. The budget was to exceed a $1.3 billion in today’s money. In response, the United States formed the Microelectronics and Computer Technology Corporation (MCC), a consortium designed to assure national competitiveness. In both cases, AI was part of a broad effort, including chip design and human-interface research</p><p>Overall, the AI industry boomed from a few million dollars in 1980 to billions of dollars in 1988, including hundreds of companies building expert systems, vision systems, robots, and software and hardware specialized for these purposes.</p><p><strong><em>QUES 3) HOW THE DIFFERENT SUBPARTS OF AI CAME INTO PICTURE?</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/590/1*-U9jmnE-eq1uLemUXW3lJg.png" /></figure><p><strong>The return of neural networks (1986-present)</strong></p><p>In the mid-1980s at least four different groups reinvented the back-propagation learning algorithm first developed in the early 1960s. The algorithm was applied to many learning problems in computer science and psychology, and the widespread dissemination of the results in the collection Parallel Distributed Processing (Rumelhart and McClelland, 1986) caused great excitement.</p><p><strong>Probabilistic reasoning and machine learning (1987-present)</strong></p><p>The brittleness of expert systems led to a new, more scientific approach incorporating probability rather than Boolean logic, machine learning rather than hand-coding, and experimental results rather than philosophical claims.14 It became more common to build on existing theories than to propose brand-new ones, to base claims on rigorous theorems or solid experimental methodology (Cohen, 1995) rather than on intuition, and to show relevance to real-world applications rather than toy examples.</p><p>AI was founded in part as a rebellion against the limitations of existing fields like control theory and statistics, but in this period it embraced the positive results of those fields. As David McAllester (1998) put it:</p><p><em>“In the early period of AI it seemed plausible that new forms of symbolic computation, e.g., frames and semantic networks, made much of classical theory obsolete. This led to a form of isolationism in which AI became largely separated from the rest of computer science. This isolationism is currently being abandoned. There is a recognition that machine learning should not be isolated from information theory, that uncertain reasoning should not be isolated from stochastic modeling, that search should not be isolated from classical optimization and control, and that automated reasoning should not be isolated from formal methods and static analysis.”</em></p><p>1988 was an important year for the connection between AI and other fields, including statistics, operations research, decision theory, and control theory. Judea Pearl’s (1988) Probabilistic Reasoning in Intelligent Systems led to a new acceptance of probability and decision models theory in AI.</p><p>A second major contribution in 1988 was Rich Sutton’s work connecting reinforcement learning — which had been used in Arthur Samuel’s checker-playing program in the 1950s — to the theory of Markov decision processes (MDPs) developed in the field of operations research. A flood of work followed connecting AI planning research to MDPs, and the field of reinforcement learning found applications in robotics and process control as well as acquiring deep theoretical foundations.</p><p><strong>Big data (2001-present)</strong></p><p>Remarkable advances in computing power and the creation of the World Wide Web have facilitated the creation of very large data sets — a phenomenon sometimes known as big data. These data sets include trillions of words of text, billions of images, and billions of hours of speech and video, as well as vast amounts of genomic data, vehicle tracking data, clickstream data, social network data, and so on.</p><p>This has led to the development of learning algorithms specially designed to take advantage of very large data sets. With large enough data sets, however, suitable learning algorithms can achieve an accuracy of over 96% on the task of identifying which sense was intended in a sentence.</p><p>The availability of big data and the shift towards machine learning helped AI recover commercial attractiveness. Big data was a crucial factor in the 2011 victory of IBM’s Watson system over human champions in the Jeopardy! Quiz game, an event that had a major impact on the public’s perception of AI.</p><p><strong>Deep learning (2011-present)</strong></p><p>The term <strong>deep learning</strong> refers to machine learning using multiple layers of simple, adjustable computing elements. Experiments were carried out with such networks as far back as the 1970s, and in the form of convolutional neural networks they found some success in hand written digit recognition in the 1990s (LeCun et al., 1995). It was not until 2011, however, that deep learning methods really took off. This occurred first in speech recognition and then in visual object recognition.</p><p>The use of a deep network to represent the evaluation function contributed to ALPHAGO’s victories over the leading human Go players (Silver et al., 2016, 2017, 2018).</p><p>These remarkable successes have led to a resurgence of interest in AI among students, companies, investors, governments, the media, and the general public. It seems that every week there is news of a new AI application approaching or exceeding human performance, often accompanied by speculation of either accelerated success or a new AI winter.</p><p>QUES 4) <strong>LASTLY HOW IT HELPED PEOPLE IN PAST AND HOW IT CAN HELP PEOPLE IN FUTURE?</strong></p><p>In the past, Artificial Intelligence made its mark by solving real-world problems in ways that humans alone could not. One of the earliest breakthroughs came in <strong>medical diagnosis</strong> during the 1970s, when the expert system <strong>MYCIN</strong> was developed at Stanford to help doctors identify bacterial infections and recommend antibiotics. Even though it was never widely deployed, it showed how AI could aid physicians with complex decision-making.</p><p>In <strong>manufacturing</strong>, the rise of industrial robots like<strong> Unimate</strong> (introduced in 1961 at a General Motors plant) revolutionized automobile assembly lines by performing repetitive and dangerous tasks with precision, improving both safety and efficiency.</p><p>In the field of <strong>space exploration</strong>, NASA used AI-based planning systems, such as <strong>Deep Space 1’s</strong> <strong>Remote Agent </strong>(1999), which was the first autonomous spacecraft control system that could plan and execute tasks without human intervention.</p><p>AI also played a role in <strong>finance</strong> during the 1980s and 1990s, where rule-based systems and early machine learning models were used for fraud detection and credit scoring.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/544/1*lTjVe3Hid1NI-0l1vmuU6A.png" /></figure><p>Even in entertainment, AI’s role was seen when IBM’s <strong>Deep Blue</strong> defeated world chess champion <strong>Garry Kasparov in 1997</strong>, marking a cultural milestone and proving AI’s ability to compete with human intelligence in strategy games. These examples show that long before today’s hype, AI was already quietly helping people in healthcare, industry, science, and everyday decision-making.</p><p>And now in future, what I think is we can’t even predict what we are capable of as a human and that same thought makes me believe that we can’t even say that exactly is the future it all depends upon we {HUMAN}, there are various AI tools developing each day, each countries trying to make their tools, technologies better than the others. It feels like we are running in a race which does not have any end yet, and I do believe that there will some end of this race. But I just want that we should slow down our pace, take a deep breath and look back at the, AI’s history which was full of ambition, unexpected failures, new insights, and gradual progress. It shows that innovation rarely proceeds in straight lines — but each pause, each winter, made the later advances stronger. As we rush forward into new possibilities, keeping the lessons of the past in mind will help ensure AI grows not just powerful, but helpful, fair, and aligned with human values.” Lastly I would like each of you who are interested in this filed do recommend the book “<strong><em>Artificial intelligent a modern approach</em></strong><em>” </em>by Stuart J. Russell and Peter Norvig, this book helped me write this blog. Thankyou everyone for reading this, I hoped you liked it.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=71dbf65ea9b7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Machine learning fundamentals]]></title>
            <link>https://medium.com/@ankushbansal9201/machine-learning-fundamentals-894f86ccc6f2?source=rss-b7c59b350f5b------2</link>
            <guid isPermaLink="false">https://medium.com/p/894f86ccc6f2</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[reinforcement-learning]]></category>
            <category><![CDATA[supervised-learning]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <dc:creator><![CDATA[Ankush Agarwal]]></dc:creator>
            <pubDate>Fri, 15 Aug 2025 13:32:05 GMT</pubDate>
            <atom:updated>2025-08-15T13:48:22.717Z</atom:updated>
            <content:encoded><![CDATA[<p>In this we are going to learn various fundamentals of machine learning.</p><p><strong>Introduction of machine learning</strong></p><p>Machine learning is a branch of Artificial Intelligence that focuses on developing models or train software to make useful predictions or generate content itself from the data given by the user. It makes machine to think like human.</p><p><strong>TYPES OF MACHINE LEARNING</strong></p><p>There are various types of machine learning , shown as below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/650/1*MqTTVToYhxgeq1v3lvhKDg.png" /><figcaption>Various types of machine learning</figcaption></figure><p><strong>SUPERVISED MACHINE LEARNING</strong></p><p>In Supervised machine learning we train a model which can make predictions after seeing lots and lots of past data with correct answers and then discovers the connection/pattern between elements in the new or unseen data to produce the correct answers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/619/1*hwpYFp5WtA3TZokDOXFCwA.png" /><figcaption>Working of supervised machine learning</figcaption></figure><p><strong>TYPES OF SUPERVISED MACHIEN LEARNING</strong></p><p>There are two types of supervised machine learning which we’ll learn with the help of a flowchart:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*xnsJHKniHFm5wbHPEYQ7Mw.png" /><figcaption>Flow chart contains types of supervised ml with their sub types</figcaption></figure><p><strong>Classification supervised machine learning<br></strong>Classification in machine learning refers to a supervised learning technique where it predicts the likelihood that something belongs to a particular category. The output of this model is in the form of a value. It learns by looking at examples with labels (like emails marked “spam” or “not spam”). After learning, it can decide which category new items belong to, like identifying if a new email is spam or not.</p><p><strong>Types of classification</strong></p><p><strong>Binary classification</strong></p><p>This is the simplest kind of classification. In binary classification, the goal is to sort the data into two distinct categories. The model output a value from a class that contain only two values. For eg. We can make a model which will provide the information that whether it’ll rain or no rain.</p><p><strong>Multiclass classification</strong></p><p>Here, instead of just two values, the model output a value from a class that contains more than two values. For eg. A model whose output either can be rain, hail, snow or sleet.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*kUXI5moxzsZkkaWLxxP_rw.png" /><figcaption>Difference between binary and multiclass classification</figcaption></figure><p><strong>Multilabel Classification</strong></p><p>In this type of classification a model helps us to show that a single piece of data can belong to multiple categories. For eg. A movie recommendation system, The system checks various features (like movie plot, actors, or genre tags) and assigns multiple labels to a single piece of data, rather than just one.</p><p><strong>Regression Supervised Learning</strong></p><p>Regression in machine learning refers to a supervised learning technique where the goal is to predict a numerical continuous value based on one or more independent feature. Unlike classification model whose output is value, the output of regression model is numerical.</p><p><strong>Types of regression</strong></p><p><strong>Linear regression</strong></p><p>Linear regression is a supervised machine learning technique that analyzes labeled data to find the best-fitting straight line for prediction. It works on the assumption that the input and output share a linear relationship, meaning changes in the input causes proportional changes in the output. The model learns this relationship during training and uses it to predict future values. This simple yet powerful approach is widely applied in statistics, economics, and data science.</p><p><strong>Types of linear regression</strong></p><p><strong>SIMPLE LINEAR REGRESSION<br></strong>Simple linear regression is one of the simplest and most widely used statistical models or technique which is used to find the relationship between variables.<br>Linear regression finds the relationship between features and labels. For example predicting the increase in salary of an employee based on his/her experience.</p><p>Mathematically we can solve it by using the following equation:-</p><p><em>y = mx + c</em></p><p>where,</p><p><em>y</em>=predict label output ( dependent variable)</p><p><em>m</em>= slope of the line</p><p><em>x</em>= input (independent variable)</p><p><em>c</em>= intercept ( the value of y when x=0)</p><p>The best-fit line will be the one that optimizes the values of m (slope) and b (intercept) so that the predicted y values are as close as possible to the actual data points.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/742/1*JksFte0is4wyyNA-NmTdFQ.png" /><figcaption>Plotting of Linear Regression</figcaption></figure><p><strong>Multiple linear regression</strong></p><p>Multiple linear regression involves more than one independent variable and one dependent variable. The equation for multiple linear regression is:</p><p><em>y’=θ0 + θ1x1 + θ2x2 +⋯+ θnxn</em></p><p>Where,</p><p><em>y’</em>= predicted value</p><p><em>θ0</em>= intercept</p><p><em>x1,x2…xn</em>= input (independent variables)</p><p><em>θ1, θ2…… θn</em> =coefficient</p><p>The goal of the algorithm is to find the best Fit Line equation that can predict the values based on the independent variables.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/591/1*mQ-EiF89ysSY20WiBvsz3w.png" /><figcaption>3D plot of multiple regression</figcaption></figure><p><strong>Polynomial Regression <br></strong>Polynomial regression is an extension of linear regression that models the relationship between the independent variable (x) and dependent variable (y) as an nth-degree polynomial. It is particularly useful when the data shows a non-linear pattern, allowing the model to fit a curve instead of a straight line. By adding polynomial terms to the linear model, it can capture more complex trends, such as population growth over time or other curved relationships in data.</p><p>The equation for polynomial regression is:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/520/1*gwEbN6ndabr4VHiipq7IRg.png" /></figure><p>y= predicted value (dependent variable)</p><p>β0=intercept</p><p>β1, β2, β3….. βn=coefficients for each polynomial terms</p><p>x → Independent variable (input)</p><p>𝑛 → Degree of the polynomial</p><p>𝜖 → Error term (difference between actual and predicted value)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/659/1*041KG_Peks7K99cBXqMvSg.png" /><figcaption>Plot of Polynomial regression</figcaption></figure><p>Choosing the right polynomial degree (n) is important: a higher degree may fit the data more closely but it can lead to overfitting. The degree should be selected based on the complexity of the data.</p><p><strong>Pictorial Difference between classification and regression</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*_BZ2T144IJwZsPbUOAIewg.png" /></figure><p><strong>There are many algorithms used in supervised learning each suited to different types of problems. Some of the most commonly used supervised learning algorithms are:</strong></p><ol><li><strong>Gradient descent and cost function</strong></li></ol><p><strong>Gradient descent</strong> is an optimization algorithm used in linear regression (and other models) to find the best-fit line for a given dataset by minimizing the loss (error). It adjusts the model parameters iteratively to produce the line that results in the lowest possible error.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/520/1*VIJGes9RWWPL0BrdfKIe7g.png" /></figure><p>“Linear regression finds the best-fit line for a dataset by minimizing the error between the actual and predicted values. This error is measured using a cost function, usually the <strong>Mean Squared Error</strong> (MSE). The goal is to determine the model parameters — the slope 𝑚 and the intercept<em> c</em> that minimize this cost function.”</p><p><strong>Cost function in linear regression</strong></p><p>As we have studied earlier that Linear regression is a technique used to predict values by fitting the best-fit line through the data points. Initially, the model’s predictions may not perfectly match the actual values. So to evaluate the model’s performance, we need a different function and that is a cost function, which measures the difference between the predicted outputs and the actual data.</p><p>The most common cost function used in linear regression is<strong> Mean squared error </strong>(MSE), which calculate the average of squared error between the predicted value and the actual value.</p><p>Mathematical expression of cost function is:-</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/392/1*9XktRX_OqNCNvC91zVsyXA.png" /></figure><p>where,</p><p>J(m,b) → Cost function (measures error)</p><p>𝑛 → Number of data points</p><p>𝑦𝑖 → Actual value for the i(th) data point</p><p>𝑦^𝑖→ Predicted value for the i(th) data point</p><p>𝑚 → Slope of the line</p><p>𝑏→ Intercept of the line</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*KPbL7dck6Z9jpoFBrsBp0g.png" /></figure><p>By taking an example we can see that the image illustrates linear regression and how gradient descent optimizes it. On the left, the best-fit line predicts house prices based on size, with the vertical dashed lines showing the prediction errors measured by the cost function. On the right, the curve represents the cost function’s value for different parameters, and gradient descent moves step-by-step toward the lowest point, where the model achieves minimum error and best accuracy.</p><p><strong>NOTE:</strong> While MSE is commonly used, there are other cost functions that can be used in linear regression each with its own advantages and that you can study by your own (according to your interest).</p><p><strong>2. Logistics regression</strong></p><p>Logistics regression is a supervised machine learning algorithm used for classification problems. Unless linear regression which predicts the continuous values, it predicts the probability that an input belongs to a specific class.</p><p>It is used for binary classification, where the output can be of two possible categories such as (yes/no , T/F or 0/1). Logistics regression uses sigmoid function to convert the input data into a probability values between 0 and 1.</p><p><strong>Types of logistics Regression</strong></p><p><strong>Binomial Logistics regression</strong></p><p>This type of logistics regression is used for dependent variable which has only two possible categories or outcomes. Typically used for Binary classification. For ex. Whether an email is spam or not.</p><p><strong>Multinomial logistics regression</strong></p><p>This type of logistics regression is used for dependent variable which has three or more possible categories that are not in any particular order. For example, classifying animals into categories like “cat,” “dog” or “sheep.” It extends the binary logistic regression to handle multiple classes.</p><p><strong>Ordinal logistics regression</strong></p><p>This type of logistics regression allies where the dependent variable has three or more categories with a natural order or ranking assigned to it. Examples include ratings like “low,” “medium” and “high.” It takes the order of the categories into account when modeling.</p><p><strong>Understanding Sigmoid function</strong></p><p><strong>Sigmoid function</strong> is used to convert the raw data or output of model into a probability value between 0 and 1.This function takes any real number and maps it into the range of 0 and 1 forming “<strong>S</strong>” shaped curve called sigmoid curve.(as shown on the figure below).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/434/1*nRS85Icu5HuzBosNXGk9_A.png" /><figcaption>Sigmoid curve</figcaption></figure><p>0.5 value is used to decide the class label.</p><p>Points to remember:-</p><p>1) If the sigmoid output is same as 0.5 to above it the input is classified as 1.</p><p>2) If the sigmoid output is below the threshold the input is classified as 0.</p><p><strong>Mathematical equation for sigmoid function:-</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/273/1*UFX_Gr0_hoj0uYs3aDq-tw.png" /></figure><p>Output range: 0&lt;𝜎(𝑥)&lt;1</p><p>When , 𝑥→+∞x→+∞, σ(x)→1</p><p>When 𝑥→−∞x→−∞, σ(x)→0</p><p>At x=0, σ(0)=0.5</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/492/1*WX28lbYxUpRsEPyAfhEKow.png" /></figure><p><em>x1,x2,……xn</em> → input feature values</p><p><em>w1,w2….wn</em>→ weights learned by the model</p><p>𝑏→ bias term</p><p><strong>3. Decision Tree</strong></p><p>A decision tree is a supervised learning method that can handle both classification and regression problems. It follows a hierarchical tree-like structure composed of a root node, internal nodes, branches, and leaf nodes. Functioning like a step-by-step flowchart, it guides decisions through:</p><p><strong>Internal nodes </strong>that test specific attributes.</p><p><strong>Branches </strong>that<strong> </strong>represent possible outcomes of those tests.</p><p><strong>Leaf nodes</strong> that deliver the final prediction or decision.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/526/1*_rn7CcX8oSY0aVeisVuIXw.png" /><figcaption>Structure of a Decision Tree</figcaption></figure><p>Decision trees are popular for their clarity, adaptability, and minimal need for data preprocessing.</p><p><strong>Let’s understand more about decision with the help of an example:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*VgJCr00iJyJf8XT96bt-sQ.png" /></figure><p>This image shows an example of a decision tree used in business analysis to make a decision — likely about selecting a candidate or approving an opportunity. Detailed explanation of how decision tree works is given below:</p><p><strong>1. Root Node — “Years of Exp.”</strong></p><p>The first decision point checks the years of experience of the person.</p><p>If more than 1 year→ move to the left branch.</p><p>If 1 year or less → move to the right branch.</p><p><strong>2. Left Branch — “#Awards”</strong></p><p>For candidates with more than 1 year of experience, the next criterion is the number of awards they have.</p><p>If more than 2 awards → Yes (decision is positive).</p><p>If 2 awards or fewer → No (decision is negative).</p><p><strong>3. Right Branch — “#Internships”</strong></p><p>For candidates with 1 year or less of experience, the next check is the number of internships.</p><p>If more than 2 internships→ Yes (positive decision).</p><p>If 2 internships or fewer → move to the next criterion, GPA.</p><p><strong>4. GPA Check</strong></p><p>If GPA is greater than 3.7 → Yes (positive decision).</p><p>If GPA is 3.7 or less → No (negative decision).</p><p><strong>Interpretation:</strong></p><p>This decision tree represents a structured way of making a final decision based on multiple factors:</p><p>First, experience is considered.</p><p>Then, depending on experience level, awards or internships are evaluated.</p><p>For low internship counts, GPA acts as a tie-breaker.</p><p>It shows how decision trees split data step-by-step until a clear Yes or No outcome is reached.</p><p><strong>Concept of information gain in decision tree</strong></p><p>Information Gain measures how effective a question (or feature) is in dividing data into distinct groups. It calculates the reduction in uncertainty after making the split. A strong question produces more well-defined groups, and the feature with the highest Information Gain is selected for the decision. This calculation is based on <strong>entropy</strong>.</p><p>Information gain is defined as the difference between the entropy of branch node and entropy of leaf or sub branch node.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/781/1*Pn0yECCSW-98Ca6zHE1dTg.png" /></figure><p><strong>Entropy</strong></p><p>Entropy in machine learning is a measure of uncertainty or impurity in a dataset. It comes from information theory and tells us how mixed the classes are in a given set of data. Mathematically, it is defined as:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/458/1*55BCgTU1qQMXPIaH0xNLlw.png" /></figure><p><strong>S → </strong>The dataset</p><p><strong>𝑐 → </strong>Number of classes</p><p><strong>𝑝𝑖→ </strong>Probability of samples belonging to class</p><p><strong>4. Support vector machines [SVM] algorithm</strong></p><p>Support Vector Machine (SVM) is a supervised machine learning algorithm used for both classification and regression. It works by finding the optimal boundary, called a <strong>hyperplane</strong> that best separates the different classes in the dataset. SVM is especially effective for binary classification problems, such as distinguishing spam from non-spam emails or identifying cats versus dogs.</p><p><strong>The main goal of SVM:-</strong></p><p>The main goal is to maximize the margin between the two classes. The maximum or larger the margin the better the model performs on new and unseen data. It works by finding the decision planes that separate data into different classes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/933/1*O7subvR-PG8dvEw1XOX8Nw.png" /><figcaption>Comparison of Good Margin vs. Bad Margin in Support Vector Machines</figcaption></figure><p><strong>KEY COMPONENTS OF SVM</strong></p><p><strong>Hyperplane: </strong>A decision boundary separately different classes in feature space and is represented by equation wx + b=0 in linear classification.</p><p><strong>Support vectors:</strong> The closest data points to the hyperplane, it helps in finding the hyperplane and margin in SVM.</p><p><strong>Margin:</strong> The distance between hyperplane and the support vectors.</p><p><strong>Kernel:</strong> A function that maps data to a higher dimensional area or space enabling SVM to handle non linearly separable data with ease.</p><p><strong>Hard margin</strong>: Maximum margin that perfectly separates the data without misclassifications.</p><p><strong>Soft margin</strong>: it allows some misclassification by introducing slack variable, balancing margin maximization and misclassification penalties.</p><p><strong>Hinge loss:</strong> SVM uses a loss function to give a penalty when points are classified incorrectly or fall too close to the boundary, and it adds a regularization term to keep the model balanced and accurate.</p><p>The SVM optimizes the following equation to balance margin maximization and penalty minimization:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/644/1*fLZveKfqcQx3-py1EldHHA.png" /></figure><p>When data is not linearly separable i.e. it can’t be divided by a straight line, SVM uses a technique called <strong>kernels</strong> to map the data into a higher-dimensional space where it becomes separable.</p><p><strong>Types of kernels</strong></p><p><strong>LINEAR KERNEL: </strong>It is suitable when the data is linearly separable meaning that a straight line can effectively separate the classes. Linear kernel can be used for text classification.</p><p>It is represented as: K(x,y)=x.y</p><p><strong>POLYNOMIAL KERNEL: </strong>It is useful when the data is not linearly separable but still follows a pattern. Polynomial kernel is used for image recognition. The formula of polynomial kernel is:</p><p>K(x,y)=(x.y + c)^d</p><p><strong>RADIAL BASIS FUNCTION (RBF) KERNEL: </strong>RBF kernel maps the data into an infinite dimensional space making it highly effective for complex classification. The formula of RBF kernel is:</p><p><em>K</em>(<em>x</em>,<em>y</em>)=<em>e</em>−(<em>γ</em>∣∣<em>x</em>−<em>y</em>∣∣2) , where <em>γ </em>is a parameter that controls the influence of each training example.</p><p><strong>NOTE:</strong> There are more types of kernel that exists in the field of machine learning, that you can study according to your preference.</p><p><strong>5. k-nearest neighbors(KNN) algorithm</strong></p><p>It is a supervised learning algorithm which is generally used for classification but can also be used for regression tasks.</p><p>It works by finding the “k” closest data points (neighbors) to a given input and makes a prediction based on the majority class {for classification} or average value {for regression}.</p><p>K-nearest is also named as a lazy learner algorithm because it does not learn from the training set immediately instead it stores the dataset and at the time of classification it performs an action on dataset.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*GGW74OeMsnZfzN5SZEtZ9w.png" /><figcaption>Classification using K-Nearest Neighbors (KNN)</figcaption></figure><p><strong>Detailed explanation of how k-nearest neighbors is working in the above figure:</strong></p><p><strong>Before training (left side): </strong>In k-NN, there is no real “training” phase like in other algorithms — it simply stores all the labeled data points (blue = positive reviews, pink = negative reviews). The yellow query data point is a new review whose label we want to predict.</p><p><strong>Prediction step (After training in this diagram): </strong>To classify the query point, k-NN looks at the k closest points to it in the feature space (based on distance, often Euclidean distance).</p><p>If most of those neighbors are blue points (positive reviews), the query will be classified as positive.</p><p>If most are pink points (negative reviews), it will be classified as negative.</p><p>In this case, the query point’s nearest neighbors are mostly positive reviews, so k-NN assigns it to the positive review class (blue group). <strong>This is why in the “After training” image, the yellow point becomes blue.</strong></p><p><strong>Distance metrics used in KNN</strong></p><p><strong>Euclidean Distance</strong></p><p>It is defined as straight line distance between two points in a plane or space.it is the most common distance metrics which is used in machine learning model.</p><p><strong>The formula of Euclidean distance is:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/402/1*hNh2JauSqLBJ8YqP5vp7KQ.png" /></figure><p><strong>Where,</strong></p><p><strong>pi= </strong>value of the i(th) feature for point 𝑝</p><p><strong>𝑞𝑖= </strong>value of the i(th) feature for point 𝑞</p><p><strong>𝑛= </strong>total number of features</p><p>So, we have studied the supervised machine learning in detail, still this is a very vast field and you can explore more about it from other resources. Now, next up is second type of machine learning i.e. <strong>Unsupervised machine learning.</strong></p><p><strong>UNSUPERVISED MACHINE LEARNING</strong></p><p>Unsupervised Machine Learning is a type of machine learning where the algorithm is given data without any labels — meaning we don’t tell it the correct answers in advance.</p><p>The goal is for the algorithm to find hidden patterns, structures, or relationships in the data on its own.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*gzxbEz8eGgDST_Ein6xN4A.png" /></figure><p><strong>Main types of unsupervised learning</strong></p><p><strong>Clustering unsupervised learning</strong></p><p>The task of grouping data points based on their similarities with each other is called clustering. This method is defined under the branch of unsupervised learning.</p><p>Clustering can help you group customers with similar purchasing behaviors, which can then be used for targeted marketing, product recommendations, or customer segmentation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/538/1*peHGVNgDTb48LkRcTaXODQ.png" /><figcaption>Clustering Unlabeled Data</figcaption></figure><p><strong>TYPES OF CLUSTERING</strong></p><p><strong>Hard clustering: </strong>In this type of clustering, each data point belongs to a cluster completely or not.</p><p><strong>Soft clustering: </strong>Instead of assigning each data points into a separate cluster, a probability or likelihood of that point being that cluster is evaluated.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/781/1*wtn8bUn44Z987XO2lsPsmg.png" /><figcaption>Hard clustering vs Soft clustering</figcaption></figure><p><strong>K-MEANS CLUSTERING</strong></p><p>It groups unlabeled dataset into different clusters. It is used to organize the dataset into groups of similarities. The algorithm works by first randomly picking some central points “<strong>centroids</strong>” and each data point are assigned to cluster the centroids are updated by finding the average position in each cluster.</p><p>This process repeats until the centroid stops changing forming clusters. The goal is to divide the data points into clusters so that similar data points should belong to same group.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/631/1*O0TgREZdEpNxho84l5rAbA.png" /></figure><p>This image shows the final result after running the K-Means algorithm with K = 3 clusters.</p><p>Step-by-Step Working of K-Means Using This Image</p><p>1. <strong>Choosing K</strong></p><p>We first decide the number of clusters we want.</p><p>Here, K = 3, meaning we want 3 groups.</p><p>2. <strong>Initial Centroid Placement</strong></p><p>The algorithm starts by randomly selecting K points as the initial centroids (shown later as the red stars ⭐ in the image).</p><p>These centroids are just guesses of where the centers of the clusters might be.</p><p>3. <strong>Assignment Step</strong></p><p>For each data point, we calculate the distance to each centroid (usually <strong>Euclidean distance</strong>). A point is assigned to the cluster whose centroid is closest to it.</p><p>After this step:</p><p>Green squares → Cluster 1</p><p>Yellow circles → Cluster 2</p><p>Blue triangles → Cluster 3</p><p><strong>4. Update Step</strong></p><p>After assigning all points, we recalculate the centroid of each cluster:</p><p>The centroid is the mean position of all points in that cluster.</p><p>The red stars in the image represent these final centroid positions.</p><p><strong>5. Repeat until Convergence</strong></p><p>The algorithm repeats steps 3 and 4 until:</p><p>1. The centroids no longer move significantly, or</p><p>2. The cluster assignments stop changing.</p><p><strong>What the Image Shows</strong></p><p>Green cluster (Cluster 1) → Points grouped in the top-right.</p><p>Yellow cluster (Cluster 2) → Points grouped at the bottom-right.</p><p>Blue cluster (Cluster 3) → Points grouped at the left.</p><p>Red stars → Final centroid positions for each cluster.</p><p><strong>HIERARCHICAL CLUSTERING</strong></p><p>Hierarchical clustering is a technique used to arrange similar data points into clusters in a step-by-step manner, forming a hierarchy or tree-like structure. It starts with every point as its own cluster and then gradually merges or splits clusters based on how similar they are.</p><p>For instance, imagine you have four animals with different heights: a rabbit (40 cm), a cat (35 cm), a dog (60 cm), and a goat (55 cm). Initially, each animal is treated as its own cluster.</p><p>* The cat and rabbit, being closest in height, are grouped together first.</p><p>* Next, the dog and goat, which have similar heights, are paired.</p><p>Finally, these two pairs are merged into one cluster, showing how hierarchical clustering progressively combines the most similar items until only one group remains.</p><p><strong>DENDROGRAM</strong></p><p>A dendrogram works like a family tree for clusters, illustrating how individual data points or groups are combined over time. At the bottom, each data point starts as its own cluster. As you move upward, similar clusters merge together. The lower the point of merging, the greater the similarity between the groups. This visualization helps you clearly see the step-by-step process of how items are grouped.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/742/1*bGorXX1b4aHsRhJv28EisQ.png" /><figcaption>Turning Distance into Data Structure: Visualizing Relationships with a Dendrogram</figcaption></figure><p><strong>TYPES OF HIERARICHAL CLUSTERING</strong></p><p><strong>Agglomerative Hierarchical Clustering (AHC)</strong> is a <strong>bottom-up approach</strong>. It begins by treating each data point as its own cluster. At every step, the two clusters that are closest to each other are merged, and this process continues until all points belong to a single cluster or until a desired number of clusters is reached. This method is easy to understand and produces a dendrogram, allowing flexibility in deciding the number of clusters later. However, it can be computationally expensive for large datasets, and once clusters are merged, they cannot be split again.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/559/1*chSosx21avg-L9qHt0n82A.png" /></figure><p><strong>Divisive Hierarchical Clustering (DHC)</strong>On the other hand, is a <strong>top-down approach</strong>. It starts with all data points in a single large cluster and progressively splits the most dissimilar cluster into smaller groups. This process continues until each point is in its own cluster or the target number of clusters is achieved. While it can be more accurate in certain cases, it is less commonly used because it requires more computation and an effective method for deciding where to split clusters.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/536/1*QHJeXGCjO4Q8KXAE3Zim0w.png" /></figure><p><strong>Dimensionality reduction</strong></p><p>It helps the dataset with too many features to reduce the number the number of feature while retaining key information. Techniques like <strong>Principal component analysis </strong>[PCA], <strong>Singular Value decomposition</strong> [SVD] and few more which convert data into a lower dimensional space while preserving important details.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*gIpMhgyNQAS_nfOJREMFGw.png" /></figure><p><strong>Let’s decode how dimensionality reduction works from that image:</strong></p><p><strong>High-Dimensional Space (Left Cube) –</strong></p><p>The first diagram shows data points in a 3D space (with X, Y, and Z axes). Each point is colored based on its group or cluster (e.g., red, blue, green, yellow). In higher dimensions, the data might have many more features (not just 3), making it harder to visualize and process.</p><p><strong>Reduced to 2D (Middle Plane) –</strong></p><p>The second diagram shows the same data projected onto a 2D plane (only two axes kept). Despite losing one dimension, the clustering pattern is still visible — similar colors are grouped together. This makes it easier to visualize patterns while keeping essential relationships intact.</p><p><strong>Reduced to 1D (Right Line) –</strong></p><p>The third diagram reduces the data further into just one dimension (a single axis). Now each cluster is arranged along a line, still maintaining separation but losing some fine-grained spatial details.</p><p><strong>The major techniques used are:-</strong></p><p><strong>Feature Selection</strong></p><p>Feature selection chooses the most relevant features from the dataset without altering them. It helps remove redundant or irrelevant features, improving model efficiency. There are few methods of future selection given below:</p><p>Filter method</p><p>Wrapper method</p><p>Embedded method</p><p><strong>Feature Extraction</strong></p><p>Feature extraction involves creating new features by combining or transforming the original features. These new features retain most of the dataset’s important information in fewer dimensions. the most common feature extraction method is <strong>Principal component analysis [PCA]</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*Gpt1HAGX4ZyuMwQMocUiRA.png" /><figcaption>Difference between supervised and unsupervised machine learning</figcaption></figure><p>After studying about <strong>supervised and unsupervised machine learning</strong>, now we are heading towards the third type of machine learning model i.e. <strong>reinforcement machine learning</strong>.</p><p><strong>REINFORCEMENT MACHINE LEARNING<br></strong>This branch of machine learning focuses on how agents can learn to make decision through trial and error to maximize rewards.</p><p>It allows machines to learn by interacting with an environment and receiving feedback based on actions.</p><p>These feedbacks can in the form of rewards and penalties.</p><p>Reinforcement learning consists of:</p><p><strong>Agent:</strong> Decision maker which perform actions.</p><p><strong>Environment: </strong>system in which agent operates.</p><p><strong>State: </strong>state or condition the agent is currently in.</p><p><strong>Action: </strong>the possible move or decision the agent can make.</p><p><strong>Rewards: </strong>the feedback or result</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/766/1*Xrx7ckPXgKXCDuiOJvVMgg.png" /></figure><p><strong>Types of reinforcement learning</strong></p><p><strong>Positive reinforcement learning:</strong> It<strong> </strong>refers to giving a reward when the agent performs a correct or desired action. The main goal is to strengthen the probability of repeating that action in the future, ensuring the agent continues to choose beneficial behaviors. For example, a robot might receive extra battery life when it successfully picks up an object, motivating it to repeat similar actions. This approach is highly effective as it encourages good behavior and helps the agent learn faster by associating successful outcomes with positive feedback<strong>.</strong></p><p><strong>Negative reinforcement learning: </strong>It<strong> </strong>involves removing an unpleasant stimulus when the agent performs the correct or desired action. The aim is to increase the chances of the agent repeating that action by allowing it to avoid negative consequences. For instance, a self-driving car’s penalty system may stop deducting points when the car stays within its lane, reinforcing the importance of correct driving behavior. This method is useful for guiding the agent toward avoiding mistakes and harmful actions, ultimately promoting safer and more efficient decision-making.</p><p>Lastly, there is an upcoming wave in machine learning, and although it’s not entirely new, it’s still developing — this wave is “G<strong>enerative AI”</strong>. There is some information about gen AI;</p><p><strong>GENERATIVE AI</strong></p><p>Generative AI is a branch of artificial intelligence that focuses on creating new data or content that resembles real-world examples. Unlike traditional AI models that are primarily used for classification, prediction, or decision-making, generative AI models learn the underlying patterns and structure of existing data to produce entirely new outputs. These models can generate text, images, music, videos, and even synthetic datasets. Popular techniques used in generative AI include Generative Adversarial Networks (GANs), Variation Auto encoders (VAEs), and transformer-based models like GPT. By learning from massive amounts of data, generative AI can produce highly realistic and coherent outputs that often mimic human-created content.</p><p>The applications of generative AI are vast and growing rapidly. In creative industries, it can be used for art generation, music composition, and storytelling. In healthcare, it can help in designing new drugs or generating realistic medical images for research and training. It also plays a vital role in data augmentation for improving machine learning models and simulating scenarios for training autonomous systems. However, along with its benefits, generative AI raises ethical concerns such as deep fakes, misinformation, and intellectual property issues. This makes it essential to balance innovation with responsible usage, ensuring that the technology is used for positive and constructive purposes. (You can study more about gen AI from other resources).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/637/1*sWiARb52ZtrJy2y0veHIQg.png" /><figcaption>Gen AI: The future</figcaption></figure><p>Finally summing up all of it in short term:</p><p>“Machine learning is a foundational branch of artificial intelligence that focuses on building algorithms capable of learning from data to make predictions or decisions without being explicitly programmed. It encompasses three primary paradigms: supervised learning, where models learn from labeled data; unsupervised learning, which identifies hidden patterns in unlabeled data; and reinforcement learning, where agents optimize behavior through feedback from interactions with their environment. The typical ML workflow involves data preprocessing, feature engineering, model training, validation, and evaluation using metrics appropriate to the task (e.g., accuracy, F1 score, or RMSE). Core algorithmic approaches include linear models, decision trees, support vector machines, ensemble methods, and deep learning architectures. In recent years, generative AI — particularly models like generative adversarial networks (GANs) and transformer-based architectures such as GPT and diffusion models — has emerged as a powerful extension of machine learning, capable of creating realistic text, images, audio, and more. As these models continue to advance, they are reshaping industries and redefining what machine learning systems can generate, automate, and understand. Looking forward, the integration of generative models with traditional ML pipelines is expected to unlock new capabilities in creativity, simulation, personalization, and human-AI collaboration.”</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=894f86ccc6f2" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>