<?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 Kalyani Krishna on Medium]]></title>
        <description><![CDATA[Stories by Kalyani Krishna on Medium]]></description>
        <link>https://medium.com/@tweetyyyyy?source=rss-d07c8a444e4f------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*dU02bnWuW1EK8Ame2U8psA.jpeg</url>
            <title>Stories by Kalyani Krishna on Medium</title>
            <link>https://medium.com/@tweetyyyyy?source=rss-d07c8a444e4f------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 03 Dec 2026 19:56:08 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@tweetyyyyy/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[Money Matters: A Cozy Guide to Your First Steps in Finance]]></title>
            <link>https://tweetyyyyy.medium.com/money-matters-a-cozy-guide-to-your-first-steps-in-finance-8bc80fc9192c?source=rss-d07c8a444e4f------2</link>
            <guid isPermaLink="false">https://medium.com/p/8bc80fc9192c</guid>
            <category><![CDATA[money-management]]></category>
            <category><![CDATA[investment]]></category>
            <category><![CDATA[financial-literacy]]></category>
            <category><![CDATA[fintech]]></category>
            <category><![CDATA[personal-finance]]></category>
            <dc:creator><![CDATA[Kalyani Krishna]]></dc:creator>
            <pubDate>Thu, 30 Apr 2026 15:15:39 GMT</pubDate>
            <atom:updated>2026-04-30T18:34:13.718Z</atom:updated>
            <content:encoded><![CDATA[<p>Congratulations! You’ve survived the late-night assignments, the placement season, and the nervous orientation days. Your first salary is about to hit your account. But before you spend it all on that celebratory gadget or an expensive dinner, there is a mystery you need to solve: <strong>Where does the money actually go?</strong></p><p>Most of us enter the workforce with a degree in engineering, commerce, or arts, but zero education in “Money Management.” We’re handed a CTC (Cost to Company) and expected to figure out the rest.</p><p>That is why I created <strong>“Money Matters: A Cozy Guide to Your First Steps in Finance”</strong> , a 2026-ready roadmap designed specifically for the modern Indian professional.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/736/0*iIBQMFavYqVPPvh2.jpg" /></figure><h3>The 90/10 Rule: It’s Not About the Math</h3><p>The biggest misconception about finance is that you need to be a calculus expert. In reality, financial literacy is <strong>10% math and 90% behavior</strong>.</p><p>Our guide starts by tackling the “Psychology of Spending”. We explore why our brains crave instant gratification and how simple habits can save you thousands every year.</p><h3>Decoding the 2026 Paycheck</h3><p>The 2026 financial landscape in India has changed. Between the <strong>Income Tax Act 2025</strong> and the choice between the <strong>Old and New Tax Regimes</strong>, your “Take-Home Pay” can be a confusing number.</p><p>Our guide breaks down:</p><ul><li><strong>The CTC vs. Net Salary:</strong> Understanding why your bank deposit is smaller than your offer letter.</li><li><strong>Tax Slabs:</strong> How to navigate the 2026 progressive tax rates.</li><li><strong>The 50/30/20 Rule:</strong> A simple framework where 50% goes to Needs, 30% to Wants, and 20% to your Future Self.</li></ul><h3>The “Shield”: Defending Your Wealth</h3><p>In an era of instant UPI payments and sophisticated digital scams, earning money is only half the battle; protecting it is the other.</p><p>We introduce <strong>“The Shield,”</strong> a dedicated section on <strong>Cyber Hygiene</strong>. You’ll learn:</p><ul><li><strong>The Golden Hour:</strong> The critical 1–2 hour window to report fraud via the <strong>1930 Helpline</strong>.</li><li><strong>The Three-Account Strategy:</strong> Using a “Vault” account with <strong>Auto-Sweep</strong> to earn 6–7% interest while keeping your daily spending separate and safe.</li><li><strong>Legal Redressal:</strong> How to use the <strong>RBI Integrated Ombudsman</strong> if a bank treats you unfairly.</li></ul><h3>Retirement is Not an Age; It’s a Number</h3><p>Retirement planning in your 20s sounds boring, but in 2026, it’s a digital superpower. We dive into the <strong>EPF 2026 upgrades</strong>, featuring <strong>24-hour UPI-based withdrawals</strong>, and the <strong>National Pension System (NPS)</strong> for market-linked growth.</p><p>By starting a <strong>Step-Up SIP</strong> today, you aren’t just saving; you’re buying your freedom for tomorrow.</p><h3>Take Control Today</h3><p>Finance doesn’t have to be cold, clinical, or scary. It can be “cozy”- a set of comfortable habits that give you peace of mind.</p><p><strong>Ready to build your financial fortress?</strong></p><p>Check out the full guide to turn these theories into daily actions.</p><p><a href="https://kalyani72.gumroad.com/l/fwwds">https://kalyani72.gumroad.com/l/fwwds</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8bc80fc9192c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Unsupervised Learning]]></title>
            <link>https://blog.gopenai.com/unsupervised-learning-dd5d2719a185?source=rss-d07c8a444e4f------2</link>
            <guid isPermaLink="false">https://medium.com/p/dd5d2719a185</guid>
            <category><![CDATA[kmeans-clustering]]></category>
            <category><![CDATA[clustering]]></category>
            <category><![CDATA[unsupervised-learning]]></category>
            <dc:creator><![CDATA[Kalyani Krishna]]></dc:creator>
            <pubDate>Tue, 28 Apr 2026 16:18:01 GMT</pubDate>
            <atom:updated>2026-04-30T13:42:33.217Z</atom:updated>
            <content:encoded><![CDATA[<h3>Contents</h3><ol><li>Dimensionality reduction</li><li>Clustering</li></ol><h3>Dimensionality reduction</h3><p><strong>What is Dimensionality Reduction?<br></strong>Dimensionality reduction is the process of reducing the number of features or variables (also called dimensions) in a dataset, while retaining as much important information as possible.<br>In simple terms, it means taking a dataset with many columns (features) and transforming it into one with fewer columns, without losing the core patterns or structure of the data.</p><p><strong>Why is Dimensionality Reduction Done?</strong></p><p>1. Simplify the Model — faster to train and easier to interpret.</p><p>2. Reduce Overfitting — Too many features can cause models to memorize the training data</p><p>3. Improve Performance — Reduces computational cost: less memory, faster training and prediction.</p><p>4. Visualization — You can’t visualize data with 100 dimensions.</p><h4>Principal component Analysis</h4><p>Principal Component Analysis (PCA) is a technique used in dimensionality reduction. It helps to simplify complex datasets by reducing the number of variables (dimensions) while retaining the most important information.</p><p>PCA is especially useful when there are <strong>strong correlations among variables</strong> — in such cases, reducing dimensions helps eliminate redundancy.</p><p><strong>Goal :</strong> to reduce the dimensions and identify patterns in data</p><p><strong>Core Idea:<br></strong>PCA works by finding the directions (principal components) in which the data varies the most. It then projects the original data onto a new set of axes formed by these components.</p><p>These principal components are uncorrelated, and each one captures as much variance as possible:</p><ul><li>PC1 captures the most variance.</li><li>PC2 captures the next most (and is orthogonal to PC1), and so on.</li></ul><p>If your data is 10-dimensional, PCA will give you 10 components. But often, just the first 2–3 components explain most of the variance.</p><p><strong>Steps of PCA</strong></p><ol><li><strong>Standardize the data</strong><br> Scale each feature so that it has a mean of 0 and a standard deviation of</li><li><strong>Compute the Covariance Matrix</strong><br> This matrix shows how features vary with each other — i.e., how strongly they are correlated.</li><li><strong>Find Eigenvalues and Eigenvectors<br>Eigenvectors</strong> give the directions of the new feature space (principal components).<br><strong>Eigenvalues</strong> indicate how much variance each component captures.</li><li><strong>Create the Feature Vector</strong><br> Select the top <strong>k</strong> eigenvectors corresponding to the <strong>k</strong> largest eigenvalues.</li><li><strong>Recast the Data</strong><br> Multiply the original data by the feature vector to project it onto the new lower-dimensional space.</li></ol><p><strong>Principal Components</strong></p><ul><li>These components are <strong>linear combinations</strong> of the original features</li><li>They are ordered by how much <strong>variance</strong> (information) they capture.</li><li>The first component captures the most variance, the second captures the next most, and so on.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/275/1*oTrMBsxvpZdyjbLAaDonxg.png" /></figure><p>A <strong>scree plot</strong> helps visualize the eigenvalues of each principal component. It shows how much variance each component captures.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/264/1*zOUBujNdFn-SmozD3d9F2Q.png" /></figure><h3>Clustering</h3><p>Clustering is an unsupervised learning technique used to group similar data points together based on their characteristics — without using predefined labels. The goal is to discover the natural structure or patterns in data.</p><p>Each group formed is called a cluster, and data points in the same cluster are more similar to each other than to those in other clusters.</p><p><strong>Why Use Clustering?</strong></p><ul><li>To find <strong>hidden patterns</strong> or <strong>groupings</strong> in data.</li><li>To <strong>segment customers</strong> in marketing (e.g., by behavior, demographics).</li><li>To <strong>detect anomalies</strong> (outliers often don’t belong to any cluster).</li><li>To <strong>compress data</strong> by summarizing with cluster centers.</li><li>To <strong>preprocess data</strong> for other tasks (like classification).</li></ul><h3>K-Means Clustering</h3><p>K-Means is a <strong>partitional clustering algorithm</strong> that: <br>Divides the dataset into <strong>k distinct clusters </strong>and<br>Each cluster is represented by a <strong>centroid</strong> (center point)</p><p><strong>How the K-Means Algorithm Works</strong></p><ol><li><strong>Choose the number of clusters (k):</strong><br> The value of <strong>k</strong> is set by the user.</li><li><strong>Initialize centroids:</strong><br> Randomly select <strong>k points</strong> to serve as initial centroids (they don’t have to be data points).</li><li><strong>Assign data points to the nearest centroid:</strong><br> Each point is assigned to the cluster whose centroid is <strong>closest</strong> (based on distance, usually Euclidean).</li><li><strong>Compute new centroids:</strong><br> For each cluster, compute the <strong>mean</strong> of all the data points in that cluster to get the new centroid.</li><li><strong>Reassign points:</strong><br> Reassign each data point to the nearest new centroid. If any reassignment occurs, go back to step 4.<br> If no changes happen, the algorithm <strong>converges</strong>, and clustering is complete.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/316/1*CKznThmcnx5csthfT1TMig.png" /></figure><p><strong>Choosing the Right Number of Clusters<br></strong>Choosing the optimal <strong>k</strong> is crucial. One popular method is using <strong>WCSS</strong> (Within-Cluster Sum of Squares).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/338/1*9uD57cEqbbysKs_pq4lT0w.png" /></figure><p><strong>Elbow Method (Elbow Plateau Diagram)</strong></p><p>To find the optimal <strong>k</strong>:</p><ol><li>Run K-Means for a range of k values (e.g., 1 to 10)</li><li>Calculate <strong>WCSS</strong> for each k</li><li>Plot <strong>k vs. WCSS</strong></li><li>Look for the <strong>“elbow point”</strong> — where the rate of decrease sharply slows down</li></ol><p>This elbow point represents a balance between:</p><ul><li><strong>Too few clusters</strong> (high WCSS, underfitting)</li><li><strong>Too many clusters</strong> (low WCSS, but possibly overfitting or unnecessary complexity)</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/279/1*OjDi-sFDBMzlSXDTL6UbKw.jpeg" /></figure><h3><strong>Spectral Clustering</strong></h3><p>Traditional clustering algorithms like K-Means work well for spherical or convex clusters, but fail with non-convex, complex-shaped, or intertwined data (e.g., spirals).<br>Spectral Clustering is designed to handle such cases by using graph theory and the spectrum (eigenvalues) of a matrix derived from the data.</p><p><strong>Key Advantages</strong></p><ul><li>Makes <strong>no assumptions</strong> about the shape of the clusters.</li><li>Works well for <strong>non-linearly separable data</strong>.</li><li>Can cluster <strong>intertwined or overlapping structures</strong> better than K-Means.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/337/1*k9jEcBGXWlfetJZZ3Mn2eg.jpeg" /></figure><p><strong>Spectral Clustering Process</strong></p><p><strong>Step 1: Construct a Similarity Graph<br></strong>Represent data as a <strong>graph</strong> where:</p><ul><li>Each <strong>data point</strong> is a <strong>node</strong>.</li><li>An <strong>edge</strong> connects each point to its <strong>k-nearest neighbors (K-NN)</strong>.</li><li>The <strong>similarity</strong> (or weight of the edge) could be binary (connected or not) or based on distance (e.g., using a Gaussian kernel).</li></ul><p><strong>Example:</strong><br> If you have 6 data points and set k = 2, the graph connects each point to its 2 closest points.</p><p><strong>Step 2: Spectral Embedding via Laplacian Matrix</strong></p><ul><li>Construct the <strong>adjacency matrix (A)</strong> for the graph.</li><li>Compute the <strong>degree matrix (D)</strong> — a diagonal matrix where each entry is the number of connections for that node.</li><li>Compute the <strong>Laplacian matrix (L)</strong>: L=D−A</li><li>Perform <strong>eigendecomposition</strong> on <strong>L</strong>.</li><li>Use the <strong>eigenvector corresponding to the 2nd smallest eigenvalue</strong> (called the <strong>Fiedler vector</strong>) to <strong>bi-partition</strong> the graph.<br> For more than 2 clusters, use multiple eigenvectors (e.g., top <em>k</em> eigenvectors with smallest non-zero eigenvalues).</li></ul><p><strong>Step 3: Apply Classical Clustering (e.g., K-Means)</strong></p><ul><li>The selected eigenvectors transform the original data into a <strong>lower-dimensional space</strong> (spectral embedding).</li><li>Run <strong>K-Means</strong> on this transformed data to produce the final clusters.</li></ul><p><strong>Why Use the 2nd Smallest Eigenvalue?</strong></p><ul><li>The <strong>smallest eigenvalue</strong> of a graph Laplacian is always zero (for a connected graph).</li><li>The <strong>second smallest eigenvalue</strong> reflects how well the graph can be <strong>partitioned into two groups</strong>.</li><li>Its corresponding eigenvector (Fiedler vector) provides a natural separation of data.</li></ul><h3>Hierarchial Clustering</h3><p>Hierarchical clustering is an <strong>unsupervised machine learning algorithm</strong> used to group unlabeled data into clusters. Unlike K-Means clustering, it builds a <strong>tree-like structure</strong> of clusters using <strong>dendrograms</strong> to represent the hierarchy among data points.</p><p><strong>Dendrograms : </strong>A <strong>dendrogram</strong> is a tree-like diagram that records the merging process of clusters.</p><ul><li><strong>X-axis</strong>: data points or features</li><li><strong>Y-axis</strong>: <strong>Euclidean distance</strong> between clusters</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/275/1*IRmRjZ_zTchZzHH41Ae1ug.jpeg" /></figure><p>You can cut the dendrogram at a chosen height to determine the number of clusters.</p><p><strong>Types of Hierarchical Clustering:</strong></p><p><strong>Agglomerative Clustering (Bottom-up)</strong></p><ul><li>Starts with each data point as its own cluster (singleton cluster).</li><li>Compute a distance matrix based on all pairs of points</li><li>Iteratively merges the two closest clusters based on minimum distance.</li><li>Update distance matrix after each merge.</li><li>Ends when all data points are merged into a single cluster.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/272/1*aCbLpVSrWiCYroYuKsUQZw.png" /></figure><p><strong>Divisive Clustering (Top-down)</strong></p><ul><li>Starts with one large cluster.</li><li>Recursively splits it into smaller clusters.</li><li>Continues until each data point is its own cluster or a stopping criterion is met.</li><li>Less commonly used due to its computational complexity</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/272/1*BElPiWMCdFWVTKodaq99lQ.png" /></figure><p><strong>Silhouette Score — Evaluating Clusters<br></strong>The <strong>silhouette score</strong> measures how well each data point fits within its assigned cluster:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/436/1*yt_wD-tEV6xaz6DMRZQoJg.png" /></figure><p>Where:</p><ul><li>a(i): average distance between point i and all other points in the same cluster.</li><li>b(i): minimum average distance from point i to all points in other clusters.</li></ul><p><strong>Interpretation of Silhouette Score:</strong></p><ul><li>+1: Well-matched to its own cluster</li><li>0: On the boundary between two clusters</li><li>–1: Poorly clustered</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dd5d2719a185" width="1" height="1" alt=""><hr><p><a href="https://blog.gopenai.com/unsupervised-learning-dd5d2719a185">Unsupervised Learning</a> was originally published in <a href="https://blog.gopenai.com/">GoPenAI</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Stop Learning OOPs in Circles: The Definitive Roadmap to Mastery]]></title>
            <link>https://tweetyyyyy.medium.com/stop-learning-oops-in-circles-the-definitive-roadmap-to-mastery-4725381f7d54?source=rss-d07c8a444e4f------2</link>
            <guid isPermaLink="false">https://medium.com/p/4725381f7d54</guid>
            <category><![CDATA[oops-concepts]]></category>
            <category><![CDATA[interview-questions]]></category>
            <category><![CDATA[object-oriented]]></category>
            <category><![CDATA[coding-interviews]]></category>
            <category><![CDATA[java]]></category>
            <dc:creator><![CDATA[Kalyani Krishna]]></dc:creator>
            <pubDate>Mon, 27 Apr 2026 16:50:53 GMT</pubDate>
            <atom:updated>2026-04-27T16:50:53.333Z</atom:updated>
            <content:encoded><![CDATA[<p>Object-Oriented Programming (OOP) is the backbone of modern software development, yet most students and junior devs get stuck in a loop of “I understand the definitions, but I can’t write the code.”</p><p>Whether you are preparing for a FAANG interview or trying to architect cleaner systems, you need a structured path and not a random collection of tutorials.</p><p>This roadmap breaks down the journey from “What is a Class?” to “High-Performance Multithreaded Systems.”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HfRMC3UmHKZcHiFbDqfg2Q.png" /><figcaption>Roadmap to ace OOPs concepts</figcaption></figure><h3>Phase 1: The Core Architecture (Chapter 1)</h3><p>You can’t build a skyscraper on a weak foundation. Most people rush into Inheritance without truly understanding how the <strong>JVM</strong> handles memory or how the <strong>JDK, JRE, and JVM</strong> interact.</p><p><strong>The “Aha!” Tip:</strong> Don’t just learn that a Class is a blueprint. Learn <em>why</em> it exists. Think of a Class as the DNA and an Object as the living, breathing organism.</p><p><strong>Key Focus Areas:</strong></p><ul><li><strong>The Four Pillars:</strong> Abstraction, Encapsulation, Inheritance, and Polymorphism.</li><li><strong>Memory Management:</strong> Understand how variables and objects are stored in the Heap vs. Stack.</li></ul><h3>Phase 2: Building Relationships (Chapter 2)</h3><p>This is where logic becomes reusable. Understand the relationship between Superclasses and Subclasses.</p><p><strong>Pro-Tip:</strong> Learn the difference between <strong>Classes and Interfaces</strong> early. If you want to define <em>what</em> a class should do without dictating <em>how</em> it does it, use an Interface.</p><h3>Phase 3: Making Programs Bulletproof (Chapter 3)</h3><p>Real-world code fails. Servers go down, users enter letters instead of numbers, and files go missing. Professional developers spend 20% of their time writing features and 80% handling errors.</p><p><strong>Interactive Challenge:</strong> Next time you write a function, ask yourself: <em>“What is the one thing that could break this?”</em> That is where your Try-Catch block belongs.</p><p><strong>Key Focus Areas:</strong></p><ul><li><strong>Exception Hierarchy:</strong> Checked vs. Unchecked exceptions.</li><li><strong>I/O Streams:</strong> Moving data from the console to files through Serialization.</li></ul><h3>Phase 4: Advanced Performance (Chapter 4)</h3><p>Once you’ve mastered the basics, it’s time to talk about speed and flexibility.</p><ul><li><strong>Multithreading:</strong> Learn how to make your program do ten things at once without crashing.</li><li><strong>Generics:</strong> Write code that works for any data type, reducing redundancy and increasing type safety.</li></ul><h3>💡 3 Tricks to Ace Your OOP Interviews</h3><ol><li><strong>The “Real World” Analogy:</strong> Never define Encapsulation using technical jargon first. Use the “Medicine Capsule” or “ATM Machine” analogy. Interviewers love candidates who can simplify complex topics.</li><li><strong>Composition over Inheritance:</strong> Always check if a class “has a” relationship rather than “is a” relationship. This is a common senior-level interview trap!</li><li><strong>The “Static” Trap:</strong> Understand that static members belong to the class, not the object. If you change a static variable in one instance, it changes for everyone.</li></ol><p>Learning these concepts from scattered YouTube videos can take months. I’ve distilled Java and OOP into a <strong>complete, 31-page accelerated guidebook</strong>.</p><p><strong>Inside my Complete OOP Notes, you’ll find:</strong></p><ul><li>✅ Detailed breakdowns of every topic in this roadmap.</li><li>✅ <strong>50 Concept-Based Questions</strong> to test your theory.</li><li>✅ <strong>25 Scenario-Based Questions</strong> modeled after real interview rounds.</li><li>✅ Visual diagrams for complex topics like JVM architecture and Multithreading lifecycles.</li></ul><p><strong>Stop guessing and start mastering.</strong></p><p>👉 <a href="https://kalyani72.gumroad.com/l/oopnotes"><strong>Download the Full OOP Mastery Notes &amp; Interview Guide Here</strong></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4725381f7d54" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The 4 Pillars of OOPs]]></title>
            <link>https://tweetyyyyy.medium.com/the-4-pillars-of-oops-2ed19dbcaf7a?source=rss-d07c8a444e4f------2</link>
            <guid isPermaLink="false">https://medium.com/p/2ed19dbcaf7a</guid>
            <category><![CDATA[objectorientedprogramming]]></category>
            <category><![CDATA[oops-in-java]]></category>
            <category><![CDATA[java]]></category>
            <category><![CDATA[oops-concepts]]></category>
            <category><![CDATA[campus-placements]]></category>
            <dc:creator><![CDATA[Kalyani Krishna]]></dc:creator>
            <pubDate>Mon, 27 Apr 2026 16:10:17 GMT</pubDate>
            <atom:updated>2026-04-27T16:11:08.617Z</atom:updated>
            <content:encoded><![CDATA[<p>If you are preparing for technical placements, you already know that <strong>Object-Oriented Programming (OOP)</strong> is the “make or break” topic of the first round. Interviewers don’t just want definitions; they want to see if you understand how to build <strong>flexible, modular, and maintainable software</strong>.</p><p>Here is the breakdown of the Four Pillars — the foundation of everything we build in Java.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ZCA7Kp9xlil5HS21" /></figure><h3>1. Abstraction: Hiding Complexity</h3><p><strong>Definition:</strong> Showing only essential features to the user while hiding the internal, complex details.</p><ul><li><strong>Real-World Example:</strong> Think of a <strong>Remote Control</strong>. When you press ‘Power,’ the TV turns on. You don’t need to know about the internal circuitry or infrared signal processing to use it.</li><li><strong>Implementation:</strong> In Java, we achieve this using <strong>Abstract Classes</strong> and <strong>Interfaces</strong>.</li></ul><h4>Code Implementation:</h4><pre>abstract class ATM {<br>    abstract void withdrawMoney(); // What to do (The &quot;Idea&quot;)<br>    <br>    void welcomeMessage() { // Concrete method<br>        System.out.println(&quot;Welcome to the Bank&quot;);<br>    }<br>}<br><br>class SBI_ATM extends ATM {<br>    void withdrawMoney() { // How to do it (Implementation)<br>        System.out.println(&quot;Processing cash withdrawal...&quot;);<br>    }<br>}</pre><h3>2. Encapsulation: Data Hiding</h3><p><strong>Definition:</strong> Wrapping data (variables) and code (methods) together into a single unit. We use <strong>private access modifiers</strong> to protect the data.</p><ul><li><strong>Real-World Example:</strong> A <strong>Medical Capsule</strong>. The medicine is hidden and protected inside; you interact with it only by swallowing the pill as a whole.</li><li><strong>The Goal:</strong> To keep the “state” of an object valid and secure from outside interference.</li></ul><h4>Code Implementation:</h4><pre>class Account {<br>    private double balance; // Data is hidden from direct access<br><br>public double getBalance() { return balance; } // Controlled access<br>    public void deposit(double amount) {<br>        if(amount &gt; 0) { balance += amount; } // Validation logic<br>    }<br>}</pre><h3>3. Inheritance: Reusability</h3><p><strong>Definition:</strong> Creating a new class from an existing one to reuse its properties and methods. This represents the <strong>IS-A relationship</strong>.</p><ul><li><strong>Real-World Example:</strong> A <strong>Programmer IS-A Employee</strong>. The Programmer inherits an ID and Name from the Employee class but adds “Programming Language” as a unique skill.</li></ul><h4>Code Implementation:</h4><pre>class Animal {<br>    void eat() { System.out.println(&quot;Eating...&quot;); }<br>}<br><br>class Dog extends Animal { // Dog inherits the eat() method<br>    void bark() { System.out.println(&quot;Barking...&quot;); }<br>}</pre><h3>4. Polymorphism: Many Forms</h3><p><strong>Definition:</strong> The ability of an object, variable, or method to perform differently in different contexts.</p><h4>A. Static (Compile-time) Polymorphism: Method Overloading</h4><p>This occurs when you have the same method name but different parameters (number, type, or order) within the same class.</p><pre>class MathOps {<br>    int add(int a, int b) { return a + b; }<br>    double add(double a, double b) { return a + b; } // Overloaded<br>}</pre><h4>B. Dynamic (Runtime) Polymorphism: Method Overriding</h4><p>This occurs when a subclass provides a specific implementation of a method already provided by its parent class.</p><pre>class Parent {<br>    void show() { System.out.println(&quot;Parent’s View&quot;); }<br>}<br><br>class Child extends Parent {<br>    @Override<br>    void show() { System.out.println(&quot;Child&#39;s customized View&quot;); }<br>}</pre><blockquote><strong><em>Placement Tip:</em></strong><em> Always use the </em><strong><em>@Override</em></strong><em> annotation. It tells the compiler to check if the method actually exists in the parent class, which prevents simple spelling mistakes during your coding rounds.</em></blockquote><h4><a href="https://kalyani72.gumroad.com/l/oopnotes">[Click here to get the complete OOPs placement notes on Gumroad]</a></h4><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2ed19dbcaf7a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Bridging the Gap: How Hybrid AI Systems Combine LLMs with Traditional Machine Learning Models]]></title>
            <link>https://blog.gopenai.com/bridging-the-gap-how-hybrid-ai-systems-combine-llms-with-traditional-machine-learning-models-eac6428bbf12?source=rss-d07c8a444e4f------2</link>
            <guid isPermaLink="false">https://medium.com/p/eac6428bbf12</guid>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[gpt]]></category>
            <category><![CDATA[hybrid-ai-agent]]></category>
            <category><![CDATA[chatgpt]]></category>
            <category><![CDATA[large-language-models]]></category>
            <dc:creator><![CDATA[Kalyani Krishna]]></dc:creator>
            <pubDate>Thu, 15 May 2025 11:53:57 GMT</pubDate>
            <atom:updated>2025-05-23T13:21:43.305Z</atom:updated>
            <content:encoded><![CDATA[<p>The world without Artificial Intelligence has become unimaginable. It is evolving at an unprecedented pace helping us solve problems, interact with technology and even make data-driven decisions. Over the past two decades <strong>traditional machine learning algorithms </strong>have played a foundational role in enabling predictive models across all fields. These algorithms are simple , easily interpretable as well as effective on structured data. However these do not work well and their capabilities are constrained when applied to unstructured data such as images , audio or natural language.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/307/1*LBV-uQvxrxpOKMNcRhJd2Q.png" /><figcaption>AI family</figcaption></figure><p>In addition to this , the rise of <strong>Large Language Models </strong>has dramatically changed the landscape of AI. These models leverage deep learning architectures like transformers to learn from a humongous amount of unstructured data capturing semantics , context and even reasoning abilities in ways traditional models cannot.</p><p>How? Check out my previous articles <a href="https://medium.com/@tweetyyyyy/introduction-to-llms-week-1-nptel-notes-06ec3b30d82b">here</a> to find more about it.</p><h3>Isn’t LLM technically a part of ML ?</h3><p>Yes , LLM is indeed a subset of ML . <a href="https://medium.com/@tweetyyyyy/machine-learning-introduction-3de741bf04cf">Machine Learning</a> encompasses a wide range of techniques like <a href="https://medium.com/@tweetyyyyy/supervised-learning-regression-20c9165e76e0">Supervised learning</a> , Unsupervised learning , Reinforcement learning , Deep Learning etc. The traditional ML models we are discussing in this article like Regression , Classification , SVMs etc comes under the supervised and unsupervised learning category while LLM is a part of Deep Learning which uses transformer architecture.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/341/1*GTuDxRrBajWrFY7ZSyih7A.png" /></figure><h3><strong>What is wrong with traditional ML models and LLMs ?</strong></h3><p>Now that we have understood where the two domains lie in the broader landscape of ML , it becomes clear that these two technologies are not competing but rather complementing each other . While both traditional ML models and LLMs have achieved significant success in their respective domains , neither is universally optimal. Each comes with its own limitations making them less effective especially when used in the real world where structured and unstructured data co-exist.</p><p><strong><em>Traditional ML models<br></em></strong>like logistic regression , decision trees and SVMs are highly effective in the case of a structured , well-labeled tabular data. They are fast , interpretable and require very little computational power. <em>Why ‘traditional’ ? </em>these models rely heavily on handcrafted features and manual feature engineering which is time consuming and is prone to errors . It also does not capture the semantics or structure of the natural language and cannot handle unstructured data requiring significant pre-processing.</p><p><strong><em>Large Language models<br></em></strong>such as GPT and BERT are built on deep neural architectures that excel in understanding language , extracting meaning and even generating coherent responses. This in turn fires back a high computational cost making it harder to deploy LLMs in resource-constrained environments. The most appropriate way to describe a LLM is as a black-box . It has no accountability to the data it produces and can even generate incorrect or hallucinated responses.</p><h3>What is a Hybrid AI Approach ?</h3><p>A Hybrid AI approach is a smart , layered system that combines the logic and efficiency of a traditional ML model with the deep contextual understanding of LLMs.</p><p>By addressing the limitations of both traditional ML models and LLMs , the Hybrid AI approach combines their strengths, thereby eliminating their individual weaknesses.</p><ol><li>LLM handles the messy , unstructured text by extracting meaning , understanding context , summarizing or tagging data while traditional ML models use that clean , structured output to make predictions , flag risks and score outcomes.</li><li>This approach allows the interpretability of ML models to balance the complex reasoning of LLMs.</li><li>Hybrid systems use LLMs only for tasks that require them thereby reducing latency and cost.</li><li>Real world data often includes mixed data types and a Hybrid AI can process this heterogeneous data seamlessly.</li></ol><h3>Architecture of Hybrid AI</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/241/1*UrhEZjSTzRJ8si7HIQyjlw.png" /><figcaption>Hybrid AI</figcaption></figure><p>The architecture of Hybrid AI can be broken down into four major stages, as illustrated in the diagram above.</p><p><strong>1. Raw Input Data<br></strong>At the very top of the pipeline lies the <strong>raw input</strong>, which is typically unstructured data — this could include customer feedback, support tickets, medical notes, product reviews, or any free-form text. In many real-world scenarios, this is where traditional ML models fall short because they expect clean, structured input.</p><p><strong>2. LLM Processing Layer<br></strong>The next stage involves a <strong>Large Language Model (LLM)</strong>, such as GPT or BERT. This component is responsible for:</p><ul><li>Understanding and parsing unstructured text</li><li>Extracting key information (e.g., entities, sentiments, intent)</li><li>Summarizing or tagging content</li><li>Generating structured representations such as embeddings, keywords, or metadata</li></ul><p>Essentially, the LLM acts as a powerful pre-processor, converting chaotic text into structured insight that a traditional model can work with. It adds contextual depth and semantic understanding that would otherwise be inaccessible to statistical models.</p><p><em>Tools and Frameworks : </em>Hugging face transformers , OpenAI API , TensorFlow and PyTorch</p><p><strong>3. Data Preparation and Transformation<br></strong>Once the LLM has done its job, the output still needs to be <strong>formatted and engineered</strong> for downstream ML processing. This stage includes:</p><ul><li>Feature selection and engineering</li><li>Data cleaning and normalization</li><li>Encoding textual elements into numerical formats</li></ul><p>This transformation step bridges the output of the LLM with the input format expected by traditional ML algorithms.</p><p><em>Tools and Frameworks : </em>Pandas , NumPy , Scikit-learn , Apache Spark</p><p><strong>4. Traditional ML Modeling<br></strong>Now, with structured, high-quality data in hand, we apply a <strong>traditional ML model</strong> — such as logistic regression, decision trees, random forests, or gradient boosting. These models:</p><ul><li>Make predictions (e.g., fraud detection, lead scoring, churn probability)</li><li>Classify outcomes based on the cleaned features</li><li>Provide interpretable results that are often necessary in production environments</li></ul><p>Because the input is now contextually rich (thanks to the LLM) yet numerically optimized (thanks to preprocessing), the ML model performs more accurately and reliably.</p><p><em>Tools and Frameworks : </em>Scikit-learn , XGBoosy , TensorFlow , PyTorch</p><p><strong>5. Final Output or Action<br></strong>The last stage delivers a concrete <strong>output or decision . </strong>This output can then feed into dashboards, trigger automation, or assist human decision-makers.</p><h3>Real-Life Use Cases</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/912/1*CFoswXszODPWDxWoG8oaVQ.png" /><figcaption>Use Cases of Hybrid AI</figcaption></figure><h3>Future Scopes of Hybrid AI</h3><ol><li><strong>Explainable Hybrid AI<br></strong>Developing interpretable LLM outputs to enhance overall system transparency.</li><li><strong>Multimodal Hybrid AI<br></strong>Combining text, images, videos and sensor data in hybrid pipelines.</li><li><strong>Resource-Efficient Models<br></strong>Advancements to reduce LLM costs while maintaining performance.</li><li><strong>Industry-Specific Solutions<br></strong>Development of a more domain specific Hybrid AI for law, medicine, research etc.</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=eac6428bbf12" width="1" height="1" alt=""><hr><p><a href="https://blog.gopenai.com/bridging-the-gap-how-hybrid-ai-systems-combine-llms-with-traditional-machine-learning-models-eac6428bbf12">Bridging the Gap: How Hybrid AI Systems Combine LLMs with Traditional Machine Learning Models</a> was originally published in <a href="https://blog.gopenai.com/">GoPenAI</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Supervised Learning — Support Vector Machines]]></title>
            <link>https://blog.gopenai.com/supervised-learning-support-vector-machines-47e663c8e517?source=rss-d07c8a444e4f------2</link>
            <guid isPermaLink="false">https://medium.com/p/47e663c8e517</guid>
            <category><![CDATA[adaboost]]></category>
            <category><![CDATA[boosting]]></category>
            <category><![CDATA[bagging]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[support-vector-machine]]></category>
            <dc:creator><![CDATA[Kalyani Krishna]]></dc:creator>
            <pubDate>Thu, 15 May 2025 07:29:13 GMT</pubDate>
            <atom:updated>2025-05-16T17:01:01.835Z</atom:updated>
            <content:encoded><![CDATA[<h3>Supervised Learning — Support Vector Machines</h3><h3>Contents</h3><ol><li>Support Vector Machines</li><li>Model Performance Concepts</li><li>Bagging</li><li>Boosting</li></ol><h3>Support Vector Machines</h3><p><strong>Support Vector Machine (SVM)</strong> is a <strong>supervised learning algorithm</strong> used for both <strong>classification</strong> and <strong>regression</strong> tasks.</p><ul><li>It constructs a <strong>hyperplane</strong> (or a set of hyperplanes) in a high-dimensional space that <strong>separates different classes</strong>.</li><li>The optimal hyperplane is the one that <strong>maximizes the margin</strong> between the closest data points of each class, called <strong>support vectors</strong>.</li></ul><p>SVM is effective for both:</p><ul><li><strong>Linearly separable data</strong> (where a straight line or plane can separate the classes).</li><li><strong>Non-linearly separable data</strong> (using <strong>kernel functions</strong> to map data into a higher-dimensional space where it becomes separable).</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/350/1*MlUeNz4Gqj3tWoUjvehIVg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/228/1*pERKJ3uSRU1VDyrMJvNM2Q.png" /></figure><p><strong>Hyperplane → </strong>decision boundary (red line). SVM searches for the hyperplane that best divides the data while maximising the margin.</p><p><strong>Support vectors → </strong>points closest to the hyperplane in both classes.</p><p><strong>Margin → </strong>distance between the two support vectors.</p><p>Dimension of hyperplane depends on the number of features.<br>If input feature = 2 , hyperplane is a line<br>If input feature = 3, hyperplane is a plane</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/345/1*H7txLCKvtM1KNlb5BRBx6Q.jpeg" /></figure><h4>Linearly Seperable data (2-D Case)</h4><p>find <em>a,b,c </em>such that<br><em>ax+by≥ c </em>for green points<br><em>ax+by≤ c </em>for red points</p><p>There are lots of possible solutions for a,b,c.<br>Support vectors are the elements of training set that would change the position of dividing the hyperplane if removed . The problem of finding the optimal hyperplabe is an optimization problem.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*48jIXw1EVfn0I-MRv-v_dA.png" /></figure><h4>Non-Linearly seperable data</h4><p>In this case , linear seperation is gained by mapping the data to a higher dimensional space</p><p><strong>Kernel Function → </strong>a kernel function allows the algorithm to operate in a high-dimensional space without explicitly computing the coordinates of the data in that space.</p><p><strong>Types of Kernel Function:<br>1. Linear Kernel<br></strong>A <strong>linear kernel</strong> computes the <strong>dot product</strong> between input vectors:<br><strong><em>K</em>(<em>x</em>,<em>y</em>)=<em>x</em>.<em>y</em></strong><em><br></em>This means the SVM searches for a <strong>straight hyperplane</strong> (line in 2D, plane in 3D) that separates the classes<br>Used in spam detection , text classification.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/378/1*yEObLrKLIUrBeO_51-Nj-w.jpeg" /></figure><p><strong>2. Polynomial Kernel<br></strong>it is used when data is not linearly seperable but still follows a pattern.<br><strong><em>K</em>(<em>x</em>,<em>y</em>)=(<em>x</em>.<em>y</em>+<em>c</em>)^<em>d</em></strong> where is a constant and d is the polynomial degree.<br>Used in image-recognition where relationship between features can be non-linear.</p><p><strong>3. Gaussian Kernel<br></strong>it is a type of Radial Basis Function Kernel that maps the data into an infinite-dimensional space and provides smooth and continuos transformations of data into higher dimensions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/341/1*R6mfBjnDM1F__iBREzbO-A.jpeg" /></figure><p><strong>4. Sigmoid Kernel<br></strong>inspired by neural networks and works similar to the activation function of a neuron.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/249/1*Pk29WG5EMIgNwrR1H20ioQ.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/423/1*DBoWkW8CkyuDxFkzqlps8Q.png" /></figure><h3>Model Performance Concepts</h3><h4>ROC-AUC</h4><p>In classification problems, particularly with <strong>imbalanced datasets</strong>, evaluating model performance using just <strong>accuracy</strong> can be misleading. That’s where <strong>ROC-AUC</strong> comes in.</p><p>Two Key Types of Classification Errors:</p><ol><li><strong>False Positives (FP):</strong> Model predicts <em>positive</em>, but it’s actually <em>negative</em></li><li><strong>False Negatives (FN):</strong> Model predicts <em>negative</em>, but it’s actually <em>positive</em></li></ol><p>Which error is worse depends on the <strong>domain</strong> (e.g., medical diagnosis vs spam detection).</p><p><strong>ROC Curve:<br></strong>The <strong>ROC curve</strong> plots:<br><strong>X-axis</strong>: False Positive Rate (FPR) = FP / (FP + TN)<br><strong>Y-axis</strong>: True Positive Rate (TPR) = TP / (TP + FN) = <strong>Recall</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/262/1*YCLgmcpbVKUsaq9SPGkXhA.jpeg" /></figure><p>It shows the trade-off between TPR and FPR at various <strong>thresholds</strong>.</p><p><strong>AUC — Area Under the Curve:</strong></p><p><strong>AUC (Area Under ROC Curve)</strong> is a single scalar value that quantifies the model’s ability to <strong>distinguish between classes</strong>.</p><p><strong>Range:</strong> 0.0 to 1.0<br><strong>0.5</strong>: No discrimination (random guessing)<br><strong>1.0</strong>: Perfect separation</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/299/1*tmMhBAT20vdf71lPx8riHg.png" /></figure><p><strong>Why Use ROC-AUC?</strong></p><ul><li>It is <strong>threshold-independent</strong>.</li><li>Particularly helpful with <strong>imbalanced datasets</strong> (e.g., 95% negative, 5% positive).</li><li>Better for comparing classifiers beyond just accuracy.</li></ul><h4>Bias and Variance</h4><p>In supervised learning, <strong>bias</strong> and <strong>variance</strong> are two fundamental sources of error that affect a model’s performance. To understand these concepts, let’s use a familiar analogy: shooting arrows at a target, like in archery.</p><p><strong>Bias → </strong>inability to capture true relationships.<br><strong>Variance → </strong>deviation of the test results from the ML model.</p><p><strong>High Bias<br></strong>You shoot several arrows, and they all land far from the bullseye — but they land close to each other. This means you’re consistently missing in the same way. In machine learning terms, <strong>high bias</strong> means the model makes strong assumptions and oversimplifies the data. It doesn’t learn enough from the training data.</p><p><strong>High Variance<br></strong>Now imagine that your arrows land all over the place — one near the bullseye, one off to the left, another way too high. You’re adjusting your aim too much with each shot, so there’s no consistency.In machine learning, <strong>high variance</strong> means the model learns the training data too well, even memorizing the noise. It becomes too sensitive to fluctuations and doesn’t generalize well.</p><p><strong>Low Bias, Low Variance<br></strong>The ideal situation is when your arrows land close to the bullseye and close to each other. You’re both accurate and consistent. This is what a good machine learning model should do: learn the pattern well and make consistent predictions on new data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/996/1*BVhTW4c1FPFa41ReTqIBXQ.jpeg" /></figure><h4>Underfitting: High Bias, Low Variance</h4><p>Your arrows consistently miss the target in the same way. You’re not learning enough to hit the bullseye. This is like using a model that is too simple to capture the patterns in the data.</p><h4>Overfitting: Low Bias, High Variance</h4><p>Your arrows hit different spots every time — sometimes close to the center, sometimes way off. You’re learning too much from small details and can’t repeat good results. This is like using a model that memorizes the training data but fails on new data.</p><p>To detect overfitting and underfitting , <strong>Cross Validation </strong>is used<br>To avoid overfitting and underfitting , <strong>Regularization , Boosting and Bagging </strong>is used.</p><h4>Ensemble methods</h4><p>Ensemble methods are meta-algorithms which combine several machine learning models together and creating a single predictive model out of it.</p><p>The main goal of using ensemble methods are : to reduce variance (bagging), to reduce bias (boosting) and to improve the predictions.</p><p>Bagging and boosting algorithms can be used in both regression problems and classification problems.</p><p><strong>Random Forest</strong> is one of the prominent bagging algorithms &amp; <strong>Adaboost and Gradient Boosting</strong> are popular boosting methods.</p><h3>Bagging</h3><p><strong>Bagging</strong>, short for <strong>Bootstrap Aggregation</strong>, is an ensemble learning technique designed to improve the stability and accuracy of machine learning models. It reduces <strong>variance</strong> and helps avoid <strong>overfitting</strong>, particularly with high-variance models like decision trees.</p><h4>Steps to Build a Random Forest:</h4><p><strong>1.Create Bootstrapped Datasets:</strong></p><ul><li>Randomly sample the original training data <strong>with replacement</strong> to generate multiple datasets.</li></ul><p><strong>2. Build Decision Trees:</strong></p><ul><li>For each bootstrapped dataset, grow a <strong>decision tree</strong>.</li><li>At each split in the tree, only a <strong>random subset of features</strong> is considered (this adds further randomness and de-correlation between trees).</li></ul><p><strong>3. Repeat:</strong></p><ul><li>Perform Steps 1 and 2 <strong>n times</strong> to create <strong>n decision trees</strong> — this is the “forest”.</li></ul><p><strong>4. Aggregate Results:</strong></p><ul><li>Use <strong>majority vote</strong> for classification or <strong>average</strong> for regression.</li><li>Final prediction is more robust and less prone to overfitting.</li></ul><h3>Boosting</h3><p><strong>Boosting</strong> is a machine learning ensemble technique that aims to <strong>convert weak learners into strong learners</strong>. It does this by training multiple models <strong>sequentially</strong>, where each new model focuses on correcting the errors made by the previous ones.</p><h4>What is AdaBoost?</h4><p><strong>AdaBoost</strong>, short for <strong>Adaptive Boosting</strong>, is a machine learning algorithm that combines <strong>many weak learners</strong> (usually shallow decision trees, called <strong>decision stumps</strong>) to form a <strong>strong classifier</strong>.</p><p>What makes it <em>adaptive</em> is that it <strong>adjusts the weights of training samples</strong>: misclassified examples get more weight so that the next model pays more attention to them.</p><ol><li><strong>Start</strong> with equal weights for all training samples.</li><li><strong>Train a weak learner</strong> (e.g., a decision stump).</li><li><strong>Measure its error rate</strong> on the training data.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/398/1*90PbR-UdYji5nEkrzrCqTg.jpeg" /><figcaption>Amount of Say</figcaption></figure><p>4. <strong>Update sample weights:</strong></p><ul><li>Increase weights of misclassified samples.</li><li>Decrease weights of correctly classified samples.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/327/1*w5bH9k55Ezmxd3P5vSp7QQ.png" /></figure><p>5. <strong>Train the next weak learner</strong> on the updated weights.</p><p>6. <strong>Repeat steps 3–5</strong> for several iterations.</p><p>7. <strong>Final model</strong> is a weighted combination of all the weak learners.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=47e663c8e517" width="1" height="1" alt=""><hr><p><a href="https://blog.gopenai.com/supervised-learning-support-vector-machines-47e663c8e517">Supervised Learning — Support Vector Machines</a> was originally published in <a href="https://blog.gopenai.com/">GoPenAI</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Dynamic and Smart Control Systems]]></title>
            <link>https://tweetyyyyy.medium.com/dynamic-and-smart-control-systems-f8bf8b894a91?source=rss-d07c8a444e4f------2</link>
            <guid isPermaLink="false">https://medium.com/p/f8bf8b894a91</guid>
            <category><![CDATA[control-system]]></category>
            <category><![CDATA[feedback-loop]]></category>
            <category><![CDATA[open-loop]]></category>
            <category><![CDATA[smart-system]]></category>
            <category><![CDATA[pid-controller]]></category>
            <dc:creator><![CDATA[Kalyani Krishna]]></dc:creator>
            <pubDate>Mon, 12 May 2025 18:52:06 GMT</pubDate>
            <atom:updated>2025-05-12T18:54:30.703Z</atom:updated>
            <content:encoded><![CDATA[<h4><strong>What is a Dynamic System ?</strong></h4><p>Dynamic systems are systems whose behaviour evolves over time based on their current states and inputs . In interactive systems (like robotics , AR/VR systems , smart exoskeletons etc.) , motion planning and control must account for real-time feedback , disturbances and user input.</p><h4><strong>Motion Planning for Interactive Systems</strong></h4><p>Motion planning is the process of determining a sequence of movements that a system should perform to achieve a goal without collisions , in real-time.</p><p><strong>Types of Motion Planning :<br>1. Offline Planning —</strong>Precomputed paths ( not ideal for interactive systems)<strong><br>2. Online/Real-Time Planning — </strong>Adjusts paths in real-time using sensor inputs</p><h4>Feedback Loops in Control Systems</h4><p>A feedback loop allows a system to adjust its behaviour based on its output to meet a desired goal (setpoint).</p><p><strong>Open Loop Systems — </strong>An open-loop system is one where the control action is independent of the output. The system does not measure or respond to the actual outcome of its actions.e.g.Electric Kettle , Washing Machine.</p><p><strong>Closed Loop Systems —</strong> A closed-loop system uses feedback from the output to influence the control action. It constantly compares the output with the desired input (setpoint) and adjusts accordingly.e.g.Cruise Control in cars , Thermostat-controlled Heating System.</p><p><strong>PID Controllers<br></strong>A PID controller stabilizes a system by continuously correcting an error value <strong><em>e(t) </em></strong>as the difference between a desired setpoint and a measured process variable and applies a correction.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/374/1*X92iqhel2rwC2VSdRAKfZQ.png" /></figure><p><strong>Proportional (P) : </strong>Reacts to current error<strong><br>Integral (I) : </strong>Reacts to accumulated error over time<strong><br>Derivative (D) : </strong>Reacts to rate of error change</p><p>Together, these terms ensure the system reacts quickly, eliminates steady-state error, and prevents oscillations, thereby maintaining <strong>stable and smooth motion</strong>.</p><p><strong>Adaptive Motion Systems<br></strong>These systems adjust their parameters (e.g., controller gains, paths) dynamically based on feedback and changing conditions from sensors and environment.</p><h4>Dynamic System Design in Assistive Robot Devices</h4><p>Dynamic system design plays a crucial role in enhancing user interaction in assistive robotic devices by making these systems adaptive, responsive, and intuitive to the user’s needs. Assistive robotics, such as robotic exoskeletons, prosthetics, and mobility aids, benefit greatly from dynamic system design by improving their usability, safety, and performance in real-world conditions.</p><p>e.g for smart prosthetics / exoskeleton</p><ol><li><strong>Motion Planning for Interactive Systems<br></strong>ensures that assistive robotic devices can predictably and safely interact with the user’s body or the environment. The robot must determine the optimal path for movement based on real-time user feedback.<br>Sensors like gyroscopes to track limb angles , movement intentions.</li><li><strong>Feedback Loops</strong><br>allows robots to continuosly monitor and adjust its behaviour based on real-time output from the system.<br>While sensors monitor torque, speed , position , PID controller compares these values to desired values .</li><li><strong>Smart Control Systems</strong><br>integration of Iot for real-time communication , system updates and personalized interactions.<br>Sensors send number of steps , joint stress etc. to clous platform or mobile app.</li><li><strong>Use of AI/ML </strong><br>enable prediction of future movements , detect anomalies in real-time.<br>AI monitors sensor data to detect unusual patterns , triggering warnings or corrective action.</li><li><strong>Adaptive Feedback</strong><br>personalize interactions based on the user’s physical and cognitive abilities.<br>If a user tires quickly , the exoskeleton reduces resistance and supports more movement.</li></ol><h4>Communication between Multiple Motion systems in an IoT-Enabled Smart Factory</h4><p>In an IoT-enabled smart factory , multiple motion systems (robotic arms , conveyor belts etc) are interconnected through a networked architecture that allows real-time communication , coordination and optimization of tasks.<br><strong>Key Components in Communication<br>1. IoT Devices and Motion Controllers —</strong> Each machine or robot is embedded with sensors, actuators, and a motion controller that are equipped with connectivity modules.</p><p><strong>2. Edge Gateways — </strong>Act as local hubs for collecting data from machines and preprocessing it before sending to the cloud.</p><p><strong>3. Industrial Network Protocols — </strong>Communication is often done using real-time industrial protocols, such as OPC UA , MQTT , Modbus TCP , PROFINET.</p><p><strong>4. Cloud Platforms — </strong>Receives data from all motion systems and performs real-time analytics, synchronization, and control orchestration.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f8bf8b894a91" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Supervised Learning — Classification]]></title>
            <link>https://tweetyyyyy.medium.com/supervised-learning-classification-e172ce5c2fdd?source=rss-d07c8a444e4f------2</link>
            <guid isPermaLink="false">https://medium.com/p/e172ce5c2fdd</guid>
            <category><![CDATA[gini-index]]></category>
            <category><![CDATA[classification]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[shannon-entropy]]></category>
            <category><![CDATA[naive-bayes-classifier]]></category>
            <dc:creator><![CDATA[Kalyani Krishna]]></dc:creator>
            <pubDate>Sun, 04 May 2025 15:42:49 GMT</pubDate>
            <atom:updated>2025-05-04T15:42:49.925Z</atom:updated>
            <content:encoded><![CDATA[<h3>Supervised Learning — Classification</h3><h3>Contents</h3><ol><li>Logistic Regression</li><li>Naive Bayes Classifier</li><li>Decision Tree Classifier</li></ol><h3>Logistic Regression</h3><p>Though the name has regression in it , Logistic regression is a classification algorithm that is used to perform binary classification tasks . (0 or 1) , (Yes or No ) , (True or False).</p><p>e.g. Predicting whether a customer will buy a product (Yes/No) based on their profile is an example of Binomial Logistic Regression.</p><h4>Why Use Logistic Regression:</h4><p><strong>Bounded output (0 to 1)</strong></p><ul><li>Uses the <strong>sigmoid (logistic) function</strong> to ensure outputs are between 0 and 1.</li><li>Output can be interpreted as a <strong>probability</strong> of the positive class.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/275/1*l29vq8YuFX6HFuJKbMBNyA.png" /></figure><p><strong>Natural thresholding</strong></p><ul><li>We can set a threshold (e.g., 0.5) to decide the class:<br> If above 0.5 → positive class , else → negative class</li></ul><p><strong>Better loss function</strong></p><ul><li>Logistic regression uses <strong>log loss (cross-entropy)</strong>, which is ideal for classification tasks, unlike the squared error in linear regression.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/358/1*_pXZZyMYNkk4SfeS7Ckkug.png" /></figure><h3>Naive Bayes Classifier</h3><p>Uses Bayes algorithm to classify data based on probabilities.<br>‘Naive’ → the presence of one feature does not affect the others.</p><h4>Assumptions</h4><ol><li>Feature independence</li><li>All features are equally important</li><li>No missing data</li></ol><h4>Bayes Theorem</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/434/1*eatPEjvYoiePQErP44kg2A.png" /></figure><p>e.g. Golf Playing prediction</p><p>Data to be classified: <strong>X = (outlook =Sunny, Temperature = Mild, Humidity = Windy = False)</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/393/1*E5xXY-4ts_FH9fTHa5iklg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/477/1*UL05Yn4UyoT_Z0aQPUCjXg.png" /><figcaption>Naive Bayes</figcaption></figure><p>Since P(C1|X) &gt; P(C2|X ) , play_golf = Yes</p><h3>Decision Tree</h3><p>A Decision Tree Classifier is a supervised learning algorithm used for both classification (categorical targets) and regression (continuous targets) tasks. It builds a model in the shape of a tree structure, where data is split into branches based on feature values, leading to a series of decisions that ultimately assign a class label or value to each data point.</p><h4>CART: Classification and Regression Trees</h4><p>CART (Classification and Regression Trees) is a popular framework for constructing decision trees:</p><ul><li>Classification Trees: Used when the target variable is categorical (e.g., classifying emails as spam or not spam).</li><li>Regression Trees: Used when the target variable is continuous (e.g., predicting house prices).</li></ul><h4>Decision Tree Structure</h4><p>A decision tree consists of:</p><ul><li>Root Node: The initial node representing the entire dataset.</li><li>Internal Nodes: Nodes where decisions are made based on feature values.</li><li>Branches: Outcomes of decisions, leading to further nodes.</li><li>Leaf Nodes: Terminal nodes that assign a class label (for classification) or a value (for regression).</li></ul><h4>Steps to Build a Decision Tree</h4><p>1. Select the Best Feature to Split</p><ul><li>For <em>classification</em>, use impurity measures such as Gini Impurity or Entropy to evaluate how well a feature separates the classes.</li><li>For <em>regression</em>, use metrics like Mean Squared Error (MSE) to assess splits.</li></ul><p>2. Split the Data</p><ul><li>Partition the data into subsets based on the chosen feature and its value(s).</li></ul><p>3. Repeat the Process Recursively</p><ul><li>For each subset, repeat the process: select the next best feature and split again, forming a recursive, top-down tree structure.</li></ul><p>4. Assign Labels to Leaf Nodes</p><ul><li>Once further splitting no longer improves homogeneity (purity) or a stopping criterion is met, assign the majority class (classification) or average value (regression) to the leaf node.</li></ul><h4>Impurity Measures for Splitting</h4><ul><li><strong>Gini Impurity:</strong> Measures the probability of misclassifying a randomly chosen element.</li><li><strong>Entropy:</strong> Measures the amount of information disorder or unpredictability.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e172ce5c2fdd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Supervised Learning — Regression]]></title>
            <link>https://tweetyyyyy.medium.com/supervised-learning-regression-20c9165e76e0?source=rss-d07c8a444e4f------2</link>
            <guid isPermaLink="false">https://medium.com/p/20c9165e76e0</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[multiple-linearregression]]></category>
            <category><![CDATA[simple-linear-regression]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[regression]]></category>
            <dc:creator><![CDATA[Kalyani Krishna]]></dc:creator>
            <pubDate>Sun, 04 May 2025 13:36:13 GMT</pubDate>
            <atom:updated>2025-05-04T13:36:13.020Z</atom:updated>
            <content:encoded><![CDATA[<h3>Supervised Learning — Regression</h3><h3>Contents</h3><ol><li>Simple Linear Regression</li><li>Multiple Linear Regression</li></ol><h3>Simple Linear Regression</h3><p>Linear regression attempts to model a relationship between 2 variables by fitting a linear equation to observed data .</p><p>It shows us the relationshio between two continuos variables :<br>1. Predictor [Independent variable] : X<br>2. Response [Dependent variable] : Y</p><p>It is represented by scatter plots</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/282/1*UYVk-UpNwNQtkYE3uZgyAw.png" /></figure><p><strong>Goal : </strong>find the best values for m , c and then use it to predict values . The line having that value → <strong>Line of best fit</strong></p><p><strong>Residuals : </strong>distance between the actual value and predicted value . If far , the residual increases and therefore the cost function also increases.<br>Line of best fit should be the one with least residual and error.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/277/1*1LkcJ5q-J8p3yJcxhckVkA.png" /></figure><h3>Multiple Linear Regression</h3><p>used to estimate the relationship between two or more independent variables to one dependent variable.</p><p><strong>Assumptions in Multiple Linear Regression :<br>1. Linearity<br></strong>assumes that the relationship between the variables is linear.</p><p><strong>2. No Multi-Collinearity<br></strong>Multi-Collinearity refers to when one independent variable can be perfectly predicted from another one. This will lead to problems in finding regression coefficients.</p><p>It can be tested using <strong>Variance Inflation Factor </strong>and <strong>Correlation matrix</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/312/1*kXpK27JR1xPw-SpFFdtAEw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/504/1*15jh2GDzlwu5x0j-zJOXTg.png" /></figure><p>High multicollinearity can be solved by combining/removing correlated variables , regularization , principal component analysis.</p><p><strong>3. No Auto-Correlation<br></strong>Auto correlation → when errors (residuals) are correlated (when past errors influence future errors)<br>e.g Time series data like stock prices</p><p>The <strong>Durbin-Watson Test </strong>is done to test for auto-correlation : <strong>DW=2(1−r)<br></strong>where r is the correlation coefficient.<br>If DW = 2 , no auto-correlation<br>If DW &lt; 2 , positive auto-correlation<br>If DW &gt; 2 , negative auto-correlation</p><p><strong>4. Homoscedasticity<br></strong>Homoscedasticity refers to the <strong>constant variance of the error terms</strong> (residuals) in a regression model. In other words, the spread of the residuals (the difference between observed and predicted values) should remain constant across all levels of the independent variable(s). Tests like <strong>Breusch-Pagan</strong> , <strong>Cook-Weisberg</strong> and <strong>White general</strong> tests are used.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=20c9165e76e0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Machine Learning — Introduction]]></title>
            <link>https://tweetyyyyy.medium.com/machine-learning-introduction-3de741bf04cf?source=rss-d07c8a444e4f------2</link>
            <guid isPermaLink="false">https://medium.com/p/3de741bf04cf</guid>
            <category><![CDATA[ml-model]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[supervised-learning]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[types-of-ml]]></category>
            <dc:creator><![CDATA[Kalyani Krishna]]></dc:creator>
            <pubDate>Sun, 04 May 2025 13:00:47 GMT</pubDate>
            <atom:updated>2025-05-04T13:00:47.771Z</atom:updated>
            <content:encoded><![CDATA[<h3>Machine Learning — Introduction</h3><h3>Contents</h3><ol><li>What is Machine Learning</li><li>Learning Models</li><li>Types of Learning</li><li>Creating a ML Model</li></ol><h3>What is Machine Learning ?</h3><p>When you program computers to optimize performances based on past experience or data , it is called machine learning.</p><p>A computer is said to learn from experience E with respect to some class of tasks T and performance measure P. <strong>P(T) increases with E.<br></strong>eg. Chess<br>T : playing chess<br>P : % of games won<br>E : playing games against itself</p><h3>Learning Models</h3><ol><li><strong>Logical Model<br></strong>uses logical rules , boolean expressions to classify data.<br>IF : segment , THEN : model<br><strong>Features → </strong>workhorses of ML<strong><br>Models → </strong>o/p of ML <strong><br>Tasks →</strong>problems that can be easily solved with ML<br>These logical models , can be easily solved using decision trees.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/395/1*82BwBzEEFzliGY2FH2LIHA.png" /></figure><p><strong>2. Geometrical Model<br></strong>represents data points as vectors in a multi-dimensional space.<br><strong>Instance space → </strong>set of all possible / describable instances</p><p><strong>Distance-based models → </strong>classifies instances based on distance . eg.Euclidean , Manhattan etc. KNN , K-Means or Hierarchial clustering is used here.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/240/1*Oexj3_D-oPvoHoUHyjC0Ig.png" /></figure><p><strong>Linear models → </strong>assumes a linear relationship b/w parameters . Linear and Logistic regression are used here.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/281/1*pkCGBwXmw-C7XtHiYlb35w.png" /></figure><p><strong>3. Probabilistic Model<br></strong>uses probability theory to predict likelihood of different classes. eg.Naive Bayes.</p><h3>Types of Learning</h3><h4>1. Supervised Learning (Learning from Examples)</h4><ul><li><strong>What happens</strong>: The model is given <strong>inputs and correct outputs</strong> to learn from.</li><li><strong>Example</strong>: Teaching a computer to recognize cats by showing it lots of cat photos <strong>with labels</strong> (“this is a cat”).</li><li><strong>Goal</strong>: Predict the output when given a new input.</li><li><strong>Used for</strong>: Spam detection, image recognition, house price prediction.</li></ul><h4>2. Unsupervised Learning (Finding Patterns)</h4><ul><li><strong>What happens</strong>: The model gets <strong>inputs only</strong>, no correct answers.</li><li><strong>Example</strong>: Feeding it a bunch of customer data, and it figures out <strong>groups or patterns</strong> (e.g., types of buyers).</li><li><strong>Goal</strong>: Discover hidden structures or groupings.</li><li><strong>Used for</strong>: Market segmentation, recommendation systems, anomaly detection.</li></ul><h4>3. Reinforcement Learning (Learning by Trial and Error)</h4><ul><li><strong>What happens</strong>: An agent learns by <strong>interacting with an environment</strong>, getting <strong>rewards or penalties</strong>.</li><li><strong>Example</strong>: A robot learns to walk by trying different movements and getting rewarded for progress.</li><li><strong>Goal</strong>: Maximize the total reward over time.</li><li><strong>Used for</strong>: Game playing (like Chess, Go), robotics, self-driving cars.</li></ul><h3>Creating a ML Model</h3><ol><li><strong>Exploratory Data Analysis<br></strong>Understand dataset , distribution , visualization.<br>Data cleaning (missing data , outliers , duplicates).<br>Feature engineering (normalization , categorical data encoding).<br>Feature selection (drop irrelevant , redundant data).<br>Visualizations.</li><li><strong>Split the Data<br></strong>into Training data and Testing data (usually 70:30).</li><li><strong>Build ML model with Training dataset<br></strong>Choose an algorithm that fits your problem statement.<br>Fit the model to learn about patterns , relationships and parameters.</li><li><strong>Test the model</strong></li><li><strong>Calculate Performance metrics<br>for regression →</strong> Mean absolute error , Mean square error , Root Mean square error .<br><strong>for classification →</strong> Accuracy , Precision , F1-score , Recall , ROC , Confusion matrix</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3de741bf04cf" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>