<?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 Anvitasreddy on Medium]]></title>
        <description><![CDATA[Stories by Anvitasreddy on Medium]]></description>
        <link>https://medium.com/@anvitasreddy?source=rss-dde898c811d0------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*eRnkjhUE0y-N-gj4Rxz9hQ.png</url>
            <title>Stories by Anvitasreddy on Medium</title>
            <link>https://medium.com/@anvitasreddy?source=rss-dde898c811d0------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 19:49:26 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@anvitasreddy/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[Mathematical Intuition for ML-Part-6]]></title>
            <link>https://medium.com/@anvitasreddy/mathematical-intuition-for-ml-part-6-4ebe3c8968a6?source=rss-dde898c811d0------2</link>
            <guid isPermaLink="false">https://medium.com/p/4ebe3c8968a6</guid>
            <dc:creator><![CDATA[Anvitasreddy]]></dc:creator>
            <pubDate>Sun, 23 Aug 2026 13:05:17 GMT</pubDate>
            <atom:updated>2026-08-23T13:05:17.846Z</atom:updated>
            <content:encoded><![CDATA[<p>A matrix is a machine that transforms information.</p><p>Example:</p><pre>x = [2]<br>    [3]<br><br>A = [2  0]<br>    [0  3]</pre><p>then,</p><pre>Ax = [2  0] [2] = [4]<br>     [0  3] [3]   [9]</pre><p>The matrix transformed:</p><pre>[2, 3] → [4, 9]</pre><p>In simple words the the x-axis got stretched 2 times and y-axis got stretched 3 times.</p><h4>Matrix Multiplication</h4><p>Suppose you have a student.</p><p>They have:</p><pre>Math        80<br>Programming 90</pre><p>You want to calculate two new scores: Technical score and Overall score.</p><p>You could define:</p><pre>Technical = 0.7 × Math + 0.3 × Programming<br>Overall   = 0.4 × Math + 0.6 × Programming</pre><p>This can be represented as:</p><pre>Math   Programming<br> ↓         ↓<br>0.7      0.3     → Technical<br>0.4      0.6     → Overall</pre><p>So matrix multiplication is taking combinations of information to produce new information.</p><h4>Why multiplication exists</h4><p>Ordinary multiplication combines numbers, but matrix combines transformations.</p><p>A neural network layer essentially performs:</p><pre>input<br>  ↓<br>matrix multiplication<br>  ↓<br>weights applied<br>  ↓<br>new representation<br><br>For example:<br>x → W₁x → activation → W₂x → output</pre><p>Some important intuition:<br>1. A matrix multiplication is many dot products happening together.</p><pre>[1 2] · [5 7]<br><br>= 1×5 + 2×7<br>= 19</pre><p>2. Suppose you have: 100 students , 3 features per student</p><pre>100 students<br>3 features per student<br><br>X = 100 × 3<br><br>[age, study_hours, sleep_hours]<br></pre><p>Now suppose model has</p><pre>3 input features<br>5 hidden neurons<br><br>The weight matrix would be:<br>W = 3 × 5<br><br>Then:<br>(100 x 3)(3 x 5)<br>= 100 x 5<br><br>You transformed:<br>100 students x 3 features<br><br>into:<br>100 students x 5 learned fatures</pre><h4>Common misconceptions</h4><p>“Matrix multiplication means multiplying corresponding elements.” That’s element-wise multiplication. Matrix multiplication is: row x column</p><p>AB = BA — which is not the situation for matrix multiplication.</p><p>Bigger matrix = more powerful matrix — A matrix represents a transformation. Its usefulness depends on what transformation it performs.</p><h3>Transpose</h3><p>it is shifting rows to columns and vice versa. Consider X=data, you may encounter: XᵀX</p><p>This appears everywhere in:</p><ul><li>linear regression</li><li>covariance matrices</li><li>PCA</li><li>optimization</li><li>least squares</li><li>neural networks</li></ul><p>For example:</p><pre>X       → observations × features<br><br>Xᵀ      → features × observations<br><br>XᵀX     → features × features</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4ebe3c8968a6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Mathematical Intuition for ML-Part5]]></title>
            <link>https://medium.com/@anvitasreddy/mathematical-intuition-for-ml-part5-ec98be3b816b?source=rss-dde898c811d0------2</link>
            <guid isPermaLink="false">https://medium.com/p/ec98be3b816b</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[mathematics]]></category>
            <category><![CDATA[mathematics-for-ml]]></category>
            <dc:creator><![CDATA[Anvitasreddy]]></dc:creator>
            <pubDate>Sat, 08 Aug 2026 16:50:55 GMT</pubDate>
            <atom:updated>2026-08-08T16:50:55.082Z</atom:updated>
            <content:encoded><![CDATA[<p>Last time we asked “how big is a single vector?”. Today we ask a closely related but distinct question: “how far apart are two points?”</p><p>This might feel like same question, and this is same for Manhattan and Euclidean. But you’ll see that once we get to Cosine and Mahalanobis, ”distance” stops being about size entirely and starts being about direction and context .</p><h3>Cosine Distance/Similarity</h3><p>This is where we stop thinking about size, and thinking about direction.</p><p>Intuition: Cosine asks do these two vectors point in roughly the same direction? Two vectors can be be enormous or tiny — Cosine doesn’t care. It only cares about the angle between them.</p><p>Real-life analogy : Imagine two people describing their taste in movies as a “preference vector” — like [8 (action), 2 (romance), 9 (comedy)]. One person rates everything on a 1–10 scale, another rates everything on a 1–100 scale but with the <em>same relative preferences</em> — say [80, 20, 90]. Are their tastes different? <strong>No!</strong> They’re proportionally identical — same direction, different “loudness.” Euclidean distance would say these two people are wildly different (huge magnitude gap). Cosine similarity correctly says: <strong>identical taste.</strong></p><h4>Why is exists?</h4><p>In many real datasets — especially text and embeddings — the magnitude of a vector is an accident of scale (e.g: a long document naturally has bigger word count vectors that short one, even if they are of same topic.) Euclidean distance would incorrectly say a long document and a short document on the same topic are “far apart” just because one vector is longer. Cosine similarity fixes this.</p><h4>Connection to ML</h4><ul><li><strong>Text/document similarity</strong> (TF-IDF vectors, bag-of-words) — document length shouldn’t matter, only topic</li><li><strong>Embedding search / semantic search</strong> (the backbone of RAG systems, vector databases like Pinecone/FAISS) — comparing sentence embeddings, image embeddings</li></ul><h3>Mahalanobis Distance</h3><p>Euclidean distance treats every direction and every feature as equally important as independent. But in real data some features will co-related and features are often in different scales (income in Rs and Age in years). Mahalanobis asks “how far is this point, measured in units that account for how the data actually spreads and corelates?”</p><h4>Real-life analogy</h4><p>Imagine judging how “unusual” a person’s height-weight combination is. A person who is very tall AND very heavy might be totally normal (height and weight correlate). But a person who is very short AND very heavy is unusual — that combination breaks the normal correlation pattern. Euclidean distance can’t tell these two cases apart (same raw distance from average); Mahalanobis distance can, because it accounts for the <em>correlation structure</em> of the data.</p><p><strong>Simple Understanding:</strong></p><p>Imagine two students:</p><ul><li>Student A: Math = 80, Physics = 80</li><li>Student B: Math = 90, Physics = 90</li></ul><p>Euclidean distance says: <em>“How many units apart are these two points?”</em></p><p>It looks at the raw difference in each direction. But there is a problem. Imagine most students score are like the above mentioned. Which is normal</p><p>Suppose someone gets Math=90, Physics=60 this might be unusual. Because</p><p><em>High Math → High Physics</em></p><p>So we shouldn’t just ask: <em>“How far is this point from the average?”</em></p><p>We should ask: <em>“How unusual is this point considering how the data normally behaves?”</em></p><p>That’s what Mahalanobis distance does.</p><p>Euclidean asks<strong> “how physically far away is the point?”</strong></p><p>Mahalanobis asks<strong> “How far away is the point relative to the normal spread and relationships in the data?”</strong></p><h4>Why it exists?</h4><p>It fixes two Euclidean blind spots simultaneously:</p><ol><li>features on different scales unfairly dominate distance calculations.</li><li>ignoring correlations makes some “unusual” points look normal and vice versa.</li></ol><h4>Connection to ML</h4><ul><li><strong>Anomaly/outlier detection</strong> (a point far in Mahalanobis terms is a genuine statistical outlier, accounting for correlations)</li><li>Improves KNN/clustering when features are correlated or unscaled, instead of manually normalizing everything</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ec98be3b816b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Mathematical Intuition for ML -Part-4]]></title>
            <link>https://medium.com/@anvitasreddy/mathematical-intuition-for-ml-part-4-3d1f8c14d16e?source=rss-dde898c811d0------2</link>
            <guid isPermaLink="false">https://medium.com/p/3d1f8c14d16e</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[mathematics]]></category>
            <dc:creator><![CDATA[Anvitasreddy]]></dc:creator>
            <pubDate>Thu, 06 Aug 2026 12:19:33 GMT</pubDate>
            <atom:updated>2026-08-06T12:19:33.007Z</atom:updated>
            <content:encoded><![CDATA[<h3>What is L2 Regularization, Why does it work?</h3><p>L2 Regularization is a machine learning technique used to prevent overfitting.</p><p>When training a model, you’re not just trying to fit the training data — you’re trying to avoid <strong>memorizing noise</strong> (overfitting). A model that memorizes the training data is overfitting. It performs well on questions it has seen before but struggles with new ones.</p><p>What do weights mean? Weights tell the model how important each input feature is. If a weight becomes very large, the model becomes extremely sensitive.For example:</p><p><em>y</em>=1000<em>x</em></p><p>If <em>x</em> changes from 5 to 5.01:</p><ul><li>Before: 1000×5=5000</li><li>After: 1000×5.01=5010</li></ul><p>A tiny input change caused a big output change.</p><h3>Why do huge weights happen?</h3><p>Suppose you’re drawing a line through some data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2EkZmI5Ibq8qSWsis0vx5A.png" /><figcaption>the model tries to pass through every point, even the weird one.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/655/1*bA-npA9mZPQ5jIdp8FzNjw.png" /><figcaption>The line becomes something like this</figcaption></figure><p>To make these sharp bends, the model often needs very large weights. It’s no longer learning the real pattern — it is chasing random noise.</p><p>The “sharp bends” are not literally bends in a straight-line model — they refer to the model becoming overly complicated to fit every training point, especially noisy ones.</p><p>In a normal model : as x increases y increases.</p><p>Now if you add a strange noise point. The model tries to fit every point perfectly, the curve suddenly goes up and then back down just to pass through that one unusual point. Those sudden changes are the sharp bends.</p><h3>What does L2 regularization do?</h3><p>L2 regularization tells the model: ”I don’t mind if you’re a little wrong, but don’t use ridiculously large weights.” It adds a penalty for large weights.It adds a penalty for large weights. Instead of minimizing only prediction error. It minimizes Prediction error + Penalty for large weights.</p><h3>What is called a leash?</h3><ul><li>Without L2: weights can become enormous.</li><li>With L2: weights are kept under control.</li></ul><p>The model can still learn, but it avoids extreme behavior.</p><p><strong>Real-life Analogy? </strong>Imagine grading students not just on exam performance, but <em>also</em> docking points if they used an absurdly overcomplicated 50-page derivation (“weights”) to solve a problem that had a simple 2-line solution. You’re rewarding the simplest explanation that still fits the facts.</p><p><strong>Why is exists? </strong>Without regularization, if you have enough model capacity (parameters), you can <em>always</em> find weights that perfectly fit training data — including its noise and random quirks. This gives 0% training error but terrible generalization. We need a mechanism that says: <strong>“fit the data, but don’t go crazy doing it.”</strong></p><h3>Connection to ML</h3><ul><li><strong>Weight decay</strong> in neural network optimizers (Adam, SGD) — same math, different name.</li><li>Prevents exploding weights → smoother decision boundaries → better generalization.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3d1f8c14d16e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Mathematical Intuition for ML-Part-3]]></title>
            <link>https://medium.com/@anvitasreddy/mathematical-intuition-for-ml-part-3-0e0e29807e15?source=rss-dde898c811d0------2</link>
            <guid isPermaLink="false">https://medium.com/p/0e0e29807e15</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[mathematics]]></category>
            <dc:creator><![CDATA[Anvitasreddy]]></dc:creator>
            <pubDate>Wed, 05 Aug 2026 16:49:19 GMT</pubDate>
            <atom:updated>2026-08-05T16:49:19.654Z</atom:updated>
            <content:encoded><![CDATA[<h3>“How Big is this Vector?”</h3><p>Imagine you are standing at your house (origin) and you walk to a friend’s house located at some point. You want one single number that answers: ”how far away is that point?”</p><p>This is what <strong>norm</strong> is, it is a vector like [3,4] isn’t just a list of two numbers, it’s an arrow pointing somewhere in space, and a norm converts that arrow into a single scaler measuring.</p><p>But there is a twist; there are multiple ways to define “distance”. That’s why we don’t have just one norm — we have a family of them (L1,L2..) each encoding a different philosophy of distance.</p><p>The above info in simple terms is , Suppose you want to go from Home to Cafe. There are different ways to measure the distance.</p><p><strong>Straight line distance(L2 Norm)</strong>: You go from home to Cafe in straight line. This is called <strong>Euclidean Distance</strong>.</p><p><strong>Walking on Roads (L1 Norm)</strong>: Imagine you are in Manhattan. You can’t walk diagonally. You can move up ,down ,left and right. Distance becomes Horizontal steps + Vertical Steps. This is called <strong>Manhattan Distance</strong>.</p><p><strong>L </strong>∞ <strong>Norm</strong>: Now imagine two computers. One has CPU usage=30%, Memory=40% and another has CPU=70% , Memory=42%. What changed the most? CPU changed by 40 memory changed by 2, instead of adding them, we only care about the biggest change. So distance is max(40,2). This is called <strong>Chebyshev (L ∞) Norm</strong>.</p><h3>Why does this exist?</h3><p>In 1D (a number line), “size” is obvious: |x|. Nobody argues about how far 5 is from 0.</p><p>But the moment you move to 2D, 3D, or (in ML) <em>thousand-dimensional</em> space, “size” stops being obvious. Do you measure distance:</p><ul><li>As the crow flies? (diagonal, straight line)</li><li>As a taxi drives? (only along grid streets)</li><li>By your single worst/largest coordinate?</li></ul><p>Each answer is useful in a different real situation — and each is a different norm.</p><p>Formal defination: A norm is any function |x| that takes a vector and returns a non-negative number.</p><ul><li>‖x‖ = 0 only if x is the zero vector (nothing has zero size except nothing)</li><li>‖cx‖ = |c|‖x‖ (scaling the vector scales its size proportionally)</li><li>‖x + y‖ ≤ ‖x‖ + ‖y‖ (triangle inequality — going directly is never longer than a detour)</li></ul><p>every norm we discuss obeys these three rules.</p><h3>ML Analogy</h3><p>L2 norm (Euclidean Norm) — p=2:</p><ul><li><strong>Euclidean distance</strong> in k-NN, k-means clustering (distance between data points)</li><li><strong>Mean Squared Error</strong> loss = squared L2 norm of the error vector</li><li><strong>L2 regularization / Ridge / weight decay. (part-4)</strong></li><li>Gradient descent step sizes, gradient magnitudes</li></ul><p>L1 norm (Manhattan/Taxicab Norm) — p=1:</p><ul><li><strong>L1 regularization (Lasso)</strong> → drives some weights to <em>exactly</em> zero → automatic feature selection</li><li>Mean Absolute Error (MAE) loss — more robust to outliers than MSE</li><li>Sparse coding, compressed sensing</li></ul><p>L∞ Norm (Chebyshev Norm) — p-&gt;∞:</p><ul><li>Adversarial robustness (bounding the <em>maximum</em> pixel perturbation in adversarial attacks like FGSM)</li><li>Chebyshev distance in some clustering variants</li><li>Gradient clipping variants, robust optimization bounds</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0e0e29807e15" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Mathematical Intuition for ML-Part2]]></title>
            <link>https://medium.com/@anvitasreddy/mathematical-intuition-for-ml-part2-cfc7a206055c?source=rss-dde898c811d0------2</link>
            <guid isPermaLink="false">https://medium.com/p/cfc7a206055c</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[mathematics]]></category>
            <dc:creator><![CDATA[Anvitasreddy]]></dc:creator>
            <pubDate>Tue, 04 Aug 2026 14:59:18 GMT</pubDate>
            <atom:updated>2026-08-04T14:59:18.123Z</atom:updated>
            <content:encoded><![CDATA[<p>Going deep into dot product.</p><p>Dot product → “How much does vector A point in the same direction as Vector B”</p><p>it is not multiplication of vectors, it is alignment.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OfK18biOl90ht0w3BKtLCg.png" /></figure><h3>Real-life Analogy</h3><p>Only the part of your pull that’s <em>in the direction of motion</em> actually moves the sled forward. Pulling straight up wastes all your effort (perpendicular = 0 useful work). Pulling exactly forward gives you 100% of your effort as motion.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BcvV6cEZ1TP4lGx5V6gqow.png" /></figure><p>that “useful portion of effort” is exactly what dot product computes.</p><h3>ML Analogy</h3><p>Think of two people’s taste in movies as vector of ratings. The dot product measures how much their tastes “point the same way”- how aligned preferences are.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3Pfb-w40wIPwB-nePJqQZA.png" /></figure><h3>Why does dot product exist</h3><p>When comparing 2 lists of numbers you can just find the distance between them (how far apart they are).</p><p>But distance is a mix of two different things: direction difference and magnitude difference.</p><p>Dot product exist to isolate direction cleanly in one number, regardless of dimension.</p><p>example: Comparing meaning of two sentences. “Do these two 768-dimensional arrows point he same way?” — is the <strong>right.</strong> “How far apart these points are?” — is <strong>wrong</strong>.</p><h3>Connection to ML Algorithms</h3><p>Logistic Regression -&gt; output = w.x+b [dot product between weights and inputs]</p><p>Recommendation Systems -&gt; Dot product between user and product = Predicted preference.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cfc7a206055c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Mathematical Intuition for ML-Part 1]]></title>
            <link>https://medium.com/@anvitasreddy/mathematical-intuition-for-ml-part-1-37090d6889b7?source=rss-dde898c811d0------2</link>
            <guid isPermaLink="false">https://medium.com/p/37090d6889b7</guid>
            <category><![CDATA[mathematics]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Anvitasreddy]]></dc:creator>
            <pubDate>Tue, 28 Jul 2026 11:15:27 GMT</pubDate>
            <atom:updated>2026-07-28T11:15:27.097Z</atom:updated>
            <content:encoded><![CDATA[<p>As a Computer Science student, one question has always bothered me: How does the math we learn actually connect to the Machine Learning algorithms we use in projects?</p><p>Over the next few days, I’ll be learning topics like Linear Algebra, Calculus, Probability, Statistics, and Optimization, and sharing my learnings along the way.</p><p>This isn’t going to be about memorizing formulas. I’ll focus on building intuition — understanding why these concepts matter and how they’re used in algorithms like Linear Regression, Neural Networks, and more.</p><p>— — — — — — — — — — — — — — — 28–7–26 — — — — — — — — — — — — — — — — — — —</p><h3>What is vector actually?</h3><p>A vector is just an arrow with two properties: direction and magnitude. The vector [4,3] isn’t just two numbers, it’s an instruction go 4 units in right and 3 units up. The arrow that results Direction: which way it points &amp; Magnitude: how long is it.</p><p>What happens when you combine two vectors? This is the operation behind every neural network.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/837/1*1yYVvAIQP7HOk8-TucPS1g.png" /></figure><p>Adding vectors means walking along <strong>a</strong>, then walking along<strong> b </strong>shortcut is just adding the components: a+b. This exactly what happens inside a neural network layer: output = weights . input + bias — vector addition and scaling, over and over, millions of times.</p><h3>Normalization: keeping direction, discarding length</h3><p>Sometimes you only care which way something points, not how strong it is — e.g. comparing the “direction” of two documents regardless of their length. That’s normalization: dividing a vector by it’s own magnitude so it becomes length 1 (unit vector).</p><figure><img alt="same direction, unit length: v̂= v / ||v||" src="https://cdn-images-1.medium.com/max/1024/1*ctbVBjQV-qocOOriMhmSWw.png" /><figcaption>same direction, unit length: v̂ = v / ||v||</figcaption></figure><p>This exact operation shows up constantly: cosine similarity (used to compare embeddings) only cares about direction, so both vectors get normalized before comparing.</p><p>The ML connection: a dataset is just a pile of vectors. For example in “house price” dataset, each row is a vector. The model isn’t reasoning about “houses”, it’s just doing vector math (dot products, additions) on these points.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/915/1*Xy9DW008iX5RUIo9nJYxVA.png" /></figure><p>Word embeddings are the same idea, Instead of (sqft, bedrooms, age), a word like “king” becomes a vector like (0.2,-0.8,0.5,…) in a 300+ dimensional space, words with similer meaning point in similer directions.</p><h3>Short Summary</h3><p>A vector is a direction + magnitude; a dataset is a cloud of such vectors; and training an ML model is largely about finding the right direction (weights) so that dot products with your data vectors produce useful answers.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=37090d6889b7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Understanding Deep Clustering]]></title>
            <link>https://medium.com/@anvitasreddy/understanding-deep-clustering-54d67bf60fca?source=rss-dde898c811d0------2</link>
            <guid isPermaLink="false">https://medium.com/p/54d67bf60fca</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[deep-clustering]]></category>
            <category><![CDATA[cnn]]></category>
            <category><![CDATA[neural-networks]]></category>
            <dc:creator><![CDATA[Anvitasreddy]]></dc:creator>
            <pubDate>Sun, 01 Mar 2026 12:17:40 GMT</pubDate>
            <atom:updated>2026-03-01T12:17:40.650Z</atom:updated>
            <content:encoded><![CDATA[<p>Deep clustering combines deep learning with traditional clustering algorithms to automatically group similar data — without labeled datasets.</p><h3>Step 1: Images Are Passed Through a Trained CNN</h3><p>The process begins by feeding images into a trained Convolutional Neural Network (CNN).</p><p>Instead of using the CNN for classification, we remove the final classification layer and use it as a feature extractor.</p><h3>What Happens Inside the CNN?</h3><p>A CNN:</p><p>Detects edges in early layers</p><p>Learns textures and shapes in middle layers</p><p>Captures complex patterns in deeper layers</p><p>By the time the image reaches the final hidden layer, the network has converted it into a compact numerical representation of its visual features.</p><p>This output is called an embedding.</p><h3>Step 2: Understanding Embeddings</h3><p>An embedding is a dense vector representation of an image.</p><p>If you pass 1000 images into the CNN, you get:</p><pre>1000 embeddings</pre><p>each embedding looks like:</p><pre>[0.12, -1.34, 0.98, 2.11, ..., 0.45]</pre><h3>What Do These Values Mean?</h3><ul><li>Each number represents a learned feature.</li><li>The full array represents the image in a high-dimensional feature space.</li><li>All embeddings have the same dimension (e.g., 128, 256, 512).</li><li>These values are not manually defined — they are learned automatically during training.</li></ul><p>Think of embeddings as coordinates in a multi-dimensional space.</p><p>If two images are visually similar (e.g., two red roses), their embeddings will be close to each other in this space.</p><h3>Step 3: Applying K-Means Clustering</h3><p>Once we have embeddings for all images, we apply K-Means clustering.</p><h3>Why Not Cluster Raw Images?</h3><p>Raw images:</p><ul><li>Are high dimensional</li><li>Contain redundant pixel information</li><li>Are difficult to cluster directly</li></ul><p>Embeddings:</p><ul><li>Capture semantic meaning</li><li>Reduce dimensional complexity</li><li>Make clustering more meaningful</li></ul><h3>What K-Means Does</h3><p>K-Means:</p><ol><li>Chooses K cluster centers</li><li>Assigns each embedding to the nearest center</li><li>Updates centers</li><li>Repeats until convergence</li></ol><p>Now each image has a cluster label.</p><h3>Step 4: Feeding Cluster Labels Back Into CNN (Deep Clustering Loop)</h3><p>Here’s where deep clustering becomes powerful.</p><p>After K-Means assigns cluster labels:</p><ul><li>These labels are treated as training targets.</li><li>The CNN is trained again to predict these cluster labels.</li></ul><h3>What Changes in the CNN?</h3><p>Initially:</p><ul><li>CNN was trained for some general feature extraction</li></ul><p>After clustering:</p><ul><li>CNN is forced to organize its feature space so that images in the same cluster become more tightly grouped.</li><li>The embedding space becomes more structured.</li></ul><h3>The Iterative Process</h3><p>Deep clustering is usually done iteratively:</p><ol><li>Extract embeddings</li><li>Perform clustering</li><li>Assign pseudo-labels</li><li>Retrain CNN using those labels</li><li>Repeat</li></ol><p>With every iteration:</p><ul><li>Embeddings improve</li><li>Clusters become cleaner</li><li>Feature representation becomes more meaningful</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=54d67bf60fca" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Understanding Unsupervised Learning: Distance Metrics]]></title>
            <link>https://medium.com/@anvitasreddy/understanding-unsupervised-learning-distance-metrics-6a460fa74da8?source=rss-dde898c811d0------2</link>
            <guid isPermaLink="false">https://medium.com/p/6a460fa74da8</guid>
            <category><![CDATA[unsupervised-learning]]></category>
            <category><![CDATA[distance-metric]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Anvitasreddy]]></dc:creator>
            <pubDate>Thu, 05 Feb 2026 10:12:14 GMT</pubDate>
            <atom:updated>2026-02-05T10:12:14.466Z</atom:updated>
            <content:encoded><![CDATA[<p>In this blog, I’ll be exploring distance metrics, a core idea behind many unsupervised learning algorithms.</p><p>In some datasets, we are given only input features and no corresponding output labels. Since there is nothing explicit to predict, these datasets are called unlabeled datasets, and they are handled using unsupervised learning models.</p><p>Because no output is provided, unsupervised learning does not “learn answers” in the traditional sense. Instead, it looks for patterns, structures, and relationships within the data. A common approach is to compare data points with their <em>nearest neighbors</em> and group or organize them based on how similar or dissimilar they are.</p><p>To measure this similarity (or dissimilarity), we rely on distance metrics. Some of the most widely used ones are Euclidean distance, Manhattan distance, and Cosine similarity.</p><h3>Common Distance Metrics</h3><p>Euclidean Distance<br>This is the most intuitive distance metric. It measures the straight-line distance between two points in space, derived from the Pythagorean theorem. Imagine drawing a direct line between two points — the length of that line is the Euclidean distance.</p><p>Manhattan Distance<br>Manhattan distance measures distance by moving along a grid, much like navigating city streets. Instead of taking the shortest straight path, it adds the horizontal and vertical distances (base and perpendicular). There is no diagonal shortcut — just step-by-step movement.</p><p>Cosine Similarity<br>Cosine similarity measures the angle between two vectors, not their physical distance. It tells us how similar the <em>direction</em> of two data points is, regardless of their magnitude. This metric is especially useful in high-dimensional data such as text or recommendation systems.</p><p>Distance metrics may look simple, but they quietly power many unsupervised algorithms like K-Means clustering, DBSCAN, and hierarchical clustering. Choosing the right metric can completely change how patterns in data are discovered.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6a460fa74da8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Exploring Python GSoC-10/12]]></title>
            <link>https://medium.com/@anvitasreddy/exploring-python-gsoc-10-12-539c9ae5b7ec?source=rss-dde898c811d0------2</link>
            <guid isPermaLink="false">https://medium.com/p/539c9ae5b7ec</guid>
            <category><![CDATA[exploring-python-projects]]></category>
            <dc:creator><![CDATA[Anvitasreddy]]></dc:creator>
            <pubDate>Wed, 11 Dec 2024 06:59:12 GMT</pubDate>
            <atom:updated>2024-12-11T06:59:12.821Z</atom:updated>
            <content:encoded><![CDATA[<p>Today I started exploring Python beginner projects and I started of with the quote generator. Which is the most suggested one.</p><p>One way was just importing pyquotegen it generates quotes, which is an inbuilt function.</p><p>It was generating quotes in my vs code but I wanted to develop a frontend for it. I had done it initially with JavaScript but linking the python program with the html and css part was a new task. This is a new thing which i am still going through it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*C06TS-LKXzcL0WK94eUHtA.png" /></figure><p>Going through Organizations:</p><p>I have gone through many organizations of GSoC by considering my interest, My tech stack, or any project that looks interesting.</p><p>52 North: This organization offers projects related to geospatial related topics, citizen science, data analytics . the technologies which it focuses on are javascript, android, java, web services, ogc standards. The one project which I liked was Extending and Stabilizing enviroCar App: Voice Command. Which stops drivers from getting distracted while driving by creating voice commands and creating more functionalities.</p><p>ArduPilot: This organization offers projects related to robotics , drone based systems, Automated vehicles etc. The technologies which they use are python, lua, c++, pixhawk. The project which I liked was fixing of cameras and Gimbals. Adding of new features like Gimbal Following another vehicle, Time based triggering of image capture etc.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=539c9ae5b7ec" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[GSoC Session Summary]]></title>
            <link>https://medium.com/@anvitasreddy/gsoc-session-summary-2a8bf8854d0e?source=rss-dde898c811d0------2</link>
            <guid isPermaLink="false">https://medium.com/p/2a8bf8854d0e</guid>
            <category><![CDATA[gsoc2024]]></category>
            <dc:creator><![CDATA[Anvitasreddy]]></dc:creator>
            <pubDate>Mon, 09 Dec 2024 09:50:12 GMT</pubDate>
            <atom:updated>2024-12-09T09:50:12.682Z</atom:updated>
            <content:encoded><![CDATA[<p>I am recently attending Google Summer of Code sessions by GSoC mentors who have cracked GSoC in their college period. Here is a brief summary of all the three sessions.</p><h3>Session -1 and Session-2:</h3><p>Focusing on learning Rust can be advantageous due to its difficulty and lesser competition, taking roughly 3 weeks to grasp at a low level. While languages like Flutter, Android, Angular JS, and Chromium are popular, Swift is recommended if you have an interest in iOS. Reviewing codebases provides insights, and Golang is excellent professionally despite high competition, with a focus on open source. Rust is particularly beneficial for IoT. Tools like Rocket Chat, which utilizes a leaderboard system, show that language is not a barrier. For API tools, Postman is easier to use than Swagger. Although the MERN stack faces heavy competition, Ruby on Rails is worthwhile but time-consuming to learn. Java can be challenging, making JavaScript a preferable alternative. The MERN stack can be mastered in about 15 days, while understanding the syntax of a new language typically takes 3 days, making high-tech projects more complex.</p><h3>Session -3 and Session-4:</h3><p>It was completely based on how to use GitHub and their commands.</p><ol><li>Find a project</li><li>Find an objective — issue already present, created new, bug</li><li>Fork and clone the project<br>git clone https://github.com/avinal/git-session</li></ol><p>4. Configure your clone</p><pre><br>git remote -v</pre><pre>origin	git@github.com:avinal/git-session.git (fetch)<br>origin	git@github.com:avinal/git-session.git (push)<br>upstream	git@github.com:avinal/git-session.git (fetch)<br>upstream	git@github.com:avinal/git-session.git (push)</pre><pre>sh<br>git config list<br>user.email=avinal@gmail.com<br>user.name=Avinal</pre><p>5. create a new branch, never use main branch</p><pre>sh<br>git switch -c avinal/issue1</pre><p>6. Make the change/contribution<br>7. Stage your changes git add BOOKS.md<br>8. Commit your changes git commit -s<br>9. Push your changes git push origin ..</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2a8bf8854d0e" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>