<?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 Mohan Kumar on Medium]]></title>
        <description><![CDATA[Stories by Mohan Kumar on Medium]]></description>
        <link>https://medium.com/@whitelovemohan123?source=rss-b071b3cc833f------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*_tf92jGRPptB0WlINWPPeQ.jpeg</url>
            <title>Stories by Mohan Kumar on Medium</title>
            <link>https://medium.com/@whitelovemohan123?source=rss-b071b3cc833f------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 14:31:17 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@whitelovemohan123/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[India’s Biggest AI Hackathon: AI Devs Competition Hosted by Langflow-AI]]></title>
            <link>https://medium.com/@whitelovemohan123/indias-biggest-ai-hackathon-ai-devs-competition-hosted-by-langflow-ai-4903c58061b5?source=rss-b071b3cc833f------2</link>
            <guid isPermaLink="false">https://medium.com/p/4903c58061b5</guid>
            <category><![CDATA[langflow]]></category>
            <category><![CDATA[summarization]]></category>
            <category><![CDATA[langchain]]></category>
            <category><![CDATA[llm-agent]]></category>
            <category><![CDATA[prompt-engineering]]></category>
            <dc:creator><![CDATA[Mohan Kumar]]></dc:creator>
            <pubDate>Tue, 27 Aug 2024 18:49:38 GMT</pubDate>
            <atom:updated>2024-08-27T18:50:40.278Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*90evQtpxENIMQG83sg0pvQ.png" /></figure><p>The AI Devs Competition, hosted by Langflow-AI, has commenced on August 26th. It is one of the biggest AI hackathons in India. In this article, we will discuss how to participate and where to get more information about the hackathon. Here is the <a href="https://www.langflow.org/aidevs-india"><strong><em>link</em></strong></a><strong><em> </em></strong>to the hackathon site.</p><p><strong>Prerequisites of the Hackathon</strong></p><p>This hackathon is open to everyone. You don’t need coding experience to participate. Even if you have no AI or coding background, you can still join the hackathon.</p><p><strong>Timelines and Other Details</strong></p><p>The hackathon is a 3-week challenge, with each week having its own winners. The difficulty of the problems will increase each week. The hackathon started on August 26th and will end on September 15th. For more details, you can join their <a href="https://discord.com/invite/EqksyE2EX9"><strong>Discord server</strong></a>.</p><p><strong>Week 1</strong> — The problem statement for the first week has been released. It is related to prompt engineering. In this challenge, you are required to design prompts for an agent that summarizes texts. You will be provided with a text file containing information about prompting techniques and other prompt engineering-related materials. Additionally, a JSON file will be provided, which you must import into Langflow. This will allow you to see the components used in the Summarizer, which will generate a TL;DR (Too Long; Didn’t Read) summary for the provided text file. The last date for submitting the Week 1 challenge solution is September 1st at 23:59 IST.</p><p><strong>Evaluation Criteria for the 1st Week Challenge</strong></p><p><strong>Primary Metric:</strong> The generated TL;DR will be evaluated against 10 questions for similarity. Your summary should be comprehensive enough to accurately answer these questions.</p><p><strong>Secondary Metric:</strong> The number of tokens in the generated summary will be used as a tiebreaker. Shorter, more concise summaries that still capture all necessary information will be favored.</p><p><strong>NOTE:</strong> You must submit your result through Langwatch. Your Langwatch traces will be used for evaluations. Make sure to enter the correct information in the Langwatch evaluator.</p><p><strong>FAQs Regarding the Week 1 Challenge</strong></p><ul><li>API keys will be provided by the organizers. These are available in the announcements section of <a href="https://discord.com/invite/EqksyE2EX9"><strong>Discord.</strong></a></li><li>You can change the flow and add other components, but make sure you submit only via Langwatch. Ensure that the content part of the prompt component is connected to the context data of the Langwatch Evaluator, and the chat output is connected to the chat output part of the Langwatch Evaluator.</li><li>You can submit as many times as you want; your last submission will be considered your valid submission.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/818/1*nahVFzSpqoe1l2jGJqRIBA.png" /></figure><p><strong>Prizes</strong></p><p>For the first week, the total prize pool is ₹2,00,000. Here is the distribution:</p><ul><li><strong>1st Place:</strong> ₹50,000</li><li><strong>2nd Place:</strong> ₹40,000</li><li><strong>3rd Place:</strong> ₹25,000</li><li><strong>4th Place:</strong> ₹15,000</li><li><strong>5th to 10th Place:</strong> ₹10,000 each</li><li><strong>11th to 50th Place:</strong> Gift Cards</li></ul><p>There will also be a bonus prize for content creation. A total of ₹60,000 will be awarded to the best content created during the competition. The top 10 content creators will be rewarded for their efforts.</p><p><strong>TL;DR</strong></p><p>This hackathon is an amazing opportunity for both technical and non-technical individuals. You will gain insights into how LLMs (Large Language Models) work.</p><p>Here is the Important link: You will get to know all the details there.</p><p><a href="https://www.langflow.org/aidevs-india"><strong>Website link</strong></a> , <a href="https://discord.com/invite/EqksyE2EX9"><strong>Discord link</strong></a></p><p>#IADevsIndia # Langflow #OPENAI</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4903c58061b5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Support Vector Machines]]></title>
            <link>https://medium.com/@whitelovemohan123/support-vector-machines-ab42b6eb732e?source=rss-b071b3cc833f------2</link>
            <guid isPermaLink="false">https://medium.com/p/ab42b6eb732e</guid>
            <category><![CDATA[svm-algorithm]]></category>
            <category><![CDATA[supervised-learning]]></category>
            <category><![CDATA[kernel-trick]]></category>
            <category><![CDATA[classification]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Mohan Kumar]]></dc:creator>
            <pubDate>Sat, 12 Aug 2023 10:46:19 GMT</pubDate>
            <atom:updated>2023-08-12T10:46:19.982Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*acEXfBaR6T2BWpG9" /></figure><p>Support Vector Machines (SVM) are a powerful class of supervised machine learning algorithms used for classification and regression tasks. They excel in scenarios where the data is not linearly separable and can also be extended to handle non-linear data through the use of kernel functions. It’s a bit confusing let me simplify it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*ewpHzMM6zv05bEj7" /></figure><p>In the above figure if I gave you a task to separate the blue circles and red squares. You can do it very easily, the line in the figure is the boundary that will classify both the classes. Any point above the line will be classified as a blue circle and the points falling under the line will be classified as a red square. Separation is the main purpose of SVM. You can say that this can be done by Logistic Regression, why choose the SVM algorithm? Let’s see another example.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/380/0*3eYQlqac_a2kehwD" /></figure><p>In the above example if you have to classify the red and blue points can you do it with a line? The answer is “NO”, you can try doing it with the help of logistic regression by adding some polynomial features to the data, but still the results will not be satisfactory and also it will be computationally very expensive. Here comes the kernel method of SVM. This figure is in 2D so we will add a new dimension Z such that Z=e^-x². The graph of e^-x² looks like the following.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/406/0*pKrkMJAlDqfNV9EM" /></figure><p>Here we can see that the red center points will be lifted upwards as they are close to the center while leaving the blue points almost in their early position. In this way, you can see that we find a plane that will classify both classes. Here we can see that we are getting a plane that is separating both red and blue points. The figure in 3d will look like this.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/349/0*gEIv7ScJuVLEuh6E" /></figure><p>Here in 2D, our classifying plane will look something like the following image.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/397/0*-OkufpLf-1PwI2yB" /></figure><p>The plane in 3d which classifies the points is called a hyperplane. The functions through which our data is transformed into higher dimension is called kernel function. Still confused about the kernel, don’t worry we will sort it out by the end of the blog.</p><h3>Intuition behind SVM</h3><p>For understanding the geometric intuition behind SVM we will concentrate on 2D data for simplicity. In the following figure, we have to classify blue rhombi and green circles. There can be multiple decision boundaries that will classify these points, then how should we decide which line will be the best decision boundary?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/596/0*XEFVis6PzDz1jeKd" /></figure><p>The best decision boundary will be that line which will have the biggest margin. Margin means the distance between the support vectors. Support vectors are the nearest point to the decision boundary of each class. The goal of SVM is to maximize the margin and find the best decision boundary. The hyperplane which is above the decision boundary is called positive hyperplane and below it is called negative hyperplane.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/850/0*wNhnnEqjr4a51iko" /></figure><p>In the first figure, we can see that we have some different boundaries and each one is classifying the two classes well. But none of them is the best boundary as someone is much close to the blue circle or the green triangle. The best decision boundary will be having the greatest margin and will be equidistant from both classes.</p><h3>Hyperparameters of SVM</h3><p><strong>Kernel:</strong></p><p>The kernel is a crucial hyperparameter that defines the transformation used to map the original feature space into a higher-dimensional space. It allows the SVM to find a nonlinear decision boundary in the transformed dimension, even though the original data might not be linearly separable. In simple words, it is just the function with the help of our original data converting into higher dimensional space.</p><p>Some few kernels used in SVM:</p><p><strong>Polynomial Kernel:</strong> The polynomial kernel transforms the data into a higher-dimensional space using polynomial functions. The formula is typically: <em>K</em>(<em>x</em>,<em>y</em>)=(<em>x</em>⋅<em>y</em>+<em>c</em>)^<em>d</em>, where <em>d</em> is the degree of the polynomial and <em>c</em> is a constant term. This kernel is useful for capturing moderate levels of nonlinearity.</p><p><strong>Radial Basis Function(RBF) Kernel: </strong>The RBF kernel, also known as the Gaussian kernel, transforms the data into an infinite-dimensional space(It might sound counterintuitive, but it is what it is). The formula is <em>K</em>(<em>x</em>,<em>y</em>)=exp(−∥<em>x</em>−<em>y</em>∥²​/2*σ^*2), where <em>σ</em> is a bandwidth parameter that often performs like “Gamma”. On increasing the value of <em>σ</em> the Gaussian distribution becomes broader and the decision boundary becomes smoother. Smaller values of <em>σ</em> result in narrower distributions, making the decision boundary more sensitive to individual data points. This kernel is quite flexible and can capture complex nonlinear relationships in the data. It’s commonly used when you don’t have prior knowledge about the specific nonlinear transformation required.</p><p><strong>Sigmoid Kernel:</strong> It is another type of kernel function used in Support Vector Machines (SVMs) for classification. Unlike some other kernels, like the linear or RBF kernels, the sigmoid kernel doesn’t have as widespread use and is less commonly used in practice.</p><p><strong>Regularization parameter(C):</strong> It is a crucial hyperparameter in Support Vector Machines (SVMs) that controls the balance between achieving a low training error and having a simple decision boundary. In simple words, the goal is to find a decision boundary that maximizes the margin between the support vectors of different classes. The regularization parameter <em>C</em> determines how much the SVM should prioritize correctly classifying the training data versus having a wider margin.</p><p>A smaller value of <em>C</em> emphasizes a wider margin, even if it means some training points may be misclassified. This can lead to a simpler decision boundary and potentially better generalization to new, unseen data. A larger value of <em>C</em> prioritizes correctly classifying the training data over having a wider margin. This can lead to a more complex decision boundary and better training accuracy but less generalization of the model.</p><p><strong>Gamma(<em>γ):</em></strong> it controls the shape of the RBF kernel and has a significant impact on the decision boundary of the SVM. It influences the spread of the distribution.</p><p>A small gamma value leads to a more relaxed and smoother decision boundary. The decision boundary is less sensitive to individual data points, which can help the model generalize well to new data. This results in more data points being considered as support vectors. A large gamma value creates a more complex and tightly fit decision boundary. The decision boundary is influenced by individual data points, possibly leading to overfitting if not controlled properly. A large gamma leads to fewer support vectors, as the decision boundary becomes more localized around individual points.</p><h3><strong>Conclusion</strong></h3><p>Support Vector Machines (SVMs) stand as a remarkable achievement in the field of machine learning, showcasing their prowess in handling complex classification tasks. SVMs have proven their versatility across various domains. Whether in image recognition, text analysis, or bioinformatics, SVMs continue to leave a profound impact on diverse industries.</p><p>I hope this blog helps in understanding the concepts of SVM. Comment down your thoughts, feedback or suggestions if any below. If you liked this blog, share it with your friends and press the clap button, subscribe to the <a href="https://medium.com/@whitelovemohan123">Mohan Kumar — Medium</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ab42b6eb732e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Demystifying Logistic Regression]]></title>
            <link>https://medium.com/@whitelovemohan123/demystifying-logistic-regression-27f507bb39?source=rss-b071b3cc833f------2</link>
            <guid isPermaLink="false">https://medium.com/p/27f507bb39</guid>
            <category><![CDATA[binary-classification]]></category>
            <category><![CDATA[sigmoid-function]]></category>
            <category><![CDATA[multiclass-classification]]></category>
            <category><![CDATA[logistic-regression]]></category>
            <category><![CDATA[supervised-learning]]></category>
            <dc:creator><![CDATA[Mohan Kumar]]></dc:creator>
            <pubDate>Sat, 15 Jul 2023 02:03:22 GMT</pubDate>
            <atom:updated>2023-07-15T02:03:22.900Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/410/1*l5JtHZx0w5t1_t8URj9_zQ.png" /></figure><p>In the realm of machine learning and statistical modeling, logistic regression is a powerful algorithm used for binary classification problems. It allows us to predict the probability of an event occurring based on a set of input variables. Whether you’re new to machine learning or seeking a deeper understanding of logistic regression, this comprehensive guide will equip you with the knowledge needed to apply this technique effectively. Through a series of clear explanations and real-life examples, we will build the foundation of our machine-learning concepts.</p><p><strong>Introduction to Binary Classification</strong></p><p>Binary classification is a fundamental problem in machine learning where the objective is to classify data instances into one of two mutually exclusive categories or classes. These classes are often referred to as the positive class (usually denoted as “1”) and the negative class (usually denoted as “0”). The goal is to determine which class a given data instance belongs to based on its features or attributes.</p><p>Let’s consider a real-life example: email spam detection. In this scenario, the task is to classify incoming emails as either spam or not spam. The positive class represents spam emails, and the negative class represents non-spam emails. The binary classification model analyzes various features of an email (such as sender, subject, body content, keywords, etc.) and predicts whether it is spam or not. This model helps us to focus more on important emails and also makes our inbox clean.</p><p>The key challenge in binary classification is to find a decision boundary that separates the two classes effectively. This decision boundary(usually sigmoid) is a mathematical function or rule that assigns data instances to the positive or negative class based on their feature values. Here comes the logistic regression which helps us to determine this decision boundary by modeling the relationship between the input variables and the probability of belonging to the positive class.</p><p><strong>Sigmoid Function</strong></p><p>The sigmoid function, also known as the logistic function, is a crucial component of logistic regression. It plays a fundamental role in mapping the output of a linear function to a probability value between 0 and 1.</p><p>In logistic regression, the goal is to estimate the probability of an event belonging to the positive class based on a set of input variables. The linear regression part of logistic regression calculates a weighted sum of the input variables, similar to ordinary linear regression. However, instead of directly outputting this sum as the prediction, logistic regression applies the sigmoid function to transform it into a probability.</p><p>The sigmoid function is defined as follows:</p><p>f(x) = 1 / (1 + e^(-x))</p><p>Here, f(x) represents the output or probability estimate, and x represents the linear combination of input variables and their respective coefficients. The sigmoid function takes any real number as input and returns a value between 0 and 1. As x approaches positive infinity, f(x) approaches 1, indicating a high probability of belonging to the positive class. Similarly, as x approaches negative infinity, f(x) approaches 0, indicating a low probability of belonging to the positive class.</p><figure><img alt="Sigmoid funtion image" src="https://cdn-images-1.medium.com/max/850/1*YuabQiGBA-W-5PWsojwN5A.png" /></figure><p>The sigmoid function has a characteristic S-shaped curve, which makes it suitable for logistic regression. By applying the sigmoid function to the linear combination of input variables, logistic regression effectively models the relationship between the inputs and the probability of the event occurring.</p><p><strong>Equation Of Logistic Regression</strong></p><p>In logistic regression, the linear function z is typically expressed as:</p><p>z = β0 + β1<em>x1 + β2</em>x2 + … + βn*xn</p><p>Here, β0, β1, β2, …, βn are the coefficients (also called weights) associated with the input variables x1, x2, …, xn. The coefficients represent the impact or contribution of each input variable on the predicted probability. The sigmoid function then transforms the value of z into a probability estimate. Let’s consider an example for understanding the above equation, Suppose you are a cricket fan and you want to make a bet on a fantasy cricket app upon the team which has a higher probability of winning the match. Before making the bet you will consider some conditions like pitch conditions, the current status of the team members of both teams, the previous record of both teams, etc. These conditions will be the features of our dataset and can be denoted as x1, x2, x3, …, xn. Our logistic regression model will have the same equations as linear regression with a little change at the last, the output will have to undergo sigmoid transformation(like the Antman transformation) to be in the range of 0 to 1.</p><p>The sigmoid function’s output can be interpreted as the probability of the event belonging to the positive class. For example, if the sigmoid function returns a value of 0.8 for a particular instance, it implies an estimated probability of 0.8 or 80% likelihood of that instance belonging to the positive class.</p><p><strong>Multiclass Logistic Regression</strong></p><p>Multiclass logistic regression extends the binary classification capability of logistic regression to handle problems with more than two classes. It allows us to predict the probability of an instance belonging to each class within a multiclass problem setting.</p><p>In binary logistic regression, we have a binary response variable (0 or 1), and the model estimates the probability of belonging to the positive class. However, in multiclass logistic regression, we deal with response variables having more than two classes. For example, classifying images into various categories, such as cats, dogs, and birds.</p><p>There are two main approaches to implementing multiclass logistic regression:</p><p><strong>One-Vs-Rest Approach</strong></p><p>OVR involves training multiple binary logistic regression models, where each model focuses on distinguishing one class from the rest of the classes. Suppose we have a multiclass problem with K classes. To apply the OvR approach, we create K separate logistic regression models. For each model, we designate one class as the positive class and consider the remaining K-1 classes as the negative class.</p><p>During the training phase, we train each binary logistic regression model independently. For example, let’s say we have a review of a viewer about a movie on IMDB and we have to classify the review into 3 classes good, medium, bad. First, we create 3 separate logistic regression models. One model for classifying good reviews as positive and the other two reviews as negatives and respectively for each type of review. In the end, we choose the model with the highest probability and that review will belong to that particular group of reviews.</p><p><strong>Multinomial Logistic Regression</strong></p><p>It is also known as Softmax Regression and is an extension of binary logistic regression to handle multi-class classification problems directly. Instead of training multiple binary classifiers as in the one-vs-rest approach, the multinomial logistic regression algorithm trains a single model that can assign probabilities to multiple classes.</p><p>Let’s consider a multi-class classification problem with k classes, similar to the one described before. In multinomial logistic regression, we introduce a weight matrix W of size (n_features, k) and a bias vector b of size (1, k), where n_features is the number of input features.</p><p>Given an input sample x, the hypothesis function for multinomial logistic regression calculates the probability that x belongs to each class i as follows:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/208/0*PWEX9pL6mWOtNWM3" /></figure><p>Here, W_i and b_i represent the i-th column of weight matrix W and bias vector b, respectively. The softmax function is used to ensure that the probabilities sum up to 1.</p><p>The cost function in multinomial logistic regression is the cross-entropy loss, which measures the difference between the predicted probabilities and the true class labels. The cost function for a single training example is given by:</p><figure><img alt="Cost function in Logistic Regression" src="https://cdn-images-1.medium.com/max/326/1*lTtn8CIEA6bvxIaAq4vfgQ.png" /></figure><p>Here, y_i is the true class label, and p(y=i|x) is the predicted probability of class i given input x.</p><p>To predict the class for a new input sample x, we use the trained parameters W and b to calculate the probabilities of x belonging to each class using the hypothesis function. The class with the highest probability is then assigned as the predicted class for x.</p><p>The multinomial logistic regression algorithm allows for direct training of a model that can classify input samples into multiple classes. It is widely used in machine learning for multi-class classification tasks, where the classes are mutually exclusive.</p><p><strong>Conclusion</strong></p><p>Logistic regression is a widely used algorithm in various domains due to its simplicity, interpretability, and effectiveness in binary classification problems. It is used in medical diagnosis, credit risk assessment, fraud detection, sentiment analysis, quality control, image and object recognition etc. These are just a few examples of the many real-life applications of logistic regression.</p><p>It’s the first thought of a machine learning engineer when comes to the classification problem. You can interpret it like Ronaldo of the classification problem.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=27f507bb39" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Linear Regression]]></title>
            <link>https://medium.com/@whitelovemohan123/linear-regression-fb8d09d212e6?source=rss-b071b3cc833f------2</link>
            <guid isPermaLink="false">https://medium.com/p/fb8d09d212e6</guid>
            <category><![CDATA[linear-regression]]></category>
            <category><![CDATA[simple-linear-regression]]></category>
            <category><![CDATA[loss-function]]></category>
            <category><![CDATA[multiple-linearregression]]></category>
            <dc:creator><![CDATA[Mohan Kumar]]></dc:creator>
            <pubDate>Thu, 06 Jul 2023 11:25:23 GMT</pubDate>
            <atom:updated>2023-07-06T11:25:23.928Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/388/1*j58EUYW7RoHO6uLX-4MJQg.jpeg" /></figure><p><strong>Linear Regression</strong></p><p>Linear Regression is the cornerstone of predictive modeling and a fundamental technique in the arsenal of every machine learning engineer. It is the first milestone a person completes when he starts learning machine learning. In this blog, we will embark on an enlightening journey that not only covers the basics of Linear Regression but also delves into advanced concepts. So, fasten your seatbelts and prepare to unravel the depths of this powerful technique.</p><p><strong>Introduction</strong></p><p>Linear Regression is a powerful and widely used technique in machine learning, serving as the foundation for many predictive modeling tasks. It is one of the most important and mostly used supervised learning algorithms. At its core, Linear Regression aims to establish a relationship between a dependent variable and one or more independent variables. In simple words, we can say that it tries to find a linear relationship between the target value and the other independent variables. For example, if we have to buy a house, generally, we look into some features like the Area of the plot, the number of rooms, the Balcony, the Crime rate in nearby colonies etc. Here in the above case if you want to make a prediction model which can predict the price of a plot in a given area. The first algorithm you will try will be linear regression. Here dependent variable will be the price of the plot and the independent variables will be the area of the plot, number of rooms, Balcony etc.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/353/1*5QebLsqg64GXZjvvvYFpCA.jpeg" /></figure><p>Here in the above figure, the green dots are representing the price of the plot and also it is shown on Y-axis as the dependent variable. On the X-axis independent variables are represented. We can see that our linear regression model is trying to find the linear relationship between the dependent variable and the independent variables. By fitting a linear equation to the data, we can make predictions and gain insights into the underlying patterns.</p><p><strong>Equations</strong></p><p>The formula for Linear Regression represents the relationship between the dependent variable (often denoted as “y”) and one or more independent variables (often denoted as “x”).</p><p><strong>Simple Linear Regression</strong></p><p>For simple linear regression where we only have a single independent variable, the formula is a mere equation of a straight line.</p><p>y = β₀ + β₁x</p><p>In this equation:</p><ul><li>“y” represents the dependent variable or the variable we want to predict. In our case, it will be the price of the plot or house.</li><li>“x” represents the independent variable, which is used to predict the dependent variable. In this case, we are only taking the number of rooms as the only independent variable, we are ignoring the other things.</li><li>β₀ is the y-intercept, which represents the value of “y” when “x” is zero. It has a lot of applications like giving a baseline value to the model, loss minimization etc.</li><li>β₁ is the slope of the line, indicating the change in “y” for a unit change in “x”.</li></ul><p>The goal of linear regression is to estimate the values of β₀ and β₁ that best fit the given data.</p><p><strong>Multiple Linear Regression</strong></p><p>For multiple linear regression, where there are multiple independent variables (x₁, x₂, …, xn), the formula expands to:</p><p>y = β₀ + β₁x₁ + β₂x₂ + … + βₙxn</p><p>In this case, each independent variable is multiplied by its respective coefficient (β) to determine its contribution to the dependent variable “y”. The coefficients (β₀, β₁, β₂, …, βₙ) represent the intercept and slopes for each independent variable. Here for our example, we are considering the whole independent variables like the area of the plot, number of rooms, balcony etc.</p><p>Here the weights that are (β₀, β₁, β₂, …, βₙ) are trained to optimize the loss function. In linear regression, a loss function quantifies the difference between the predicted values and the actual values. The goal is to minimize this loss, indicating a better fit of the regression line to the data. Generally, we use Mean Squared Error(MSE).</p><p>MSE calculates the average squared difference between the predicted values and the actual values. It is defined as the sum of squared residuals divided by the number of data points. The formula for MSE is as follows:</p><p>MSE = (1/n) * Σ(yᵢ — ȳ)²</p><p>Here, yᵢ represents the actual value, ȳ denotes the predicted value, and n is the number of data points. Minimizing the MSE leads to finding the best weights that best fit the data in terms of minimizing the squared errors. The weights are updated by Gradient Descent.</p><p><strong>Applications</strong></p><p>Linear Regression is one of the most used algorithms in daily life. It comes first in the mind of a machine learning engineer when he has to build a model. It is used in the Finance, Marketing, Healthcare etc sectors. These are just a few examples of how linear regression algorithms are used in real-life applications. The versatility and simplicity of linear regression make it a valuable tool for analyzing relationships and making predictions across a wide range of domains.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fb8d09d212e6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Introduction To Machine Learning]]></title>
            <link>https://medium.com/@whitelovemohan123/introduction-to-machine-learning-373b9be98ee1?source=rss-b071b3cc833f------2</link>
            <guid isPermaLink="false">https://medium.com/p/373b9be98ee1</guid>
            <category><![CDATA[type-of-machine-learning]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Mohan Kumar]]></dc:creator>
            <pubDate>Fri, 30 Jun 2023 10:41:32 GMT</pubDate>
            <atom:updated>2023-06-30T10:41:32.625Z</atom:updated>
            <content:encoded><![CDATA[<p>Nowadays, Chat Gpt is a hot topic in the computer world. Everyone is talking about the pros and cons of the Chat Gpt. Whether it has more pros than cons is another topic but it has started a hype about a branch of computer science called “Artificial Intelligence”. Even non-tech people are taking an interest in this field. Artificial Intelligence is not a new dimension of technology. This term was coined about 70 years ago. Artificial intelligence is a broad sector of technology and we can think of machine learning as a subset of it.</p><p>Machine learning is a branch of Artificial intelligence that focuses on training data and building an algorithm to predict test data. The algorithm learns from training examples and slowly tries to improve its accuracy. It’s something similar to how a human learns. It is widely used in various fields like medicine, email filtering, speech recognition, agriculture etc where we can’t predict on the basis of conventional algorithms as the data may be so much diverse that it can’t be fitted into the existing algorithms.</p><p>Machine learning has 3 types.</p><p>(1) Supervised learning</p><p>(2) Unsupervised learning</p><p>(3) Reinforcement learning</p><h3>Supervised Learning</h3><p>Supervised learning mainly deals with labeled data. Here we have some training data which we fit into the algorithm and then we try to predict for testing data. The prediction data can be continuous or discrete, it depends on the type of data.</p><p>For example: let’s say you are a professional gambler and you bet on cricket matches. Then before making any bet, you will analyze some features like the condition of the pitch, weather, injured players etc. After all these analyses you are going to place a bet on a team. Here the prediction will be binary either the team you choose will win or lose but you have some labeled features, based on what you are trying to make a prediction. let’s consider another classic example of supervised learning where a broker has to sell a house so he decides to make a list of some features on which the price of a house depends like no. of bedrooms, living area etc. Based on these features the pricing of a house is made. Here in both examples, we have labeled data and based on those labeled data we have to make a prediction.</p><p>Some algorithms that are used in supervised learning are Linear Regression, Logistic Regression, Support Vector Machine, Decision Tree Classifier, Random Forest Classifier, XGBoost etc.</p><h3>Unsupervised Learning</h3><p>Unsupervised learning deals with unlabelled data. Here we have some unlabelled data, in which we have to find some features that will affect our interest. Here our model learns patterns and relationships from unlabelled data. Unlike supervised learning, there are not any target values on which our model will train itself. Unless our model will explore the data and try to find some hidden features and patterns.</p><p>It is used by a lot of commercial companies where companies want to understand their customer base to tailor their marketing strategies. They have a very large dataset containing information about their customers like age, gender, browsing behavior, purchase history etc. But they do not have any predefined labels on which they can classify their customers so that they can focus on increasing their sales. In this scenario, unsupervised learning can help to segment the customer base based on their shared characteristics or features. Then they can make marketing campaigns focused on the targeted segment’s preferences and needs. For example, one segment consists of tech-savvy customers who are interested in the latest gadgets and another segment may be interested in traditional products. This is just one example of unsupervised learning that can be applied to various domains like finance, health industry, fraud detection, image analysis etc.</p><p>Some algorithms that are used in unsupervised learning are K-means clustering, Hierarchical clustering, DBSCAN(Density-Based Spatial Clustering of Applications with Noise), Principal Component Analysis(PCA), t-SNE(t-Distributed Stochastic Neighbor Embedding), Gaussian Mixture Models(GMM), Anomaly detection algorithms etc.</p><h3>Reinforcement Learning</h3><p>Reinforcement learning focuses on training the agent on sequential decisions in an environment to maximize a cumulative reward. It is based on the way how humans learn by interacting with the environment. The agent learns through a trial and error process, exploring different actions and observing their outcomes to improve the decision-making ability.</p><p>Agent: An entity that can learn and take decisions or actions in an environment. Generally, an agent would be algorithms, robots or any system capable of learning and taking decisions or actions.</p><p>Environment: It is an external world or simulation in which the agent operates. It can be a physical world, a virtual world or a software simulation.</p><p>Reward: It is a numerical signal provided to the agent for the action taken by the agent. It can be positive, negative or zero depending on the desirability of actions.</p><p>Reinforcement learning employs different algorithms to learn and improve the cumulative reward. Some algorithms are Q-learning, SARSA, Deep Q-Networks, Proximal Policy Optimization, Actor-Critic methods etc.</p><p>Reinforcement learning has found applications in various domains like robots, Autonomous Driving, Financial Trading, Energy Management etc.</p><p>Here the blog ends, In the next blog we will deep dive into supervised learning algorithms. We will look into the Linear Regression algorithm.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=373b9be98ee1" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>