<?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 Syed Saarib Rasheed on Medium]]></title>
        <description><![CDATA[Stories by Syed Saarib Rasheed on Medium]]></description>
        <link>https://medium.com/@saarib2405?source=rss-8643cc22f074------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*FiMfh-AfkfLfxA3XUF8luA@2x.jpeg</url>
            <title>Stories by Syed Saarib Rasheed on Medium</title>
            <link>https://medium.com/@saarib2405?source=rss-8643cc22f074------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 23:33:40 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@saarib2405/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[K-Fold Cross Validation: Why Your Model’s Accuracy Might Be Lying to You]]></title>
            <link>https://medium.com/@saarib2405/k-fold-cross-validation-4ad3df853b6e?source=rss-8643cc22f074------2</link>
            <guid isPermaLink="false">https://medium.com/p/4ad3df853b6e</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[model-evaluation]]></category>
            <category><![CDATA[technology]]></category>
            <dc:creator><![CDATA[Syed Saarib Rasheed]]></dc:creator>
            <pubDate>Fri, 06 Feb 2026 18:11:54 GMT</pubDate>
            <atom:updated>2026-02-06T18:11:54.107Z</atom:updated>
            <content:encoded><![CDATA[<p><strong><em>And how to catch it before it’s too late</em></strong></p><p>You train your model. It shows 95% accuracy. You deploy it. It fails spectacularly.</p><p>Sounds familiar?</p><p>In a world where Instagram’s recommendations know you better than your friends, where targeted ads seem to read your mind, and where humans increasingly depend on other AI models, data is not just important. It is everything. But here is the uncomfortable truth. Most models are tested on a lie.</p><p>That 95% accuracy? It might just be luck.</p><h3>The Problem With Traditional Testing</h3><p>A traditional train-test split is like judging a student’s entire academic capability based on a single exam. Sure, it is fast. But it introduces massive variance. Your model’s performance depends entirely on which random data points ended up in your test set.</p><p>One lucky split? Your model looks like a genius.<br>One unlucky split? It looks like it learned nothing.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VfTH5AiZkt4D59NUG6r0xg.png" /><figcaption>Image generated using nano banana</figcaption></figure><p>This is where K-Fold Cross Validation comes in. Not to tell you how accurate your model is, but to make you confident in that accuracy.</p><h3>What Exactly Is K-Fold Cross Validation?</h3><p>Think of K-Fold Cross Validation as a stress test for your data.</p><p>Instead of one train test split, you create K different splits of your dataset. Each data point gets to play two critical roles. Being used for training AND being used for testing. Then you average all the results to get a more reliable performance estimate.</p><p>It is not about getting higher accuracy. It is about getting honest accuracy.</p><h3>How It Actually Works Step by Step</h3><p>Let’s break this down with a real example. Imagine you have a dataset with 1,000 rows.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5PzxWkmrsVMX1GcaiGgbKA.png" /><figcaption>Image generated using nano banana</figcaption></figure><h3>Step 1: Shuffle Your Data</h3><p>First, randomize the order of your rows. This ensures you are not accidentally capturing any patterns based on how the data was originally collected.</p><h3>Step 2: Choose Your K Value</h3><p>There is no magic formula for choosing K, but industry standards typically use K=5 or K=10. For our example, let’s use K=5.</p><h3>Step 3: Divide Into Folds</h3><p>With K=5, you split your 1,000 rows into 5 equal parts.</p><p>Fold 1 is Rows 1 to 200<br>Fold 2 is Rows 201 to 400<br>Fold 3 is Rows 401 to 600<br>Fold 4 is Rows 601 to 800<br>Fold 5 is Rows 801 to 1,000</p><h3>Step 4: Train and Test Iteratively</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*enFbfS2QEGQtNc7o4y9UuQ.png" /><figcaption>Image generated using nano banana</figcaption></figure><p>Iteration 1. Test on Fold 1, Train on Folds 2, 3, 4, 5. Accuracy is 85%<br>Iteration 2. Test on Fold 2, Train on Folds 1, 3, 4, 5. Accuracy is 91%<br>Iteration 3. Test on Fold 3, Train on Folds 1, 2, 4, 5. Accuracy is 88%<br>Iteration 4. Test on Fold 4, Train on Folds 1, 2, 3, 5. Accuracy is 84%<br>Iteration 5. Test on Fold 5, Train on Folds 1, 2, 3, 4. Accuracy is 92%</p><h3>Step 5: Calculate the Average</h3><p>Final accuracy = (85 + 91 + 88 + 84 + 92) / 5 = 88%</p><p>Now you have a much more robust estimate of your model’s true performance.</p><h3>Critical Pitfalls And How to Avoid Them</h3><p>Even K Fold Cross Validation can betray you if you are not careful. Here are the most common mistakes.</p><h3>1. Time Series Data and Temporal Order</h3><p><strong>The Problem</strong><br> Random shuffling destroys temporal order. You cannot train on tomorrow’s data to predict yesterday’s stock prices. That is cheating.</p><p><strong>The Solution</strong><br> Use Time Series Cross Validation with a rolling window approach to maintain chronological order. Your model should only learn from the past to predict the future.</p><h3>2. Data Scaling and Information Leakage</h3><p><strong>The Problem</strong><br> If you scale your entire dataset before splitting, your training folds gain knowledge of the test set’s distribution. This creates artificially optimistic results.</p><p><strong>The Solution</strong><br> Split first. Calculate scaling parameters like mean and standard deviation ONLY on the training fold. Then apply those same parameters to both train and test folds.</p><h3>3. Class Imbalance and Missing Classes</h3><p><strong>The Problem</strong><br> A Simple random K-fold might create test folds with zero examples of rare classes. Imagine testing a fraud detection model with no fraud cases in one fold.</p><p><strong>The Solution</strong><br> Use Stratified K-fold Cross Validation to ensure each fold maintains the same proportion of target classes as the overall dataset.</p><h3>Wait, So What Happens to All Those Models?</h3><p>Here is something that surprises many beginners. All those models get discarded.</p><p>K-Fold CV is not about producing a final trained model. It is about evaluating your model’s approach. Once you are confident in your validation results, you typically retrain one final model on the entire dataset.</p><h3>Why K-Fold Cross Validation Matters</h3><p>Let me distill this into what actually matters for your machine learning pipeline.</p><p><strong>Reduces Bias</strong><br> Provides a less optimistic, more realistic estimate of model performance</p><p><strong>Efficient Data Use</strong><br> Every single observation gets used for both training and validation</p><p><strong>Robust Evaluation</strong><br> Averaging results gives you a stable performance metric you can trust</p><p><strong>Prevents Overfitting</strong><br> Ensures your model generalizes to truly unseen data</p><h3>The Bottom Line</h3><p>Here is the sentence that changed how I think about model validation.</p><p>K-Fold Cross Validation does not help you understand how accurate your model is. It makes you confident in the accuracy of your model.</p><p>In an era where AI models are making increasingly critical decisions from medical diagnoses to loan approvals to content recommendations, we cannot afford to deploy models validated on luck.</p><p>The train-test split is fast. K-Fold Cross Validation is reliable.</p><p><strong><em>And in production, reliability beats speed every single time.</em></strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4ad3df853b6e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Unravelling the Wonders of TensorFlow]]></title>
            <link>https://medium.com/@saarib2405/unravelling-the-wonders-of-tensorflow-9064afcb5094?source=rss-8643cc22f074------2</link>
            <guid isPermaLink="false">https://medium.com/p/9064afcb5094</guid>
            <category><![CDATA[tensorflow]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[google]]></category>
            <dc:creator><![CDATA[Syed Saarib Rasheed]]></dc:creator>
            <pubDate>Sat, 02 Mar 2024 15:26:29 GMT</pubDate>
            <atom:updated>2024-03-02T15:32:56.613Z</atom:updated>
            <content:encoded><![CDATA[<p>An Insightful Expedition into the World of TensorFlow</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*lLPNpbF34Jex53W8.png" /></figure><p>Let’s embark on a journey of intricacies of TensorFlow — an indispensable tool in the domain of Machine Learning and Artificial Intelligence.</p><h3>TensorFlow 101: The Basics Unveiled</h3><p>TensorFlow is an open-source platform for Machine Learning and Artificial Intelligence It allows you to build, train, and deploy complex models using data flow graphs and various tools and libraries. Now let’s understand what A data flow graph is. It is a way of representing a computation as a network of nodes and edges. Where Each node performs a mathematical operation on one or more tensors. And Each edge represents the flow of tensors from one node to another. Now what are these tensors. So TensorFlow is named after tensors, which are the central unit of data in the platform. Tensors can have different shapes, sizes, and types, depending on the data they represent. For example, a tensor can be a scalar, a vector, a matrix, or a higher-dimensional array but A tensor can also have a data type, such as int, float, string, or boolean. TensorFlow can run on multiple devices, such as CPUs, GPUs, TPUs, or mobile phones etc. TensorFlow is designed to handle large and complex data sets and models, and to enable fast and efficient computation and experimentation. It is widely used for deep learning, which is a branch of machine learning that uses multiple layers of artificial neural networks to learn from data and perform desired tasks.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/683/1*RLT8XfzPeYx1p1l8X_BYZg@2x.jpeg" /></figure><h3>A Glimpse into TensorFlow’s Journey Through Time</h3><p>TensorFlow was developed by the Google Brain team and was released by Google in November 2015 as an open-source platform for Machine Learning and Artificial Intelligence. TensorFlow 1.0 was officially launched in February 2017, with many new features and improvements. Which was followed by TensorFlow 2.0 which was released in September 2017, with a major focus on ease of use, simplicity, and flexibility. TensorFlow 2.0 also integrated Keras as the core API, and introduced TensorFlow Extended, a platform for end-to-end machine learning pipelines. Since then TensorFlow has been continuously updated and improved, with new versions and features added regularly. Some of the recent additions include TensorFlow Quantum, a library for quantum machine learning, TensorFlow Federated, a framework for federated learning, and TensorFlow Lite, a lightweight library for mobile and embedded devices.</p><h3>Why TensorFlow? The Superhero in the World of AI Challenges</h3><p>Well, the simple answer is that In this era of big data and complex algorithms, the demand for powerful machine-learning frameworks has skyrocketed. And machine learning and artificial intelligence are becoming more and more important in the world. However, Machine Learning and Artificial Intelligence are not easy to implement and deploy. They require a lot of data, computation, and expertise. They also involve many challenges, such as data quality, model architecture, optimization, testing, debugging, and security.</p><p>TensorFlow addresses these challenges by providing a comprehensive and flexible platform that simplifies and accelerates the development and deployment of Machine Learning and AI applications. TensorFlow allows you to use existing models and libraries, or create your own custom models, with a variety of languages and frameworks. It also enables you to run your models on different devices and platforms, with high performance and scalability. While also offering tools and features for data processing, visualization, debugging, monitoring, and security.</p><h3>Where Can TensorFlow Work its Magic? Hint: Almost Everywhere</h3><p>TensorFlow can be implemented in various domains and applications that require machine learning and artificial intelligence. TensorFlow can help you to create and deploy models for tasks such as: Computer vision, NLP, speech processing, recommender systems, generative models etc.</p><ul><li><strong>In Computer vision:</strong> TensorFlow can be used to build models for image recognition, object detection, face recognition, segmentation, and more. TensorFlow can also leverage libraries such as OpenCV and TensorFlow Lite to run computer vision models on lighter devices.</li><li><strong>In Natural language processing:</strong> TensorFlow can be used to build models for natural language understanding, translation, summarization, sentiment analysis, chatbots, and more. TensorFlow can also leverage libraries such as TensorFlow Text and TensorFlow Hub.</li><li><strong>In Speech processing:</strong> TensorFlow can be used to build models for speech recognition, speech synthesis, speech enhancement, and more. TensorFlow can also leverage libraries such as TensorFlow Audio and TensorFlow I/O to process and manipulate audio data.</li><li><strong>In Recommender systems:</strong> TensorFlow can be used to build models for personalized recommendations, ranking, search, and more. TensorFlow can also leverage libraries such as TensorFlow Recommenders and TensorFlow Ranking to help in this process.</li><li><strong>In Generative models:</strong> TensorFlow can be used to build models for generating realistic images, text, audio, and video. TensorFlow can also leverage libraries such as TensorFlow Probability and TensorFlow Graphics for these operations.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/683/1*E_sNOeGdv-sLz_d-hUV2wg@2x.jpeg" /></figure><p>These are just some of the examples of where TensorFlow can be implemented. But it can also be used for other domains and applications, such as healthcare, finance, robotics, gaming, and more. TensorFlow is a versatile and powerful platform that can help you to solve various problems and create innovative solutions with Machine Learning and Artificial Intelligence.</p><h3>Who’s the Star of the TensorFlow Show? You!</h3><p>TensorFlow can be used by anyone who is interested in Machine Learning and Artificial Intelligence. TensorFlow is user-friendly platform with multiple APIs and libraries for different use cases and skill levels. TensorFlow also supports multiple languages and frameworks, such as Python, C++, Java, Swift, R, and Julia. TensorFlow can be used mainly by Researchers, Data Scientists, Machine Learning Engineers and Programmers. TensorFlow is a platform that can cater to the needs and preferences of different users, and enable them to collaborate and learn from each other. It is not only a tool, but also a community of passionate and enthusiastic people who are working together to advance the field of Machine Learning and Artificial Intelligence.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9064afcb5094" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Overview of Web 3.0]]></title>
            <link>https://medium.com/@saarib2405/overview-of-web-3-0-7b0abd1fa053?source=rss-8643cc22f074------2</link>
            <guid isPermaLink="false">https://medium.com/p/7b0abd1fa053</guid>
            <category><![CDATA[web]]></category>
            <dc:creator><![CDATA[Syed Saarib Rasheed]]></dc:creator>
            <pubDate>Sun, 03 Apr 2022 08:36:27 GMT</pubDate>
            <atom:updated>2024-03-02T15:39:59.507Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/323/1*Z3MPKrIhp2pWtTVnoSOwQA.jpeg" /></figure><h3><strong>INTRODUCTION</strong></h3><p>With the introduction of Web 1.0 to the world, the internet could operate as an online newspaper. People used to read the information available on the internet and move on with their lives with no scope for any form of interaction among people.<br>Then came Web 2.0, which everyone is using, and it enabled us with social media and gave us the ability to interact with other people,<br>Now comes Web 3.0.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/305/1*602QQjM_BPptY0zEGDQqWQ.jpeg" /></figure><h3><strong>WHY DO WE NEED WEB 3.0?</strong></h3><p>The reason we need Web 3.0 is because of the monopoly of some tech giants that are ruling the Internet like Google, which accounts for nearly 87% of the global search market, and Facebook, known as Meta now, has reportedly reached out to 3.6 billion people in recent times but, the question that needs an answer is who gave the right to these giants to control the internet?. It’s known that Google and Facebook(Meta) have their user’s data, which they use for personalized advertising, but the biggest concern is the privacy breach. When Apple introduced Ask App Not to Track feature in IOS 14.5, Facebook estimated a loss of 10 billion dollars in revenue in 2022, making it quite clear how these giants rely heavily on users’ data. <br>Web 3.0 enables Internet users to have their independence and their powers</p><h3><strong>WHAT IS WEB 3.0?</strong></h3><p>Web 3.0 consists of three major parts(D.O.B).<br>1. Decentralization.<br>2. Open source.<br>3. Blockchain.</p><p><strong>Let’s talk about Decentralization:</strong><br>Decentralization, in simple words, is to distribute the power held by tech giants like Google and Facebook unbiasedly among Internet users.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/390/1*O3BeNRgy1_Ri099L8muk8Q.jpeg" /></figure><p><strong>Next comes Open Source:</strong><br>It proposed to make Web 3.0 an open-source platform where anyone can come and modify it according to their requirements and needs, just like how Android is.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/281/1*JsV5OsMho2bodIcBio5dnw.jpeg" /></figure><p><strong>At last, comes the Blockchain:</strong><br>It’s a very secure technology used to store data securely, and as its name suggests, data is stored in different blocks and will be in the form of a chain, and it is difficult to hack it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/342/1*fCTBW9pCqu2cGIOeY8Nmpw.jpeg" /></figure><h3><strong>FROM WHERE DID WEB 3.0 COME?</strong></h3><p>It came from the co-founder of the cryptocurrency Ethereum, Gavin Wood, who introduced Web 3.0 to give a different experience. He quotes, “Web 3.0 is really about allowing people to come together and coordinate their efforts for something greater”.</p><h3><strong>WHAT ARE THE PROS OF WEB 3.0?</strong></h3><ul><li><strong>The first one is Anonymous single sign-on:</strong><br> It is a scheme that enables users to sign into multiple services anonymously by using just one credential.</li><li><strong>The second one Self Governing:</strong><br> It means the users will be able to create their own decisions and rules on any website.</li><li><strong>The third one is Better Search:</strong><br>It means all the searches will be natural, and no Search Engine Optimization (S.E.O) will be there.</li><li><strong>The Fourth one is the Personalized browsing experience:</strong><br> It will tune the browsing experience according to users’ preferences and perspectives.</li><li><strong>And the last one is Uninterrupted services:</strong> As witnessed at times, services like Facebook and WhatsApp get shut down, resulting in huge losses. To solve this, Web 3.0 comes in as it is based on blockchain and is decentralized.</li></ul><h3><strong>WHAT ARE THE SHORTCOMINGS OF WEB 3.0?</strong></h3><ol><li><strong>The first one is Ownership Concerns:</strong><br>According to the former CEO of Twitter, Jack Dorsey, a website cannot have multiple owners or cannot be decentralized. It rolls onto a second point</li><li><strong>The second one is Regulation Issues:</strong><br>According to many experts, when the internet gets decentralized, it will prove to be a hassle to maintain regulations and manage cybercrimes, and censorship will become a huge concern too.</li><li><strong>The third one is Old Hardware will be Obsolete:</strong><br>As Web 3.0 is feature-loaded, it will demand many resources forcing users to upgrade their devices, and will also cause a lot of E-waste.</li><li><strong>The fourth one is Forced Upgrades:</strong><br>All the current businesses will either have to upgrade themselves or would have run out of business, affecting the economy.</li><li><strong>The fifth one is Easier Access to Data:</strong><br>As the data is decentralized, it becomes easy to access and may result in a privacy breach.</li></ol><h3><strong>CONCLUSION</strong></h3><p>Web 3.0, for now, is just a theory with people supporting and criticizing it.<br>To take a sneak peek at the Web 3.0 application of cryptocurrency and NFTs are the best live examples.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7b0abd1fa053" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>