<?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 Deeprajvadhwane on Medium]]></title>
        <description><![CDATA[Stories by Deeprajvadhwane on Medium]]></description>
        <link>https://medium.com/@deeprajvadhwane01?source=rss-be0061ccfbdf------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*kVB4NglpBpAPKdrjn16Qqg.png</url>
            <title>Stories by Deeprajvadhwane on Medium</title>
            <link>https://medium.com/@deeprajvadhwane01?source=rss-be0061ccfbdf------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 03 Dec 2026 12:39:55 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@deeprajvadhwane01/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[Natural Language Processing]]></title>
            <link>https://medium.com/@deeprajvadhwane01/natural-languanatural-language-processing-nlp-is-the-discipline-of-building-machines-that-can-d398712fef3c?source=rss-be0061ccfbdf------2</link>
            <guid isPermaLink="false">https://medium.com/p/d398712fef3c</guid>
            <dc:creator><![CDATA[Deeprajvadhwane]]></dc:creator>
            <pubDate>Mon, 15 Jul 2024 17:24:32 GMT</pubDate>
            <atom:updated>2024-07-16T06:34:18.390Z</atom:updated>
            <content:encoded><![CDATA[<p><a href="https://www.deeplearning.ai/the-batch/issue-44/">Natural language processing (NLP)</a> is the discipline of building machines that can manipulate human language — or data that resembles human language — in the way that it is written, spoken, and organized. It evolved from computational linguistics, which uses computer science to understand the principles of language, but rather than developing theoretical frameworks, NLP is an engineering discipline that seeks to build technology to accomplish useful tasks. NLP can be divided into two overlapping subfields: natural language understanding (NLU), which focuses on semantic analysis or determining the intended meaning of text, and natural language generation (NLG), which focuses on text generation by a machine. NLP is separate from — but often used in conjunction with — speech recognition, which seeks to parse spoken language into words, turning sound into text and vice versa.ge Processing (NLP)</p><h3>What is NLP?</h3><p>Natural Language Processing, or NLP, is all about creating machines that can understand and use human language. Whether it’s written, spoken, or organized in different ways, NLP helps computers handle language just like we do.</p><h4><strong>Where It Came From</strong></h4><p>NLP started in a field called computational linguistics. This field uses computer science to study how languages work. But instead of just creating theories, NLP focuses on building practical tools and technologies.</p><h4><strong>Two Key Areas in NLP</strong></h4><ol><li><strong>Natural Language Understanding (NLU)</strong></li></ol><p>This is like teaching computers to understand what we mean when we write or say something. It’s about grasping the meaning behind the words.</p><p><strong>2. Natural Language Generation (NLG):</strong></p><p>This is about making computers capable of creating human-like text. Imagine a computer writing a story or composing an email.</p><p><strong>NLP vs. Speech Recognition:</strong> While NLP deals with understanding and generating text, it’s different from speech recognition. Speech recognition is about converting spoken words into written text and vice versa, allowing computers to understand spoken language.</p><h4><strong>Why Does Natural Language Processing (NLP) Matter?</strong></h4><p>NLP is a crucial part of our daily lives and is becoming even more important as it’s used in various fields like retail and medicine.</p><p><strong>Everyday Uses of NLP:</strong></p><ul><li><strong>Customer Service:</strong> Chatbots in online stores use NLP to help customers.</li><li><strong>Healthcare:</strong> NLP can read and summarize medical records to assist doctors.</li><li><strong>Virtual Assistants:</strong> Tools like Amazon’s Alexa and Apple’s Siri use NLP to understand and answer your questions.</li><li><strong>Advanced Prose Generation:</strong> Sophisticated systems like GPT-3 can write detailed texts on many topics and power smart chatbots.</li><li><strong>Search Engines:</strong> Google uses NLP to improve search results.</li><li><strong>Social Media:</strong> Platforms like Facebook use NLP to detect and filter harmful content.</li></ul><p><strong>What is Natural Language Processing (NLP) Used For?</strong></p><ol><li><strong>Sentiment Analysis:</strong></li></ol><p>Determines if the emotion in text is positive, negative, or neutral.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*YjcQxQcoAvCA3AuY.png" /></figure><p><strong>2. Toxicity Classification:</strong></p><p>Identifies hostile intent and categories like threats or hate speech.</p><p><strong>Example:</strong> Filtering out offensive comments on social media platforms.</p><p><strong>3. Machine Translation:</strong></p><p>Translates text from one language to another.</p><p><strong>Example:</strong> Using Google Translate to convert English text to Spanish.</p><p><strong>4. Named Entity Recognition:</strong></p><p>Extracts specific entities like names, organizations, or locations from text.</p><p><strong>Example:</strong> Identifying “Barack Obama” as a person and “White House” as a location in news articles.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*6hSAAplzXeYitMMw.png" /></figure><p><strong>5. Spam Detection:</strong></p><p>Classifies emails as spam or not.</p><p><strong>Example:</strong> Gmail automatically moving unwanted emails to the spam folder.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/318/1*q_O1dInIa3YVZPlK5_aoOw.png" /></figure><p><strong>8. Text Generation:</strong></p><p>Produces human-like text.</p><p><strong>Example:</strong> GPT-3 writing articles or generating responses in a chatbot.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/416/1*Wi-vM96fQnma8WcXTvG1sA.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d398712fef3c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Transfromer]]></title>
            <link>https://medium.com/@deeprajvadhwane01/transfromer-a06fb028c69b?source=rss-be0061ccfbdf------2</link>
            <guid isPermaLink="false">https://medium.com/p/a06fb028c69b</guid>
            <dc:creator><![CDATA[Deeprajvadhwane]]></dc:creator>
            <pubDate>Wed, 17 Apr 2024 17:29:16 GMT</pubDate>
            <atom:updated>2024-04-17T17:31:52.120Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/875/0*qDjpygoZWXQZfmLk.png" /></figure><p>Transformer architecture was introduced by a team of researchers at Google’s Brain division in a 2017 paper titled “<strong>Attention Is All You Need</strong>.” This advent of the transformer marked a seismic shift in the landscape of NLP. It ushered in the era of large language models (LLMs) that have since demonstrated remarkable advancements in the realm of NLP, surpassing the capabilities of earlier-generation recurrent neural networks (RNNs). From machine translation and sentiment analysis to question answering and text summarization, LLMs based on transformers have set new benchmarks and opened up exciting possibilities for the future of AI-driven language tasks.</p><h3>Why Transformers?</h3><p>With the increase in popularity of Transformer models its critical to comprehend why so many practitioners and researchers in the field of natural language processing now turn to them. We examine the applications of Transformer models in this section as well as the reasons why they perform better than more conventional sequential models like convolutional neural networks (CNNs) and recurrent neural networks (RNNs). Transformers are essential in modern AI applications because of their many advantages which range from effective processing of lengthy sequences to interpretable attention mechanisms.</p><h3>Innovations and Advantages of Transformers</h3><p><strong>Parallelization and Scalability: </strong>Transformers enable the parallelization of computation across various segments of the input sequence by utilizing feed-forward layers and self-attention mechanisms. Compared to traditional recurrent models, Transformers’ parallel processing allows for faster training times and better scalability which makes them ideal for complicated tasks and large-scale datasets.</p><p><strong>Efficient Handling of Long Sequences: </strong>A key benefit of Transformer models is their efficient handling of long sequences. In contrast to recurrent models, which encounter problems with vanishing or exploding gradients when dealing with long sequences, Transformers can effortlessly grasp relationships between distant segments of the input sequence. This makes them perfect for activities like document summarizing, creating long-form texts, and translating machines.</p><p><strong>Global Contextual Information: </strong>Transformers are highly effective at capturing overall contextual information from all parts of the input sequence at the same time. Transformers can capture intricate relationships and dependencies by utilizing self-attention mechanisms, enabling them to take into account every aspect of the input sequence for making predictions. This allows Transformers to provide predictions that are more informed and contextually relevant than conventional sequential models.</p><p><strong>Reduced Training Time: </strong>Transformers have been demonstrated to cut down training time considerably in comparison to conventional recurrent models. Transformers are able to train more effectively on extensive datasets by getting rid of the requirement for repeated connections and making use of parallel processing. The decreased training time accelerates model development and enables quicker experimentation and iteration, resulting in a faster progress in research and development.</p><p><strong>Interpretable Attention Mechanisms: </strong>Transformers include attention mechanisms which offer understanding into the model’s decision-making process. The focus weights produced by Transformers show which sections of the input sequence are the most important for every prediction, leading to a more understandable and clear decision-making process in the model. This ability to understand the model’s reasoning is especially important in sectors like healthcare and finance, where interpretability holds great value.</p><p><strong>Transfer Learning and Fine-Tuning: </strong>Transformers facilitate both transfer learning and fine-tuning which makes it possible to apply pretrained models to new tasks with little further training. State-of-the-art performance on a variety of tasks can be achieved by fine-tuning pre-trained Transformer models that were trained on large scale datasets like BERT and GPT. Transformers can be used for a wide range of tasks and domains due to their ability to transfer knowledge.</p><p>Before we delve into the intricate details of the transformer architecture, let’s draw an analogy that simplifies the understanding of how transformers operate.</p><p>Imagine you are trying to comprehend a lengthy story. You can’t simply read the story from beginning to end, as you will forget what happened earlier in the narrative. Instead, you need to be able to focus on the important parts of the story and ignore the unimportant ones. Transformers function in a similar way. They can concentrate on the crucial elements of a sequence and disregard the less significant ones, even if the important parts are not consecutive.</p><p>A transformer accomplishes the following:</p><p><strong>1. Pays Attention:</strong> Just like you might pay extra attention to important parts of a story, the transformer pays attention to important words in a sentence.</p><p><strong>2. Understands Context:</strong> The transformer looks at all the words in the sentence together, not one after the other. This helps it understand how words depend on each other.</p><p><strong>3.</strong> <strong>Weighs Relationships:</strong> It figures out how words are related to each other. For example, if the sentence is about a cat and a mouse, it knows that these words are connected.</p><p><strong>4. Combines Insights:</strong> The transformer combines all this knowledge to understand the whole story and how words fit together.</p><p><strong>5. Predicts Next Steps:</strong> With its understanding, it can even guess what words might come next in the story.</p><p>At its core, the transformer architecture revolutionized the way neural networks process sequences by introducing the concept of “self-attention.” This self-attention mechanism lets each word in the sequence consider the entire context of the sentence, rather than just the words that came before it. This is akin to a person paying varying degrees of attention to different parts of a conversation.</p><p>Now, let’s explore the details of the transformer architecture.</p><p>The transformer architecture consists of two main components: <strong>the encoder and the decoder.</strong></p><p>The <strong>Encoder</strong> processes the input sequence, breaking it down into meaningful representations. On the other hand, a <strong>Decoder </strong>takes these representations and generates the output sequence, like a translation or a text continuation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/0*bsPOWzoevxmcc2OX.png" /></figure><p>Machine learning models are essentially large statistical calculators, primarily designed to process numerical data rather than text. Therefore, before feeding text into the model for processing, we must first convert words into numerical tokens. This process is called <strong>embedding</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/0*QRYIA3KdhUhwKQ8-.png" /></figure><p>Embedding serves the following purposes:</p><p><strong>1. Word to Vector Conversion:</strong> Each word or token in the input text is assigned a unique numerical vector. This vector represents the word’s meaning and context within the given language. These word vectors are often pre-trained on vast text corpora and capture semantic relationships between words.</p><p><strong>2. Embedding Layer:</strong> These word vectors pass through an “embedding layer” in the model. This layer acts as a lookup table, associating each word with its corresponding vector.</p><p>Next, we assign <strong>Positional Encodings</strong>.</p><p><strong>Positional encoding</strong> is a technique used to provide the model with information about the position or order of words in a sequence. Since transformers process words in parallel rather than sequentially, they lack the inherent understanding of word order that other models, like recurrent neural networks (RNNs), have. Positional encoding addresses this limitation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/0*GGYjjN2cUuottlkg.png" /></figure><p>Here’s how positional encoding works:</p><p><strong>Assigning Positions and Preserving Order Information:</strong> Each word or token input sequence is assigned a unique positional encoding vector. These vectors represent the position of each word in the sequence.</p><p><strong>Incorporating into Word Embeddings:</strong> These positional encoding vectors are added to the word embeddings of the input tokens. In essence, this adjustment augments each word’s initial word embedding to encompass crucial positional information within the sequence. Additionally, this allows the model to differentiate between words with the same content but different positions in the sequence.</p><p>The token embeddings (input tokens) and position encodings are fed to the self-attention layer in the transformer model.</p><h3>Self-Attention Layer</h3><p>The <strong>self-attention layer</strong> is a pivotal component of the transformer architecture, and it is responsible for capturing relationships and dependencies between words in a sequence. Let’s break down how the self-attention layer works step by step:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/0*jxIt9MOPS94X5f0y.png" /></figure><p><strong>1. Create Queries, Keys, and Values:</strong> To understand how words relate to each other, the self-attention layer creates three sets of vectors for each word in the input sequence:</p><ul><li><strong>Query (Q)</strong>: Represents the word we are currently focusing on. Each word has its corresponding Query vector.</li><li><strong>Key (K)</strong>: Represents all words we want to pull information from to help determine the relevance of each word to the Query.</li><li><strong>Value (V)</strong>: Contains the information of words that we’ll extract when there’s a match between Query and Key.</li></ul><p>Let’s outline the Q, K, and V values for the following sentence.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/0*hNtvR3fm7-QGlGdR.png" /></figure><p><strong>2. Derive Attention Scores:</strong> Next, the self-attention mechanism calculates attention scores between the Query vectors (Q) and the Key vectors (K). These scores indicate how much each word should pay attention to other words. Higher scores imply higher attention, suggesting that the word is more relevant to the Query. Lower scores suggest lower relevance or importance to the Query.</p><p><strong>3.</strong> <strong>Calculat</strong>e <strong>Weighted Sum:</strong> Using the calculated attention scores, the self-attention layer computes a weighted sum of the value vectors (V). Words with higher attention scores contribute more to this weighted sum. This step effectively combines the context of all words in the sequence for the Query word.</p><p><strong>4. Apply Multiple Attention Heads:</strong> To enhance its understanding of context, the transformer often employs multiple sets of Queries, Keys, and Values, known as “attention heads.” These heads allow the model to focus on different aspects of the sequence simultaneously. It’s like having multiple people in a group discussion, each paying attention to different parts of the conversation.</p><p><strong>5. Generate Output:</strong> The output contains contextualized representations of the words in the input sequence, taking into account their relationships with other words. This output now becomes the input for the Feed-Forward layer.</p><h3>Feed-Forward Layer</h3><p>The feed-forward layer in the transformer architecture is a neural network layer that is applied to the output of the self-attention layer. It is a position-wise transformation, meaning that it is applied to each position in the sequence independently of the other positions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/0*OBSCpZXDRdrvQ8P7.png" /></figure><p>The feed-forward layer plays a multifaceted role in the transformer architecture, facilitating the modeling of long-range dependencies, introducing non-linearity for complex relationships, and boosting the model’s capacity to process and extract meaningful information from input sequences.</p><p><strong>Let’s Simplify!</strong></p><p>Imagine you have a big box of Lego pieces. Each Lego represents a word or a part of a sentence. Now, when you’re building something with these Legos, sometimes you want to change the color or shape of a piece to make it fit better in your creation.</p><p>The feed-forward layer in the transformer is like a magical Lego workshop. You send your Lego pieces (words or parts of sentences) into this workshop one by one. Inside, there’s a magical machine that can reshape and repaint each Lego based on how it should fit best in the bigger picture of your creation.</p><p>Once the Lego piece (word) has gone through the machine and has been reshaped and repainted, it comes out, ready to be a part of your amazing Lego world (sentence). And the best part? Even though every Lego piece goes through the same machine, each one might come out looking a bit different based on its unique role in your creation.</p><p>That’s what the feed-forward layer does! It tweaks each word a little, so everything fits together better.</p><p>Let’s now delve into the details of feed-forward layer.</p><p><strong>Linear Transformation:</strong> The first step in the feed-forward layer is to apply a linear transformation to the input. This involves multiplying the input by a learnable weight and adding a bias. This linear transformation projects the input into a different (often higher-dimensional) space, setting the stage for intricate interactions and transformations.</p><p><strong>Activation Function:</strong> After the linear transformation, a non-linear activation function, such as Rectified Linear Unit (ReLU), is applied element-wise to the transformed input. The activation function introduces non-linearity, enabling the model to capture complex patterns in the data.</p><p><strong>Second Linear Transformation:</strong> Following the activation function, another linear transformation is applied to the results. This transformation employs a different set of learnable weights and a bias term to further adapt the data, potentially altering its dimensionality, though not necessarily reverting to the original size. This step refines the representations further, preparing them for subsequent layers or final outputs.</p><p><strong>Residual Connection and Layer Normalization</strong>: The transformer architecture addresses challenges like the vanishing gradient problem by using a residual connection. This means that the output of a layer is added to the initial input, allowing the model to learn to only make small changes to the input. Layer normalization is applied before adding the residual connection, promoting stability in training and ensuring consistent gradients throughout the layers.</p><p><strong>Let’s Simplify!</strong></p><p><strong>1. Residual Connection (or Skip Connection):</strong> Imagine you’re trying to solve a math problem, and your friend suggests a intricate method to solve it. Instead of completely discarding your initial approach, you synergize both: your method and your friend’s, to derive the answer.</p><p>Similarly, in deep learning, as we stack more layers, the learning process might become challenging. Residual connections come to the rescue by letting the input of a layer bypass some intermediate layers and directly merge with the output. In essence, the network can blend the original information (akin to your method) with the more refined information (similar to your friend’s approach).</p><p>Mathematically, it looks like this: <strong>Output = Input + Transformed Input</strong></p><p><strong>2. Layer Normalization:</strong> Let’s say you’re baking cookies by following a specific recipe. But every time you bake, your oven’s temperature fluctuates a lot. This makes it hard to consistently bake good cookies. To solve this, you decide to use an oven thermometer to ensure the temperature is consistent every time.</p><p>Layer normalization functions much like that oven thermometer. In deep learning, the values (like the oven’s temperature) can become too big or too small as they pass through layers. This can cause problems and make the network harder to train. Layer normalization, thus, standardizes these values across layers, ensuring consistency. Specifically, it adjusts inputs to a layer such that their average is 0 and their variability (standard deviation) is 1. This equilibration not only accelerates the learning process but also fortifies the model’s adaptability to unfamiliar data.</p><p>In the intricate framework of the transformer architecture, both residual connections and layer normalization are indispensable. They bolster the learning process, particularly given the model’s depth and inherent complexity.</p><p>Now back to the Encoder process.</p><h3>Output to Next Encoder Block or Decoder</h3><p>If additional Encoder blocks are stacked above the current one, the output from this Encoder block (after layer normalization) becomes the input for the subsequent Encoder block.</p><p>However, if this is the last Encoder block, its output is forwarded to the Decoder. This output acts as the key and value for the Decoder’s Multi-Head Attention mechanism, allowing it to attend to the Encoder’s output.</p><p>Assuming the output has been passed to the Decoder block, the diagram illustrates the steps encompassed within the Decoder process.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/0*NfGlIxWLbL5QEoMh.png" /></figure><p>Let’s break down the decoder process in the transformer architecture using a simple analogy.</p><p>Imagine you’re trying to translate a sentence from one language (say, French) to another (say, English). The decoder’s job is to produce the English sentence based on both the original French sentence and the bits of the English sentence it has generated so far.</p><p>Here’s a simple step-by-step explanation:</p><ol><li><strong>Input</strong>: The decoder takes in a part of the English sentence that has already been generated (in the beginning, this is just a start token).</li><li><strong>Self-Attention</strong>: Just like people often think about how words in a sentence relate to each other when translating, the decoder checks how each word in the English input relates to the other words. This helps in making sure the translation flows naturally and maintains context. This step is similar to the self-attention mechanism in the encoder but is focused on the target sentence.</li><li><strong>Cross-Attention</strong>: Next, the decoder pays “attention” to the French sentence (the encoded version). It’s like when you glance back at the original French text to make sure you’re translating correctly. The decoder checks which parts of the French sentence are most relevant to the word it’s currently trying to produce in English.</li><li><strong>Feed Forward and Output</strong>: The decoder then processes the information it has gathered from the above steps, decides on the next English word (or token), and adds it to the output sequence.</li><li><strong>Repeat</strong>: The decoder keeps doing this, generating one word at a time, until it decides the translation is complete and produces an end token.</li></ol><p>Throughout these steps, the transformer utilizes layers of decoders (often multiple stacked on top of each other) to refine the translation, ensuring accuracy and context.</p><p>So, in a nutshell, the decoder in the transformer architecture is like a smart translator that refers back to both the original sentence and what it has translated so far to produce a coherent and accurate translation.</p><p>Now let’s dive into the details of the decoder process. The decoder in the transformer architecture is a multi-step process.</p><ol><li><strong>Input Embedding: </strong>Just as with the Encoder, the input to the Decoder (which is the target sequence during training) is first embedded into continuous vectors. This embedded input is then added to the positional encoding to incorporate the sequence’s order information.</li><li><strong>Masked Multi-Head Self-Attention: </strong>The Decoder employs a masked version of the self-attention mechanism, ensuring each position can only attend to positions before it (or to itself) in the sequence. This masking is essential during training to prevent a word from “seeing” future words, maintaining the autoregressive property of the Decoder. It’s important to note that this masking is only applied during training. During inference, the decoder can attend to all words in the target sequence, including future words.</li><li><strong>Residual Connection &amp; Layer Normalization (post Self-Attention):</strong> A residual connection adds the output of the self-attention layer to its input. Layer normalization is then applied to stabilize and scale the activations.</li><li><strong>Multi-Head Attention over Encoder’s Output: </strong>This multi-head attention mechanism uses the Encoder’s output as its keys and values and the output from the Decoder’s self-attention as its queries. It allows the Decoder to focus on relevant parts of the source sequence while generating the target sequence.</li><li><strong>Residual Connection &amp; Layer Normalization: </strong>The output from the Multi-Head attention layer is combined with its input using a residual connection. This is followed by layer normalization.</li><li><strong>Position-wise Feed-Forward Network: </strong>The Decoder also has a position-wise Feed-Forward layer, similar to the one in the Encoder. This network consists of two linear (dense) layers with a ReLU activation function in between. It operates on each position independently, adding more expressive power to the Decoder.</li><li><strong>Residual Connection &amp; Layer Normalization</strong>: The output of the Feed-Forward network is combined with its input via a residual connection. Another layer normalization is applied.</li><li><strong>Stacking of Decoder Blocks: </strong>Just as multiple Encoder blocks are stacked in the Transformer, multiple Decoder blocks are stacked as well. The output from one block serves as the input to the subsequent block, passing through the above operations repeatedly.</li><li><strong>Output Linear Layer &amp; Softmax: </strong>Once the data passes through all the Decoder blocks, it goes through a final linear layer which maps it to the desired output vocabulary size. A softmax function is then applied to produce the probability distribution over the target vocabulary, generating the final output sequence.</li></ol><h3>Applications of Transformer Models</h3><ol><li><strong>Machine Translation:</strong> Transformers have brought about a significant transformation in the translation industry by attaining cutting-edge results across multiple language pairs. Transformer models can translate between various languages by using self-attention mechanisms and capturing global dependencies across input sequences while ensuring great accuracy and fluency.</li><li><strong>Natural Language Understanding (NLU):</strong> Transformers are commonly utilized in various NLU tasks such as text classification, sentiment analysis, and named entity recognition. They are highly skilled in deciphering the subtleties of human language because of their capacity to absorb rich text representations and contextual information.</li><li><strong>Natural Language Generation (NLG):</strong> Transformer models are also used in NLG tasks like language modeling dialogue generation and text summarization. Transformers produce coherent and contextually relevant text by learning from large corpora of text data which makes them useful tools for conversational systems and content generation.</li><li><strong>Question Answering:</strong> Transformers have demonstrated remarkable performance in tasks where the model is required to provide pertinent and accurate answers to user inquiries given a specific context. Transformer models are able to comprehend complex questions and produce precise answers by efficiently capturing semantic relationships and contextual data.</li><li><strong>Language Modeling:</strong> Transformers are frequently used in <a href="https://vyom-modi.medium.com/demystifying-language-modeling-from-models-to-applications-0c7c24640a6a"><em>language modeling</em></a> which is the process of forecasting the word or token that will appear next in a string of text. Transformer models can generate fluid and logical text by training on large amounts of text data, enabling them to grasp the underlying patterns and organization of human language.</li><li><strong>Speech Recognition:</strong> Transformers have been applied in converting spoken words into written text for tasks in speech recognition. Transformers can accurately convert spoken words into text by analyzing audio signals and using self-attention mechanisms. This has the potential to boost speech recognition systems.</li><li><strong>Image Captioning:</strong> Transformer models are now used for image captioning tasks in which the model creates textual descriptions of images in addition to text-based tasks. Transformer models have the ability to produce precise and informative captions for a variety of images by merging textual context with visual elements that are extracted from the images.</li><li><strong>Recommendation Systems:</strong> To tailor content and provide users with relevant recommendations, Transformers are being employed more frequently in recommendation systems. Transformer models forecast user preferences by examining user behavior and preferences. This allows them to suggest movies products or articles that are likely to be of interest.</li></ol><p>To summarize, the Decoder in the Transformer architecture processes its input through self-attention, cross-attention with the Encoder’s output, and position-wise Feed-Forward networks, repeatedly for each stacked block, culminating in a final output sequence after the softmax operation.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a06fb028c69b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Navigating the GenAI Frontier: Transformers, GPT, and the Path to Accelerated Innovation]]></title>
            <link>https://medium.com/@deeprajvadhwane01/navigating-the-genai-frontier-transformers-gpt-and-the-path-to-accelerated-innovation-161be7f6e55b?source=rss-be0061ccfbdf------2</link>
            <guid isPermaLink="false">https://medium.com/p/161be7f6e55b</guid>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[large-language-models]]></category>
            <category><![CDATA[transformers]]></category>
            <dc:creator><![CDATA[Deeprajvadhwane]]></dc:creator>
            <pubDate>Sat, 13 Apr 2024 17:36:36 GMT</pubDate>
            <atom:updated>2024-04-17T17:56:46.642Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YAd5BY7Hqdcdjz5U71Jl1Q.jpeg" /></figure><h4>What are Language Models?</h4><p>Language modeling is a technique that helps in capturing the relationship between <strong>words </strong>and <strong>sentences</strong>. Huge amounts of data are given as input to the architecture that builds the Large Language model.</p><h4>The Story of Neural Networks in Language Modeling</h4><p>Before 2013, various neural network architectures such as Shallow Artificial Neural Networks, Recurrent Neural Networks, Long Short Term Memory, and Gated recurrent neural networks were used for language modeling. These architectures worked better for tabular, image, and sequential data like text. However, each architecture had its own set of problems. For instance, while predicting the next word in language modeling, the sequence and context of the words were not preserved in shallow ANNs. RNNs with their sequential training that only one token can be processed at a time as input to the encoder, leading to very slow training. This leads to impracticality in training the model efficiently with large data. Another issue with RNNs was they couldn’t handle long-term dependencies. LSTM with an attention mechanism handled the long-term dependencies to an extent but didn’t work effectively on very long sentences. The problem of a slow training process continued as LSTM worked on sequential training.</p><h4>Seq2Seq and Attention Mechanism</h4><p><strong>2014: </strong><a href="https://proceedings.neurips.cc/paper/2014/hash/a14ac55a4f27472c5d894ec1c3c743d2-Abstract.html"><em>Sequence to Sequence Learning with Neural Networks</em></a> a paper by Ilya Sutskever, Oriol Vinyals and Quoc V. Le created the Encoder-Decoder Architecture which allowed for the handling of variable-length input and output sequences thereby revolutionizing sequence-to-sequence tasks such as machine translation.</p><p><strong>2015:</strong> The paper <a href="https://arxiv.org/abs/1409.0473"><em>Neural Machine Translation by Joint Learning to Align and Translate</em></a><em> </em>by Dzmitry Bahdanau, KyungHyun Cho and Yoshua Bengio builds upon Seq2Seq model and presents the Attention Mechanism. During the translation process, this mechanism dynamically focused on different parts of the source sentence addressing the issue of information loss in translation and producing more accurate translations particularly for longer sentences.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fiT3sEQiq9GX2nPlhOIIlA.jpeg" /><figcaption>Sequence to sequence Architecture</figcaption></figure><h4>Transformers</h4><p>The Transformer architecture, which was presented in the paper <a href="https://proceedings.neurips.cc/paper_files/paper/2017/hash/3f5ee243547dee91fbd053c1c4a845aa-Abstract.html"><em>Attention is All You Need</em></a><em> </em>by Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N. Gomez, Łukasz Kaiser and Illia Polosukhin in <strong>2017</strong>, is a significant breakthrough in sequence modeling. This advent of the transformer marked a seismic shift in the landscape of NLP. It ushered in the era of large language models (LLMs) that have since demonstrated remarkable advancements in the realm of NLP, surpassing the capabilities of earlier-generation recurrent neural networks (RNNs). From machine translation and sentiment analysis to question answering and text summarization, LLMs based on transformers have set new benchmarks and opened up exciting possibilities for the future of AI-driven language tasks.</p><h4>Why Transformer?</h4><p>1. <strong>Scalable and Parallel Compute:</strong> The Transformer architecture’s design allows for highly scalable and parallelized computation, making it well-suited for handling large datasets and complex tasks. This scalability enables efficient training and inference, reducing computational time and resources.</p><p>2. <strong>Revolutionized NLP with LLMs:</strong> Transformers, particularly with the introduction of Language Models like GPT-1, have revolutionized Natural Language Processing (NLP). They’ve set new benchmarks in tasks such as text generation, translation, and sentiment analysis, demonstrating superior performance and understanding of language.</p><p>3. <strong>Unification of DL Approaches:</strong> The Transformer architecture has served as a unifying framework for various deep learning approaches. It integrates self-attention mechanisms, positional encoding, and feed-forward networks into a cohesive structure.</p><p>4. <strong>Multi-Modal Capability:</strong> Transformers exhibit multi-modal capability, processing diverse data types like text, image, video, and audio within a unified framework. This adaptability showcases their versatility and drives advancements across various AI applications.</p><p>5. <strong>Accelerated GenAI:</strong> Transformers have accelerated the pace of innovation in the field of Generative Artificial Intelligence (GenAI). Their ability to model complex relationships and generate coherent and contextually relevant outputs has opened new avenues for creativity, problem-solving, and human-machine interaction.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*B3DfjzhA_rcJRXINHH8UdQ.png" /><figcaption>Transformer Architecture</figcaption></figure><h4><strong><em>Working of each component in architecture:</em></strong></h4><ol><li><strong>Self-attention mechanism: </strong>It is the central component of Transformer architecture. By allowing each word or token in the input sequence to pay attention to every other word or token in the sequence this mechanism captures relationships and global dependencies. The model can dynamically focus on the most pertinent data for each prediction by using self-attention to allocate varying weights to different input components.</li><li><strong>Positional Encoding:</strong> Transformers use positional encodings to preserve the sequence of words in input data without relying on recurrence. This information about the position of each word in the sequence is incorporated into the input embeddings through these encodings.</li><li><strong>Feed-Forward Neural Networks:</strong> Transformers apply non-linear transformations to input representations by utilizing feed-forward neural networks. These networks improve the representations of words or tokens by assisting in capturing intricate patterns and relationships in the input sequences.</li><li><strong>Multi-Head Attention: </strong>Transformers use multi-head attention mechanisms which involve parallel computation of attention using various learned linear projections. This improves the model’s capacity to recognize a variety of patterns by enabling it to concentrate on various segments of the input sequence at the same time.</li><li><strong>Skip Connections and Layer Normalization: </strong>Residual Connections or Skip Connections allow the network to hold onto crucial data from earlier layers which makes it easier to learn and optimize intricate patterns. Layer Normalization aids in stabilizing training and enhances the flow of information within the network.</li></ol><h3>Creation of GPT-1</h3><p>The introduction of the Transformer architecture by Google in 2017 led to a significant milestone in Natural Language Processing with the creation of Generative Pre-trained Transformer 1 (GPT-1). In June of 2018, OpenAI introduced GPT-1 along with the groundbreaking paper named <a href="https://s3-us-west-2.amazonaws.com/openai-assets/research-covers/language-unsupervised/language_understanding_paper.pdf"><em>Enhancing Language Comprehension through Generative Pre-Training</em></a> by Alec Radford, Karthik Narasimhan, Tim Salimans, and Ilya Sutskever.</p><p>This groundbreaking publication first presented the idea of generative pre-trained transformers, establishing the foundation for subsequent iterations of the GPT series, including GPT-2, GPT-3, GPT-3.5 and the latest GPT-4. In this section, we will explore the details of training GPT-1 from the beginning, drawing insights from the GPT-1 paper to shed light on the training process of this revolutionary language model.</p><h3>Training GPT-1 from Scratch</h3><ol><li><strong>Data Preprocessing:</strong> The data goes through numerous preprocessing steps before being used for training. Creating a list of all the distinct tokens that are present in the dataset is known as vocabulary creation and the process of breaking up the text into individual tokens is called tokenization. To improve the diversity and resilience of the training data data augmentation techniques can also be used.</li><li><strong>Architecture Overview:</strong> Like its predecessors GPT-1 uses a Transformer-based architecture with stacked encoder layers. To enable the model to recognize complex patterns and dependencies in the input data, each layer is composed of feed-forward neural networks and self-attention schemes.</li><li><strong>Pre-training Objective:</strong> Through the use of generative pre-training of a language model, the aforementioned paper proposed a novel method for understanding language. For a variety of downstream tasks the GPT architecture uses unsupervised pre-training and supervised fine-tuning. Prior to training the model gains a deep comprehension of language patterns and structures by learning to predict the subsequent token in a series based on the preceding tokens.</li><li><strong>Transformer Training:</strong> During training, GPT-1 undergoes optimization using algorithms like Stochastic Gradient Descent (SGD) or Adam. Learning rate schedules may adjust the learning rate dynamically throughout the training process, ensuring stable convergence. Batch size considerations are also crucial, balancing computational efficiency and model performance.</li><li><strong>Fine-Tuning:</strong> GPT-1 can adjust its learned representations after pre-training by fine-tuning it on particular downstream tasks. Retaining the pre-trained weights while training the model on task-specific datasets is known as fine-tuning. By using this method GPT-1 can achieve state-of-the-art performance in several NLP tasks.</li><li><strong>Evaluation and Performance:</strong> Metrics like F1 score, accuracy, and perplexity are measured to assess GPT-1s performance on benchmark datasets and tasks. Comparative analyses with other models, including BERT, provides insights into the effectiveness and versatility of GPT-1 across different domains and applications.</li></ol><p>To summarize, the Decoder in the Transformer architecture processes its input through self-attention, cross-attention with the Encoder’s output, and position-wise Feed-Forward networks, repeatedly for each stacked block, culminating in a final output sequence after the softmax operation.</p><p>Refereces:- <a href="https://proceedings.neurips.cc/paper/2014/hash/a14ac55a4f27472c5d894ec1c3c743d2-Abstract.html">https://proceedings.neurips.cc/paper/2014/hash/a14ac55a4f27472c5d894ec1c3c743d2-Abstract.html</a></p><p><a href="https://proceedings.neurips.cc/paper_files/paper/2017/hash/3f5ee243547dee91fbd053c1c4a845aa-Abstract.html">Attention is All you Need</a></p><p><a href="https://arxiv.org/abs/1409.0473">https://s3-us-west-2.amazonaws.com/openai-assets/research-covers/language-unsupervised/language_understanding_paper.pdf</a></p><p><a href="https://s3-us-west-2.amazonaws.com/openai-assets/research-covers/language-unsupervised/language_understanding_paper.pdf">https://s3-us-west-2.amazonaws.com/openai-assets/research-covers/language-unsupervised/language_understanding_paper.pdf</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=161be7f6e55b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Language Revolution: How Large Language Models are Changing the World]]></title>
            <link>https://medium.com/@deeprajvadhwane01/large-language-models-853314400707?source=rss-be0061ccfbdf------2</link>
            <guid isPermaLink="false">https://medium.com/p/853314400707</guid>
            <category><![CDATA[large-language-models]]></category>
            <dc:creator><![CDATA[Deeprajvadhwane]]></dc:creator>
            <pubDate>Fri, 12 Apr 2024 03:31:55 GMT</pubDate>
            <atom:updated>2024-04-12T04:16:46.078Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JYO7Au5kLczQL3ojiyKuVg.jpeg" /></figure><p>One of the most talked-about advancements in the field of artificial intelligence in recent years is the use of large language models (LLMs). But what are LLMs specifically, and what are the applications? We’ll go into the intriguing realm of LLMs, their possible uses, and the difficulties they offer in this blog.</p><p>Many techniques were tried to perform natural language-related tasks but the LLM is purely based on deep learning methodologies. LLM (Large language model) models are highly efficient in capturing the complex entity relationships in the text at hand and can generate the text using the semantic and syntactic of that particular language in which we wish to do so.</p><p>Probably the most famous example of a large language model to date is OpenAI’s GPT-4, which powers ChatGPT. It has demonstrated a remarkable understanding of complex topics and the ability to generate detailed, nuanced text in various styles and languages. This showcased the potential of large language models to transform industries, enhance productivity, and even entertain.</p><p>As the technology continues to improve every single day, LLM use cases are also becoming more sophisticated and diverse. Let’s take a closer look at the most trending applications of large language models and see how they are utilized in real life.</p><h3>Popular applications of large language models</h3><p>Large language models’ ability to generate text in real timehas made them invaluable in enhancing search engines, powering virtual assistants, and improving language translation services. While these are just three examples, there are many more LLM use cases.</p><h3>1. Content generation</h3><p>LLM applications are especially good at content generation. They can be used to automatically create texts for various purposes, including articles, blog posts, marketing copy, video scripts, and social media updates. Moreover, LLM-backed generative AI apps can adapt to different writing styles and tones, making them versatile for generating content that resonates with specific target audiences.</p><h4>Real-world apps</h4><p>Among the myriad applications of large language models, content generation stands out as one of the most popular and widely adopted use cases. This is why there are already numerous AI-powered apps that serve this particular purpose. Claude and ChatGPT are two of them.</p><p><strong>Claude</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/820/1*A3rCbueKOflyUsbfRhDnNA.png" /></figure><p>Claude is an AI assistant developed by Anthropic. It has rapidly evolved since its first release in March 2023.</p><p>Claude is great at sophisticated dialogues, creative content generation, complex reasoning, and detailed instruction. Its unique feature is the industry-leading 100,000 token context window, which allows it to process an extensive amount of information equivalent to the length of an average novel in just a minute.</p><h4><strong>ChatGPT</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*35i3vZD0eBec7hBQLQhqPA.png" /></figure><p>When it comes to content generation, it’s impossible not to bring up this well-known AI tool. Its main purpose is to assist users in generating coherent text based on the prompts it receives.</p><p>Digital marketers, for example, turn to ChatGPT to craft compelling ad copy, blog posts, and social media content that captivates their specific target audience. Similarly, educators find ChatGPT helpful in creating instructional materials, quizzes, and interactive learning modules, making the educational content both informative and engaging for students.</p><p>In the creative industry, authors and script writers use ChatGPT to break through writer’s block, develop plot ideas, or even write entire sections of their manuscripts. Programmers and developers also utilize ChatGPT to generate code snippets, debug existing code, or learn new programming languages.</p><h3>2. Translation and localization</h3><p>LLM applications can provide accurate, context-aware translations across numerous language pairs. These models are trained on vast collections of bilingual or multilingual text, allowing them to understand nuances, idioms, and grammatical structures of different languages. They can maintain the intent and style of the original text, which is crucial for literary translations, business communications, and legal documents.</p><p>As for localization, LLMs help adapt content culturally and contextually for different target audiences, ensuring that the translated material is culturally appropriate and resonant. They consider local customs, measurements, date formats, and cultural references, making the content relevant and accessible. This capability is particularly important in marketing and entertainment industries, where engagement heavily depends on cultural nuance.</p><p>In addition to this, large language models facilitate real-time translation and localization, enabling businesses to communicate effectively with international partners and customers.</p><h4>Real-world apps</h4><p>Let’s take a look at two large language model applications — Falcon LLM and NLLB-200.</p><p><strong>Falcon LLM</strong></p><p>Falcon LLM, developed by the Technology Innovation Institute (TII), is an open-source AI model. Its Falcon 40B version was trained on 1 trillion tokens and has 40 billion parameters, while Falcon 180B boasts 180 billion parameters, having been trained on 3.5 trillion tokens.</p><p>In general, Falcon LLM excels across a spectrum of activities, including reasoning, programming, skill assessments, and knowledge evaluations.</p><p>What’s noteworthy is that its multilingual capabilities extend across numerous languages, including English, German, Spanish, French, Italian, Polish, Romanian, Swedish, and more, making it adept at translation and localization tasks. This allows for seamless integration into various applications, especially those requiring a deep understanding of multiple languages.</p><p><strong>NLLB-200</strong></p><p>NLLB-200 is an artificial intelligence model introduced by Meta AI. It translates across 200 different languages, incorporating many that were previously unsupported or poorly served by existing translation tools, and notably includes support for 55 African languages.</p><p>This model is not just a technical achievement but also a step towards a more inclusive technology, allowing for better communication and understanding across a diverse range of languages and cultures.</p><h3>3. Search and recommendation</h3><p>LLMs are capable of understanding and processing natural language queries with unprecedented accuracy and context. When integrated into search engines, these models can interpret the intent behind a user’s query and deliver more relevant and precise results. They can also generate summaries of content, making it easier for users to find the information they need quickly.</p><p>In recommendation systems, LLMs analyze user preferences, search history, and interaction data to personalize content suggestions. They can predict user needs, thereby enhancing the entire user experience.</p><h4>Real-world apps</h4><p>Let’s explore Bard — a compelling example of how LLM applications are enhancing search systems.</p><p><strong>Bard</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TAOwqEl4LLB5ja1z5ANYFw.png" /></figure><p>Developed by Google and launched in March 2023, Bard is a good example of an LLM application in search. Originating from the LaMDA family and subsequently upgraded to PaLM and Gemini, Bard was introduced as a response to the rise of OpenAI’s ChatGPT.</p><p>As a research LLM, Bard leverages Google’s extensive knowledge base and predictive capabilities to generate responses, offering creative and flexible answers to user prompts.</p><h3>4. Virtual assistants</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*XEBPllXnmj4MxLiF.jpg" /></figure><p>At the core of AI-powered virtual assistants are LLMs that understand and process natural language. When a user asks a question or gives a command, the LLM interprets the intent and context of the request. Once the intent is understood, the LLM generates an appropriate response.</p><p>Modern virtual assistants also learn from interactions to provide personalized responses and improve over time. They analyze feedback, remember users’ preferences, and adapt to their unique way of communication.</p><p>Here is what LLM-based virtual assistants do specifically:</p><ul><li><strong>Performing tasks</strong>: Virtual assistants can perform a variety of tasks, from setting alarms and reminders to booking appointments, sending messages, or even ordering groceries. They interact with other applications and services to execute these tasks on behalf of the user.</li><li><strong>Providing information</strong>: They can answer questions and provide information on a wide range of topics like weather forecasts, news, and traffic updates. LLMs enable them to pull and generate information from various sources quickly and reliably.</li><li><strong>Facilitating conversations</strong>: Virtual assistants can engage in conversations, providing a more human-like interaction.</li><li><strong>Automating customer support</strong>: Many businesses use virtual assistants to handle customer inquiries, guide users through troubleshooting, or provide detailed product information. This automation can lead to faster response times and 24/7 support availability.</li><li><strong>Enhancing accessibility</strong>: For individuals with disabilities or those needing hands-free support, virtual assistants offer a valuable tool for interacting with technology and accessing information effortlessly.</li></ul><h4>Real-world apps</h4><p>Large language models are the driving force behind some of the most advanced and widely-used virtual assistants today, including Amazon’s Alexa and Google Assistant. Let’s see how they apply this technology to boost their services.</p><p><strong>Alexa</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/272/1*nmictt2iJORB3xGVUDtt3w.png" /></figure><p>Alexa is Amazon’s voice-controlled virtual assistant based on a cloud service. It is capable of voice interaction, music playback, setting alarms, streaming podcasts, and providing real-time information such as news or weather. Alexa can also control several smart devices, functioning as a home automation system.</p><p>In September 2023, Amazon announced a significant upgrade to Alexa, introducing a new, custom-built LLM to enhance the assistant’s capabilities and conversational qualities. The revamped Alexa aims to surpass ChatGPT by providing more “real-world” functionalities, including real-time information and personalized interactions, with a more realistic and casual voice.</p><p><strong>Google Assistant</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/218/1*0uEDiDmWAZZzQseI8k0oxg.png" /></figure><p>Google Assistant is an AI-powered virtual assistant predominantly available on mobile and smart home devices. It can engage in two-way conversations, utilizing Google’s deep learning neural network, known as Google Neural Machine Translation, as part of its AI.</p><p>Users can ask Google Assistant to carry out tasks like sending texts, playing music, or providing weather updates. It’s also integrated with various smart devices and can control smart home appliances.</p><h3>5. Code development</h3><p>Large language models can assist programmers in writing, reviewing, and debugging code. These models can understand and generate code snippets, suggest completions, and even write entire functions based on brief descriptions. For instance, a developer might input a comment like “sort a list of numbers in ascending order,” and the LLM can provide the corresponding code.</p><p>Furthermore, LLMs can translate code between different programming languages, making it easier for developers to work with unfamiliar syntax or migrate projects to a new language.</p><h4>Real-world apps</h4><p>StarCoder is among the most popular LLM applications designed to make developers’ lives a little bit easier. Let’s dive deeper into it.</p><p><strong>StarCoder</strong></p><p>StarCoder is a collaborative effort between Hugging Face and ServiceNow. This open-source LLM is trained on a diverse and extensive dataset sourced from GitHub, which includes a wide array of programming languages, Git commits, GitHub issues, and Jupyter notebooks. The model itself is substantial, with approximately 15 billion parameters and training on 1 trillion tokens, with further fine-tuning on 35 billion Python tokens.</p><p>In terms of performance, StarCoder has been demonstrating strong capabilities in various coding tasks. It can handle a large context length of over 8,000 tokens, which is particularly useful for understanding and generating extensive code sequences. This makes it suitable for code autocompletion, modification, and providing explanations in natural language.</p><p>One of the notable features of StarCoder is its multilingual support, allowing it to understand and generate code in over 80 languages.</p><h3>6. Sentiment analysis</h3><p>Large language models applications can be utilized for sentiment analysis, thanks to their deep understanding of language nuances and context. Trained on extensive datasets, they can quite accurately determine the sentiment behind texts, ranging from social media posts to customer reviews.</p><p>LLM applications work by classifying the text such as positive, negative, or neutral, often accompanied by associated confidence scores. For instance, in customer feedback analysis, large language models can discern specific emotions or attitudes towards products or services. This enables businesses to gain valuable insights into customer satisfaction and tailor their strategies accordingly.</p><h4>Real-world apps</h4><p>As we delve into the real-world LLM use cases for sentiment analysis, notable examples include Grammarly and its tone detector feature.</p><p><strong>Grammarly</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xwBcMUK4sWdpf8fWUiJ9LA.png" /></figure><p><strong>Grammarly</strong>is and, widely use writing enhancement tools and a brser extension. It provides grammar and spell checking as well as plagiarism detection services, among others, to ensure that the text is clear and mistake-free. At its core, Grammarly uses powerful large language models to understand the context and offer suggestions to enhance writing style, tone, and clarity.</p><p>One of the innovative features of Grammarly is its tone detector. It analyzes the text for sentiment and emotional cues, categorizing the tone into various labels such as disheartening, curious, formal, accusatory, disapproving, assertive, joyful, or optimistic, and others. It helps you understand how your message might be perceived by the reader and allows you to adjust the tone accordingly.</p><p>For businesses, this feature is invaluable in maintaining brand voice consistency, enhancing customer communication, and making sure that the messages align with the intended sentiment, whether it’s professional, supportive, or friendly.</p><h3>7. Question answering</h3><p>Question answering is among typical and very widespread LLM applications. These models easily understand and generate human-like text, making them ideal for providing accurate and contextually relevant answers to a wide array of questions.</p><p>Users can interact with large language models through search engines, virtual assistants, customer service bots, or educational platforms.</p><h4>Real-world apps</h4><p>Let’s explore an example of how LLMs are utilized for question answering from Meta.</p><p><strong>LLaMA</strong></p><p>LLaMA, short for Large Language Model Meta AI, is trained on a vast corpus of 1.4 trillion tokens, enabling it to predict and generate text by taking a sequence of words as input. This is why LLaMA is particularly good at answering questions across various domains, understanding context, and providing accurate, relevant information.</p><p>Its versatility allows it to be fine-tuned for specific tasks, especially sophisticated question answering scenarios. By offering LLaMA in various sizes and sharing its code, Meta aims to make AI research more accessible and encourage further work on enhancing large language models for better problem-solving and question-answering.</p><h3>8. Market research</h3><p>Large language models are able to provide deep insights into consumer behavior, trends, and preferences. They can analyze customer feedback, identify patterns and sentiments, predict market trends, and generate reports summarizing complex data into actionable insights.</p><p>For instance, an LLM can evaluate thousands of product reviews to determine the most appreciated features or common complaints, guiding companies in product development and marketing strategies.</p><p>LLMs are capable of performing extensive research on competition surrounding specific products or services. They can track the evolution of trends, benchmark against competitors, and provide strategic insights for positioning and innovation.</p><h4>Real-world apps</h4><p>Let’s see how real-world applications like Brandwatch and Talkwalker are leveraging large language models to transform data into useful business insights.</p><p><strong>Brandwatch</strong></p><p>Brandwatch is a digital consumer intelligence platform that utilizes AI and machine learning developments to analyze online conversations and provide insights for market research.</p><p>Brandwatch provides access to an extensive pool of online consumer discussions, encompassing social media, blogs, forums, and news sites. This vast dataset enables the platform to conduct thorough sentiment analysis, trend spotting, and brand perception studies. By harnessing this data, businesses can rapidly respond to market shifts, understand consumer needs and opinions, and identify emerging trends.</p><p><strong>Talkwalker</strong></p><p>Talkwalker is a market research tool that provides real-time, data-backed responses to critical management questions. It combines existing customer data with social intelligence to understand which products consumers love or dislike, creating a holistic view of a company’s performance and identifying key factors about products.</p><p>Leveraging social intelligence, Talkwalker allows companies to tap into a vast pool of consumer opinions and trends, helping them stay ahead in a fast-moving market environment. This tool is particularly useful for conducting product listening and collecting customer product feedback, both crucial for maintaining a competitive edge and fostering product development.</p><h3>9. Education</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*nnwnjqw1kYC_L1Fi.jpg" /></figure><p>LLM applications are increasingly being used in education to personalize learning and provide tutoring.</p><p>LLMs can adapt to individual student’s learning styles and pace, offering customized explanations and feedback. For instance, a model can generate interactive reading materials that adjust complexity based on the student’s comprehension level or provide real-time language translation to aid foreign students.</p><p>Just like being virtual tutors, LLMs can answer students’ questions, guide them through problem-solving steps, and even motivate them with encouraging messages.</p><h4>Real-world apps</h4><p>Unsurprisingly (or surprisingly for some?), the ubiquitous Duolingo owl has made a savvy move by enhancing its educational services through LLMs.</p><p><strong>Duolingo</strong></p><p>Duolingo has introduced Duolingo Max, a new subscription plan that leverages the power of GPT-4. It offers two new features: <em>Explain My</em> <em>Answer</em> and <em>Roleplay</em>.</p><p><em>Explain My Answer</em> allows learners to receive detailed explanations about their responses in lessons, helping them understand why an answer was right or wrong and giving further clarification and examples.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xZzyukI_szX-wyAjZkd40A.png" /></figure><h4>Conclusion</h4><p>In simpler terms, Large Language Models (LLMs) are like super-smart assistants that can do a lot of cool stuff with language. They help us write articles, translate languages accurately, find what we’re looking for on the internet faster, and even chat with us like real people. They’re the brains behind virtual assistants like Alexa and Google Assistant, making them smarter and more helpful. Plus, they’re handy for coding, understanding how people feel through their writing, and answering all sorts of questions we might have. LLMs are not only making our lives easier but also opening up new possibilities in education, market research, and more. So, it’s safe to say they’re shaping the way we interact with technology and each other in pretty big ways!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=853314400707" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Bagging and Boosting]]></title>
            <link>https://medium.com/@deeprajvadhwane01/bagging-and-boosting-d7c32575377a?source=rss-be0061ccfbdf------2</link>
            <guid isPermaLink="false">https://medium.com/p/d7c32575377a</guid>
            <category><![CDATA[dat]]></category>
            <category><![CDATA[bagging]]></category>
            <category><![CDATA[boosting]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Deeprajvadhwane]]></dc:creator>
            <pubDate>Fri, 10 Mar 2023 05:17:41 GMT</pubDate>
            <atom:updated>2023-03-10T05:17:41.627Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*knQ2LhN9n_durFODfQ6cng.png" /></figure><h3>Bagging Vs Boosting</h3><p>Hello friends,</p><p>In this Blog, I will discuss Bagging and Boosting. These (Bagging and Boosting) are commonly used terms by data scientists all over the world. But what exactly these terms mean and how does it help the data scientists. In this Blog, we will learn about bagging and boosting and how they are used in practice.</p><p>So, let’s get started.</p><h3>1. Introduction to Ensemble Learning</h3><ul><li>Bagging and boosting are both ensemble learning methods in machine learning.</li><li>Bagging and boosting are similar in that they are both ensemble techniques, where a set of weak learners are combined to create a strong learner that obtains better performance than a single one.</li><li>Ensemble learning helps to improve machine learning model performance by combining several models. This approach allows the production of better predictive performance compared to a single model.</li><li>The basic idea behind ensemble learning is to learn a set of classifiers (experts) and to allow them to vote. This diversification in Machine Learning is achieved by a technique called ensemble learning. The idea here is to train multiple models, each the objective to predict or classify a set of results.</li><li>Bagging and boosting are two types of ensemble learning techniques. These two decrease the variance of single estimate as they combine several estimates from different models. So the result may be a model with higher stability.</li><li>The main causes of error in learning are due to noise, bias and variance. Ensemble helps to minimize these factors. By using ensemble methods, we’re able to increase the stability of the final model and reduce the errors mentioned previously.</li><li>Bagging helps to decrease the model’s variance.</li><li>Boosting helps to decrease the model’s bias.</li><li>These methods are designed to improve the stability and the accuracy of Machine Learning algorithms. Combinations of multiple classifiers decrease variance, especially in the case of unstable classifiers, and may produce a more reliable classification than a single classifier.</li><li>To use Bagging or Boosting you must select a base learner algorithm. For example, if we choose a classification tree, Bagging and Boosting would consist of a pool of trees as big as we want as shown in the following diagram:</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*PErjbybiRc-qYkxC.png" /></figure><p>Before understanding bagging and boosting and how different classifiers are selected in the two algorithms, we need to first understand about Bootstrapping.</p><h3>2. Bootstrapping</h3><ul><li>Bootstrap refers to random sampling with replacement. Bootstrap allows us to better understand the bias and the variance with the dataset.</li><li>So, Bootstrapping is a sampling technique in which we create subsets of observations from the original dataset with replacement. The size of the subsets is the same as the size of the original set.</li><li>Bootstrap involves random sampling of small subset of data from the dataset. This subset can be replaced.</li><li>The selection of all the example in the dataset has equal probability. This method can help to better understand the mean and standand deviation from the dataset.</li><li>Let’s assume we have a sample of ’n’ values (x) and we want an estimate of the mean of the sample. We can calculate it as follows:</li><li>mean(x) = 1/n * sum(x)</li><li>Bootstrapping can be represented diagrammatically as follows:</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1010/0*LsE2Mtbe4Doq5ABh.png" /></figure><p>Now, we turn our attention to bagging and boosting.</p><h3>3. Bagging</h3><h3>Boostraping + Aggregation =&gt; Bagging</h3><ul><li>Bagging ( or Bootstrap Aggregation), is a simple and very powerful ensemble method. Bagging is the application of the Bootstrap procedure to a high-variance machine learning algorithm, typically decision trees.</li><li>Bagging works by creating multiple versions of the same models,each model trained on a different random subset of the training set of data.</li><li>By averaging the prediction of these multiple models bagging helps to reduce the variance of the model,making it to sensitive to small fluctuation in the training data.</li><li>However , since each model is training on a different subset of data, the bias of model is not affected, as it uses the same assumptions and relationships as the original model.</li><li>This results in a reduction of variance while keeping bias of model roughly the same,helping to find a balance between overfitting and underfitting.</li><li>The idea behind bagging is combining the results of multiple models (for instance, all decision trees) to get a generalized result. Now, bootstrapping comes into picture.</li><li>Bagging (or Bootstrap Aggregating) technique uses these subsets (bags) to get a fair idea of the distribution (complete set). The size of subsets created for bagging may be less than the original set.</li><li>It can be represented as follows:</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/978/0*Daasb1HcCWaJF5fv.png" /></figure><p>Bagging works as follows:-</p><ol><li>Multiple subsets are created from the original dataset, selecting observations with replacement.</li><li>A base model (weak model) is created on each of these subsets.</li><li>The models run in parallel and are independent of each other.</li><li>The final predictions are determined by combining the predictions from all the models.</li></ol><p>Now, bagging can be represented diagrammatically as follows:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1012/0*za4a07E_P-TWO-An.png" /></figure><h3>4. Boosting</h3><ul><li>Boosting is a sequential process, where each subsequent model attempts to correct the errors of the previous model. The succeeding models are dependent on the previous model.</li><li>Boosting is an Ensemble learning method that combines a set of weak learners into strong learners to minimize training errors.</li><li>In this technique, learners are learned sequentially with early learners fitting simple models to the data and then analyzing data for errors. In other words, we fit consecutive trees (random sample) and at every step, the goal is to solve for net error from the prior tree.</li><li>When an input is misclassified by a hypothesis, its weight is increased so that next hypothesis is more likely to classify it correctly. By combining the whole set at the end converts weak learners into better performing model.</li><li>Three Popular Types of algorithm or Boosting Methods :-</li><li><strong>AdaBoost or Adaptive Boost</strong></li><li><strong>Gradient Boost</strong></li><li><strong>Extreme Gradient Boost or XGBoost</strong></li></ul><p>Let’s understand the way boosting works in the below steps.</p><ol><li>A subset is created from the original dataset.</li><li>Initially, all data points are given equal weights.</li><li>A base model is created on this subset.</li><li>This model is used to make predictions on the whole dataset.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/171/0*3IVwk63Li5CAjcLk.png" /></figure><ol><li>Errors are calculated using the actual values and predicted values.</li><li>The observations which are incorrectly predicted, are given higher weights. (Here, the three misclassified blue-plus points will be given higher weights)</li><li>Another model is created and predictions are made on the dataset. (This model tries to correct the errors from the previous model)</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/166/0*88MHx7s6h08vEAhw.png" /></figure><ol><li>Similarly, multiple models are created, each correcting the errors of the previous model.</li><li>The final model (strong learner) is the weighted mean of all the models (weak learners).</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*SWAhAlZYE2tNijvp.png" /></figure><ul><li>Thus, the boosting algorithm combines a number of weak learners to form a strong learner.</li><li>The individual models would not perform well on the entire dataset, but they work well for some part of the dataset.</li><li>Thus, each model actually boosts the performance of the ensemble.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/180/0*zbBJYTjzGOTfZm6Q.png" /></figure><h3>5. Getting N learners for Bagging and Boosting</h3><ul><li>Bagging and Boosting get N learners by generating additional data in the training stage.</li><li>N new training data sets are produced by random sampling with replacement from the original set.</li><li>By sampling with replacement some observations may be repeated in each new training data set.</li><li>In the case of Bagging, any element has the same probability to appear in a new data set.</li><li>However, for Boosting the observations are weighted and therefore some of them will take part in the new sets more often.</li><li>These multiple sets are used to train the same learner algorithm and therefore different classifiers are produced.</li><li>This is represented diagrammatically as follows:</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*Uo2UI_c2RV_yhPfb.png" /></figure><h3>6. Weighted data elements</h3><ul><li>Now, we know the main difference between the two methods.</li><li>While the training stage is parallel for Bagging (i.e., each model is built independently), Boosting builds the new learner in a sequential way as follows:</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*53mOmceArNMdXIxR.png" /></figure><ul><li>In Boosting algorithms each classifier is trained on data, taking into account the previous classifiers’ success.</li><li>After each training step, the weights are redistributed. Misclassified data increases its weights to emphasise the most difficult cases.</li><li>In this way, subsequent learners will focus on them during their training.</li></ul><h3>7. Classification stage in action</h3><ul><li>To predict the class of new data we only need to apply the N learners to the new observations.</li><li>In Bagging the result is obtained by averaging the responses of the N learners (or majority vote).</li><li>However, Boosting assigns a second set of weights, this time for the N classifiers, in order to take a weighted average of their estimates.</li><li>This is shown diagrammatically below:</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*-9-WFkwo5LrCNiaB.png" /></figure><ul><li>In the Boosting training stage, the algorithm allocates weights to each resulting model.</li><li>A learner with good a classification result on the training data will be assigned a higher weight than a poor one.</li><li>So when evaluating a new learner, Boosting needs to keep track of learners’ errors, too.</li><li>Let’s see the differences in the procedures:</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*GLDiPZiQFY3dpIPH.png" /></figure><ul><li>Some of the Boosting techniques include an extra-condition to keep or discard a single learner.</li><li>For example, in AdaBoost, the most renowned, an error less than 50% is required to maintain the model; otherwise, the iteration is repeated until achieving a learner better than a random guess.</li><li>The previous image shows the general process of a Boosting method, but several alternatives exist with different ways to determine the weights to use in the next training step and in the classification stage.</li></ul><h3>8. Selecting the best technique- Bagging or Boosting</h3><ul><li>Now, the question may come to our mind — whether to select Bagging or Boosting for a particular problem.</li><li>It depends on the data, the simulation and the circumstances.</li><li>Bagging and Boosting decrease the variance of your single estimate as they combine several estimates from different models. So the result may be a model with higher stability.</li><li>If the problem is that the single model gets a very low performance, Bagging will rarely get a better bias. However, Boosting could generate a combined model with lower errors as it optimises the advantages and reduces pitfalls of the single model.</li><li>By contrast, if the difficulty of the single model is over-fitting, then Bagging is the best option. Boosting for its part doesn’t help to avoid over-fitting.</li><li>In fact, this technique is faced with this problem itself. For this reason, Bagging is effective more often than Boosting.</li></ul><h3>9. Similarities between Bagging and Boosting</h3><p>Similarities between Bagging and Boosting are as follows:-</p><ol><li>Both are ensemble methods to get N learners from 1 learner.</li><li>Both generate several training data sets by random sampling.</li><li>Both make the final decision by averaging the N learners (or taking the majority of them i.e Majority Voting).</li><li>Both are good at reducing variance and provide higher stability.</li></ol><h3>10. Differences between Bagging and Boosting</h3><p>Differences between Bagging and Boosting are as follows:-</p><ol><li>Bagging is the simplest way of combining predictions that belong to the same type while Boosting is a way of combining predictions that belong to the different types.</li><li>Bagging aims to decrease variance, not bias while Boosting aims to decrease bias, not variance.</li><li>In Baggiing each model receives equal weight whereas in Boosting models are weighted according to their performance.</li><li>In Bagging each model is built independently whereas in Boosting new models are influenced by performance of previously built models.</li><li>In Bagging different training data subsets are randomly drawn with replacement from the entire training dataset. In Boosting every new subsets contains the elements that were misclassified by previous models.</li><li>Bagging tries to solve over-fitting problem while Boosting tries to reduce bias.</li><li>If the classifier is unstable (high variance), then we should apply Bagging. If the classifier is stable and simple (high bias) then we should apply Boosting.</li><li>Bagging is extended to Random forest model while Boosting is extended to Gradient boosting.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/797/0*mfJOSKaWI2oCaXIM" /></figure><h3>11. Summary and Conclusion</h3><ul><li>In this kernel, we discussed two very important ensemble learning techniques — Bagging and Boosting.</li><li>We have discussed Bootstrapping, Bagging and Boosting in detail.</li><li>We have discussed classification stage in action.</li><li>Then, we have shown how to select the best technique — Bagging or Boosting for a particular problem.</li><li>Lastly, we have discussed similarities and differences between Bagging and Boosting.</li><li>I hope this article would have given you a solid understanding of Bagging and Boosting.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d7c32575377a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Supervised Learning]]></title>
            <link>https://medium.com/@deeprajvadhwane01/a-complete-machine-learning-pipeline-ee46da132824?source=rss-be0061ccfbdf------2</link>
            <guid isPermaLink="false">https://medium.com/p/ee46da132824</guid>
            <dc:creator><![CDATA[Deeprajvadhwane]]></dc:creator>
            <pubDate>Fri, 20 Jan 2023 16:47:42 GMT</pubDate>
            <atom:updated>2023-01-20T17:37:04.655Z</atom:updated>
            <content:encoded><![CDATA[<p>Introduction to supervised Machine Learning</p><ul><li>What is machine learning?</li><li>Types of Machine learning Algorithms</li><li>Supervised Machine Learning</li><li>Classification vs Regression</li></ul><h3><strong>What is machine learning?</strong></h3><p>Machine learning is a subfield of artificial intelligence, which is broadly defined as <strong>the capability of a machine to imitate intelligent human behavior</strong>.</p><p>Task <strong>T</strong>: image classification problem of classifying dogs and cats</p><p>Experience <strong>E</strong>: I would give a ML algorithm a bunch of images of dogs and cats</p><p>The performance measure <strong>P</strong>: the ML algorithm could learn how to distinguish a new image as being either a dog or cat.</p><p>Machine learning (Machine Learning by Tom Mitchell):</p><p><strong>A computer program is said to learn from experience </strong>E<strong> with respect to some class of tasks </strong>T<strong> and performance measure </strong>P<strong>, if its performance at tasks in </strong>T<strong>, as measured by </strong>P<strong>, Improves with experience </strong>E<strong>.</strong></p><h3><strong>Types of Machine learning Algorithms</strong></h3><ol><li><strong>Supervised Learning</strong>: Input data is called training data and has a known label or result. Ex: Spam/not-spam or a stock price at a time.</li><li><strong>Unsupervised Learning</strong>: Input data is not labeled and does not have a known result. EX: Grouping customers by purchasing behavior</li><li><strong>Semi-Supervised Learning</strong>: Input data is a mixture of labeled and unlabeled examples. EX: a photo archive where only some of the images are labeled, (e.g. dog, cat, person) and the majority are unlabeled.</li><li><strong>Reinforcement Learning</strong>: a goal-oriented learning based on interaction with environment. Autonomous cars.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/1*mlhCfNeNSo75TRH9yEUJIA.png" /><figcaption>Types of Machine learning</figcaption></figure><h3><strong>Supervised Machine Learning</strong></h3><ol><li>Regression: Linear Regression, Logistic Regression</li><li>Instance-based Algorithms: k-Nearest Neighbor (KNN)</li><li>Decision Tree Algorithms: CART</li><li>Bayesian Algorithms: Naive Bayes</li><li>Ensemble Algorithms: EXtreme Gradient Boosting</li><li>Deep Learning Algorithms: Convolution Neural Network</li></ol><figure><img alt="Supervised learning" src="https://cdn-images-1.medium.com/max/998/1*E5AxGBka4ThYaZX_ILYj0g.png" /><figcaption>simple diagam for Supervised learning</figcaption></figure><h3><strong>Classification vs Regression</strong></h3><h4>Regression in Machine Learning Explained</h4><p>Regression finds correlations between dependent and independent variables. Therefore, regression algorithms help predict continuous variables such as house prices, market trends, weather patterns, oil and gas prices (a critical task these days!), etc.</p><p>The Regression algorithm’s task is finding the mapping function so we can map the input variable of “x” to the continuous output variable of “y.”</p><h4>Classification in Machine Learning Explained</h4><p>On the other hand, Classification is an algorithm that finds functions that help divide the dataset into classes based on various parameters. When using a Classification algorithm, a computer program gets taught on the training dataset and categorizes the data into various categories depending on what it learned.</p><p>Classification algorithms find the mapping function to map the “x” input to “y” discrete output. The algorithms estimate discrete values (in other words, binary values such as 0 and 1, yes and no, true or false, based on a particular set of independent variables. To put it another, more straightforward way, classification algorithms predict an event occurrence probability by fitting data to a logit function.</p><p>Classification algorithms are used for things like email and spam classification, predicting the willingness of bank customers to pay their loans, and identifying cancer tumor cells.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/301/1*aPAsFJJiL0AmPXWlV60JjA.png" /><figcaption>Classification vs Regression</figcaption></figure><h3>Feedback for me?</h3><p>I am data science practitioners and would love to hear from you — positive or negative reviews.</p><p><strong>LinkedIn</strong>: <a href="https://www.linkedin.com/in/deepraj-vadhwane">https://www.linkedin.com/in/deepraj-vadhwane</a></p><p><strong>Email:</strong> deeprajvadhwane01@gmail.com</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ee46da132824" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>