<?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 Vedika Bhat on Medium]]></title>
        <description><![CDATA[Stories by Vedika Bhat on Medium]]></description>
        <link>https://medium.com/@vedikabhat2503?source=rss-d82e832351ef------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*UO0DHQ2qBZ9xND3L</url>
            <title>Stories by Vedika Bhat on Medium</title>
            <link>https://medium.com/@vedikabhat2503?source=rss-d82e832351ef------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 13:05:52 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@vedikabhat2503/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[EdgeMind: Building a Lightweight On-Device AI Assistant]]></title>
            <link>https://medium.com/@vedikabhat2503/edgemind-building-a-lightweight-on-device-ai-assistant-3188a6c58559?source=rss-d82e832351ef------2</link>
            <guid isPermaLink="false">https://medium.com/p/3188a6c58559</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[tensorflow]]></category>
            <category><![CDATA[edge-computing]]></category>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <dc:creator><![CDATA[Vedika Bhat]]></dc:creator>
            <pubDate>Sun, 20 Sep 2026 18:56:19 GMT</pubDate>
            <atom:updated>2026-09-20T18:56:19.144Z</atom:updated>
            <content:encoded><![CDATA[<p>It started, honestly, with a small moment of frustration. I was on a train with barely any signal, trying to get a quick answer from an AI chatbot, and watching the loading spinner just sit there was oddly annoying. It made me stop and think about something I hadn’t really questioned before: why does every “smart” assistant need a live internet connection just to function? Somewhere in the back of my mind, I already knew the answer because these models are massive, and they live on someone else’s servers. But that train ride was the first time it actually bothered me enough to want to do something about it.</p><p>Around the same time, I was deep into my learning journey with Imarticus, working through concepts in machine learning and deep learning that, until then, had mostly lived in theory for me backpropagation, model architectures, optimization, the usual suspects. What Imarticus did for me wasn’t just teaching the math and the code; it pushed me to keep asking “okay, but where does this actually get used?” after every single concept. It wasn’t enough to know how a neural network learns, I wanted to know what happens when that network has to run somewhere with no GPU, no stable internet, and no room for excess. That habit of connecting theory to real-world constraints is really where the seed for EdgeMind got planted. I didn’t want to just train a model and call it done. I wanted to build something that solved an actual, physical limitation, running intelligently, without the cloud.</p><p>So EdgeMind became my answer to that train-ride problem. A lightweight AI assistant that lives entirely on a laptop, no internet required, no data leaving the device, no dependency on anything outside the machine in front of me.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/0*OI5zYYPHP-QnR4DZ.jpg" /><figcaption>Edge AI Processors</figcaption></figure><h4><strong>Setting the Baseline</strong></h4><p>Every good experiment needs an honest starting point, so before I touched anything related to compression, I wanted to see what a “normal” model actually costs to run. I picked a small pretrained language model and loaded it in TensorFlow, just to measure the basics: file size, memory footprint, and how long it took to respond to a simple prompt. I wasn’t trying to prove anything yet; I just wanted numbers I could trust, so that every improvement later would mean something concrete instead of a vague feeling of “this seems faster.”</p><pre>import tensorflow as tf<br>import time<br><br>model = tf.keras.models.load_model(&quot;base_model&quot;)<br><br>start = time.time()<br>output = model.predict(sample_input)<br>end = time.time()<br><br>print(f&quot;Inference time: {end - start:.2f} seconds&quot;)<br>print(f&quot;Model size: {get_model_size(&#39;base_model&#39;)} MB&quot;)</pre><p>The numbers weren’t shocking, but they were revealing. Even a ‘small’ model by industry standards was heavier than I expected. Heavy enough that I could immediately see why on-device deployment isn’t the default choice for most products. My fans were audibly working. My laptop, which usually handles my day-to-day work without complaint, was clearly straining under something it wasn’t built for. This baseline became my measuring stick for everything that followed, and honestly, a bit of quiet motivation too.</p><h4><strong>The Turning Point: Quantization</strong></h4><p>If there’s one part of this project that felt like an actual lightbulb moment, it was learning about quantization. The idea is almost deceptively simple: instead of storing every weight in a neural network as a 32-bit floating-point number, you compress it down to something smaller, like an 8-bit integer without needing to retrain the whole model from scratch. On paper, it sounds like a rounding trick. In practice, it’s the difference between a model that fits comfortably on a laptop and one that doesn’t.</p><p>I converted my baseline model into TensorFlow Lite format and applied post-training quantization:</p><pre>converter = tf.lite.TFLiteConverter.from_keras_model(model)<br>converter.optimizations = [tf.lite.Optimize.DEFAULT]<br>tflite_quant_model = converter.convert()<br><br>with open(&quot;edgemind_quantized.tflite&quot;, &quot;wb&quot;) as f:<br>    f.write(tflite_quant_model)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Z7pELuJVZcPiQLxy.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*bmYlPRyjRuhxg-Dv.jpg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*iZ9Qpw6hW2a-cLrN" /><figcaption>Quantization Process</figcaption></figure><p>Watching the file size drop after this step was genuinely satisfying. It felt like proof that the theory I’d been reading about actually held up in practice. The model wasn’t just smaller on paper; it was smaller on disk, in memory, and in the time it took to respond.</p><h4><strong>Making It Actually Offline</strong></h4><p>A compressed model is only half the story, the real test was making sure it worked without any dependency on the internet at all. I built a small inference pipeline using the TensorFlow Lite Interpreter, switched off my WiFi, and ran it.</p><pre>interpreter = tf.lite.Interpreter(model_path=&quot;edgemind_quantized.tflite&quot;)<br>interpreter.allocate_tensors()<br><br>input_details = interpreter.get_input_details()<br>output_details = interpreter.get_output_details()<br><br>interpreter.set_tensor(input_details[0][&#39;index&#39;], sample_input)<br>interpreter.invoke()<br><br>result = interpreter.get_tensor(output_details[0][&#39;index&#39;])</pre><p>There was something quietly thrilling about seeing a response come back with the WiFi icon crossed out on my screen. It’s a small thing, technically, but it was the moment EdgeMind stopped being an idea and started being real.</p><h4><strong>Benchmarking: Where the Trade-offs Live</strong></h4><p>No compression comes for free, and I didn’t want to pretend otherwise. So I built a simple comparison table, testing the original model against the quantized version across size, speed, and response quality.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/542/1*_6prtjRlU33uPJGdPLuOoA.png" /></figure><p>Seeing this laid out made the trade-off concrete in a way that theory never quite manages to. Yes, there’s a small dip in output quality but the gain in speed and portability, for an assistant meant to run on everyday hardware, felt like a genuinely worthwhile exchange. It also made me appreciate something I hadn’t thought about before starting this: every “efficient” AI product you use has someone, somewhere, having made exactly this kind of trade-off deliberately.</p><h4><strong>What This Project Taught Me</strong></h4><p>If I’m being honest, EdgeMind taught me more about constraints than it did about accuracy. Building for the cloud, you can throw compute at almost any problem and let scale paper over the cracks. Building for the edge forces you to actually understand your model, what it needs, what it can afford to lose, and where the real bottlenecks live. That shift in thinking is something I don’t think I’d have arrived at without the foundation Imarticus gave me; it’s one thing to learn what quantization is in a lecture, and another thing entirely to feel the need to use it because your laptop fan is spinning like it’s about to take off. The theory became real the moment it had to survive contact with my actual hardware.</p><p>It also taught me patience with imperfection. The quantized model isn’t as sharp as the original, and I had to sit with that instead of chasing an illusion of a “perfect” compressed model that loses nothing. Some of the most useful lessons from this project came from accepting a slightly worse answer in exchange for something that could actually run where I needed it to.</p><h4><strong>Looking Ahead</strong></h4><p>EdgeMind, as it stands, is still a work in progress a proof of concept more than a finished product. But that train-ride frustration that started all of this feels a lot less abstract now. There’s a real, working assistant sitting on my laptop that doesn’t need permission from a server somewhere else to answer a question. The next steps I’m excited about are pushing the compression further with knowledge distillation, training a smaller “student” model that learns to mimic this one, and eventually seeing how small I can make this while keeping it genuinely useful — because the real goal was never just “smaller.” It was always “smaller, without losing what makes it worth using.”</p><p>If this project has a single takeaway, it’s this: intelligence doesn’t have to live exclusively in giant data centers. Sometimes it can live quietly on the device already in your hand, waiting for a question, no signal required.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3188a6c58559" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[INDUSTRY-SPECIFIC ANALYTICS USE CASE : UNDERSTANDING MODEL BUILDING USING MACHINE LEARNING]]></title>
            <link>https://medium.com/@vedikabhat2503/industry-specific-analytics-use-case-understanding-model-building-using-machine-learning-9b745e5761b7?source=rss-d82e832351ef------2</link>
            <guid isPermaLink="false">https://medium.com/p/9b745e5761b7</guid>
            <category><![CDATA[campaign-roi]]></category>
            <category><![CDATA[customer-targeting]]></category>
            <category><![CDATA[revenue-forecasting]]></category>
            <category><![CDATA[dataleakage]]></category>
            <category><![CDATA[model-selection]]></category>
            <dc:creator><![CDATA[Vedika Bhat]]></dc:creator>
            <pubDate>Fri, 03 Jul 2026 18:56:29 GMT</pubDate>
            <atom:updated>2026-07-03T18:56:29.371Z</atom:updated>
            <content:encoded><![CDATA[<h4><strong>INTRODUCTION</strong></h4><p>I Built a Machine Learning System That Tells a Business Exactly Who to Target, What They’re Worth, and What Happens Next. A behind-the-scenes look at building a full customer intelligence engine, from messy CSVs to a revenue forecast — and the data leakage bug that almost ruined it. There’s a particular kind of panic that hits when your model is 97% accurate. Not excitement. Panic. Because in my experience, when a model performs that well on real-world business data, it usually means something is wrong, not that you’re a genius. I hit that exact moment while building this project, and chasing down why it happened turned into one of the more useful things I learned from the whole exercise. More on that in a minute. This post walks through a project I built to solve a very ordinary, very expensive business problem: a retail company sends marketing campaigns to thousands of customers, and most of that money is wasted on people who were never going to buy anyway. I wanted to see if machine learning could fix that — not with one model, but with a small pipeline of models that work together, the way a real analytics team would actually approach it.</p><p>Some of that plumbing was more fiddly than it sounds. The returns table, for instance, only had order IDs — not customer IDs — so I had to route it through the orders table first before I could aggregate anything at the customer level:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*INPLUQauuL87adDJudzFJA.png" /></figure><h4>THE BUSINESS PROBLEM</h4><p>Picture a mid-sized retail company. They have customer records, order history, returns, website visits, customer service tickets, and a history of marketing campaigns going back a couple of years. Every month, someone in marketing has to decide: who do we send this campaign to? Right now, that decision is probably based on gut feeling, or “everyone who bought something in the last year.” That works, kind of, but it’s expensive, and it ignores something important — not every customer is worth the same amount, and not every customer is equally likely to respond. I wanted to build something that could answer three questions at once: 1. Will this specific customer respond to a campaign? 2. If they do, how much are they actually worth over time? 3. Given both of those answers, who should we actually spend money targeting, and what can we expect to make back? And as a bonus, I wanted to forecast overall company sales a few months out, and see what happens to that forecast if the campaign actually works.</p><h4>THE DATA</h4><p>I worked with eight separate tables: customer profiles, orders, marketing campaigns, product returns, website activity, customer service interactions, department-level targets, and monthly sales targets. Nothing here was a single clean spreadsheet — it was scattered the way real business data usually is, spread across systems that don’t naturally talk to each other. The first real task, before any modelling could happen, was building what people in the industry call a “Customer 360” — one row per customer, with everything worth knowing about them pulled into a single table. That meant: Merging customer demographics into the base table Mapping returns back to customers (the returns table only had order IDs, not customer IDs, so I had to route through the orders table first) Calculating a return rate for each customer Figuring out, for every customer, whether they had ever purchased from a marketing campaign — this became my first prediction target Averaging out what it typically costs to run a campaign against each customer, since I’d need that later to calculate return on investment.</p><p>Some of that plumbing was more fiddly than it sounds. The returns table, for instance, only had order IDs — not customer IDs — so I had to route it through the orders table first before I could aggregate anything at the customer level.</p><pre># Returns table only has Order_ID, not Customer_ID —<br># map it through Orders first<br>order_customer_map = orders[[&#39;Order_ID&#39;, &#39;Customer_ID&#39;]]<br>returns_mapped = returns.merge(order_customer_map, on=&#39;Order_ID&#39;, how=&#39;left&#39;)<br><br># Now aggregate returns at customer level<br>return_features = returns_mapped.groupby(&#39;Customer_ID&#39;).agg(<br>    Return_Count=(&#39;Return_ID&#39;, &#39;count&#39;),<br>    Total_Refund_Amount=(&#39;Refund_Amount&#39;, &#39;sum&#39;),<br>    Avg_Days_To_Return=(&#39;Days_To_Return&#39;, &#39;mean&#39;)<br>).reset_index()<br><br>df = df.merge(return_features, on=&#39;Customer_ID&#39;, how=&#39;left&#39;)<br>df[&#39;Return_Count&#39;].fillna(0, inplace=True)<br>df[&#39;Total_Refund_Amount&#39;].fillna(0, inplace=True)<br>df[&#39;Avg_Days_To_Return&#39;].fillna(0, inplace=True)<br>df[&#39;Return_Rate&#39;] = df[&#39;Return_Count&#39;] / df[&#39;Total_Orders&#39;].replace(0, 1)</pre><p>Small detail, but it’s the kind of thing that breaks silently if you don’t check for it — every “customer-level” feature is only as good as the join that built it. Once that table existed, I had something to actually build models on.</p><h4>STAGE ONE: WILL THEY RESPOND?</h4><p>The first question — will a given customer respond to a campaign — is a classic yes-or-no classification problem. But the data had a catch that a lot of tutorials don’t warn you about: only about 1 in every 5 customers had ever purchased from a campaign. That kind of imbalance will quietly wreck a model if you’re not paying attention, because a lazy model can just predict “no” every time and still look accurate on paper. I tested three models here — a Decision Tree, a Random Forest, and XGBoost — and tuned the last one with a randomised hyperparameter search. The results told a genuinely interesting story:</p><p><strong>The Decision Tree </strong>caught 78% of actual responders, but its overall accuracy was mediocre — it was over-eager, flagging a lot of people who wouldn’t actually respond.</p><p><strong>The Random Forest </strong>looked the best on raw accuracy (about 78%), but it was quietly missing half of the real responders. High accuracy, low usefulness.</p><p><strong>XGBoost</strong>, tuned properly and given a class-imbalance correction, struck the best balance — it caught 72% of real responders while keeping a solid ROC-AUC score of 0.76.</p><p>That gap between the Random Forest’s “accuracy” and its actual recall on responders is the whole reason accuracy alone is a dangerous metric for imbalanced business problems. If I had stopped at “which model has the highest accuracy,” I would have picked the worst option for what the business actually needed — finding the people worth targeting.</p><p>Here’s the XGBoost setup that ended up winning, including the class-imbalance correction:</p><pre>negative = (y_train == 0).sum()<br>positive = (y_train == 1).sum()<br><br>xgb_model = XGBClassifier(<br>    subsample=0.8,<br>    colsample_bytree=0.8,<br>    scale_pos_weight=negative / positive,   # correct for the 1-in-5 imbalance<br>    objective=&#39;binary:logistic&#39;,<br>    eval_metric=&#39;logloss&#39;,<br>    random_state=42<br>)<br><br>param_grid = {<br>    &#39;max_depth&#39;: [4, 5, 6],<br>    &#39;learning_rate&#39;: [0.03, 0.05, 0.1],<br>    &#39;n_estimators&#39;: [300, 500]<br>}<br><br>random_search = RandomizedSearchCV(<br>    estimator=xgb_model,<br>    param_distributions=param_grid,<br>    n_iter=10,<br>    scoring=&#39;roc_auc&#39;,<br>    cv=3,<br>    random_state=42,<br>    n_jobs=-1<br>)<br>random_search.fit(X_train, y_train)<br>best_xgb = random_search.best_estimator_</pre><p>I also went back afterward and tested different probability thresholds instead of the default 50/50 cutoff, since in a marketing context you can decide how aggressive or conservative you want to be about who counts as “likely to respond”.</p><pre>for t in [0.30, 0.40, 0.45, 0.50, 0.55, 0.60]:<br>    y_pred_t = (y_prob_xgb &gt;= t).astype(int)<br>    print(&quot;\nThreshold:&quot;, t)<br>    print(classification_report(y_test, y_pred_t))</pre><h4>STAGE TWO: WHAT ARE THEY WORTH?</h4><p>Predicting response is only half the equation. A customer who’s 90% likely to respond but only ever spends ₹500 isn’t worth chasing the way someone who spends ₹50,000 a year is. So the second stage predicted Customer Lifetime Value — a continuous number, not a yes/no.</p><p>This is where the 97%-accuracy panic happened.</p><p>My first pass at this model came back with an almost suspiciously good score. When I dug into feature correlations, I found the problem immediately: Customer Lifetime Value in this dataset was, essentially, a direct mathematical function of Total Revenue — they moved together at an almost perfectly fixed ratio. I was accidentally letting the model see the answer disguised as a feature. This is called data leakage, and it’s one of the most common — and most dangerous — mistakes in applied machine learning, because the model looks brilliant right up until it meets real, unseen data and falls apart.</p><p>I traced a second leak the same way: Average Order Value turned out to just be Total Revenue divided by Total Orders, rearranged. Keeping it in would have been the same mistake wearing a different hat.</p><p>Once I stripped both of those out and kept only genuine behavioral signals — order frequency, product quantity, return patterns, campaign engagement, tenure — the models had to actually work for their answers. And they still performed impressively well:</p><p><strong>Linear Regression </strong>landed at an R² of 0.865 — respectable, but it clearly couldn’t capture the non-linear ways customer behavior interacts.</p><p><strong>Random Forest</strong> reached an R² of 0.973 with the lowest error of any model tested, and became the final choice for this stage.</p><p><strong>XGBoost</strong>, even after a second round of tuning with regularization to control overfitting, settled around 0.96 — strong, but the Random Forest still edged it out here.</p><p>The lesson I keep coming back to from this stage isn’t really about which algorithm won. It’s that a model’s first “great” result deserves the most suspicion, not the least. If a number looks too good, the right instinct is to go hunting for the leak before celebrating.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tI5fRgO1FQiOreWT-s6RcA.png" /></figure><h4>STAGE THREE: BUILDING THE ACTUAL TARGETTING ENGINE</h4><p>With both pieces in place — a probability of response, and a predicted lifetime value — I combined them into a single number for every customer:</p><p><strong><em>Expected Value = Response Probability × Predicted Lifetime Value T</em></strong></p><p>his is a small formula, but it does a lot of work. It naturally ranks customers not by who’s most likely to respond, and not by who’s most valuable, but by who represents the best combination of both. A customer with a 90% response chance but low value might rank below someone with a 40% response chance and a much higher value.</p><p>Ranking every customer by this score let me test different targeting strategies. I compared targeting the top 10%, 20%, 30%, 50%, 75%, and 100% of customers, and plotted expected revenue against campaign cost for each cutoff. The pattern was exactly what you’d hope for and exactly what makes this kind of model useful in the real world: revenue captured grows as you target more people, but return on investment steadily shrinks, because you’re increasingly spending money on people less likely to convert. There’s a real, visible point of diminishing returns — and now it’s a chart, not a guess.</p><h4>STAGE FOUR: PUTTING A NUMBER ON IT, HONESTLY</h4><p>A single revenue estimate is easy to produce and easy to be wrong about. So instead of reporting one number, I used bootstrap resampling — repeatedly resampling the targeted customer group with replacement, a thousand times over, to build a realistic range of likely outcomes rather than a single point estimate.</p><p>This produced a conservative estimate, a most-likely estimate, and an optimistic estimate for expected campaign revenue, along with a projected return on investment. It’s a small technique, but it changes the conversation with stakeholders from “the model says we’ll make X” to “here’s the range we’re confident in, and here’s the most likely outcome” — which is a much more honest and much more defensible way to present a forecast.</p><p>Along the way, I also caught myself in a second, smaller leakage-adjacent mistake: my first version of “expected campaign revenue” summed lifetime value across all targeted customers, which massively overstates what a single campaign could realistically generate. I corrected it to use expected order revenue instead — a much more grounded, defensible number — and rebuilt the bootstrap estimate on top of that. I also broke the projected revenue down by which marketing channel each targeted customer tends to engage with most, which turns an abstract score into something a channel manager can actually act on.</p><h4><strong>STAGE FIVE: FORECASTING, WHAT’S NEXT</strong></h4><p>The final piece stepped back from individual customers to look at the business as a whole: what will total monthly sales look like over the next six months, and what happens to that forecast if this campaign actually lands?</p><p>I tested three forecasting approaches, deliberately ordered from simplest to most sophisticated, so I’d have an honest baseline to measure against:</p><p>A basic 3-month moving average, purely as a sanity-check baseline.</p><p>An <strong>ARIMA</strong> model, after confirming with a stationarity test that the sales data had trend and seasonal patterns that needed differencing before the model could be fit properly.</p><p><strong>Facebook’s Prophet library</strong>, which handled the yearly seasonality in the data far more gracefully and produced the most reliable forecast of the three, complete with a visible seasonal decomposition and confidence bands around each future month</p><p>With Prophet chosen as the final forecasting model, I refit it on the complete sales history and projected six months forward. Then I layered the bootstrap-estimated campaign revenue on top of the very next forecasted month — giving a “baseline forecast” and a “campaign-adjusted forecast” side by side. It’s one thing to say a campaign will generate revenue. It’s a different, more useful thing to show what that revenue actually does to next month’s overall sales curve.</p><h4>BRINGING IT ALL TOGETHER</h4><p>None of this is much good sitting in a notebook, so the last step was packaging every output — customer scores, model comparisons, the targeting thresholds, channel breakdowns, the revenue estimate, the sales forecast, and the trained models themselves — into a clean set of files ready to power an interactive dashboard.</p><p>The idea is that a marketing manager should be able to open a simple app, see the ranked customer list, adjust the targeting percentage, and watch the projected revenue and cost update in real time, without ever touching a line of code</p><h4>WHAT I’S TELL SOMEONE STARTING THIS KIND OF PROJECT</h4><p>A few things stuck with me more than the model scores did.</p><p>First, imbalanced classes are everywhere in business data, and accuracy is often the wrong metric to optimize for. The model that “wins” on accuracy is frequently the one quietly failing at the thing you actually care about.</p><p>Second, when a regression model performs suspiciously well, that’s a signal to slow down, not speed up. Data leakage doesn’t announce itself — it hides inside features that look perfectly reasonable until you check what they’re secretly made of.</p><p>Third, a single number is rarely the most honest way to report a prediction to a business. A range, built from something like bootstrapping, tends to earn more trust than false precision does.</p><p>And finally, the real value of a project like this isn’t any one model — it’s the chain connecting them. <em>Knowing who might respond means little without knowing what they’re worth</em>. Knowing both means little without a way to rank and target them. And none of it means much to a business unless it connects back to something as simple and familiar as next month’s total sales number. That’s the part I think gets missed most often when people talk about applying machine learning to business problems: the individual models are rarely the hard part. Making them talk to each other, and making the output honest enough to hand to someone who has to make a real decision with it — that’s the actual work.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9b745e5761b7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[HOW COMPUTER LEARNS PATTERNS]]></title>
            <link>https://medium.com/@vedikabhat2503/how-computer-learns-patterns-6556a31e58e8?source=rss-d82e832351ef------2</link>
            <guid isPermaLink="false">https://medium.com/p/6556a31e58e8</guid>
            <dc:creator><![CDATA[Vedika Bhat]]></dc:creator>
            <pubDate>Fri, 13 Mar 2026 19:37:22 GMT</pubDate>
            <atom:updated>2026-03-13T19:37:22.509Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>INTRODUCTION</strong></p><p>From inventing machines to building great AI models we have come a long way. “AI” is something that we come across and hear about quite often in our everyday lives.</p><p>Have you ever wondered how social media would immediately start suggesting advertisments related to the content you might have searched for on Google? Well, that’s because both the web platforms as well as the gadgets are highly powered with AI/ML Technologies that allow machines to learn patterns from information in their back and systems.</p><p><strong>UNDERSTANDING ML IN SIMPLE WORDS</strong></p><p>While computers follow instructions given by us for execution tasks machine learning models train machines to learn from the past data, perform analysis, identify patterns, process information, and return valuable and insightful predictions. In this blog we will be exploring exactly how that’s done.</p><p>As understanding the patterns occur naturally to human beings, like if there are dark clouds outside, it might rain; machines too do something similar by using past data, and algorithms, for example:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/672/1*M4b_8lBXWtdrUMEaUr2Ipw.png" /></figure><p>Algorithms identifies the pattern analysis data and discover that:</p><p>More the advertising -&gt; higher the sales -&gt; higher the profit -&gt; higher the ROI, which tells us that the business is doing great.</p><p><strong>DATA COLLECTION</strong></p><p>ML follows a basic workflow, data is the foundation of ML, therefore, collecting relevant and high-quality data for algorithms to analyze the patterns well, and it can be gathered from various internal, external, and generated sources.</p><pre>import pandas as pd<br>df = pd.read_csv(&quot;/content/sample_data/california_housing_train.csv&quot;)<br>df</pre><p><strong>DATA PRE-PROCESSING</strong></p><p>It is a process of removing missing values, handling duplicates, converting text to numbers, etc., from data which can often be messy and incomplete, and pre-processing ensures that it gets clean and organized before training the models.</p><pre># Turn the categories into numbers:<br>from sklearn.preprocessing import OneHotEncoder<br>from sklearn.compose import ColumnTransformer<br><br>Categorical_Features = [&quot;longitude&quot;, &quot;latitude&quot;, &quot;housing_median_age&quot;, &quot;total_rooms&quot;, &quot;total_bedrooms&quot;, &quot;population&quot;, &quot;households&quot;, &quot;median_income&quot;]<br>one_hot = OneHotEncoder()<br>transformer = ColumnTransformer([(&quot;one_hot&quot;,<br>                                  one_hot,<br>                                  Categorical_Features)],<br>                                remainder = &quot;passthrough&quot;)<br>transformed_x = transformer.fit_transform(x)<br>transformed_x</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cuXDE9tTPAM2FQh-lQ3DGQ.avif" /></figure><p><strong>TRAINING THE MODEL</strong></p><p>A process where algorithm analyzes data and identifies patterns which help us discover relevant relationships between input and output variables.</p><pre>from sklearn.model_selection import train_test_split<br><br>x_train, x_test, y_train, y_test = train_test_split(x, y, test_size=0.2, random_state=100)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*0iPSgIenYssaYPOt" /></figure><p><strong>MODEL EVALUATION</strong></p><p>one of the critical steps in the model development process which ensures that our model is good enough to perform well on unseen data. The data must be divided into train, test, and often validation sets for improving clarity in the data and efficiency of the model.</p><p>1] <strong>Confusion matrix:</strong> It is used to compare predicted values/classes against actual target values. It simply determines how well a classification model is performing.</p><p>2] <strong>Accuracy:</strong> It is a fundamental evaluation metric that represents total correct predictions, both positive and negative, made by a model out of all the predictions, and it helps us evaluate the performance of a classification model.</p><p>3] <strong>Precision:</strong> It is a classification metric that measures accuracy of all positive predictions.</p><p>4] <strong>Recall:</strong> It measures the percentage of actual positive cases a model correctly identifies, which we also call as true positive rate (TPR).</p><p>5] <strong>F1 score:</strong> It is a metric in ML that calculates harmonic mean of precision and recall, which is the average. It ranges between 0 and 1, with 0 denoting lowest possible result and 1 denoting the most accurate result, keeping 0.5 as the threshold value.</p><p>These are the most important steps we follow while we build highly efficient and accurate prediction, automation, and classification models.</p><pre>from sklearn.metrics import mean_squared_error, r2_score<br><br>lr_train_mse = mean_squared_error(y_train, y_lr_train_pred)<br>lr_train_r2 = r2_score(y_train, y_lr_train_pred)<br><br>lr_test_mse = mean_squared_error(y_test, y_lr_test_pred)<br>lr_test_r2 = r2_score(y_test, y_lr_test_pred)<br><br>lr_results = pd.DataFrame([&#39;Linear Regression&#39;, lr_train_mse, lr_train_r2, lr_test_mse, lr_test_r2]).transpose()<br>lr_results.columns = [&quot;Method&quot;, &quot;Train MSE&quot;, &quot;Train R2&quot;, &quot;Test MSE&quot;, &quot;Test R2&quot;]</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8j7yGxj2t1lbDsONpoKFSg.png" /></figure><p><strong>ROLE OF MACHINES IN MACHINE LEARNING</strong></p><p>Computers and machine learning (ML) models go hand-in-hand by creating a relationship where computers provide the necessary physical infrastructure (hardware/software) to process data, while ML models provide the “intelligence” that allows those computers to perform complex tasks without explicit, hard-coded rules.</p><p><strong>CONCLUSION</strong></p><p>Computers can learn patterns from data and make intelligent predictions thanks to machine learning. Algorithms can find connections that aid in the resolution of practical issues by examining sizable datasets. Pattern recognition is the cornerstone of contemporary artificial intelligence, from recommendation systems to healthcare analytics. The next generation of data professionals will need to understand how machines learn patterns as data continues to grow at a rapid pace and for that as, machines will learn logic, patterns will perform it’s magic.</p><p>My educational experience at Imarticus Learning has significantly improved my comprehension of these machine learning concepts. The program’s emphasis on real-world applications and practical projects helps close the gap between theoretical understanding and practical data science solutions, which motivated me to research and write about this subject.</p><p><strong>REFERENCES</strong></p><ul><li><strong>Google Machine Learning Crash Course</strong><br> <a href="https://developers.google.com/machine-learning/crash-course">https://developers.google.com/machine-learning/crash-course</a></li><li><strong>Scikit-learn Documentation (Machine Learning in Python)</strong><br> <a href="https://scikit-learn.org/stable/">https://scikit-learn.org/stable/</a></li><li><strong>Kaggle — Introduction to Machine Learning</strong><br> <a href="https://www.kaggle.com/learn/intro-to-machine-learning">https://www.kaggle.com/learn/intro-to-machine-learning</a></li><li><strong>MIT OpenCourseWare — Introduction to Machine Learning</strong><br> <a href="https://ocw.mit.edu/courses/6-036-introduction-to-machine-learning/">https://ocw.mit.edu/courses/6-036-introduction-to-machine-learning/</a></li><li><strong>Towards Data Science — Machine Learning Articles</strong><br> <a href="https://towardsdatascience.com/">https://towardsdatascience.com/</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6556a31e58e8" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>