<?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 Ayush Gupta on Medium]]></title>
        <description><![CDATA[Stories by Ayush Gupta on Medium]]></description>
        <link>https://medium.com/@ayush.goc?source=rss-402226f49c54------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*HK5drb-D02Ubw40Kbl2-oA.jpeg</url>
            <title>Stories by Ayush Gupta on Medium</title>
            <link>https://medium.com/@ayush.goc?source=rss-402226f49c54------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 05:33:47 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ayush.goc/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[Aplazo Island: Village Where My AI Agents Could Work Without Me]]></title>
            <link>https://medium.com/aplazo-tech-blog/aplazo-island-village-where-my-ai-agents-could-work-without-me-4618d3af3e84?source=rss-402226f49c54------2</link>
            <guid isPermaLink="false">https://medium.com/p/4618d3af3e84</guid>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[agentic-ai]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[claude]]></category>
            <dc:creator><![CDATA[Ayush Gupta]]></dc:creator>
            <pubDate>Thu, 26 Nov 2026 12:06:29 GMT</pubDate>
            <atom:updated>2026-11-26T12:06:29.911Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*flZRu1zb2yfBC5rxdRFvTQ.gif" /></figure><p><em>This story is about how I turned a pile of scattered conversations into one place I actually enjoy visiting. It’s a cozy village with twelve AI assistants running on Grok Bot working together.</em></p><p>At around 10 AM, I opened my laptop and found Sherlock visiting Watson.</p><p>Wait, what? Sherlock and Watson! Apparently, they were discussing a research topic I’d given them. Watson, my fact check bot, had already checked whether the research made sense for Aplazo, and Sherlock, my research assistant, was looking into whether something similar had been tried elsewhere.</p><p>Meanwhile, Arya, my assistant, had finished going through my Slack messages and emails, Arthur was working on a document, and Scouter was collecting new Data Science publications for me to read.</p><p>Nobody needed anything from me.</p><p>Which was interesting, considering all twelve of them work for me.</p><p>Also, none of them are human. 🤖</p><p>They’re my AI assistants, and I decided to give them their own little village.</p><p>There’s a post office, a library, an idea lab, and a clock tower in the middle. Every assistant has its own house, a specific job, skills and a tiny pixel-art character that wanders around the village talking to other bots.</p><p>When someone needs my attention, a speech bubble appears above their house. Otherwise, the village stays quiet.</p><p>Building a virtual village wasn’t exactly on my roadmap. But then again, neither was becoming the manager of twelve bots.</p><p>The idea wasn’t to create another application that I’d spend half my morning managing. Quite the opposite. I wanted something I could open, glance at, and close within a minute.</p><p>The island is just a lightweight interface sitting on top of my existing AI assistants. It doesn’t ask an AI model to regenerate summaries every time I open it or constantly consume tokens to show me what’s happening. The agents continue doing their work in the background, and the village simply displays their latest updates, conversations, and anything that needs my attention.</p><blockquote><strong><em>So instead of digging through twelve different chats to figure out what matters, I can see everything in one place.</em></strong></blockquote><p>It’s a bit unusual, but turned out to be quite practical.</p><h3>Part 1: How I Ended Up Managing Twelve Bots</h3><p>It didn’t start with twelve assistants. It started with one, then another, and then a few more.</p><p>As a Lead Data Scientist, I spend a lot of time switching between coding, researching ideas, reading documents, catching up on Slack, and figuring out what needs my attention. AI assistants started taking some of that work off my plate.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Gn9EjSQaNUNs4qZtkxQSGQ.jpeg" /></figure><p>And they were genuinely useful.</p><p>One was good at research, another at reviewing ideas, another at keeping track of conversations. Eventually, I had assistants for writing documents, preparing presentations, finding interesting things to read, and even handling some personal tasks.</p><p>They did their jobs fine. The problem was that I had to keep track of all of them.</p><p><strong>I’d ask one assistant to research something, forget which conversation it was in, and later spend time looking for the answer. </strong>Sometimes one assistant needed information another already had, which meant I became the person copying messages between them.</p><p>I had automated parts of my work, only to give myself a new job: managing the automation.</p><p>And I didn’t want to solve that by building another complicated dashboard. I already had enough tabs open.</p><p>I wanted one place where I could see what everyone was working on and step in only when they needed me. Ideally, without making another AI call just to open the interface and find out what was happening.</p><p>That’s where the idea of a little village came from.</p><h3>Part 2: Giving My Bots a Place to Live</h3><p>I started experimenting with the idea alongside Jarvis, one of my AI assistants.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EtVrBljQ0j5S3JkUV55W2A.png" /></figure><p>Instead of a traditional dashboard full of cards and status indicators, I wanted something that felt a little more alive. What if every assistant had its own place, and I could simply visit them whenever I wanted?</p><p>That’s how we landed on a pixel-art village.</p><p>The idea was simple. Arya, who handles my messages, would have a post office. Sherlock, who researches things, would have a library. Edison, who helps me explore problems and possible solutions, would have an idea lab. And the other assistants would get their own little corners of the island.</p><p>I could click on a house to see what its assistant was working on, read previous conversations, or give it a new task. If an assistant needed something from me, it could leave a message above its house.</p><p>Over the next two or three days, I spent some time building the village with Jarvis. We went back and forth on the layout, the houses, the little characters, and how the messages should appear. Eventually, the village started looking like an actual place.</p><p>Each assistant had a house and a character that could walk over to the others. For the first time, I could see their work without jumping between conversations.</p><p>I was pretty happy with it, until I remembered I’d given every bot the ability to talk.</p><p>And apparently, they all had a lot to say.</p><h3>Part 3: The Village Was Beautiful. It Was Also Unbearably Noisy.</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oA5qy1Tqbonhn1_uKxQ7MQ.png" /></figure><p>The first version had a small design flaw. Every assistant wanted to tell me what it was doing.</p><p>Sherlock was researching something. Watson had finished reviewing a document. Arya was checking messages. Edison was exploring a possible solution to a problem we’d been discussing. Every little update appeared as a speech bubble above someone’s house.</p><p>Within minutes, my peaceful village looked like twelve bots were having an argument in a group chat.</p><p>It was funny to watch, but not particularly useful.</p><p>I had built the island to reduce the number of things I needed to check, and somehow ended up creating another place demanding my attention.</p><p>So I changed one simple rule: <strong>a speech bubble should appear only when an assistant actually needs me.</strong></p><p>If Sherlock is researching, I don’t need to know every step. If Watson is reviewing something, he can finish before telling me. And if Edison is exploring a new approach, he can discuss it with the others before bringing it to me.</p><p>Everything else stays in the assistant’s conversation history, available whenever I want to look.</p><p>I also added an inbox to collect things that needed my attention, so I wouldn’t have to walk around the village checking every house. Arya’s morning brief became especially useful here. Instead of just summarizing Slack and email, it highlights what needs a response and carries forward unfinished items from previous days. I can mark things as done, and they stop following me around.</p><p>The village finally started doing what I’d wanted from the beginning: helping me keep track of things without making me keep track of the village.</p><p>Once the bots stopped talking to me about every little thing, I noticed they started talking to each other.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8o0cWZKrfffAtX74WxNi-A.png" /></figure><p>Take Edison, for example. He’s the assistant I turn to when I want to explore a problem, think through different approaches, or figure out whether something is worth pursuing.</p><p>Earlier, I would have to take one of the approaches we’d discussed to Watson to check whether it made sense for Aplazo, then ask Sherlock to research whether anyone had tried something similar. After that, I’d go back to Edison with their feedback.</p><p>Now they can have that conversation themselves.</p><p>Edison can ask Watson to check the internal context, Sherlock can research what exists elsewhere, and together they can refine the approach before bringing their findings back to me.</p><p>And the funny part is that I can watch them visit each other’s houses as they exchange messages.</p><p>I still review their conclusions. But at least I’ve stopped being the messenger between my own assistants.</p><h3>Part 4: What’s Running Behind the Village?</h3><p>So, what’s powering this little village?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XexjxcuS7Vw2kxWNsDL3zQ.png" /></figure><p>The assistants themselves run on <strong>Grok Bot</strong>. That’s where they have their tools, instructions, and the ability to communicate with each other. The island only shows what they’re already doing.</p><p>I deliberately wanted to keep the interface lightweight. I didn’t want to spend additional tokens just to see what my assistants were up to.</p><p>Behind the scenes, a small process collects their latest messages, figures out which ones actually need my attention, and puts everything into a JSON file. That file is synced to my Mac, where a simple HTML page and a tiny Python server bring the village to life.</p><p>The page re-reads that file every other second, but no model is involved. Tokens get spent when the assistants do work. Opening the village or reading old conversations doesn’t use any tokens.</p><p>Sending a message works in the other direction. I type something in the village, the local server forwards it through a webhook to Jarvis, and Jarvis routes it to the appropriate assistant.</p><p>I also wanted to make sure the interface didn’t become a security problem. The webhook key stays on the server side rather than being exposed in the browser, and the local server has checks to restrict requests.</p><p>And there’s one rule I won’t compromise on: <strong>the assistants can prepare messages, but nothing gets sent to Slack, email, or anyone else without my explicit approval of the exact message.</strong></p><h3>Part 5: A Quiet Village Is a Good Village</h3><p>I still use Claude Code for most of my coding. Grok Bot handles much of the rest: research, communication, documents, organizing information, and the small bookkeeping tasks that accumulate throughout the week.</p><p>Aplazo Island doesn’t replace either of them. It just gives me one place to see what’s happening across my assistants, find their messages, and deal with whatever needs my attention.</p><p>And that’s what has made it useful.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*52WAUZuZO-rpnUM66instg.png" /></figure><p>I can open the island in the morning, go through Arya’s brief, check whether Watson has something for me to review, and see what the others have been working on.</p><p>And sometimes Edison is still discussing a problem with Watson or Sherlock.</p><p>The difference is that I don’t have to keep checking twelve conversations to understand what’s happening.</p><p>I can close the island and get back to my actual work.</p><p>Building this taught me that more AI assistants don’t automatically make you more productive. If you’re the one checking on them and carrying messages between them, you’ve just given yourself another job.</p><p>The village gave me a way to step out of that loop.</p><p>And somewhere along the way, I ended up with a little corner of my laptop that I enjoy opening.</p><p>Twelve bots, a handful of houses, and, on a good day, absolutely nobody asking me anything.</p><p>That’s my kind of village. 🏡</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4618d3af3e84" width="1" height="1" alt=""><hr><p><a href="https://medium.com/aplazo-tech-blog/aplazo-island-village-where-my-ai-agents-could-work-without-me-4618d3af3e84">Aplazo Island: Village Where My AI Agents Could Work Without Me</a> was originally published in <a href="https://medium.com/aplazo-tech-blog">Aplazo Tech Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Inside Aplazo’s Multi-Agent Framework for Reusable ML Model Workflow]]></title>
            <link>https://medium.com/aplazo-tech-blog/inside-aplazos-multi-agent-framework-for-machine-learning-6488c05d47c2?source=rss-402226f49c54------2</link>
            <guid isPermaLink="false">https://medium.com/p/6488c05d47c2</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[agentic-ai]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Ayush Gupta]]></dc:creator>
            <pubDate>Tue, 14 Jul 2026 11:54:01 GMT</pubDate>
            <atom:updated>2026-07-14T11:54:01.387Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PzU1y3a4DnrZQFOH0ZWCuQ.png" /></figure><blockquote>This is the Story of how my Data Science team at Aplazo’s turned repeated model-building work into a reusable multi-agent workflow without taking human judgment out of the loop.</blockquote><p>At Aplazo, we make a lot of decisions with machine learning models.</p><p>We are a buy-now-pay-later company in Mexico, so our models sit close to real business decisions: who gets approved for credit, what looks like fraud, which customers may activate, where risk is hiding.</p><p>These aren’t toy problems. A bad model does not just make a dashboard look wrong. It changes business decisions.</p><p>The lesson we learned was simple: the hard part was not making every model automatic. The hard part was making our best modeling habits reusable.</p><p>That is where the <strong>multi-agent framework</strong> came in. <em>Not as a replacement for data scientists, but as a structured teammate</em> that could follow a signed scope, produce clear artifacts, and hand work from one specialist to the next.</p><p>This is the story of how our team stopped treating every new model like a one-off project and started turning the way we already worked into something reusable.</p><p>The early results were encouraging: for comparable model builds, the path from brief to first model draft moved from roughly <strong>4–6 weeks to 2–3 days</strong>. <br>On the first run, on the out-of-time validation set, the employment model gave us <strong>70.7% accuracy </strong>and<strong> 0.696 macro-F1</strong> on a binary classification problem.</p><p>More importantly, new projects no longer started from a blank page.</p><h3>In this story</h3><ol><li><a href="https://medium.com/@ayush.goc/6488c05d47c2#5759">The Déjà Vu of Every New Model</a></li><li><a href="https://medium.com/@ayush.goc/6488c05d47c2#1893">Why we treated the framework like a new hire</a></li><li><a href="https://medium.com/@ayush.goc/6488c05d47c2#fd1b">The Model Scope Document Became the Contract</a></li><li><a href="https://medium.com/@ayush.goc/6488c05d47c2#0457">How skill chaining made handoffs reliable</a></li><li><a href="https://medium.com/@ayush.goc/6488c05d47c2#bfde">When the chain worked on real models</a></li></ol><h3>1. The Déjà Vu of Every New Model</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ao9ODsX0kyN2Vf5t-OSkOA.png" /></figure><p>On our Data Science team, for a very long time, every new model started with a strangely familiar feeling.</p><p>A project would land: fraud one quarter, underwriting the next, activation after that. And before we had written a single line of code, I could already picture the next few weeks.</p><p>Pull the data. Run exploratory data analysis, or EDA, to understand coverage, quality, timing, and business meaning. Debate what the target should be. Write the feature pipeline. Build the training loop. Add validation. Write production-ready code. Add deployment glue. Fix the edge cases. Then document everything.</p><p>Then, a few weeks later, do almost the same thing again.</p><p>The data changed. The business question changed. The decisions were different. <strong>But the operating rhythm looked familiar.</strong></p><p>At first, that felt natural.</p><p>Fraud, underwriting, activation, each problem came with its own business context, data reality, risk, and trade-offs. That is what makes applied machine learning interesting. No two models are the same once you get close to the decision they will influence.</p><p>But as our team built more of them, <strong>a pattern started to emerge.</strong></p><p>🧠 We were getting better at recognizing the shape of responsible model building.</p><p>We knew which questions had to be asked early: What exactly are we predicting? Would this data actually exist at decision time? What would count as leakage? Which metric will the business trust? What makes the model explainable enough to use?</p><p>These questions are where business judgment, data understanding, and modeling experience come together.</p><p>The opportunity wasn’t to avoid those questions. It was to make sure we asked them consistently, clearly, and early enough.</p><p>Across projects, the responsible workflow had a familiar shape.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0umgzVWqxeMSiypunukrvg.png" /><figcaption>The models were different, but the responsible operating rhythm had a reusable shape.</figcaption></figure><p>The business questions changed. The responsible operating rhythm did not.</p><p>That rhythm wasn’t something to dismiss. It was something worth preserving.</p><p>The more we talked about it, the more it felt like the team had already developed an internal playbook. It just lived in people’s heads, notebooks, project folders, and repeated habits.</p><blockquote><strong><em>👩‍🍳</em></strong><em> The kitchen analogy started to make sense when we thought about </em>mise en place<em>: the preparation a kitchen does before service begins.</em></blockquote><blockquote><em>Every dish is different: a fraud model and an activation model shouldn’t cook from the same recipe. But a good kitchen doesn’t rediscover its own station every time a new order comes in. The knives are where they always are, the prep is done, the quality checks known. The chef still reads the order and makes sure the plate comes out right; nobody’s reinventing where the salt lives.</em></blockquote><blockquote><em>That was what we were missing. Not one recipe for every model, a prepared station, so each new model starts from the team’s best habits instead of rebuilding the basics again.</em></blockquote><p>It stopped being, “Why are we doing the same work again?” and became, “How do we preserve the best version of how we already work, so every new model starts with what the team has already learned?”</p><p>That was the real beginning of the framework.</p><p>AI shouldn’t replace the Data Science team. But it could join the team.</p><blockquote>💡 <strong>Takeaway:</strong> We didn’t need to automate judgment. We needed to make the rhythm around good judgment reusable.</blockquote><h3>2. Why we treated the framework like a new hire</h3><p>Calling it a teammate sounds simple now.</p><p>At the time, it felt like a word the system had to earn.</p><p>We weren’t trying to build a system that would silently make modeling decisions and ask everyone to trust the result. I wouldn&#39;t trust that yet -neither my team on day one but in future I am pretty sure that will happen.</p><p>In our world, a model can affect decisions. It can influence how we understand our customers. So the idea of letting an automated system run end to end without structure wasn’t exciting.</p><p>A teammate is different. A teammate has a defined role, works within constraints, asks for context before acting, and can be challenged.</p><p>That became the design principle.</p><p>The framework shouldn&#39;t begin by training a model.</p><p><strong>It should begin the way a new person on the team would begin: with a brief.</strong></p><p>A strong data scientist joining a project doesn&#39;t get full autonomy on day one. You don’t say, “Here are the databases, go ship a model.”</p><p>You give them context first: <em>what we’re solving, why it matters</em>, <em>which data is in play</em>, <em>what the business cares about</em>, <em>what to be careful with</em>, <em>where we already have strong opinions and where we need the data to speak</em>.</p><p>Then they go away, study the data, and come back with a plan.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rWahuvMPFHIkVrApwlA_mQ.png" /><figcaption>A prepared station helps, but the chef still needs the order before cooking begins.</figcaption></figure><blockquote><em>👩‍🍳 In kitchen terms, this is the order before service begins. The station may already be prepared, but the chef still needs to know what dish is being made, which ingredients are allowed, what constraints matter, and what would make the result unacceptable.</em></blockquote><p>The framework works the same way. Before it builds anything, it needs enough context to study the data and come back with a plan.</p><p>That became the shape of the system: <strong>onboarding first, automation second.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QzCXThLMksCXv13oqES0HQ.png" /><figcaption>The Agentic AI framework starts like onboarding a new teammate: context first, execution second.</figcaption></figure><h3>What the system gets on day one</h3><p>The first version of the brief was intentionally small.</p><p>We wanted enough structure to guide the system, but not so much structure that we pretended all modeling decisions could be made before looking at the data.</p><p><strong><em>In machine learning, some of the most important decisions only become clear after you look at the data.</em></strong></p><p>So the framework starts with five things:</p><p><strong>Objective:</strong> What the model is for and how we will know whether it helped.<br><strong>Problem statement:</strong> What we are actually trying to solve, in plain language.<br><strong>Allowed data sources:</strong> Where the system is allowed to look.<br><strong>Feature cap:</strong> The maximum number of input signals the model may use, so the final model stays lean, explainable, and easier to maintain.<br><strong>Training Window</strong>: How many months of history the model is allowed to learn from.</p><p>That is the whole brief.</p><p>What is missing from the brief is just as important.</p><p>We don’t force the exact target on day one, the success metric before we’ve seen the data, or a modeling strategy before exploration.</p><p><strong>A good data scientist wouldn&#39;t do that.</strong></p><p>They would inspect the data first. They would check coverage, label quality, noise, timing, business meaning, and whether the target is even usable in the form we imagined.</p><p>So the framework does the same.</p><p>Its first job isn’t to build anything. It’s to come back with a plan.</p><blockquote>💡<strong>Takeaway:</strong> Treat an AI agent like a new hire: brief it, constrain it, review its plan, and only then let it execute.</blockquote><h3>3. The Model Scope Document Became the Contract</h3><p>That plan lives in one central artifact: the <strong>Model Scope Document</strong>.</p><p>This became the centre of the framework.</p><p>Before we built it, the truth of a model project could live in too many places: a notebook, a config file, a Slack thread, a Jira ticket, a meeting note, or someone’s memory.</p><p>That works until it doesn’t.</p><p>It works until someone asks why the target was defined that way, or validation quietly uses a different metric than Risk expected, or a feature slips in because no one remembers whether that source was allowed or deployment needs the assumptions that were actually signed off.</p><p>The Model Scope Document pulls those decisions into one place.</p><p><strong>It describes the objective, the problem statement, the proposed target, the data sources, the success metric, the feature cap, what is in scope, and what is explicitly out of scope.</strong></p><p>But it is not only a memo for humans.</p><p>It starts with a machine-readable header, so every downstream agent can parse the agreement without trying to interpret prose.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NvgCHsYfVpbf_uYXVw47bQ.png" /><figcaption>The Model Scope Document is the approved order before the kitchen starts moving.</figcaption></figure><blockquote><em>👩‍🍳 In kitchen terms, the Model Scope Document is the approved order and prep sheet before service begins. It tells the chef what has to be made, which ingredients are allowed, what quality standard matters, and what is explicitly out of bounds.</em></blockquote><blockquote><em>Once that order is approved, the chef has something concrete to run the kitchen against. The chef can coordinate the stations, but it does not rewrite the order halfway through service.</em></blockquote><p><strong>Model Scope Document looks like this:</strong></p><pre># --- Model Scope: machine-readable header ---<br>project:        { name, slug }<br>objective:      &quot;&lt;model objective&gt;&quot;          # [H]<br>problem:        &quot;&lt;problem statement&gt;&quot;         # [H]<br>task_type:      classification | regression | both   # [H opt / E proposes]<br>target:         { definition, kind, buckets|raw }     # [H+E] <br>metric:         { name, goal, threshold }             # [H+E]<br>max_features:   &lt;int&gt;                          # [H]<br>training_window_months: &lt;int&gt;                  # [H] — months of history to train on<br>data_sources:   [ &lt;slug&gt;, ... ]                # [H]<br>status:         draft | signed_off | frozen</pre><p>Check MODEL_SCOPE_TEMPLATE.md in the <a href="https://github.com/torr95/Multi_agent_framework/blob/main/MODEL_SCOPE_TEMPLATE.md">Github Here</a>. Each section is tagged by provenance: [H] human input · [E] Exploration· [H+E] assembled</p><p>Every important decision also carries a source tag.</p><p>Some fields come from humans. Some come from exploration. Some are assembled from both.</p><p>That small detail changed the review.</p><p>It made clear which parts were business intent, which parts came from the data, and which choices were made jointly. It also stopped the system from pretending to know something it didn’t know.</p><p>🔒 We enforce one rule strictly: no exploration-driven field can remain “to be decided” after sign-off.</p><p>If the framework can’t ground a recommendation in the data, it says so. It leaves the decision for a person.</p><p>It doesn’t invent a number just to make the document look complete.</p><p>That was one of the first places where the new-hire metaphor became more than a metaphor. A good teammate doesn’t pretend to know. A good teammate says, “I checked. The data doesn’t support that yet.”</p><blockquote>💡Takeaway: The Model Scope Document isn’t just documentation. It is the contract that keeps every downstream agent aligned.</blockquote><h3>The sign-off is the control point</h3><p>The sign-off became the most important pause in the framework.</p><p>It is easy to underestimate a pause.</p><p>In automation work, the instinct is often to remove pauses. Reduce friction. Keep things moving. Make everything flow.</p><p><em>But in model building, some friction is healthy.</em></p><p>🛑 Before the framework pulls full data, builds features, trains, or produces a validation report, it stops.</p><p>A human has to read the Model Scope Document and sign off on the essentials: what we are building, what the target is, which sources are allowed, which metric matters, what is out of scope, and what would make the model unacceptable.</p><p><em>Only after that document is signed off does the chain run.</em></p><p>This wasn’t bureaucracy. It was protection: protection against the machine doing the wrong work quickly, against humans changing the goal after seeing the metric, and against small assumptions quietly becoming production behavior.</p><p>Once the document is signed off, it becomes <strong>frozen</strong>.</p><p>Frozen doesn’t mean perfect forever. It means the chain now has a contract.</p><p>The agents downstream are no longer guessing what the project is about. They are executing against an approved scope. The target is defined, the allowed sources are listed, the metric is agreed, the feature cap is set, the boundaries are clear.</p><p>From that point on, every agent downstream has something concrete to obey.</p><h3>What it is built on</h3><p>Under the hood, the framework is intentionally simple. It isn’t one giant agent trying to do everything. It is a set of <strong>contracts</strong>, <strong>artifacts</strong>, and <strong>checks</strong>.</p><p>It has four main pieces:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*P2PtRFgtZVia8mqtbN75tg.png" /><figcaption>Under the hood, the framework is simple by design: signed scope, versioned skills, an Orchestrator, and shared artifacts for Multi Agent Framework</figcaption></figure><ol><li><strong>A signed Model Scope Document</strong> that defines the objective, target, metric, feature cap, approved data sources, and status.</li><li><strong>A set of versioned skills</strong>, each with a SKILL.md contract that declares what the skill does, what it consumes, and what it produces.</li><li><strong>An Orchestrator </strong>is the chef running the kitchen, that reads the signed scope, runs the skills in order, checks that expected artifacts exist at the expected paths, and stops the chain when a contract is broken. It never does a station’s work itself; it just makes sure the right work happens in the right order.</li><li><strong>A shared artifact layer</strong> where reports, datasets, feature matrices, model objects, validation outputs, and deployment packages are written and passed forward.</li></ol><blockquote>A template of the Model Scope Document and a sample SKILL.md are shared here: <a href="https://github.com/torr95/Multi_agent_framework">Link</a>.</blockquote><p>That is what made the next part possible. Because once the plan was clear, the harder question became:</p><p>How do we make sure each agent hands off its work without losing meaning along the way?</p><p>That is where <strong>skill chaining</strong> came in.</p><p>Each Agent in the system has a<strong> skill</strong>: a small, self-contained unit with a SKILL.md file that declares three things:</p><ol><li>What it does.</li><li>What it consumes.</li><li>What it produces.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HYAzenQEaKf8BS-Lix6HWw.png" /><figcaption>Anatomy of skill in Agentic AI</figcaption></figure><p>So a <strong>skill</strong> is just a specialist with its job written down. Not an agent that improvises, but a unit that knows exactly what it needs to start, exactly what it has to hand over, and where both of those live. Same inputs in, same shape of output out, every time.</p><p><strong>Chaining</strong> is what you get when you line those contracts up end to end. Each skill writes its “produces” to a fixed place, and that becomes the next skill’s “consumes.” No skill explains itself to the next one in prose. It leaves behind an artifact the next one is allowed to trust.</p><h3>4. How skill chaining made handoffs reliable</h3><p>Once the Model Scope Document was signed off, the next question was obvious: <em>How do we make sure each agent understands exactly what it is supposed to do?</em></p><p>That became more important than the agents themselves.</p><p>Our first instinct was to let agents explain things to each other. One agent would explore the data and write a summary. The next would read it and continue. It felt natural but also created risk.</p><p>In machine learning, meaning can change quietly.</p><ul><li>A target definition can become slightly softer.</li><li>A metric can be interpreted a little differently.</li><li>A feature can look allowed because the reason it was excluded never traveled with the handoff.</li></ul><p>Nothing has to crash for the system to become unreliable.</p><p>That is when we realized the real problem wasn’t agent intelligence.</p><p><em>It was handoff quality.</em></p><p>So we stopped treating agent outputs like conversations and started treating them like contracts.</p><p>That became the core idea of <strong>skill chaining</strong>: each specialist produced a specific artifact that the next specialist is allowed to trust.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*m5HAXsHJs__tueTtTdNhIA.png" /></figure><blockquote><em>👩‍🍳 The kitchen analogy comes back here too.</em></blockquote><blockquote>Mise en place<em> prepares the station, but service still depends on clean handoffs. Prep, cooking, tasting, plating, and service are not the same job. Each station owns a part of the work. Each station receives something in a usable state and passes something forward in a usable state.</em></blockquote><blockquote><em>The chef doesn’t need to do every station’s work. The chef only needs to run the kitchen with the approved order: keep the sequence clear, check that the handoffs are complete, and stop the work when something is not ready to move forward.</em></blockquote><blockquote><em>If prep is wrong, the next station shouldn’t silently guess what was intended. The handoff should stop, and the issue should be named.</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rMJ0wJoYZq4xFaTI_lD9pQ.png" /><figcaption>Skill chaining works like prepared kitchen stations: each specialist owns a step and passes a clean handoff forward.</figcaption></figure><p>That is how we wanted the agents to work. For each agent, the handoff was written down clearly. <strong>Example below</strong>:</p><pre># ① eda-agent — owner: Data/EDA Engineer<br>consumes:  { model_objective, problem_statement, data_sources, max_features, training_window_months }   # the 5 user inputs<br>produces:<br>  - { id: analysis_reports,     path: artifacts/eda/analysis_reports/,        kind: reports }<br>  - { id: data_sample_profile,  path: artifacts/eda/sample_profile.json,      kind: profile }<br>  - { id: target_exploration,   path: artifacts/eda/target_exploration.json,  kind: analysis }  # incl. bucket-vs-raw<br>  - { id: eda_code,             path: artifacts/eda/code/,                    kind: code }<br>feeds: Model Scope Document (§3, §4, §5 stats)<br><br># ② data-agent — owner: Data/EDA Engineer<br>consumes:  { model_scope }                                  # target def + data_sources + training_window_months from frozen doc<br>produces:<br>  - { id: training_data,        path: artifacts/data/training_data.parquet,   kind: dataset }<br>  - { id: data_dictionary,      path: artifacts/data/data_dictionary.md,      kind: doc }<br>feeds: ③ feature-engineering<br><br># ③ feature-engineering — owner: Feature Engineer<br>consumes:  { training_data, model_scope }                   # feature ideas + max_features from doc<br>produces:<br>  - { id: feature_taxonomy,     path: artifacts/features/feature_taxonomy.md, kind: doc }<br>  - { id: feature_matrix,       path: artifacts/features/features.parquet,    kind: dataset }   # csv/parquet<br>  - { id: feature_validation,   path: artifacts/features/validation.md,       kind: report }<br>feeds: ④ model-training<br><br># ④ model-training — owner: ML Engineer<br>consumes:  { feature_matrix, feature_taxonomy, model_scope } # target + metric from doc<br>produces:<br>  - { id: model_file,           path: artifacts/model/model.pkl,              kind: model }<br>  - { id: feature_importance,   path: artifacts/model/feature_importance.csv, kind: table }     # incl. IV/PSI<br>  - { id: selected_features,    path: artifacts/model/selected_features.json, kind: list }      # after iterative reduction<br>  - { id: train_report,         path: artifacts/model/train_report.md,        kind: report }    # performance metrics<br>feeds: ⑤ model-validation<br><br># ⑤ model-validation — owner: Validation Lead<br>consumes:  { model_file, feature_matrix, model_scope }      # eval criteria from doc; holdout labels held out<br>produces:<br>  - { id: validation_criteria,  path: artifacts/validation/criteria.md,       kind: doc }<br>  - { id: validation_report,    path: artifacts/validation/report.md,         kind: report }    # metric vs threshold<br>feeds: ⑥ deployment (after human go-ahead on the report)<br><br># ⑥ deployment — owner: MLOps Engineer<br>consumes:  { model_file, selected_features, model_scope }   # architecture/inference from doc<br>produces:<br>  - { id: deployment_package,   path: artifacts/deploy/,                      kind: package }<br>feeds: — (end of chain)</pre><p>For detailed view of each agent and handoff please <a href="https://github.com/torr95/Multi_agent_framework/blob/main/SKILL.md"><strong>GO HERE</strong></a></p><p>The EDA agent doesn’t “tell” the Data agent what happened. It writes an EDA report in a known <strong>schema</strong>.</p><p>The Data agent doesn’t guess what Feature Engineering needs. It produces a training dataset at a fixed path.</p><p>The Training agent doesn’t invent validation criteria. It reads them from the signed Model Scope Document.</p><p>One stage’s output becomes the next stage’s input.</p><p>That sounds simple, but it is what made the system feel dependable.</p><p>The chain became a set of explicit handoffs.</p><p>The Orchestrator tied the whole thing together, but deliberately kept it boring.</p><p>It held the signed plan, passed the right inputs to the right agent, checked that the promised artifacts were produced, and then moved the chain forward.</p><p>Now this contract changed how we worked.</p><p>If a <em>stage produced the wrong artifact</em>, the chain stopped.<em> </em>If an<em> expected file was missing</em>, it stopped. If a <em>skill didn’t match its contract</em>, it stopped, it didn’t quietly continue on assumptions. It named the blocker: which skill, which artifact, which agent. That made problems specific, and therefore fixable. Not “the pipeline broke,” but “the feature engineering skill didn’t produce the validation artifact it promised.”</p><p>That is the part I think is easy to underestimate.</p><p><em>The value of skill chaining wasn’t that it made the agents more impressive. It made them more accountable.</em></p><p>It gave every agent a role, every handoff a shape, and every failure a name.</p><p>That is when the framework stopped feeling like a clever demo and started feeling like a system we could trust.</p><blockquote>💡<strong>Takeaway:</strong> Contracts beat conversation. An agent handoff should be an artifact, not a vibe.</blockquote><h3>5. When the chain worked on real models</h3><p>The model that made the framework feel real was an <strong>income-and-employment model.</strong></p><p>It wasn’t the cleanest problem. That is why it mattered.</p><p>In underwriting, income and employment aren’t abstract fields. They change how much confidence we have in a credit decision.</p><p>But some of our underwriting applicants did not have open-banking data: permissioned bank-account information that can provide strong income signals, which meant we were missing one of the strongest signals for a some of these users.</p><p>For applicants with open-banking coverage, we had stronger ground truth.</p><p>For applicants without it, we needed to infer carefully. It would have been easy to force the problem into a neat regression task and ask the model to predict a raw monthly income number.</p><p>But the exploratory data analysis agent pushed back.</p><p>The data didn’t support that level of precision honestly.</p><p>Income bands were more stable and useful but they were less performative.</p><p>That recommendation changed the plan.</p><p>The scope became a two-target build: classify employment and estimate income band.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XGleErfQN8T7pBggrCqFCw.png" /><figcaption>📊 <em>On the first run, on the out-of-time validation set, the employment model gave us a result we could actually reason about. Using only </em><strong><em>21 final features</em></strong><em>, it reached </em><strong><em>70.7% accuracy and 0.696 macro-F1</em></strong><em> on a binary employed-vs-unemployed problem. The majority-class baseline was 54.6% accuracy and just 0.35 macro-F1, so the model was doing far more than predicting the most common class.</em></figcaption></figure><p>That was the first moment I really liked the system, not because it automated anything, but because it refused to pretend the data was cleaner than it was.</p><p>From there, the chain did what it was designed to do.</p><p>The Data agent created the training set with a genuine out-of-time split, so the model only learned from information that would have existed at decision time.</p><p>The Feature Engineering agent built signals from the approved sources and flagged anything suspicious before it could make the model look better than it really was.</p><p>The Training agent fit a lean model and reduced the final inputs down to the feature cap.</p><p>The Validation agent scored the holdout against the gates the team had agreed to before training began.</p><p>The output wasn’t just a metric.</p><p>It was a validation artifact: what passed, what failed, where the model was strong, where it was weaker, and which slices deserved more attention.</p><p>The important part of that report wasn’t the specific number. It was the shape of the conversation it created.</p><p>Instead of “does this feel good enough?”, we could ask:</p><ul><li>Did it clear the agreed gates?</li><li>Where did it struggle?</li><li>Is performance stable across confidence tiers?</li><li>Are we comfortable with the trade-offs?</li><li>What has to change before deployment?</li></ul><p>That’s a far healthier conversation to have.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IYxMozWqYxIJgGtyqguEhA.png" /><figcaption>Validation is not just the final score. It is the tasting step before the model reaches production.</figcaption></figure><blockquote><em>👩‍🍳 In kitchen terms, this is the tasting step before the dish leaves the kitchen. The station may be prepared, the chef may be coordinating the handoffs, and every station may have done its job, but the dish still has to be checked against the standard in the approved order.</em></blockquote><p>And then came the real test of the framework: could the same chain work for a completely different kind of model?</p><p>The second model we ran through it was an engagement score model. It had a different objective, a different target design, different success metrics, and a different downstream use case.</p><p>But, Same framework.</p><p>Same operating procedure.</p><p>No changes to the chain.</p><p>That was the moment the design felt right, not because every model got easy, but because the second model <strong>did not start from zero</strong>.</p><p><strong>What changed:</strong></p><ul><li>The first model through the chain was the income-and-employment model: <strong>employment classification + income-band estimation</strong>.</li><li>The second was an engagement score model, with a different objective, target design, metric set, and business use case.</li><li>Comparable projects moved from <strong>4–6 weeks to 2–3 days</strong> from brief to final model draft.</li><li>The biggest improvement was not just speed. It was that the second model started with a signed scope, explicit handoffs, and validation gates instead of starting from a blank page.</li></ul><p>A new project now starts with a brief.<br>Then a scope.<br>Then a sign-off.<br>Then a chain of specialists, each handing something concrete to the next.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hA_EWs8bR4Wgu3i_LL-NiA.png" /><figcaption>The goal was not one recipe for every model. It was a prepared kitchen: an approved order, a chef running the chain, and stations with clean handoffs.</figcaption></figure><blockquote><em>👩‍🍳 In the end, the analogy holds: the order kept the work aligned, the chef kept the kitchen moving, and the stations made the work repeatable.</em></blockquote><blockquote>💡<strong>Takeaway:</strong> A good framework does not make every model easy. It makes sure every model starts from what the team has already learned.</blockquote><p>That’s the version of AI in data science that feels real to me: not a replacement for the team, but a teammate we had to onboard properly.</p><p>The agents help us move faster.</p><p>The people still decide what good means.</p><p>Want the building blocks? The <a href="https://github.com/torr95/Multi_agent_framework/blob/main/MODEL_SCOPE_TEMPLATE.md">Model Scope Document template</a> and the <a href="https://github.com/torr95/Multi_agent_framework/blob/main/SKILL.md">orchestrator skill</a> (SKILL.md) are both on GitHub.</p><p><em>Multi Agent Framework- Built by the Aplazo Data Science team: </em><a href="https://medium.com/u/d1213f1716ee"><em>Ashish Jain</em></a><em>· </em><a href="https://medium.com/u/402226f49c54"><em>Ayush Gupta</em></a><em> · </em><a href="https://medium.com/u/1a7b96873450"><em>Mukesh Sahu</em></a><em> · </em><a href="https://medium.com/u/66d31ca68130"><em>Prateek Jain</em></a><em>· </em><a href="https://medium.com/u/405aa4037783"><em>Swapnesh Khare</em></a><em> · </em><a href="https://medium.com/u/59867bf032e1"><em>Vishal Gupta</em></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6488c05d47c2" width="1" height="1" alt=""><hr><p><a href="https://medium.com/aplazo-tech-blog/inside-aplazos-multi-agent-framework-for-machine-learning-6488c05d47c2">Inside Aplazo’s Multi-Agent Framework for Reusable ML Model Workflow</a> was originally published in <a href="https://medium.com/aplazo-tech-blog">Aplazo Tech Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Easy installation of Cuda Toolkit on Ubuntu 18.04]]></title>
            <link>https://medium.com/@ayush.goc/easy-installation-of-cuda-toolkit-on-ubuntu-18-04-7931394c1233?source=rss-402226f49c54------2</link>
            <guid isPermaLink="false">https://medium.com/p/7931394c1233</guid>
            <category><![CDATA[cuda]]></category>
            <category><![CDATA[ubuntu]]></category>
            <category><![CDATA[ubuntu-18]]></category>
            <category><![CDATA[nvidia]]></category>
            <category><![CDATA[installation]]></category>
            <dc:creator><![CDATA[Ayush Gupta]]></dc:creator>
            <pubDate>Fri, 21 Aug 2020 18:25:52 GMT</pubDate>
            <atom:updated>2020-08-21T18:30:08.095Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rtQEpsPRtooHnsYlDWEAdg.jpeg" /></figure><p>Installation of the Cuda is very easy if the correct version of the <strong>Driver</strong> is selected with the correct version of the <strong>Cuda Toolkit</strong>. The main reason for Cuda not working or giving errors is the compatibility issue.</p><p>For this article, I am considering Nvidia GPU with Ubuntu 18.04 LTS.</p><p><strong>Let’s divide the work into the following steps:</strong></p><ol><li>Check the compatibility of Cuda and Nvidia drivers.</li><li>Install the Nvidia driver.</li><li>Install the Cuda Toolkit.</li><li>Set Environment Variables.</li><li>Check the installation.</li></ol><p><strong>Step-1: Check the compatibility of Cuda and Nvidia drivers.</strong></p><p>Nvidia has complete documentation on the compatibility of the Toolkit with the Driver Version.</p><blockquote>Below is the table which is taken from the above document, it tells which Driver would work with which Cuda toolkit. Visit <a href="https://docs.nvidia.com/deploy/cuda-compatibility/index.html">Official Documentation</a> for more details.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/372/1*oxxoEpWVFRGvTT-ciCGnOw.png" /></figure><p><strong>Step-2: Install the Nvidia driver.</strong></p><p>in Ubuntu, Go to Show Application-&gt; Software &amp; Updates-&gt; Additional Drivers and select the Driver which you want to install and click Apply Changes.</p><blockquote>Here I am choosing the <strong>nvidia-driver-440(proprietary)</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/807/1*kpWbPdxihvQfqOgQYZrmaA.png" /></figure><p>Now you can check the installed driver with the following command</p><pre>nvidia-smi</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/711/1*sDKmtb9cLmSmikVtipKRtw.png" /></figure><p>It will show the correct version of the installed driver, it might show the Cuda version also but that doesn’t mean that it is installed. It shows the Cuda version which is compatible with this Nvidia driver.</p><blockquote>Here it is showing <strong>CUDA Version: 10.2</strong> with <strong>NVIDIA-SMI 440.100, </strong>which means Cuda 10.2 is compatible with it. <a href="https://stackoverflow.com/a/55717476">Read more</a> on this.</blockquote><p><strong>Step-3: Install the Cuda Toolkit.</strong></p><p>Search for that specific version for Cuda<em>(here 10.2)</em> on google and visit the <a href="https://developer.nvidia.com/cuda-10.2-download-archive">official website</a> to download the Cuda toolkit.</p><p>Select the OS, Architecture, Distribution, Version, and Installer Type. You will get a link to download the Cuda Toolkit.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oxvrr1eZ5Bem6CXv2Sp2Gw.png" /></figure><p>Copy the link of<strong> .deb file</strong> and open terminal and write:<strong> <em>wget &lt;link&gt;</em>.</strong></p><pre>wget <a href="http://developer.download.nvidia.com/compute/cuda/10.2/Prod/local_installers/cuda-repo-ubuntu1804-10-2-local-10.2.89-440.33.01_1.0-1_amd64.deb">http://developer.download.nvidia.com/compute/cuda/10.2/Prod/local_installers/cuda-repo-ubuntu1804-10-2-local-10.2.89-440.33.01_1.0-1_amd64.deb</a></pre><p>After downloading the file, write the: <strong><em>sudo dpkg -i &lt;file_name&gt;</em></strong></p><pre>sudo dpkg -i cuda-repo-ubuntu1804-10-2-local-10.2.89-440.33.01_1.0-1_amd64.deb</pre><p>It will fail the first time but will return the command to register the GPG key. Copy that command and run it.</p><pre>sudo apt-key add /var/cuda-repo-10-2-local-10.2.89-440.33.01/7fa2af80.pub</pre><p>Now again run the <strong><em>sudo dpkg -i &lt;file_name&gt;</em></strong></p><pre>sudo dpkg -i cuda-repo-ubuntu1804-10-2-local-10.2.89-440.33.01_1.0-1_amd64.deb</pre><p>This time it will work. Now write the following commands in the terminal to install Cuda.</p><pre>sudo apt-get update<br>sudo apt-get install cuda</pre><p>VOILA! Cuda is installed, now we need to set some environment variables and we are done.</p><p><strong>Step- 4: Set Environment Variables</strong></p><p>Open terminal and type following commands to make 2 files:</p><p><strong>First</strong>:</p><p>Use gedit to any other editor to create &amp; open the following file</p><pre>sudo gedit /etc/profile.d/cuda.sh</pre><p>In the file add the following lines and save it:</p><pre>export PATH=$PATH:/usr/local/cuda/bin<br>export CUDADIR=/usr/local/cuda</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/898/1*k1oZaz6z7cEuBVqoLoO3dA.png" /></figure><p><strong>Second</strong>:</p><p>Use gedit to any other editor to create &amp; open the following file</p><pre>sudo gedit /etc/ld.so.conf.d/cuda.conf</pre><p>In the file add the following lines and save it:</p><pre>/usr/local/cuda/lib64</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/896/1*l7Jkpi8TOxXMC5I3hQkglQ.png" /></figure><p>Now we are Done! Just write the following code and reboot.</p><pre>sudo ldconfig</pre><p><strong>Step 5: Check the installation</strong></p><p>You can check the installation by writing the following code. If the installation is correct it will return the specified version of the Cuda.</p><pre>nvcc --version</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/449/1*WYlz7QzZSnzFmXxRi8m3ww.png" /></figure><p>Thank You</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7931394c1233" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A Deep Dive Into EDA]]></title>
            <link>https://medium.com/deep-dive-into-exploratory-data-analysis/eda-pokemon-visualization-58102b68e2d7?source=rss-402226f49c54------2</link>
            <guid isPermaLink="false">https://medium.com/p/58102b68e2d7</guid>
            <category><![CDATA[matplotlib]]></category>
            <category><![CDATA[explore]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[visualization]]></category>
            <dc:creator><![CDATA[Ayush Gupta]]></dc:creator>
            <pubDate>Mon, 22 Jul 2019 18:03:20 GMT</pubDate>
            <atom:updated>2024-05-20T08:31:19.730Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Hh-HFAUs4w1nFr78f2aasw.png" /></figure><h3>A Deep Dive Into Exploratory Data Analysis: Pokemon Dataset</h3><h3>Introduction</h3><p>Exploratory data analysis is one of the most important and useful aspects of Data Science and Machine Learning. It is one of the most powerful approaches to analyzing data using various visualization techniques.</p><p>In this article, I have tried to cover some of the most important visualization techniques that are required to understand the data in a better way.</p><p>I have taken one of the most interesting datasets of Pokemon for all those 90s people, but don’t worry if you are not aware of Pokemon, the data set is pretty easy to understand.</p><p>So here we Go!</p><h3>Getting Ready</h3><p>There are many visualization libraries present today in Python which gives amazing graphs and plots, some of these libraries are:</p><ul><li><strong>Matplotlib: </strong>Python’s 2D plotting library</li><li><strong>Seaborn: </strong>Provides a high-level interface</li><li><strong>Plotly: </strong>Creates interactive plots</li><li><strong>Bokeh: </strong>It’s a highly interactive library</li><li><strong>ggplot: </strong>Based on R’s ggplot and the <a href="http://www.amazon.com/Grammar-Graphics-Statistics-Computing/dp/0387245448"><em>Grammar of Graphics</em></a></li></ul><p>In this article, we are going to explore some of the most awesome visualization techniques using <strong>Matplotlib</strong> and <strong>Seaborn</strong>. Visualizing the data is the first step, after visualization, we are going to learn some of the important data manipulation techniques. I’ll be using pandas and numpy frequently, if you want to learn more about this, <a href="https://www.hackerearth.com/practice/machine-learning/data-manipulation-visualisation-r-python/tutorial-data-manipulation-numpy-pandas-python/tutorial/"><em>click here</em></a>.</p><p><strong>Installation</strong></p><pre>#install Matplotlib<br>pip install matplotlib</pre><pre>#install Seaborn<br>pip install seaborn</pre><p><strong>Dataset</strong></p><p>As mentioned above the dataset is of Pokemon, containing 13 attributes for 800 different Pokemon.</p><p><em>Link to Dataset-&gt; </em><a href="https://www.kaggle.com/abcsds/pokemon"><em>https://www.kaggle.com/abcsds/pokemon</em></a></p><p>We will try to see if it could predict the type of Pokemon using other attributes.</p><h3><strong>Getting started</strong></h3><p>Before getting started a few things must be kept in mind:</p><ul><li>Check for Missing Values</li><li>Check for Class Imbalance</li><li>Check for Redundant Attributes</li><li>Check for the distribution of various attributes</li><li>Check for Outliers</li></ul><p><strong>Importing Data</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sAJOCRMeOKxIJcCDXBE5ww.png" /><figcaption>Importing the dataset from CSV file using pandas</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uSEO6UrqCXDh_ZYIkxjuMg.png" /><figcaption>This gives the shape of the data(rows, columns)</figcaption></figure><p><strong>Correcting spelling mistakes</strong></p><p>As you can see the name of the Mega Pokemon are not correct, so correcting the names for mega evolved Pokemon. [ VenusaurMega Venusaur -&gt; Mega Venusaur]</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YcWMATIVxc1Ha0xIyEzQyA.png" /><figcaption>Now the names of Mega Evolved are correct</figcaption></figure><p><strong>To check the Missing Values:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KnEsL8ZABXPpBPnnVU-CaA.png" /><figcaption>We can see the Type2 attribute has 386 missing values</figcaption></figure><p>Missing values are a great pain if not dealt with, <a href="https://github.com/ResidentMario/missingno"><strong>missingno</strong></a> module is one of the great ways to visualize the missing values present in the dataset. You can even use the <strong>seaborn heatmap </strong>to plot a beautiful graph depicting all the missing values.</p><blockquote>Read this article “<a href="https://dev.to/tomoyukiaota/visualizing-the-patterns-of-missing-value-occurrence-with-python-46dj"><em>Visualizing the patterns of missing value occurrence with Python</em></a>”on visualising the missing values using the above two approaches.</blockquote><p>What to do next after detecting the missing value?</p><p>We can do the following things once we have found the missing values:</p><ol><li>Remove Rows With Missing Values.</li><li>Choose a Global Value to replace all the missing values from the attribute.</li><li>Use the Mean of the attribute and replace all the missing values with this mean.</li><li>Use the median of the attribute and replace all the missing values with this median.</li><li>There are various predictive models to estimate the value to be filled in.</li></ol><blockquote>You can go to this awesome article for filling of missing value: <a href="https://towardsdatascience.com/how-to-handle-missing-data-8646b18db0d4"><strong><em>How to Handle Missing Data</em></strong></a></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9D-TJzT2hmL3eTqWu60qRg.png" /><figcaption>Taken from the article “<a href="https://towardsdatascience.com/how-to-handle-missing-data-8646b18db0d4">How to Handle Missing Data</a>”</figcaption></figure><p>Here as the Type2 attribute has 386 missing values, I have just simply put the Type1 values in the Type2 due to the fact that some Pokemon have only 1 type present, and even if there are 2 types, Generally, Pokemon have 1 type stronger than 2 type, so for missing values, this will work.</p><p>For other Datasets, any of the above 5 things can be done to fill in the missing values.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7EP3-S0kEubG15SyHUE_tQ.png" /><figcaption>Now there are <strong>no missing values</strong> in the dataset</figcaption></figure><p><strong>Check for class Imbalance</strong></p><p>There are a lot of ways in which you can check for the class imbalance, among those I prefer to use either a Histogram or Pie chart of all the classes present in the target attribute.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6z_h0opfijkBl0DxknFz1w.png" /><figcaption>Gives all the <strong>unique values</strong> of the attribute</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AxadxBlE0zw9sw66PHhcsw.png" /><figcaption>Gives counts of all the values in the attribute</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7qVFmQMURkqK_qgeiFSQCA.png" /><figcaption>Plotting the Pie chart using the above data</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/964/1*6nlGqkyxUkgvx_bDLpgXCQ.png" /></figure><p>A Pie Chart is one of the ways to represent different classes but a Histogram can be used as well.</p><p>The pie chart count of each class must be known and fed into <em>plt.pie</em> to return the percentage of each class.</p><p><strong>Check for Redundant Attributes:</strong></p><p>Selecting the best features that represent the Dataset has always been the most important step before putting our data in any kind of machine learning model.</p><p>There are various ways of selecting the best features, some of them are:</p><ol><li>Univariate Selection</li><li>Feature Importance</li><li>Correlation Matrix with Heatmap</li></ol><blockquote>You can visit this article “<a href="https://towardsdatascience.com/feature-selection-techniques-in-machine-learning-with-python-f24e7da3f36e">Feature Selection Techniques in Machine Learning with Python</a>” for more information.</blockquote><p>I have used <strong>Heat Map</strong>, which tells the correlation between different attributes. We have to check for Highly correlated attributes in the Heat Map and remove them.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wgTIrdzTv83kUrJftMfkVg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QNZI8OnWY3UK1sukRvXPiA.png" /><figcaption>From the scale of 0 being least correlated and 1 being most</figcaption></figure><p>For now, removing the categorical features to analyze the non-categorical data effect on Type1 and Type2.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VEwtvBw5aZCUT0yn1gXYeA.png" /><figcaption>new_Data is a copy of the daily_Data dataset, ‘Generation’ and ‘Legendary’ are removed for now</figcaption></figure><h4><strong>Check for Outliers</strong></h4><p><strong>Box plots</strong> are a great way to depict the attributes, they show quartile ranges and Outliers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*x8IPgKDvQNmuac13BSpPNw.png" /></figure><p><strong>BoxPlots:</strong></p><p><strong>Median (Q2/50th Percentile)</strong>: the middle value of the dataset.<strong>First quartile (Q1/25th Percentile): the middle number between the smallest number and the median of the dataset.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BvnhVVCb6qOHRvpE8pNv0w.png" /></figure><p><strong>Third quartile (Q3/75th Percentile)</strong>: the middle value between the median and the highest value of the dataset.<strong>Interquartile range (IQR): 25th to the 75th percentile.whiskers (shown in blue)Outliers (shown as green circles)</strong>“<strong>maximum</strong>”: Q3 + 1.5*IQR“<strong>minimum</strong>”: Q1 -1.5*IQR</p><blockquote>Refer to this article “<a href="https://towardsdatascience.com/understanding-boxplots-5e2df7bcbd51">Understanding Boxplots</a>” to know more about boxplots.</blockquote><h3>Visualizing different attributes</h3><p><strong>Strip-plot</strong>,<strong> Box-plot </strong>and<strong> Bar-plots,</strong> <strong>Swarm-plots</strong>, <strong>Factor-plots, </strong>and<strong> Radar Chart </strong>are a great way to Visualise various attributes in the dataset.</p><p>The function takes <strong>Type1 or Type2(Target)</strong> and draws a strip plot and box plot corresponding to the <strong>attribute</strong> selected in the function, moreover a box plot is also drawn using the mean of the taken <strong>attribute</strong> grouped by <strong>Type1 or Type2(Target).</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ib1CDK8-u1CYVjh1YS3HsQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hJgx_iAnUN6mKW68LGQzFw.png" /><figcaption>Function mean_attribute can be called for each attribute(other Non categorical)and Type1/Type2(Target)</figcaption></figure><p>Checking the Categorical Attributes: ‘<strong>Generation</strong>’ and ‘<strong>Legendary</strong>’ attributes effects on Dataset.</p><p><a href="https://seaborn.pydata.org/generated/seaborn.swarmplot.html"><strong>Swarm plots</strong></a></p><p>They can be drawn on its own, but it is also a good complement to a <strong>box</strong> or <strong>violin</strong> <strong>plot</strong> in cases where you want to show all observations along with some representation of the underlying distribution.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RWceU1Q8Hj829uJQB3K2Uw.png" /></figure><p>Further,we have to see how the number of pokemon of each <strong>type</strong> depend on <strong>generation</strong> as seen below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JN1lHhydMmDcONPDA4kyjA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gLJyW1uooCgTrjtYI6OcFA.png" /></figure><p>We have seen how the <strong>Types</strong> of Pokemon are related to <strong>Generation </strong>and how each generation of Pokemon contributes to different attributes in a swarm plot.</p><p>Now we will see the effect of <strong>Legendary</strong> on the different attributes, I have used <strong>Factor-Plot </strong>to clearly differentiate between Legendary and Non-Legendary Pokemon.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_K6k__s8Oy4gvtVsO3srjg.png" /><figcaption>Swarm kind of factor plot</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*i7xZRNapdeIbRfYmktR0Ag.png" /><figcaption>Bar kind of factor plot</figcaption></figure><p>We can see from the above plot that <strong>Legendary</strong> Pokemon(<strong>orange</strong>) have a higher Total than the <strong>Non-Legendary</strong> Pokemon(<strong>Blue</strong>).</p><p><strong>Comparison of Different Pokemon</strong></p><ul><li><strong>Bar-plot</strong> for each attribute for comparison of two different Pokemon</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lvRThEZ9enGdmbkLc4MSPg.png" /></figure><ul><li><strong>Radar chart</strong> for comparison of two different Pokemon</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vEvxqCtyKueXEU8A61fcCQ.png" /></figure><pre><strong>#Code for Radar Chart</strong></pre><pre>pok1=daily_Data.loc[pokemon1]<br>pok2=daily_Data.loc[pokemon2]<br># Libraries<br>import matplotlib.pyplot as plt<br>import pandas as pd<br>from math import pi<br>fig = plt.figure(figsize=(10, 10))<br># Set data<br>df = pd.DataFrame({<br>&#39;group&#39;: [&#39;A&#39;,&#39;B&#39;],<br>&#39;HP&#39;: [pok1[&quot;HP&quot;], pok2[&quot;HP&quot;]],<br>&#39;Attack&#39;: [pok1[&quot;Attack&quot;], pok2[&quot;Attack&quot;]],<br>&#39;Defense&#39;: [pok1[&quot;Defense&quot;], pok2[&quot;Defense&quot;]],<br>&#39;Sp. Atk&#39;: [pok1[&quot;Sp. Atk&quot;], pok2[&quot;Sp. Atk&quot;]],<br>&#39;Sp. Def&#39;: [pok1[&quot;Sp. Def&quot;], pok2[&quot;Sp. Def&quot;]],<br>&#39;Speed&#39;: [pok1[&quot;Speed&quot;], pok2[&quot;Speed&quot;]]<br>})</pre><pre>#maximum among all<br>maximum=max([pok1[&quot;Attack&quot;], pok2[&quot;Attack&quot;],pok1[&quot;Defense&quot;], pok2[&quot;Defense&quot;],pok1[&quot;Sp. Atk&quot;], pok2[&quot;Sp. Atk&quot;],<br>pok1[&quot;Sp. Def&quot;], pok2[&quot;Sp. Def&quot;],pok1[&quot;Speed&quot;], pok2[&quot;Speed&quot;]])<br> <br># ------- PART 1: Create background<br> <br># number of variable<br>categories=[&#39;HP&#39;, &#39;Attack&#39;, &#39;Defense&#39;, &#39;Sp. Atk&#39;,<br>       &#39;Sp. Def&#39;, &#39;Speed&#39;]<br>N = len(categories)<br>#to select the range, means till where the graph can go for a variable.<br>aa=[]<br>aaa=[]<br>for i in range(maximum):<br>    aa.append(i*10)<br>    aaa.append(str(i*10))</pre><pre># What will be the angle of each axis in the plot? (we divide the plot / number of variable)<br>angles = [n / float(N) * 2 * pi for n in range(N)]<br>angles += angles[:1]<br> <br># Initialise the spider plot<br>ax = plt.subplot(111, polar=True)<br> <br># If you want the first axis to be on top:<br>ax.set_theta_offset(pi / 2)<br>ax.set_theta_direction(-1)<br> <br># Draw one axe per variable + add labels labels yet<br>plt.xticks(angles[:-1], categories,size=15,color=&quot;black&quot;)</pre><pre># Draw ylabels<br>ax.set_rlabel_position(0)<br>plt.yticks(aa, aaa, color=&quot;black&quot;, size=15)<br>plt.ylim(0,maximum)</pre><pre># ------- PART 2: Add plots<br> <br># Plot each individual = each line of the data <br># Ind1<br>values=df.loc[0].drop(&#39;group&#39;).values.flatten().tolist()<br>values += values[:1]<br>ax.plot(angles, values, linewidth=4, linestyle=&#39;solid&#39;, label=pokemon1,color=color1)<br>ax.fill(angles, values, color1, alpha=0.1)<br> <br># Ind2<br>values=df.loc[1].drop(&#39;group&#39;).values.flatten().tolist()<br>values += values[:1]<br>ax.plot(angles, values, linewidth=4, linestyle=&#39;solid&#39;, label=pokemon2,color=color2)<br>ax.fill(angles, values, color2, alpha=0.1)<br> <br># Add legend<br>plt.legend(loc=&#39;upper right&#39;, bbox_to_anchor=(0.1, 0.1))</pre><blockquote>Code for entire article can be found on <a href="https://www.kaggle.com/ayush01/complete-pokemon-stats-visualization">https://www.kaggle.com/ayush01/complete-pokemon-stats-visualization</a></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=58102b68e2d7" width="1" height="1" alt=""><hr><p><a href="https://medium.com/deep-dive-into-exploratory-data-analysis/eda-pokemon-visualization-58102b68e2d7">A Deep Dive Into EDA</a> was originally published in <a href="https://medium.com/deep-dive-into-exploratory-data-analysis">A Deep Dive Into EDA: Learn Visualization From Most Interesting Pokemon Dataset</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>