<?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 Shashwat Tiwari on Medium]]></title>
        <description><![CDATA[Stories by Shashwat Tiwari on Medium]]></description>
        <link>https://medium.com/@datasciencehub?source=rss-cbffda0fff2d------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*eKW96c9MuRYvJy0C97lmzg.jpeg</url>
            <title>Stories by Shashwat Tiwari on Medium</title>
            <link>https://medium.com/@datasciencehub?source=rss-cbffda0fff2d------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 22:06:35 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@datasciencehub/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[I Replaced Cursor with a Local AI Coding Setup. Here’s What Actually Happened]]></title>
            <link>https://datasciencehub.medium.com/i-replaced-cursor-with-a-local-ai-coding-setup-heres-what-actually-happened-4dde7eaefa01?source=rss-cbffda0fff2d------2</link>
            <guid isPermaLink="false">https://medium.com/p/4dde7eaefa01</guid>
            <category><![CDATA[cursor]]></category>
            <category><![CDATA[cline]]></category>
            <category><![CDATA[ai-coding-assistant]]></category>
            <category><![CDATA[generative-ai-tools]]></category>
            <category><![CDATA[ai-code-generation]]></category>
            <dc:creator><![CDATA[Shashwat Tiwari]]></dc:creator>
            <pubDate>Sat, 24 Oct 2026 13:07:37 GMT</pubDate>
            <atom:updated>2026-10-24T13:07:37.371Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*00NwD1It2vAr2Gt9" /><figcaption>Photo by <a href="https://unsplash.com/@almoya?utm_source=medium&amp;utm_medium=referral">Aerps.com</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><blockquote><em>What I learned after moving from a subscription-based AI editor to Visual Studio Code, Cline, Ollama, and locally hosted coding models.</em></blockquote><p>AI coding tools have quietly become another monthly engineering expense.</p><p>At first, the subscription feels easy to justify. The assistant completes repetitive code, explains unfamiliar modules, and occasionally saves an afternoon of debugging. But after using Cursor regularly, I started questioning whether I needed an entirely separate editor and a recurring subscription just to access those capabilities.</p><p>I was also becoming uncomfortable with how dependent my development workflow had become on a reliable internet connection. If the connection was slow, the assistant was slow. If the service was unavailable, the AI part of the editor effectively disappeared.</p><p>So, instead of renewing automatically, I tried something different: Cline inside Visual Studio Code, connected to a model running locally through Ollama.</p><p>The result was not a perfect replacement for Cursor. It was slower, required more configuration, and exposed some uncomfortable truths about running language models on consumer hardware.</p><p>But it also gave me something I had not realized I was missing: control.</p><h4>Why I Started Looking Beyond Cursor</h4><p>Cursor is a polished product. That is probably its biggest advantage.</p><p>It feels familiar because it is built around the Visual Studio Code experience, and most features work with little configuration. Chat, multi-file editing, code generation, and context-aware assistance are integrated into a single interface.</p><p>My frustration was not with the quality of the editor. It was with the shape of the dependency.</p><p>I had three concerns.</p><h4>1. The Cost Was Becoming Harder to Evaluate</h4><p>A fixed subscription is easy to understand when usage is predictable. AI-assisted development, however, is rarely predictable.</p><p>One week I might use the assistant for a few small refactors. The next week I might ask it to inspect an unfamiliar codebase, trace an API flow, update tests, and modify several files.</p><p>The more I used agent-style features, the more conscious I became of request limits and model usage. Once you start thinking about whether a prompt is “worth” sending, the tool is adding friction instead of removing it.</p><h4>2. My Development Environment Depended on the Cloud</h4><p>Most cloud-based coding assistants become dramatically less useful without an internet connection.</p><p>That limitation matters in more situations than expected:</p><ul><li>Working during a flight</li><li>Developing behind a restricted corporate network</li><li>Dealing with unstable hotel or cafe Wi-Fi</li><li>Accessing repositories that should not leave a controlled environment</li><li>Continuing work during an external service outage</li></ul><p>I did not need every coding task to work offline. But I wanted basic repository analysis, boilerplate generation, documentation, and routine refactoring to remain available.</p><h4>3. I Wanted to Keep My Existing Editor</h4><p>Over time, a developer’s editor becomes more than an application. It becomes a collection of extensions, shortcuts, themes, settings, scripts, and small habits.</p><p>I had already configured Visual Studio Code around my workflow. Moving to a separate editor meant maintaining another environment and accepting differences in extension behavior or update timing.</p><p>What I really wanted was simpler:</p><blockquote><em>Keep Visual Studio Code, add an AI coding agent, and choose where the model runs.</em></blockquote><p>That led me to Cline.</p><h4>The Local Setup</h4><p>The architecture is straightforward once the components are separated.</p><p><a href="https://github.com/cline/cline">Cline</a> is the coding agent. It runs as a Visual Studio Code extension and manages the workflow around the model. It can inspect files, propose changes, create new files, and execute terminal commands after receiving permission.</p><p>Ollama is the local model runtime. It downloads and serves a language model on the machine.</p><p>The coding model performs the actual inference.</p><p>Conceptually, the request flow looks like this:</p><pre>Visual Studio Code<br>       |<br>     Cline<br>       |<br>     Ollama<br>       |<br>Local coding model</pre><p>The important distinction is that Cline is not the model. It is the agent that gives the model access to the development environment.</p><p>That separation makes the setup flexible. A local model can be used for private or offline work, while a cloud model can still be configured for tasks that require stronger reasoning.</p><h4>Getting It Running</h4><p>The first step was installing Ollama and downloading a coding-capable model.</p><p>A typical Ollama workflow looks like this:</p><pre>ollama pull &lt;model-name&gt;<br>ollama run &lt;model-name&gt;</pre><p>Once the model is available, Ollama exposes a local endpoint, normally:</p><pre>http://localhost:11434</pre><p>Inside Cline, I selected Ollama as the model provider, entered the local endpoint, and chose the installed model.</p><p>That was enough to establish the connection.</p><p>The first test was deliberately small. I opened a side project and asked the agent to:</p><ol><li>Explain the repository structure.</li><li>Identify the application entry point.</li><li>Trace a request from the API route to the service layer.</li><li>Suggest a small refactoring without modifying any files.</li></ol><p>This immediately revealed the biggest difference between using an online frontier model and a local one.</p><p>The local model could understand the task, but it needed tighter instructions.</p><p>Large, vague prompts produced inconsistent results. Focused prompts worked considerably better.</p><p>For example, this was too broad:</p><pre>Review this project and improve the architecture.</pre><p>This produced a more useful response:</p><pre>Review the files under src/api and src/services.<br> <br>Identify:<br>1. Routes containing business logic.<br>2. Duplicated validation logic.<br>3. Functions with more than one responsibility.<br> <br>Do not edit any files. Return a proposed refactoring plan with the<br>affected file paths.</pre><p>The lesson was simple: smaller models benefit from narrower scopes and explicit output requirements.</p><h4>What Worked Better Than Expected</h4><p>I initially expected the offline setup to be useful only for autocomplete-level tasks. It was more capable than that.</p><h4>Repository Exploration</h4><p>Cline could inspect selected files and explain how different modules interacted. For unfamiliar services, this was a faster starting point than manually following imports across the project.</p><p>It was particularly useful for questions such as:</p><ul><li>Where is this object created?</li><li>Which module calls this function?</li><li>Where is this environment variable used?</li><li>Which API route eventually reaches this database query?</li><li>What needs to change if this interface is extended?</li></ul><p>The answers were not always complete, but they were usually good enough to point me toward the right files.</p><h4>Repetitive Implementation Work</h4><p>Local models handled repetitive, pattern-based changes reasonably well.</p><p>Examples included:</p><ul><li>Adding similar validation to multiple endpoints</li><li>Creating data-transfer objects</li><li>Generating test skeletons</li><li>Updating configuration examples</li><li>Converting repeated logic into helper functions</li><li>Writing docstrings and comments</li><li>Producing basic SQL queries</li><li>Creating command-line wrappers around existing functions</li></ul><p>These tasks tend to have a clear local pattern. Once the agent sees two or three examples from the repository, it can usually reproduce the structure.</p><h4>Private Code Stayed on the Machine</h4><p>For me, this was the most meaningful benefit.</p><p>When the model, runtime, extension, and source code are all local, repository content does not need to be sent to an external inference API.</p><p>That does not automatically make the environment secure. Extensions, telemetry settings, dependencies, terminal permissions, and Model Context Protocol servers still need to be evaluated.</p><p>However, local inference removes one major data path from the architecture.</p><p>For proprietary repositories or experimental work involving sensitive data, that can be more valuable than raw model quality.</p><h4>Offline Development Was Genuinely Possible</h4><p>After downloading the required model and dependencies, I could disconnect from the network and continue using the coding agent.</p><p>There were obvious boundaries. Package installation, online documentation, remote APIs, and Git operations still required connectivity. But code explanation, generation, editing, and local command execution continued to work.</p><p>The experience felt less like using a cloud service and more like having another development tool installed on the machine.</p><h4>Where the Local Setup Struggled</h4><p>Running an AI coding agent locally involves real compromises.</p><h4>Hardware Matters</h4><p>Local inference is demanding.</p><p>A model that technically runs on a machine may still be too slow for an interactive coding workflow. Memory capacity, memory bandwidth, model size, quantization, and context length all affect the experience.</p><p>Smaller models respond faster but make more reasoning mistakes. Larger models understand complex tasks better but may respond too slowly or exceed the available memory.</p><p>There is no universally correct model. The practical choice depends on the hardware and the type of work being performed.</p><h4>Large Context Windows Are Expensive</h4><p>Coding agents send more than the user’s prompt to the model. They may include system instructions, file contents, repository structure, previous messages, terminal output, and tool results.</p><p>As the task continues, the context grows.</p><p>With a local model, that can cause:</p><ul><li>Slower responses</li><li>Increased memory usage</li><li>Repeated or contradictory answers</li><li>Lost details from earlier instructions</li><li>Context overflow errors</li></ul><p>The most reliable approach was to keep tasks short and start a new session when moving to a different problem.</p><h4>Multi-File Reasoning Was Inconsistent</h4><p>A local model could update several related files when the pattern was obvious. It struggled more with architectural changes that required understanding indirect dependencies across the repository.</p><p>For example, renaming an API field across a schema, service layer, persistence model, event payload, tests, and frontend client was possible, but risky.</p><p>On tasks like this, I used a two-stage workflow:</p><ol><li>Ask the model to produce an impact analysis.</li><li>Review the affected files before allowing changes.</li></ol><p>Even then, I treated the output as a first draft rather than a completed implementation.</p><h4>It Did Not Reproduce Cursor’s Entire Experience</h4><p>Cline is primarily an agent. It is not a drop-in clone of every Cursor feature.</p><p>Cursor’s inline completion and integrated interface feel more immediate. The local Cline setup feels deliberate: describe a task, allow the agent to inspect files, review its plan, approve actions, and inspect the result.</p><p>That workflow works well for structured changes, but it is not always the fastest option when writing code line by line.</p><h4>Cursor vs. Local Cline Setup: A Practical Performance Comparison</h4><p>After using both setups on similar development tasks, the difference was less about which tool was universally better and more about where each one performed best.</p><p>The comparison below reflects practical day-to-day use rather than controlled benchmarking. Local performance will vary significantly depending on the selected model, available RAM or VRAM, context size, and repository complexity.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hmnDYog727waecFlVF7drA.png" /><figcaption>Performance comparison between Cursor using a cloud model and Cline using Ollama with a local model.</figcaption></figure><h4>What the Comparison Revealed</h4><p>For quick completions, broad repository analysis, and complicated multi-file reasoning, Cursor was usually faster and required fewer corrections.</p><p>The local setup performed best when the task had clear boundaries. Asking it to update one service, generate tests for a specific module, or explain a handful of related files usually produced useful results. Asking it to “review the entire application” was far less reliable.</p><p>The biggest performance improvement did not come from repeatedly changing models. It came from changing how I structured tasks:</p><ul><li>Limit the number of files included in each request.</li><li>Separate planning from implementation.</li><li>Start a new session when the context becomes too large.</li><li>Ask for an impact analysis before approving multi-file changes.</li><li>Use a smaller model for routine work and a stronger model for complex reasoning.</li><li>Review generated changes with the same care as a human-written pull request.</li></ul><p>In other words, local models rewarded disciplined prompting. They worked best when the task resembled a well-defined engineering ticket rather than an open-ended request.</p><h4>The Approval Model Is a Feature, Not an Annoyance</h4><p>One aspect I initially found tedious was the repeated approval process.</p><p>The agent asks before reading certain files, modifying code, or running terminal commands. It can make the interaction feel slower than a standard chat window.</p><p>After using it on real projects, I started appreciating the interruption.</p><p>An agent with terminal and filesystem access is effectively being given access to the development environment. A wrong command can delete files, reveal secrets, modify configuration, or introduce changes outside the intended scope.</p><p>I now treat agent permissions the same way I treat pull requests:</p><ul><li>Inspect the proposed action.</li><li>Understand the affected scope.</li><li>Reject commands that are unnecessarily broad.</li><li>Review the final diff.</li><li>Run tests independently.</li></ul><p>The purpose of an AI coding agent is to accelerate engineering work, not to remove engineering accountability.</p><h4>My Current Workflow Is Hybrid</h4><p>I did not completely abandon cloud models.</p><p>Instead, I divided tasks according to sensitivity, complexity, and cost.</p><p>I use a local model for:</p><ul><li>Repository exploration</li><li>Routine refactoring</li><li>Boilerplate</li><li>Test scaffolding</li><li>Documentation</li><li>Simple debugging</li><li>Private code</li><li>Offline development</li></ul><p>I use a cloud model for:</p><ul><li>Complex architectural reasoning</li><li>Large cross-repository changes</li><li>Difficult concurrency bugs</li><li>Unfamiliar frameworks</li><li>Long-context analysis</li><li>Tasks where speed matters more than privacy</li></ul><p>This hybrid setup has been more practical than trying to force one model to handle every situation.</p><p>The local model is the default. The cloud model is an escalation path.</p><p>That distinction also changes how I think about cost. Instead of paying for continuous access regardless of usage, I can reserve paid inference for problems where additional capability provides measurable value.</p><h4>Practical Advice Before Switching</h4><p>If you are considering a similar setup, do not cancel an existing subscription immediately.</p><p>Install the local stack and use it alongside your current tool for a week.</p><p>Test it against your actual work:</p><ul><li>A bug you already understand</li><li>A small feature</li><li>A multi-file refactor</li><li>A test-generation task</li><li>An unfamiliar repository</li><li>A session without internet access</li></ul><p>Pay attention to more than response quality.</p><p>Measure how often you need to correct the model, how much time you spend managing context, whether the machine remains usable during inference, and whether local execution meaningfully improves your privacy or workflow.</p><p>A free tool is not cheaper if it consumes more engineering time than it saves.</p><h4>Final Thoughts</h4><p>Replacing Cursor was not simply a matter of installing an extension and downloading a model.</p><p>It changed the architecture of my coding assistant.</p><p>Instead of using an editor tied to a specific AI service, I now have separate layers: the editor, the agent, the runtime, and the model. Each layer can be changed without replacing the entire workflow.</p><p>The trade-off is additional responsibility. I have to choose models, manage context, understand hardware limitations, and review agent permissions carefully.</p><p>For developers who want the smoothest possible experience, Cursor remains difficult to beat. The product removes configuration and gives users a cohesive environment from the first launch.</p><p>But developers who care about offline access, local inference, model choice, or control over source-code exposure now have a credible alternative.</p><p>The local setup is not as polished. It is not always as capable. And it is definitely not effortless.</p><p><em>If you like this Post, Please follow me. If you have noticed any mistakes in the way of thinking, formulas, animations, or code, please let me know.</em></p><p><em>Cheers!</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4dde7eaefa01" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Rise of Small Language Models]]></title>
            <link>https://medium.com/geekculture/rise-of-small-language-models-72d1340929f9?source=rss-cbffda0fff2d------2</link>
            <guid isPermaLink="false">https://medium.com/p/72d1340929f9</guid>
            <category><![CDATA[generative-ai-use-cases]]></category>
            <category><![CDATA[small-language-model]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[gen-ai-revolution]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <dc:creator><![CDATA[Shashwat Tiwari]]></dc:creator>
            <pubDate>Wed, 25 Dec 2024 11:55:18 GMT</pubDate>
            <atom:updated>2024-12-25T11:55:18.333Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*JvGWPyfxeBxsmhMj" /><figcaption>Photo by <a href="https://unsplash.com/@newmaterial?utm_source=medium&amp;utm_medium=referral">New Material</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><blockquote>In the rapidly evolving field of natural language processing (NLP), large language models (LLMs) like OpenAI’s o1 have garnered significant attention for their impressive capabilities. However, not every application necessitates the immense computational power and size of these models. Enter small language models (SLMs) — compact, efficient, and tailored solutions that deliver high performance without the hefty resource requirements. This blog explores the top 13 small language models that are making a big impact in the NLP landscape.</blockquote><blockquote><strong>The Rise of Small Language Models</strong></blockquote><p>Small language models are designed to strike a balance between capability and efficiency. By optimizing model size and architecture, they offer lightweight solutions ideal for edge devices, resource-constrained environments, or applications requiring faster inference. From powering mobile applications to providing offline NLP functionalities, these models are reshaping the landscape of AI by making advanced language technologies more accessible.</p><blockquote><strong>Versatile Multi-Task Performance (Translation, Summarization, Q&amp;A)</strong></blockquote><ol><li><strong>T5</strong></li></ol><ul><li><strong>Overview</strong>: Developed by Google Research, T5 (Text-To-Text Transfer Transformer) is a versatile model that frames all NLP tasks as text-to-text problems.</li><li><strong>Sizes</strong>: Ranges from T5-Small (60 million parameters) to T5–11B (11 billion parameters).</li><li><strong>Architecture</strong>: Based on the Transformer model, utilizing both encoder and decoder components.</li><li><strong>Availability</strong>: Open-source under the Apache 2.0 license, accessible via TensorFlow and Hugging Face’s Transformers library.</li></ul><p>2. <strong>Qwen-2</strong></p><ul><li><strong>Overview</strong>: Designed for efficient NLP with a focus on computational resource optimization.</li><li><strong>Sizes</strong>: Ranges from 3 billion to 13 billion parameters.</li><li><strong>Architecture</strong>: Advanced Transformer model with multi-head self-attention and feed-forward neural networks.</li><li><strong>Availability</strong>: Open-source with certain advanced features available through a subscription.</li></ul><p>3. <strong>Llama 3.2</strong></p><ul><li><strong>Overview</strong>: Part of the Llama series, designed for high performance with resource efficiency.</li><li><strong>Sizes</strong>: Ranges from 1.3 billion to 13 billion parameters.</li><li><strong>Architecture</strong>: Employs Grouped Query Attention and Rotary Positional Embedding (RoPE).</li><li><strong>Availability</strong>: Open-source with a free tier and extended features through paid licensing.</li></ul><p>4. <strong>Mistral Nemo</strong></p><ul><li><strong>Overview</strong>: Focuses on delivering high-quality language understanding and generation capabilities.</li><li><strong>Sizes</strong>: Ranges from 1.3 billion to 13 billion parameters.</li><li><strong>Architecture</strong>: Transformer-based design with optimized attention mechanisms.</li><li><strong>Availability</strong>: Open-source, providing developers with free access to the model and its codebase.</li></ul><blockquote><strong>Reasoning-Heavy Tasks</strong></blockquote><p><strong>5. Phi-4</strong></p><ul><li><strong>Overview</strong>: Developed by Microsoft Research, designed to excel in reasoning tasks.</li><li><strong>Sizes</strong>: 14 billion parameters.</li><li><strong>Architecture</strong>: Tailored for reasoning with synthetic data generation and post-training refinements.</li><li><strong>Availability</strong>: Proprietary model, details on access not disclosed.</li></ul><blockquote><strong>Text Generation</strong></blockquote><p><strong>6. DistilGPT-2</strong></p><ul><li><strong>Overview</strong>: A smaller, efficient version of OpenAI’s GPT-2.</li><li><strong>Sizes</strong>: Approximately 82 million parameters.</li><li><strong>Architecture</strong>: Similar to GPT-2 but with fewer layers, utilizing knowledge distillation.</li><li><strong>Availability</strong>: Open-source via the Hugging Face model repository.</li></ul><p><strong>7.SmolLM</strong></p><ul><li><strong>Overview</strong>: Lightweight model designed for efficient NLP with a reduced computational footprint.</li><li><strong>Sizes</strong>: Ranges from 10 million to 300 million parameters.</li><li><strong>Architecture</strong>: Transformer-based with advanced pruning and quantization techniques.</li><li><strong>Availability</strong>: Open-source with a free tier and extended features through a subscription plan.</li></ul><blockquote><strong>General NLU (Text Classification, Sentiment Analysis, Named Entity Recognition)</strong></blockquote><p><strong>8. MiniLM</strong></p><ul><li><strong>Overview</strong>: Developed by Microsoft, designed for high performance with fewer computational resources.</li><li><strong>Sizes</strong>: Ranges from 22 million to 384 million parameters.</li><li><strong>Architecture</strong>: Transformer-based with knowledge distillation techniques.</li><li><strong>Availability</strong>: Open-source via Hugging Face Transformers and GitHub.</li></ul><p><strong>9. MobileBERT</strong></p><ul><li><strong>Overview</strong>: Lightweight adaptation of BERT for resource-constrained devices.</li><li><strong>Sizes</strong>: Approximately 25 million parameters.</li><li><strong>Architecture</strong>: Bottleneck structure with inverted bottleneck layers and a quadruple feed-forward network.</li><li><strong>Availability</strong>: Open-source and freely available for use.</li></ul><p><strong>10. Microsoft Phi 3.5 Mini</strong></p><ul><li><strong>Overview</strong>: Compact version of the Phi language model series.</li><li><strong>Sizes</strong>: Ranges from 1.3 billion to 3 billion parameters.</li><li><strong>Architecture</strong>: Transformer framework with advanced attention mechanisms.</li><li><strong>Availability</strong>: Proprietary model with a free tier for limited usage.</li></ul><p><strong>11. Gemma 2</strong></p><ul><li><strong>Overview</strong>: Designed for efficient natural language understanding and generation tasks.</li><li><strong>Sizes</strong>: Ranges from 125 million to 1.2 billion parameters.</li><li><strong>Architecture</strong>: Transformer-based with dynamic attention heads and layer normalization enhancements.</li><li><strong>Availability</strong>: Open-source with a permissive license and a free tier for experimentation.</li></ul><p><strong>12. TinyBERT</strong></p><ul><li><strong>Overview</strong>: Distilled version of BERT for resource-constrained environments.</li><li><strong>Sizes</strong>: Ranges from 14 million to 66 million parameters.</li><li><strong>Architecture</strong>: Transformer-based with knowledge distillation techniques.</li><li><strong>Availability</strong>: Open-source under the Apache License 2.0.</li></ul><p><strong>13. DistilBERT</strong></p><ul><li><strong>Overview</strong>: Smaller, faster version of BERT developed by Hugging Face.</li><li><strong>Sizes</strong>: Approximately 66 million parameters.</li><li><strong>Architecture</strong>: Transformer-based with six layers and knowledge distillation.</li><li><strong>Availability</strong>: Open-source via Hugging Face’s Transformers library.</li></ul><blockquote><strong>Conclusion</strong></blockquote><p>Small language models are making significant strides in transforming the field of NLP by offering a balance between performance, efficiency, and accessibility. Unlike their larger counterparts, these models are designed to operate in resource-constrained environments, making them ideal for mobile applications, edge devices, and scenarios requiring real-time responses. By leveraging advancements in model compression, knowledge distillation, and optimized architectures, small models prove that compactness does not necessarily mean a compromise in quality.</p><p>The versatility of small language models is evident in their applications, from powering chatbots and summarization tools to enabling offline NLP capabilities. Open-source models like T5, Qwen-2, and Mistral Nemo drive innovation by making advanced technology accessible to more people. Proprietary models like Microsoft Phi 3.5 Mini show how tailored solutions meet specific enterprise needs.</p><p>As the demand for AI continues to rise across sectors, small language models will remain crucial for scaling NLP technologies efficiently and inclusively. These models prove that smaller, optimized architectures can achieve impressive results, bringing AI to new domains and users.</p><p><em>If you like this Post, Please follow me. If you have noticed any mistakes in the way of thinking, formulas, animations, or code, please let me know.</em></p><p><em>Cheers!</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=72d1340929f9" width="1" height="1" alt=""><hr><p><a href="https://medium.com/geekculture/rise-of-small-language-models-72d1340929f9">Rise of Small Language Models</a> was originally published in <a href="https://medium.com/geekculture">Geek Culture</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Unraveling the Mystery of RAG: A Beginner’s Guide to Retrieval-Augmented Generation Systems]]></title>
            <link>https://medium.com/analytics-vidhya/unraveling-the-mystery-of-rag-a-beginners-guide-to-retrieval-augmented-generation-systems-d5506ee26baf?source=rss-cbffda0fff2d------2</link>
            <guid isPermaLink="false">https://medium.com/p/d5506ee26baf</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[retrieval-augmented-gen]]></category>
            <category><![CDATA[genrative-ai]]></category>
            <category><![CDATA[generative-ai-tools]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <dc:creator><![CDATA[Shashwat Tiwari]]></dc:creator>
            <pubDate>Wed, 27 Nov 2024 10:32:13 GMT</pubDate>
            <atom:updated>2024-11-27T10:32:13.427Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*GSrU6kKj-_54gyns" /><figcaption>Photo by <a href="https://unsplash.com/@harlynkingm?utm_source=medium&amp;utm_medium=referral">Max Harlynking</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Artificial Intelligence (AI) is rapidly evolving, and one of the most exciting advancements in this field is the development of Retrieval-Augmented Generation (RAG) systems. These systems are designed to improve the efficiency and accuracy of information retrieval and response generation in AI models.</p><p>For beginners and tech enthusiasts alike, understanding the different types of RAG can be both intriguing and essential. Let’s dive into the world of RAG and explore its various types.</p><h3>1. Standard RAG</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*1afqY2blU-FzziI6u96WoA.png" /></figure><p>The Standard RAG is the foundational model that integrates large language models with retrieval mechanisms. It’s designed for quick response times, making it suitable for real-time applications. By consulting external data sources, it significantly improves the quality of responses.</p><h3>2. Corrective RAG</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*dipMrT5OW9Gsq9QzekkAqA.png" /></figure><p>This type of RAG specializes in correcting errors in generated responses. It implements multiple iterative passes and utilizes user feedback to refine the correction process, with a strong focus on user satisfaction.</p><h3>3. Speculative RAG</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*FOhCSOjdS6RnaL6sGjPd9A.png" /></figure><p>The Speculative RAG operates by drafting responses with a small specialist model and then validating them with a larger generalist model. This approach promotes speed through parallel drafting and efficient processing.</p><h3>4. Fusion RAG</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*K0TcU7Vu7_N0MXzdMwu7dw.png" /></figure><p>Fusion RAG combines multiple retrieval methods to source comprehensive and resilient responses. It’s capable of adapting dynamically to the query context, providing a robust solution for complex inquiries.</p><h3>5. Agentic RAG</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*pd338pBIz5h2RQ3hmCpyOQ.png" /></figure><p>Agentic RAG applies adaptive strategies in real-time for information retrieval. It interprets user intent to provide relevant responses and supports a modular design for the integration of new data sources.</p><h3>6. Self RAG</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*fw6HxH1zxJxTKxXVI8sBkA.png" /></figure><p>Self RAG uses the model’s own generated outputs as retrieval candidates. It refines responses iteratively for consistency and relevance to the evolving context.</p><h3>7. Adaptive RAG</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*nAG9kPUOyyDIU_IiOT0kXQ.png" /></figure><p>Adaptive RAG chooses when to retrieve information, balancing internal and external knowledge. It utilizes confidence scores to avoid unnecessary retrievals, optimizing the response process.</p><h3>8. REFEED Retrieval Feedback</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*D9adFoLhmBEQYRCB5eGQlw.png" /></figure><p>REFEED refines outputs by retrieving relevant documents without model fine-tuning. It improves initial answers and uses a ranking system to ensure answer reliability.</p><h3>9. REALM</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*uRAT7SYDFbSr-IDrXPIRhw.png" /></figure><p>REALM retrieves documents from vast databases like Wikipedia to inform model predictions. It outperforms comparable models by incorporating external knowledge.</p><h3>10. RAPTOR</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*JyS7l5ZhjDzha-tWRTFk_Q.png" /></figure><p>RAPTOR employs a hierarchical tree framework for sorting information, enabling intelligent retrieval of information at various levels of abstraction.</p><h3>11. REVEAL</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*uqd2tq0xuzd-GXOHHn7HYg.png" /></figure><p>REVEAL integrates external knowledge and task-specific actions for improved decision-making in visual-language models. It strives for efficient and adaptable responses.</p><h3>12. REACT</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*ZN-9E9dO3-DTemGn8u-Dkw.png" /></figure><p>REACT focuses on the interaction of models with their environment. It maintains context awareness and generates logical decisions, thereby enhancing reliability.</p><h3>13. REPLUG</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/799/1*9FfXxmVym1RWcJFKxH-ivg.png" /></figure><p>REPLUG is a retrieval plugin that enhances language models by incorporating relevant surrounding information into the model’s prediction process.</p><h3>14. MEMO RAG</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*kMOHsUdAwuwU0yWptZ5dbw.png" /></figure><p>MEMO RAG merges memory and retrieval strategies to handle complex inquiries and manage large data volumes. A memory model assists in drafting guided answers.</p><h3>15. Attention-based RAG (ATLAS)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*CzvIOCR47emY0zRJ3hPMWg.png" /></figure><p>ATLAS improves question-answering by retrieving external documents and efficiently integrating query and document information.</p><h3>16. RETRO</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*x_FWl1mdda2MiiBmoFC2gQ.png" /></figure><p>RETRO enriches responses by splitting input text into chunks and summoning relevant external information. It efficiently broadens the model’s contextual understanding.</p><h3>17. AUTO RAG</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*fgqXrlwbl8AntZaI6alX0g.png" /></figure><p>AUTO RAG automates the optimization process of RAG systems by testing different configurations and employing a greedy optimization approach.</p><h3>18. CORAG</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*Z0gdo2J01_C6Eu0jbN37LQ.png" /></figure><p>CORAG optimizes chunk selection within databases while adhering to cost constraints. It uses Monte Carlo Tree Search (MCTS) to choose the optimal chunk combination.</p><h3>19. EACO-RAG</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/799/1*e7DA8PfgPJZn6bPDQdHwzQ.png" /></figure><p>EACO-RAG utilizes edge computing to distribute vector datasets across nodes. It reduces delays, resource use, and optimizes cost, accuracy, and delay with adaptive knowledge updates.</p><h3>20. RULE RAG</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*OdTkLCIURANHT6IoEbKHtg.png" /></figure><p>RULE RAG incorporates rules to guide both document retrieval and answer generation. This aligns responses closely to the query context.</p><h3>21. Conversational RAG (CORAL)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*65jJeWVri8FpN2JNFgvUWw.png" /></figure><p>CORAL benchmarks conversational RAG capabilities using Wikipedia data and supports multi-turn dialogues.</p><h3>22. Iterative RAG</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*NQm_0SgjVth5HV7lfL0B7g.png" /></figure><p>Iterative RAG enhances retrieval performance through an iterative process using reinforcement learning. It refines searches based on previous iterations.</p><h3>23. Context-driven Tree-structured Retrieval (ConTReGen)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/684/1*Vh6pxy2IyAS6TJzeEK5ggQ.png" /></figure><p>ConTReGen decomposes complex queries into sub-queries to produce detailed responses through a hierarchical structure.</p><h3>24. CRAT</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/553/1*kkDgdx_rdN_F-kXxnnwvVw.png" /></figure><p>CRAT is a multi-agent framework that focuses on translation accuracy by assessing and addressing ambiguity using knowledge graphs and causality validation.</p><h3>25. Graph RAG</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/749/1*y_qV0mYAwNweuDr_-DJvoQ.png" /></figure><p>Graph RAG constructs a knowledge graph in real-time during retrieval. It uses node relationships and confidence scores to maintain relevance and improve response accuracy.</p><p><em>Each of these RAG types offers unique advantages and caters to different aspects of AI-driven information retrieval and response generation. As AI continues to advance, the role of RAG systems will become increasingly significant, offering more nuanced and accurate interactions between humans and machines. Whether you’re a beginner or a seasoned tech enthusiast, understanding these RAG types is a step towards appreciating the complexities and capabilities of modern AI systems.</em></p><p><strong>References</strong></p><ul><li><a href="https://medium.com/the-hack-weekly-ai-tech-community/understanding-different-rag-techniques-0186ea5b9a13">Understanding-different-rag-techniques</a></li></ul><p><em>If you like this Post, Please follow me. If you have noticed any mistakes in the way of thinking, formulas, animations, or code, please let me know.</em></p><p><em>Cheers!</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d5506ee26baf" width="1" height="1" alt=""><hr><p><a href="https://medium.com/analytics-vidhya/unraveling-the-mystery-of-rag-a-beginners-guide-to-retrieval-augmented-generation-systems-d5506ee26baf">Unraveling the Mystery of RAG: A Beginner’s Guide to Retrieval-Augmented Generation Systems</a> was originally published in <a href="https://medium.com/analytics-vidhya">Analytics Vidhya</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[An A-to-Z Guide to Retrieval-Augmented Generation (RAG) Concepts]]></title>
            <link>https://datasciencehub.medium.com/an-a-to-z-guide-to-retrieval-augmented-generation-rag-concepts-2c1ae933ba17?source=rss-cbffda0fff2d------2</link>
            <guid isPermaLink="false">https://medium.com/p/2c1ae933ba17</guid>
            <category><![CDATA[retrieval-augmented-gen]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[generative-ai-use-cases]]></category>
            <category><![CDATA[generative-ai-tools]]></category>
            <dc:creator><![CDATA[Shashwat Tiwari]]></dc:creator>
            <pubDate>Tue, 26 Nov 2024 16:32:06 GMT</pubDate>
            <atom:updated>2024-11-26T16:32:06.263Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ISRswG__5dMCQSKU" /><figcaption>Photo by <a href="https://unsplash.com/@googledeepmind?utm_source=medium&amp;utm_medium=referral">Google DeepMind</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>As we delve into the world of artificial intelligence, one term that is gaining traction is Retrieval-Augmented Generation (RAG). This concept is revolutionizing the way AI systems interact with information, providing a more intuitive and accurate approach to generating responses. Let’s embark on an alphabetical journey through the key concepts that make RAG a standout in the AI landscape.</p><blockquote><strong>A is for Augmented</strong>:</blockquote><p>AI models are now being augmented with external data, which enhances their ability to generate factually accurate information. This is particularly important in preventing the generation of irrelevant or fabricated content, a phenomenon known as hallucination.</p><blockquote><strong>B is for BM25</strong>:</blockquote><p>This traditional algorithm plays a crucial role in determining the relevance of documents to search queries. It uses a mathematical formula that takes into account the frequency of terms, making it a staple for keyword-based retrieval tasks.</p><blockquote><strong>C is for Consistency:</strong></blockquote><p>Ensuring that AI-generated information is consistent with retrieved data is known as grounding. This is essential in fields like medical AI and legal tech, where accuracy is of utmost importance.</p><blockquote><strong>D is for Dense Retrieval</strong>:</blockquote><p>Unlike sparse retrieval that relies on keywords, dense retrieval uses numerical vectors to understand the context better, making it a vital component of RAG systems.</p><blockquote><strong>E is for Embeddings</strong>:</blockquote><p>These are numerical representations of text that allow for dense retrieval and semantic searches, enhancing the recommendation systems and RAG applications.</p><blockquote><strong>F is for Fine-tuning:</strong></blockquote><p>To optimize pre-trained models for specific tasks, fine-tuning is employed. This process requires tailored data to improve performance and accuracy.</p><blockquote><strong>G is for Grounding</strong>:</blockquote><p>Grounding is the practice of vetting AI-generated information against retrieved data to ensure factual consistency.</p><blockquote><strong>H is for Hybrid Search</strong>:</blockquote><p>This approach combines different methodologies to improve document retrieval, ensuring that the search process is both comprehensive and efficient.</p><blockquote><strong>I is for Indexing</strong>:</blockquote><p>Indexing allows for fast and structured data access, making it a cornerstone of data retrieval frameworks.</p><blockquote><strong>J is for Joint Learning</strong>:</blockquote><p>Here, generative and retrieval models are optimized together, enhancing the overall performance of the AI system.</p><blockquote><strong>K is for Knowledge Base</strong>:</blockquote><p>A critical component for accurate, real-time information retrieval, the knowledge base is the foundation of any RAG system.</p><blockquote><strong>L is for Latent Space</strong>:</blockquote><p>This high-dimensional space is where embeddings reside, aiding in the semantic correlation between queries and documents.</p><blockquote><strong>M is for Memory Retrieval</strong>:</blockquote><p>By accessing historical user interactions, memory retrieval boosts personalization in AI systems.</p><blockquote><strong>N is for Neural Retrieval:</strong></blockquote><p>Going beyond basic keyword search capabilities, neural retrieval uses deep learning to determine query-document relevance.</p><blockquote><strong>O is for Ontology</strong>:</blockquote><p>Structuring inter-entity relationships is crucial, and ontology helps in organizing these connections within AI systems.</p><blockquote><strong>P is for Prompt Engineering:</strong></blockquote><p>Generating appropriate queries or responses is an art, and prompt engineering is the discipline that ensures these prompts are effective.</p><blockquote><strong>Q is for Query Expansion</strong>:</blockquote><p>This technique broadens search parameters to improve retrieval, a key feature in RAG systems.</p><blockquote><strong>R is for RAG:</strong></blockquote><p>At the heart of our discussion, RAG uses generative models alongside query expansion to produce contextually relevant responses.</p><blockquote><strong>S is for Sparse Retrieval:</strong></blockquote><p>Based on keywords, sparse retrieval is straightforward and often used in conjunction with dense retrieval.</p><blockquote><strong>T is for Tokenization</strong>:</blockquote><p>Breaking down text into smaller segments for processing is known as tokenization, a fundamental step in computerized text handling.</p><blockquote><strong>U is for Unstructured Data</strong>:</blockquote><p>RAG systems must convert unstructured data, like text or videos, into structured formats for better handling.</p><blockquote><strong>V is for Vector Search:</strong></blockquote><p>Matching semantically related items in a high-dimensional space is made possible through vector search, essential for dense retrieval.</p><blockquote><strong>W is for Warm-Start Retrieval:</strong></blockquote><p>Pre-trained models are used to improve the efficiency of retrieval systems, a method known as warm-start retrieval.</p><blockquote><strong>X is for Explainability</strong>:</blockquote><p>Ensuring that AI systems are transparent and understandable is critical, especially in high-stakes sectors.</p><blockquote><strong>Y is for Yield Optimization</strong>:</blockquote><p>Enhancing response relevance is the goal of yield optimization, ensuring that users receive the most pertinent information.</p><blockquote><strong>Z is for Zero-shot Retrieval:</strong></blockquote><p>Fetching information without specific training is known as zero-shot retrieval, allowing AI systems to quickly adapt to new contexts.</p><p><em>In conclusion, RAG is a fascinating blend of AI technologies that retrieve and generate data, offering a nuanced approach to how systems interact with information. From theoretical knowledge to practical application steps, these concepts form a foundational resource for anyone venturing into the realm of AI.</em></p><p><em>If you like this Post, Please follow me. If you have noticed any mistakes in the way of thinking, formulas, animations, or code, please let me know.</em></p><p><em>Cheers!</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2c1ae933ba17" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Deconstructing Documents with RAGxplorer: Unveiling the Semantic Landscape]]></title>
            <link>https://medium.com/analytics-vidhya/deconstructing-documents-with-ragxplorer-unveiling-the-semantic-landscape-28d42449b27b?source=rss-cbffda0fff2d------2</link>
            <guid isPermaLink="false">https://medium.com/p/28d42449b27b</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[generative-ai-tools]]></category>
            <category><![CDATA[retrieval-augmented]]></category>
            <category><![CDATA[generative-ai-use-cases]]></category>
            <dc:creator><![CDATA[Shashwat Tiwari]]></dc:creator>
            <pubDate>Sun, 28 Jan 2024 07:53:48 GMT</pubDate>
            <atom:updated>2024-01-28T07:53:48.981Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*F7K1wM1Q4tFayv_U" /><figcaption>Photo by <a href="https://unsplash.com/@jplenio?utm_source=medium&amp;utm_medium=referral">Johannes Plenio</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><blockquote>Ever feel like documents are dense jungles of information, obscuring the underlying meaning and connections? Well, say hello to <a href="https://github.com/gabrielchua/RAGxplorer"><strong><em>RAGxplorer</em></strong><em>,</em></a> your trusty machete for navigating the semantic undergrowth! This interactive tool takes the mystery out of text analysis, providing a visual playground to explore the hidden relationships within any document.</blockquote><blockquote><strong>From Chunks to Embeddings: Decoding the Document’s DNA</strong></blockquote><p>Imagine chopping a document into bite-sized pieces, each containing a nugget of meaning. RAGxplorer does precisely that, slicing your document into overlapping chunks and then transforming each into a mathematical code called an “embedding.” This code, residing in a high-dimensional space, captures the essence of the chunk, its semantic fingerprint if you will.</p><blockquote><strong>Visualizing the Unseen: Mapping the Semantic Landscape</strong></blockquote><p>But these codes are invisible to the naked eye. That’s where RAGxplorer’s magic kicks in. It takes these abstract embeddings and projects them onto a 2D or 3D map, creating a visual tapestry of the document’s semantic landscape. Each chunk becomes a dot, its position determined by its meaning and context. Think of it as a cosmic dance, where closer dots represent chunks with similar themes, while those farther apart hold vastly different ideas.</p><blockquote><strong>Querying the Cosmos: Finding Needles in the Textual Haystack</strong></blockquote><p>But this map isn’t just for pretty pictures. You can pepper it with your own questions, represented as additional dots. Instantly, RAGxplorer reveals which chunks resonate with your query, pulling them closer in the cosmic dance. This visualization makes it instantly clear how well the document answers your questions, with tight clusters around your query dot signifying strong relevance.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*R_K96njoCaeSDkmBBqfg5A.png" /><figcaption><a href="https://github.com/gabrielchua/RAGxplorer">Source</a></figcaption></figure><blockquote><strong>Adaptability is Key: From PDFs to Personalized Exploration</strong></blockquote><p>RAGxplorer isn’t a one-size-fits-all tool. It happily chomps on PDFs, extracting their semantic DNA. You can even adjust the chunk size and overlap, fine-tuning the analysis to your document’s unique structure. And to speed things up, you can build a personalized vector database, like a cheat sheet for the document’s meaning.</p><blockquote><strong>Beyond Visualization: Unveiling Biases and Knowledge Gaps</strong></blockquote><p>RAGxplorer isn’t just a visual treat; it’s a powerful tool for understanding the document’s inner workings. You can use it to identify potential biases, where certain themes cluster close together, potentially overshadowing others. It can also reveal gaps in knowledge, areas where the document is light on information. And to top it all off, you can experiment with different query expansion techniques, seeing how they shape the retrieval of relevant chunks, giving you deeper insights into the document’s response to your needs.</p><p><em>So, next time you’re drowning in a sea of text, don’t despair. Grab your trusty RAGxplorer and embark on a voyage of discovery. Unravel the semantic knots, unearth hidden connections, and gain a newfound understanding of the documents that guide your world.</em></p><blockquote><strong><em>References</em></strong></blockquote><ul><li><a href="https://github.com/gabrielchua/RAGxplorer"><strong>Ragxplorer</strong></a></li></ul><p><em>If you like this Post, Please follow me. If you have noticed any mistakes in the way of thinking, formulas, animations, or code, please let me know.</em></p><p><em>Cheers!</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=28d42449b27b" width="1" height="1" alt=""><hr><p><a href="https://medium.com/analytics-vidhya/deconstructing-documents-with-ragxplorer-unveiling-the-semantic-landscape-28d42449b27b">Deconstructing Documents with RAGxplorer: Unveiling the Semantic Landscape</a> was originally published in <a href="https://medium.com/analytics-vidhya">Analytics Vidhya</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Become a Data Scientist with these 10 Steps]]></title>
            <link>https://medium.com/geekculture/become-a-data-scientist-with-these-10-steps-1cba4ba75243?source=rss-cbffda0fff2d------2</link>
            <guid isPermaLink="false">https://medium.com/p/1cba4ba75243</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[beginners-guide]]></category>
            <category><![CDATA[data-science-courses]]></category>
            <category><![CDATA[data-scientist]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Shashwat Tiwari]]></dc:creator>
            <pubDate>Fri, 06 May 2022 15:46:52 GMT</pubDate>
            <atom:updated>2022-07-11T06:33:18.248Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*2VcpJBaYobTGvE0Z" /><figcaption>Photo by <a href="https://unsplash.com/@tesecreates?utm_source=medium&amp;utm_medium=referral">Matese Fields</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p><em>Data Scientist has been described as the “sexiest” job of the 21st century by HBS in 2012. We are in 2022 now and still, this statement holds true. The companies need more data scientists in several business domains than there are available to hire. There are a large number of people transitioning their carrier toward data science from other domains such as marketing, finance, insurance, software engineering, etc.</em></p><p>According to our Data professor <a href="https://medium.com/u/f94b47c3cfca">Chanin Nantasenamat</a>-</p><blockquote>“The best way to learn data science is to do data science.”</blockquote><p>Most of my friends currently working as software engineers showed their interest in learning Data Science. Hence I decided to develop this post for all Aspiring Data scientists who need a step-by-step guide <strong><em>on where to start their Data Science Journey.</em></strong></p><blockquote><strong>Step I - Learn Python 3-Programming Essentials</strong></blockquote><p>All you need is a programming language either it could be Python 3 or R language. Recommending a very good specialization course by the <em>University of Michigan.</em></p><p><a href="https://www.coursera.org/specializations/python-3-programming?ranMID=40328&amp;ranEAID=lVarvwc5BD0&amp;ranSiteID=lVarvwc5BD0-GYb96MURdvkczQS6elAmRw&amp;siteID=lVarvwc5BD0-GYb96MURdvkczQS6elAmRw&amp;utm_content=2&amp;utm_medium=partners&amp;utm_source=linkshare&amp;utm_campaign=lVarvwc5BD0">Python 3 Programming</a></p><p>This course gives a beginner walkthrough starting from variables, conditions, and loops that goes up to intermediate concepts like keyword parameters, list comprehensions, lambda expressions, and class inheritance.</p><p>For R language I suggest this course on <a href="https://www.udemy.com/course/complete-python-bootcamp/">Udemy</a> by <em>Jose Portilla.</em> Jose has structured this course in such a way that any beginners will be able to grasp concepts very quickly.</p><blockquote><strong>Step II- Machine Learning Concepts</strong></blockquote><p>Machine learning is a very important part of Data Science that every beginner must know. Most companies test your concepts, applications, and experience in machine learning.</p><p>If you are a complete beginner or a bit familiar with Machine learning I suggest the below course by <em>Andrew Ng</em>.</p><p><a href="https://www.coursera.org/learn/machine-learning?irclickid=VRnzySQoTxyIUXeyo62h8XVKUkGSkZxcZ2jjWM0&amp;irgwc=1&amp;utm_medium=partners&amp;utm_source=impact&amp;utm_campaign=3259009&amp;utm_content=b2c">Machine Learning</a></p><p><em>Andrew Ng</em> is a great instructor which makes every machine learning concept so easy to understand. It is designed for students and working professionals who are complete beginners. At the end of this course, you won’t be an expert at Machine Learning but you will be able to make machine learning models that can perform complex tasks.</p><p>Also, I am dropping a few medium posts after you go through the specialization that will help you to get along with Machine learning.</p><ul><li><a href="https://medium.datadriveninvestor.com/machine-learning-in-a-nutshell-e4ff2a50dbaf">Machine Learning in a NutShell</a></li><li><a href="https://medium.com/analytics-vidhya/complete-guide-to-machine-learning-evaluation-metrics-615c2864d916">Complete Guide to Machine Learning Evaluation Metrics</a></li><li><a href="https://medium.com/geekculture/7-important-distance-metrics-every-data-scientist-should-know-11e1b0b2ebe3">7 Important Distance Metrics every Data Scientist should know.</a></li><li><a href="https://machinelearningmastery.com/start-here/">Start Here with Machine Learning - Machine Learning Mastery</a></li></ul><blockquote><strong>Step III- Learning Data Science</strong></blockquote><p>Data Science is an interdisciplinary field that interacts with computer science, statistics, and domain knowledge. In order to become a skilled Data scientist one needs to have a good foundation in not one but multiple fields.</p><p><a href="https://www.coursera.org/specializations/data-science-python?irclickid=VRnzySQoTxyIUXeyo62h8XVKUkGSkZQ4Z2jjWM0&amp;irgwc=1&amp;utm_medium=partners&amp;utm_source=impact&amp;utm_campaign=3259009&amp;utm_content=b2c">Applied Data Science with Python</a></p><p>Above skill-based specialization will walk you through the bits and pieces of Data Science with Python. It will help you to gain confidence in statistical, machine learning, information visualization, text analysis, and social network analysis techniques through popular python toolkits such as pandas, matplotlib, scikit-learn, nltk, and networkx to gain insight into their data.</p><p>After this specialization, you can also go through this awesome course by 365 careers team the <a href="https://www.udemy.com/course/the-data-science-course-complete-data-science-bootcamp/"><em>Data Science Bootcamp 2022</em></a><em>.</em></p><p>Dropping an article as well for you to speed up-</p><p><a href="https://ischoolonline.berkeley.edu/data-science/what-is-data-science-2/">What is Data Science?</a></p><blockquote><strong>Step IV- Statistics,Probability and Mathematics</strong></blockquote><p>As I mentioned earlier Data science consists of Statistics, Probability, and Mathematics at its core.</p><p>The course on Statistical Inference by<em> Mine Çetinkaya-Rundel</em> follows a great path for learning hypothesis testing, confidence intervals, and statistical inference methods for categorical and numerical data.</p><p><a href="https://www.coursera.org/learn/inferential-statistics-intro?irclickid=VRnzySQoTxyIUXeyo62h8XVKUkGShRx4Z2jjWM0&amp;irgwc=1&amp;utm_medium=partners&amp;utm_source=impact&amp;utm_campaign=3259009&amp;utm_content=b2c">Inferential Statistics</a></p><p>You might also want to go through the fantastic course on udemy by <em>Kirill Eremenko</em> on <a href="https://www.udemy.com/course/data-statistics/#instructor-1">Statistics for Business Analytics and Data Science A-Z™</a>.</p><p>Again pasting a few links which I usually bookmarked for quick revisions-</p><ul><li><a href="https://statisticsbyjim.com/basics">Basics Archives</a></li><li><a href="https://www.kaggle.com/code/shashwatwork/guide-to-normality-tests-in-python">Guide to Normality Tests in Python</a></li><li><a href="https://www.kaggle.com/code/shashwatwork/guide-to-statistical-hypothesis-tests-in-python">Guide to Statistical Hypothesis Tests in Python</a></li><li><a href="https://towardsdatascience.com/stats-gist-list-an-irreverent-statisticians-guide-to-jargon-be8173df090d">Stats Gist List: An irreverent statistician’s guide to jargon</a></li></ul><blockquote><strong>Step V- Learn SQL for Data Science</strong></blockquote><p>SQL is one of the most popular coding language today. But when it comes to Data Science every beginner should know a little bit of it at least.SQL helps you in the ETL process and running your data preparation pipelines.</p><p>Hence recommended a specialization course by <em>UC Davis</em> on SQL. It will help you quickly develop SQL fluency which will be of great help in your Data Science journey.</p><p><a href="https://www.coursera.org/specializations/learn-sql-basics-data-science?irclickid=VRnzySQoTxyIUXeyo62h8XVKUkGShDzwZ2jjWM0&amp;irgwc=1&amp;utm_medium=partners&amp;utm_source=impact&amp;utm_campaign=3259009&amp;utm_content=b2c">Learn SQL Basics for Data Science</a></p><p>Hit on a few blogs link while going through the specialization-</p><ul><li><a href="https://medium.com/analytics-vidhya/crafting-recommendation-engine-in-pyspark-a7ca242ad40a">Crafting Recommendation Engine in PySpark</a></li><li><a href="https://mode.com/sql-tutorial/introduction-to-sql/">SQL for Data Analysis: Tutorial Introduction - Mode</a></li></ul><blockquote><strong>Step VI- Learn Machine learning-Advance</strong></blockquote><p>If you have gone through the above five steps then congratulations you have achieved the Beginner badge for Data science. Now we can through a bit advanced concepts related to the Machine Learning universe.</p><p>The Advance Machine learning Specialization brings you deep learning, reinforcement learning, natural language understanding, computer vision, and Bayesian methods on the table. The course is powered by Top Kaggle machine learning practitioners and CERN scientists who share their experiences in solving real-world problems.</p><p><a href="https://www.coursera.org/specializations/aml/">Coursera | Online Courses &amp; Credentials From Top Educators. Join for Free</a></p><p>As usual, pasting a few topics on Advance Machine learning for you-</p><ul><li><a href="https://medium.com/analytics-vidhya/reinforcement-learning-beginners-approach-chapter-i-689f999cf572">Reinforcement Learning — Beginner’s Approach Chapter -I</a></li><li><a href="https://medium.com/analytics-vidhya/reinforcement-learning-beginners-approach-chapter-ii-a72e415c57ca">Reinforcement Learning — Beginner’s Approach Chapter -II</a></li><li><a href="https://blog.goodaudience.com/innovative-explanation-to-ml-models-interpretability-a9c20dd97c54">Innovative Explanation to ML Model’s Interpretability</a></li><li><a href="https://medium.com/analytics-vidhya/medical-concepts-vectors-evolution-in-health-care-applications-a4f408d4cdad">Medical Concepts Vectors- Evolution in Health care Applications</a></li></ul><blockquote><strong>Step VII- Deep learning</strong></blockquote><p>Deep learning is one of the most fascinating topics in Data Science. It is considered to be leading-edge AI technology.</p><p><em>Andrew Ng</em> brings to you a specialization course on Deep learning which is a pure gem. He presented each and every concept related to Convolutional<em> </em>networks, RNNs, LSTM, Adam, Dropout, and BatchNorm<em> </em>in such a simple manner that every beginner can able to capture easily.</p><p><a href="https://www.coursera.org/specializations/deep-learning?irclickid=VRnzySQoTxyIUXeyo62h8XVKUkGShu3wZ2jjWM0&amp;irgwc=1&amp;utm_medium=partners&amp;utm_source=impact&amp;utm_campaign=3259009&amp;utm_content=b2c">Deep Learning</a></p><p>Summarizing this section with a few Blogs-</p><ul><li><a href="https://medium.datadriveninvestor.com/deep-learning-in-a-nutshell-a600a27ab371">Deep Learning in a NutShell</a></li><li><a href="https://medium.com/analytics-vidhya/ultimate-journey-of-gans-7e5df53b01b">Ultimate Journey of GANs</a></li><li><a href="https://blog.goodaudience.com/most-intuitive-explanation-of-activation-functions-fdf6d9b4a53a">Most Intuitive Explanation of Activation Functions</a></li><li><a href="https://medium.com/analytics-vidhya/introduction-to-computer-vision-opencv-in-python-fb722e805e8b">Introduction to Computer Vision &amp; OpenCV in Python</a></li></ul><blockquote><strong>Step VIII- Leaning Keras/ Pytorch for Deep learning</strong></blockquote><p>For Deep learning knowledge of one of the python wrappers, either Pytorch or Keras is a must. However, most beginners start with Keras due to its simplicity and ease of understanding but nowadays Pytorch is become a popular library among Deep learning Researchers due to the control it gives you while building your neural network.</p><p>Hence learning Pytorch concepts will help you to understand the code in a lot of research these days.</p><p><em>Joseph Santarcangelo</em> gives a wonderful explanation of Pytorch concepts and fundamentals.</p><p><a href="https://www.coursera.org/learn/deep-neural-networks-with-pytorch?irclickid=VRnzySQoTxyIUXeyo62h8XVKUkGSh7UwZ2jjWM0&amp;irgwc=1&amp;utm_medium=partners&amp;utm_source=impact&amp;utm_campaign=3259009&amp;utm_content=b2c">Deep Neural Networks with PyTorch</a></p><p>Even if you are interested in Keras then I recommend taking <a href="https://www.udemy.com/course/deep-learning-with-python-and-keras/">Deep learning with Python and Keras</a> by<em> Jose Portilla.</em></p><p>Here are a few posts that might be helpful for you after taking these courses-</p><ul><li><a href="https://datasciencehub.medium.com/gentle-introduction-to-linear-regression-in-pytorch-cd6434c98d4d">Gentle Introduction to Linear Regression in Pytorch</a></li><li><a href="https://blog.goodaudience.com/awesome-introduction-to-logistic-regression-in-pytorch-d13883ceaa90">Awesome Introduction to Logistic Regression in PyTorch-</a></li><li><a href="https://datasciencehub.medium.com/story-behind-the-convolutional-neural-networks-cnn-with-pytorch-part-i-977acdce01bf">Story Behind the Convolutional Neural Networks (CNN) with PyTorch Part I</a></li></ul><blockquote><strong>Step IX- Model Deployment-MLOps</strong></blockquote><p>Model Deployment is part of the <a href="https://www.datascience-pm.com/crisp-dm-2/">CRISP-DM</a> process that is used in many industrial projects and has proven successful in machine learning systems.</p><p>Most of my Machine learning systems got failed because I didn&#39;t think of model deployment before starting the initial phase. Hence it is important to think about how we can deploy our machine learning model to production once it&#39;s ready.</p><p><em>Blaine Sundrud</em> will guide you through the complete process of how to build, train and deploy a model using Amazon SageMaker with built-in algorithms and Jupyter Notebook instance.</p><p><a href="https://www.coursera.org/learn/aws-machine-learning?irclickid=VRnzySQoTxyIUXeyo62h8XVKUkGSh6VcZ2jjWM0&amp;irgwc=1&amp;utm_medium=partners&amp;utm_source=impact&amp;utm_campaign=3259009&amp;utm_content=b2c">Getting Started with AWS Machine Learning</a></p><p><em>Ankit Mistry and the team</em> have also developed a wonderful udemy course on the deployment of <a href="https://www.udemy.com/course/deploy-machine-learning-model/">ML Models on GCP and Heroku.</a></p><p>I hate to do Self-promotions but you might also look at this post of mine, where I deployed a Machine learning model on Heroku using flask rest API.</p><p><a href="https://datasciencehub.medium.com/android-app-development-with-retrofit-flask-rest-2e3fe50b00f9">Android App Development with Retrofit &amp; Flask REST.</a></p><blockquote><strong>Step X- Revise Data Structures and Algorithms</strong></blockquote><p>Data Structures and algorithms play a vital role in the Data Science journey.</p><p>Yes, you heard it right! Most of us data scientist does not pay much attention to Data structures but many companies ask about data structures and algorithms as part of their interview process for hiring data scientists.</p><p>Hence some portion of your precious time should be spent on learning Data Strucutiee and algorithms. <em>Neil Rhodes and the team</em> made it very simple with this specialization course on Coursera.</p><p><a href="https://www.coursera.org/specializations/data-structures-algorithms?irclickid=VRnzySQoTxyIUXeyo62h8XVKUkGSm2R0Z2jjWM0&amp;irgwc=1&amp;utm_medium=partners&amp;utm_source=impact&amp;utm_campaign=3259009&amp;utm_content=b2c">Data Structures and Algorithms</a></p><p>If you want to go through quick reads on Data Structures tons of articles available on the net suggesting a few here-</p><ul><li><a href="https://mlwhiz.com/blog/2020/01/28/ll/">A simple introduction to Linked Lists for Data Scientists - MLWhiz</a></li><li><a href="https://towardsdatascience.com/8-useful-tree-data-structures-worth-knowing-8532c7231e8c">8 Useful Tree Data Structures Worth Knowing</a></li></ul><blockquote><strong>Conclusion</strong></blockquote><p><em>In this post, I have charted out X Steps on how anyone can start their Data science journey. By following the mentioned steps one can easily transition their carrier into Data science. The key here is constant learning and revising concepts regularly so that you can able to ace any Data Science interviews.</em></p><p><em>If you like this guide, please follow me. If you have noticed any mistakes in the way of thinking, formulas, animations, or code, please let me know.</em></p><p><em>Cheers!</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1cba4ba75243" width="1" height="1" alt=""><hr><p><a href="https://medium.com/geekculture/become-a-data-scientist-with-these-10-steps-1cba4ba75243">Become a Data Scientist with these 10 Steps</a> was originally published in <a href="https://medium.com/geekculture">Geek Culture</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[7 Important Distance Metrics every Data Scientist should know.]]></title>
            <link>https://medium.com/geekculture/7-important-distance-metrics-every-data-scientist-should-know-11e1b0b2ebe3?source=rss-cbffda0fff2d------2</link>
            <guid isPermaLink="false">https://medium.com/p/11e1b0b2ebe3</guid>
            <category><![CDATA[data-scientist]]></category>
            <category><![CDATA[cosine-similarity]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Shashwat Tiwari]]></dc:creator>
            <pubDate>Wed, 30 Jun 2021 16:37:33 GMT</pubDate>
            <atom:updated>2021-07-03T19:12:08.834Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*s2vXOwj-IVNYP1yr" /><figcaption>Photo by <a href="https://unsplash.com/@forest_ms?utm_source=medium&amp;utm_medium=referral">Forest Simon</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p><em>Hola,</em></p><p>Distance metrics play a vital role in most machine learning models. Distance metrics are basically used to enhance the performance of similarity-based algorithms.</p><p><em>The distance metrics usage has been present since its inception. Basically, Distance provides a similarity measure between two data points. One of the most popular examples of distance-based metrics is well known Nearest neighbors rule for classification, where a new sample is labeled with the majority class within its nearest neighbors.</em></p><p>Algorithms behind Nearest Neighbour classifiers are the main motivation behind distance-based learning. These kinds of algorithms have standard distance metrics like the Euclidean distance in order to measure data similarity. The distance parameter that data brings as a comparison with non-similar data can significantly increase the quality of these algorithms.</p><blockquote>An effective distance metric improves the performance of our machine learning model, whether that’s for classification tasks or clustering.</blockquote><p>In this blog, we are going to walk through some of the most used Distance metrics that every data scientist must know-</p><ul><li><strong>Euclidean Distance</strong></li><li><strong>Manhattan Distance</strong></li><li><strong>Chebyshev Distance</strong></li><li><strong>Minkowski Distance</strong></li><li><strong>Hamming Distance</strong></li><li><strong>Cosine Similarity</strong></li><li><strong>Jaccard Similarity</strong></li></ul><blockquote><strong>Euclidean Distance</strong></blockquote><p>Euclidean Distance is one of the most commonly used distance metrics. Mathematically it is the square root of the sum of differences between two different data points.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/342/1*FqBSg8VulMJjIdSEwJ4B7g.png" /><figcaption><a href="https://aiaspirant.com/distance-similarity-measures-in-machine-learning/">Source</a></figcaption></figure><p><em>Most Machine learning algorithms including K- Means Clustering uses Euclidean distance in order to calculate the similarity between two data points or observations.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/425/1*dL2EluoLn0fkTC4fw32u4Q.png" /><figcaption><a href="https://vitalflux.com/different-types-of-distance-measures-in-machine-learning/">Source</a></figcaption></figure><p>Moreover, Euclidean distance is used when we are calculating the distance between two sets of data that have numerical data type i.e.integer or float.</p><p><em>Point to keep in mind that if your data have features with different scales it is a must to normalize or standardize the features across all columns before calculation of Euclidean distance</em>. If scaling of features is not performed then large values in features will dominate the distance metrics.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XvJ2FHXpOaxtrZ2sJfqOYw.png" /></figure><blockquote><strong>Manhattan Distance</strong></blockquote><p><em>Manhattan Distance also known as City Block Distance or Taxicab Distance calculate the distance between two real-valued vectors. Mathematically Manhattan distance is calculated as the sum of absolute distances between two different data points.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/286/1*8bjam0CSB8vlRU4vGa9djQ.png" /><figcaption><a href="https://aiaspirant.com/distance-similarity-measures-in-machine-learning/">Source</a></figcaption></figure><p>It is mostly used when two vector lies in a uniform grid-like chessboard or city block. The name taxicab creates an intuition for what measures the shortest path that a taxicab would take between city blocks which are coordinates on the grid.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/838/1*YHsZ3yAXf1DfuMAN-Sz9Mw.png" /><figcaption><a href="https://vitalflux.com/different-types-of-distance-measures-in-machine-learning/">Source</a></figcaption></figure><p>Mostly it is recommended to use Manhattan distance instead of Euclidean distance when we have real value vectors in integer dimensional space.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PFdvhr7jciU6tUrOupUuoQ.png" /></figure><blockquote><strong>Chebyshev Distance</strong></blockquote><p><em>The Chebyshev distance is calculated as the maximum of the absolute difference between two different vectors. It is also called Chessboard Distance or L infinity Distance or Maximum value distance.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/327/1*70bG-UNhrScC0qFJuYrOpA.png" /><figcaption><a href="https://aiaspirant.com/distance-similarity-measures-in-machine-learning/">Source</a></figcaption></figure><p>The best intuition which I got from this <em>distance is the movement of King in Chessboard it can move in up, down, left, right any direction.</em></p><p>The Chebyshev distance is sometimes used in the logistic warehouse as it effectively measures the time crane took to move an object. Also widely used in Computer-Aided Manufacturing applications for the optimization of machines operating in planes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*N4rr4UnBGMzE6du-4PTxAQ.png" /></figure><blockquote><strong>Minkowski Distance</strong></blockquote><p><em>Minkowski Distance generalizes Euclidean and Manhattan Distance</em>. It is also called p-norm vector as it adds a parameter called the “p” that allows different distance measures to be calculated.</p><p>For Different values of p Minkowski will be-</p><ul><li>p=1, the distance measure is the Manhattan measure.</li><li>p=2, the distance measure is the Euclidean measure.</li><li>p = ∞, the distance measure is the Chebyshev measure</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/301/1*1vGBgaETFBrDPcSLcbnzNA.png" /><figcaption><a href="https://aiaspirant.com/distance-similarity-measures-in-machine-learning/">Source</a></figcaption></figure><p>When we are implementing any Machine learning Algorithm that uses Minkowski as a distance measure we can tune the hyperparameter “<em>p</em>”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*n6PqeutIVq7pgCs2eMBN-w.png" /></figure><blockquote><strong>Hamming Distance</strong></blockquote><p><em>Ahh! Hamming Distance is used when we have categorical attributes in our data. Hamming Distance measures the similarity between two string which must be of the same length.</em></p><p>Hamming Distance basically quantifies if two attributes are different or not. When they are equal Hamming distance is 0 else 1.</p><p>In the below code snippet you can see we are calculating the Hamming distance between two strings “euclidean” and “manhattan”.The distance between these two strings can be calculated as the average or sum of the number of bit differences between these two strings.</p><p>Hence the Hamming distance between these two strings will be 7.Also to keep in mind that Hamming <em>distance works only when we have a string of the same length.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DGDYr62MYcBBfV5vh2y_Fw.png" /></figure><blockquote><strong>Cosine Similarity</strong></blockquote><p><em>Cosine similarity basically measures the similarity between two non-zero vectors. It is basically the cosine angle between two vectors that are most similar.</em></p><p>Most similar vectors will have 0 degrees between them hence the value of cos 0 is 1.Moreover the vectors opposite to each other have a value of -1 i.e. cos(180deg).</p><p><em>Hence it infers that cosine similarity ranges from -1 to 1.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/531/1*iOtGC_C4rUjql3toikhqUA.png" /><figcaption><a href="https://vitalflux.com/different-types-of-distance-measures-in-machine-learning/">Source</a></figcaption></figure><p>The <a href="https://en.wikipedia.org/wiki/Cosine_similarity">cosine distance</a> is used when we want to calculate the distance between two sparse vectors. For example, if there are 1000 attributes collected about cars and 200 of these were mutually exclusive (meaning that one car had them but the others don’t), then there would only be a need to include 800 dimensions in the calculation.</p><p><em>Cosine similarity only cares about the angle between two vectors hence not the distance between them</em>.</p><pre>              cosine distance = 1-cosine similarity</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*P53BK8Ao5zdiyzPqvZgXug.png" /></figure><blockquote><strong>Jaccard Similarity</strong></blockquote><p><em>In Jaccard similarity is used to understand the similarity between two sample sets. The Jaccard similarity emphasizes that the similarity between two finite sample sets instead of vectors and it is defined as the size of the intersection divided by the size of the union of the sample sets.</em> The mathematically written as:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/241/1*O4-yVq6Zkj_Vk-ut6X7mEg.png" /><figcaption><a href="https://aiaspirant.com/distance-similarity-measures-in-machine-learning/">Source</a></figcaption></figure><p>Unlike cosine distance, Jaccard distance will be calculated as</p><pre>           Jaccard distance = 1 — jaccard similarity</pre><p>Jaccard Similarity is commonly used in Convolution Neural nets with image detection applications in which it measures the accuracy of object detection Algorithms.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*u2q2jCuFVZDYHcWcKXK88A.png" /></figure><blockquote><strong>Inference</strong></blockquote><p>In this Blog, we have a discussion on various distance metrics that Data scientists should know. The selection of Distance Metrics should be based on your data.</p><ul><li><em>Euclidean distance can be used if features are similar or if we want to find the distance between two data points.</em></li><li><em>When we have high dimensions then Manhattan is more preferred.</em></li><li><em>In the case of Categorical features, Hamming Distance is used.</em></li><li><em>Cosine similarity is used when we are concern about the direction of vectors not magnitude.</em></li></ul><blockquote><strong>References</strong></blockquote><ul><li><a href="https://aiaspirant.com/distance-similarity-measures-in-machine-learning/">Blog by AI Aspirant</a></li><li><a href="https://machinelearningmastery.com/distance-measures-for-machine-learning/">Awesome explanation by Jason Brownlee.</a></li><li><a href="https://www.youtube.com/watch?v=ieMjGVYw9ag">Youtube video by Krish Naik</a></li><li><a href="https://www.analyticsvidhya.com/blog/2020/02/4-types-of-distance-metrics-in-machine-learning/">Type of Distance Metrics by Analytics Vidhya</a></li><li><a href="https://vitalflux.com/different-types-of-distance-measures-in-machine-learning/">Machine learning Metrics</a></li></ul><p><em>If you like this Blog, Please hit </em>👏 and <em>follow me. If you have noticed any mistakes in the way of thinking, formulas, animations, or code, please let me know.</em></p><p><em>Cheers!</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=11e1b0b2ebe3" width="1" height="1" alt=""><hr><p><a href="https://medium.com/geekculture/7-important-distance-metrics-every-data-scientist-should-know-11e1b0b2ebe3">7 Important Distance Metrics every Data Scientist should know.</a> was originally published in <a href="https://medium.com/geekculture">Geek Culture</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Machine Learning Cheat Sheat-Logistic Regression]]></title>
            <link>https://medium.com/analytics-vidhya/machine-learning-cheat-sheat-logistic-regression-72d826d64824?source=rss-cbffda0fff2d------2</link>
            <guid isPermaLink="false">https://medium.com/p/72d826d64824</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[cheatsheet]]></category>
            <category><![CDATA[data-scientist]]></category>
            <category><![CDATA[interview]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Shashwat Tiwari]]></dc:creator>
            <pubDate>Sat, 22 May 2021 14:13:44 GMT</pubDate>
            <atom:updated>2021-05-25T17:53:14.795Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*e3Ho0PrBap6G2Cfp" /><figcaption>Photo by <a href="https://unsplash.com/@benwhitephotography?utm_source=medium&amp;utm_medium=referral">Ben White</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p><em>Hello Everyone </em>👋<em>,</em></p><p><em>Nowadays Machine Learning and its Application are advancing day by day. It’s becoming very hard for us to recall basic concepts related to Machine learning on daily basis.</em></p><p><em>Hence Introducing the Machine learning Algorithm Cheat Sheet Series in which we will be recalling core concepts related to the Machine learning Algorithm which will be helpful for you in cracking any Data Science interviews or projects.</em></p><p><em>It will be a point-to-point explanation for quick revision and understanding of Machine learning Algorithms.</em></p><blockquote>So Hold Tight………..</blockquote><blockquote><strong>Logistic Regression</strong></blockquote><ul><li>Logistic Regression objective <em>is to model the probabilities of classification problems with two outcomes 0 or 1, Yes/No. It is basically an extension of the linear regression model for performing classification</em>.</li><li>Linear Regression basically works for <em>Regression problems but it failed for classification Why?</em></li><li><em>A Linear Model does not output probabilities however it treats the classes 0 and 1 as numbers and tries to find the best fit line that minimizes the distance between the point and the line.</em> Moreover, <em>it does not spit out probabilities that are required for linearly separate two classes.</em></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*k87NEaCQCBuE533erZAKTQ.png" /><figcaption><a href="https://christophm.github.io/interpretable-ml-book/logistic.html">Source</a></figcaption></figure><ul><li>So instead of fitting a straight line Logistic regression <em>uses the Logit function which is a sigmoid function for squashing the output of a linear equation between 0 and 1. The logistic function is defined as:</em></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/331/1*_PFn35JEMKwGdfowaYEy7A.png" /></figure><ul><li>The logistic Regression Algorithm estimates <em>the probability of falling into a specific categorical dependent variable based on given independent variables.</em> The odds or probability that describe the outcome of a single iteration is modeled as a function of explanatory variables.</li><li><em>Logistic Regression is divided into three types based on target feature data type</em>-</li></ul><ol><li><strong>Binary Logistic Regression</strong>-<em>Commonly used when the dependent feature has binary response Yes/No or 0/1 etc.</em></li><li><strong>Multi-nomial Logistic Regression</strong>- <em>When the target feature has more than 3 responses or categories without any order example Predicting the type of drugs used for the treatment of COVID-19.</em></li><li><strong>Ordinal Logistic Regression</strong><em>-When the target feature has more than 3 responses or categories with specific ordering. example Predicting the severity COVID-19 i.e. high/medium/low.</em></li></ol><blockquote><strong>User Manual for Logistic Regression</strong></blockquote><p><strong><em>#</em></strong><em> Logistic Regression can be used when there is a specific requirement to model the probabilities of the target feature as a function of other explanatory features.</em></p><p><strong><em>#</em></strong><em> Use Logit Regression when there is a need to predict probabilities of the categorical dependent variable which is binary as a function of other explanatory features.</em></p><p><strong><em>#</em></strong><em> Logistic regression algorithm is used when classification is needed on two categories based on other explanatory features.</em></p><blockquote><strong>Advantages of Logit Regression</strong></blockquote><ul><li><em>Easy to interpret and less complex</em></li><li><em>Can handle non-linear data points as a linear relationship between predictors is not assumed.</em></li><li><em>Classification Algorithm that does not assume normal distribution among features.</em></li><li><em>Provides probability distribution over other Machine learning models.</em></li><li><em>Logistic regression can also be extended from binary classification to multi-class classification.</em></li></ul><blockquote><strong>Disadvantage of Logit Distribution</strong></blockquote><ul><li><em>Overfitting can occur when we have High Dimensions and sparse training data.</em></li><li><em>It is not Robust to Outliers and Missing Values.</em></li><li><em>Requires more data points in order to achieve stability and meaningful results.</em></li><li><em>Logit Regression predicts an outcome that depends on the group of particular independent features.</em></li></ul><blockquote><strong>Applications of Logit Regression</strong></blockquote><ul><li><em>Logistic regression algorithm is applied in the field of epidemiology.</em></li><li><em>Used to predict the outcome of political elections.</em></li><li><em>Used to classify a set of words as nouns, pronouns, verbs, adjectives.</em></li><li><em>Used in weather forecasting to predict the probability of rain.</em></li><li><em>Used in Retail Banking for Predicting the Loan Defaults or Risk Management.</em></li></ul><p>ℹ <strong><em>Scikit learn implementation of Logistic Regression Algorithm can be found </em></strong><a href="http://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LogisticRegression.html"><strong><em>here</em></strong></a><strong><em>.</em></strong></p><p>ℹ <strong><em>R Implementation of Logistic Regression Algorithm can be found </em></strong><a href="https://www.rdocumentation.org/packages/stats/versions/3.6.2/topics/glm"><strong><em>here</em></strong></a><strong><em>.</em></strong></p><blockquote>With the above points, I hope you will get a better understanding of the Logistic Regression.Also you can able to crack any interview question related to Logistic Regression Algorithm.</blockquote><blockquote>For the Next Cheat Sheet of ML, Algorithm Please refer to this <a href="https://medium.com/analytics-vidhya/machine-learning-cheat-sheat-support-vectors-machines-8abb9c350804">link</a>.</blockquote><h3>Do Checkout My Other Blogs related to ML/DL <a href="https://shashwatwork.github.io/blog/#">here</a>.</h3><p><em>If you like this Post, Please follow me. If you have noticed any mistakes in the way of thinking, formulas, animations, or code, please let me know.</em></p><p><em>Cheers!</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=72d826d64824" width="1" height="1" alt=""><hr><p><a href="https://medium.com/analytics-vidhya/machine-learning-cheat-sheat-logistic-regression-72d826d64824">Machine Learning Cheat Sheat-Logistic Regression</a> was originally published in <a href="https://medium.com/analytics-vidhya">Analytics Vidhya</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Machine Learning Cheat Sheat-Support Vectors Machines]]></title>
            <link>https://medium.com/analytics-vidhya/machine-learning-cheat-sheat-support-vectors-machines-8abb9c350804?source=rss-cbffda0fff2d------2</link>
            <guid isPermaLink="false">https://medium.com/p/8abb9c350804</guid>
            <category><![CDATA[beginners-guide]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[interview]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[tutorial]]></category>
            <dc:creator><![CDATA[Shashwat Tiwari]]></dc:creator>
            <pubDate>Sun, 24 Jan 2021 23:37:27 GMT</pubDate>
            <atom:updated>2021-01-25T16:42:04.915Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*W7HIsY7siasG01WF" /><figcaption>Photo by <a href="https://unsplash.com/@anniespratt?utm_source=medium&amp;utm_medium=referral">Annie Spratt</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p><em>Hello Everyone </em>👋<em>,</em></p><p><em>Nowadays Machine Learning and its Application are advancing day by day. It’s becoming very hard for us to recall basic concepts related to Machine learning on daily basis.</em></p><p><em>Hence Introducing the Machine learning Algorithm Cheat Sheet Series in which we will be recalling core concepts related to the Machine learning Algorithm which will be helpful for you in cracking any Data Science interviews or projects.</em></p><p><em>It will be a point to point explanation for quick revision and understanding of Machine learning Algorithms.</em></p><blockquote>So Hold Tight………..</blockquote><blockquote><strong>Support Vector Machines</strong></blockquote><ul><li>A supervised learning algorithm can be used for both <em>classification and regression problem statement</em>.</li><li>It works by <em>classifying data into different classes by finding the line i.e. hyperplane which separates the training data set into classes</em>.</li><li>In SVM we plot the data as a <em>point in n-dimensional space where n is the number of features with value of each feature to be cordinate value</em>.Then the classification is performed by finding the hyper-plance differentiating two classes.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/410/1*rU2OUfGtDwx4DBkVdPitwA.png" /><figcaption><a href="https://www.analyticsvidhya.com/blog/2017/09/understaing-support-vector-machine-example-code/">Source</a></figcaption></figure><ul><li>Support Vector Machines tries to <em>maximize the distance between different classes involved and this is called margin maximization.</em>Basically the line between two classes is identified then there is much chance that SVM will generalize to unseen data.</li><li>SVM are categorized into following -</li></ul><p><strong># Linear SVM’s-</strong></p><p>☞ Linear SVM <em>are the classifiers that separate the training data by a Hyperplane</em>.In SVM classifier it is easy to add hyperplane between two classes but question arises that we should add features manually to form a hyper plane this technique is called<em> Kernal Trick.</em></p><p><strong># Non-Linear SVM’s-</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/657/1*5nDYHeACtD2sUCox7NVT2Q.png" /><figcaption><a href="https://www.analyticsvidhya.com/blog/2017/09/understaing-support-vector-machine-example-code/">Source</a></figcaption></figure><p>☞ In non-linear SVM’s it is not possible to separate the training data using a hyperplane</p><p>☞ SVM Kernal defines <em>a function that takes low dimensional input space and transform it to higher dimensional space hence a not separable data points transformed into seperable.</em></p><blockquote><strong>Advantages of Support Vectors</strong></blockquote><ul><li>SVM offers<em> best classification performance (accuracy) on the training data.</em></li><li>SVM renders more efficiency for correct classification of the future data.</li><li>The best thing about SVM is that it does not make any strong assumptions on data.</li><li>It does not <em>over-fit the data</em>.</li></ul><blockquote><strong>Disadvantages of Support Vector Machines</strong></blockquote><ul><li>Training time <em>higher on large dimensions</em> datasets.</li><li>Does not give good results when<em> we have noise</em> in our dataset.</li><li>SVM doesn’t directly <em>provide probability estimates</em>.Hence it can be calculated using k-fold cross validation.</li><li>SVM algorithms are slightly<em> harder to visualize </em>because of the complexity in formulation.</li></ul><blockquote><strong>Applications of Support Vector Machine</strong></blockquote><ul><li><em>Stock Market</em> forecasting by various financial institutions.</li><li><em>Face Detection </em>classify part of image as face or no face and create a boundary box.</li><li>Can be used in <em>Biomedical imaging</em> such as classification of Cancer and Protein cells.</li><li><em>Handwriting recognition</em> We use SVMs to recognize handwritten characters used widely.</li><li>Used in <em>Classification of Text Documents</em>.</li><li>Crucial for cases where <em>very high predictive power is required.</em></li></ul><p>ℹ <strong><em>Scikit learn implementation of Support Vector Machines Algorithm can be found </em></strong><a href="http://scikit-learn.org/stable/modules/svm.html"><strong><em>here</em></strong></a><strong><em>.</em></strong></p><p>ℹ <strong><em>R Implementation of Support Vector Machines Algorithm can be found </em></strong><a href="https://cran.r-project.org/web/packages/e1071/index.html"><strong><em>here</em></strong></a><strong><em>.</em></strong></p><blockquote>With the above info, I hope you will get a better understanding of the Support Vector Machines Algorithm.Also you can able to crack any interview question related to SVM’s.</blockquote><h3>For the Next Cheat Sheet of ML, Algorithm Please refer to this <a href="https://datasciencehub.medium.com/machine-learning-cheat-sheet-k-nearest-neighbors-algorithm-93462a66831">link</a>.</h3><h3>Do Checkout My Other Blogs related to ML/DL <a href="https://shashwatwork.github.io/blog/#">here</a>.</h3><p><em>If you like this Post, Please follow me. If you have noticed any mistakes in the way of thinking, formulas, animations, or code, please let me know.</em></p><p><em>Cheers!</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8abb9c350804" width="1" height="1" alt=""><hr><p><a href="https://medium.com/analytics-vidhya/machine-learning-cheat-sheat-support-vectors-machines-8abb9c350804">Machine Learning Cheat Sheat-Support Vectors Machines</a> was originally published in <a href="https://medium.com/analytics-vidhya">Analytics Vidhya</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Machine Learning Cheat Sheet-Naive Bayes]]></title>
            <link>https://medium.com/analytics-vidhya/machine-learning-cheat-sheet-naive-bayes-56a8ea5bb610?source=rss-cbffda0fff2d------2</link>
            <guid isPermaLink="false">https://medium.com/p/56a8ea5bb610</guid>
            <category><![CDATA[interview]]></category>
            <category><![CDATA[beginners-guide]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Shashwat Tiwari]]></dc:creator>
            <pubDate>Thu, 12 Nov 2020 08:25:44 GMT</pubDate>
            <atom:updated>2020-11-13T16:37:01.961Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*qZ-m0ymiGhnjWxDz" /><figcaption>Photo by <a href="https://unsplash.com/@timmossholder?utm_source=medium&amp;utm_medium=referral">Tim Mossholder</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p><em>Hello Everyone </em>👋<em>,</em></p><p><em>Nowadays Machine Learning and its Application are advancing day by day. It&#39;s becoming very hard for us to recall basic concepts related to Machine learning on daily basis.</em></p><p><em>Hence Introducing Machine learning Algorithm Cheat Sheet Series in which we will be recalling core concepts related to Machine learning Algorithm which will be helpful for you in cracking any Data Science Interview or projects.</em></p><p><em>It will be a point to point explanation for quick revision and understanding of Machine learning Algorithms.</em></p><blockquote>So Hold Tight………..</blockquote><blockquote><strong>Naive Bayes Algorithm</strong></blockquote><ul><li>Suppose you have to build a machine learning classifier in order to classify <strong>a web page, a document, an email or any other lengthy text notes </strong>manually. This is where Naive Bayes comes into the picture.</li><li>Naive Bayes Algorithm is a supervised learning classification algorithm that <strong>assumes that there is independence among predictors.</strong></li><li>Naive Bayes Classifier one of the most popular Algorithms<strong> grouped by similarities that work on the popular Bayes Theorem.</strong> In simple terms, a Naive Bayes classifier assumes that the <strong>presence of a particular feature in a class is unrelated to the presence of any other features.</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/411/1*nIKV_8sH5gnpc2kPu0DcHQ.png" /></figure><ul><li>Bayes Theorem basically calculates the<strong> posterior probability P(c|x)</strong> from <strong>P(c), P(x), and P(x|c)</strong>.In the above equation-</li></ul><p>👉<em>P(c|x) is the posterior probability of class c w.r.t given predictor x.</em></p><p>👉<em>P(c) is the prior probability of class c.</em></p><p>👉<em>P</em>(<em>x|c</em>) is the likelihood which is the probability of <em>predictor</em> given <em>class.P</em>(<em>x</em>) is the prior probability of <em>predictor</em>.</p><blockquote><strong>When to use Naive Bayes —</strong></blockquote><ul><li>The Size of training data is from <strong>Moderate to large.</strong></li><li>Given the classification parameter, <strong>attributes that describe the instances should be conditionally independent.</strong></li><li>If you have <strong>high dimensionality</strong> in your Training data.</li></ul><blockquote><strong><em>Advantages of Navie Bayes</em></strong></blockquote><ul><li>Naive Bayes Algorithm is more efficient when the <strong>input features are categorical.</strong></li><li>A Naive Bayes classifier <strong>converges faster, relatively to other discriminative models like logistic regression</strong>. Also, it requires less training.</li><li>It is easy and quick to bring out the <strong>prediction of classes for test data</strong>. It also performs well for multiclass classification problems.</li><li>Though it requires a<strong> conditional independence assumption</strong>, the Naive Bayes Classifier has presented good performance in various application domains.</li></ul><blockquote><strong>Disadvantages of Naive Bayes</strong></blockquote><ul><li>In real life datasets, <strong>it is almost impossible that we get a set of predictors that are completely independent</strong>. So the concept of independent predictors fails here.</li><li>Naive Bayes is also called <strong>Bad Estimator so one should not completely rely on its probability functions.</strong></li><li>Naive Bayes Algorithm suffers from the problem of <strong>“Zero Frequency”</strong>.Need to be treated with the smoothing techniques is called<em> </em><strong><em>Laplace estimation</em></strong>.</li></ul><blockquote><strong>Applications</strong></blockquote><ul><li><strong>Sentiment Analysis-</strong> Mostly used in text classification due to its efficient result in multiclass problems and independent feature rule. Also in Real World Facebook use it to analyze status updates expressing positive or negative emotions.</li><li><strong>Recommendation Systems-</strong> Naive Bayes when combines with Collaborative filtering gives a better recommendation engine which predicts whether a user would like a given Item or not.</li><li><strong>Document Categorization</strong>- Google uses document classification to index documents and finds relevancy scores i.e. the PageRank mechanism considers the pages marked as important in the databases that were parsed and classified using a document classification technique.</li></ul><p>ℹ <strong><em>Scikit learn implementation of Naive Bayes Algorithm can be found </em></strong><a href="https://scikit-learn.org/stable/modules/classes.html?highlight=naive%20bayes#module-sklearn.naive_bayes"><strong><em>here</em></strong></a><strong><em>.</em></strong></p><p>ℹ <strong><em>R Implementation of Naive Bayes Algorithm can be found </em></strong><a href="https://uc-r.github.io/naive_bayes"><strong><em>here</em></strong></a><strong><em>.</em></strong></p><blockquote>With the above info, I hope you will get a better understanding of the Naive Bayes Algorithm.Also you can able to crack any interview question related to Naive Bayes Algorithm.</blockquote><h4>For the Next Cheat Sheet of ML, Algorithm Please refer to this <a href="https://datasciencehub.medium.com/machine-learning-cheat-sheet-k-nearest-neighbors-algorithm-93462a66831">link</a>.</h4><h4><strong><em>Do Checkout My Other Blogs related to ML/DL </em></strong><a href="https://shashwatwork.github.io/blog/#"><strong><em>here</em></strong></a><strong><em>.</em></strong></h4><p><em>If you like this Post, Please follow me. If you have noticed any mistakes in the way of thinking, formulas, animations, or code, please let me know.</em></p><p><em>Cheers!</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=56a8ea5bb610" width="1" height="1" alt=""><hr><p><a href="https://medium.com/analytics-vidhya/machine-learning-cheat-sheet-naive-bayes-56a8ea5bb610">Machine Learning Cheat Sheet-Naive Bayes</a> was originally published in <a href="https://medium.com/analytics-vidhya">Analytics Vidhya</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>