<?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 Vijay Anaparthi on Medium]]></title>
        <description><![CDATA[Stories by Vijay Anaparthi on Medium]]></description>
        <link>https://medium.com/@anaparthivijay79?source=rss-79b3dbe635ba------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*lIgu6_Ajac0-lhJkxsWqRA.jpeg</url>
            <title>Stories by Vijay Anaparthi on Medium</title>
            <link>https://medium.com/@anaparthivijay79?source=rss-79b3dbe635ba------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 22:07:42 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@anaparthivijay79/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[Linear Regression Explanation With Simple Example]]></title>
            <link>https://anaparthivijay79.medium.com/linear-regression-explanation-with-simple-example-90d7adb2e7bb?source=rss-79b3dbe635ba------2</link>
            <guid isPermaLink="false">https://medium.com/p/90d7adb2e7bb</guid>
            <category><![CDATA[linear-regression]]></category>
            <category><![CDATA[statistics]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Vijay Anaparthi]]></dc:creator>
            <pubDate>Sat, 08 May 2021 03:03:30 GMT</pubDate>
            <atom:updated>2021-05-08T03:03:30.052Z</atom:updated>
            <content:encoded><![CDATA[<p>In this article, I am going to explain linear regression by taking one simple problem.</p><p><strong>Problem Statement -</strong>Let&#39;s say your company is hiring new employees and you have to set(finalize) salary for them.</p><p><strong>Data you have</strong> — You have the last 5 years of employee data. Data consist of</p><ol><li>Experience, Skills are input features</li><li>Salary as output</li></ol><p><strong>Problem Approach</strong></p><p>Now we can apply linear regression to the above problem. Basically, we cant visualize 3-D,n-D properly. So I am going to explain the problem in 2D only. For that, I am taking only 1 feature as an input i.e Experience</p><p><strong>Step 1</strong>:- Now I am drawing a scatter plot by using the last 5 years&#39; data. Experience on the x-axis and Salary on the y-axis.</p><p><strong>Note</strong> — I drew only a few data points but in the real world, you will get a lot of data points.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/432/1*5as4-xbfAylkvVSfK_QQ4w.png" /></figure><p><strong>Step 2</strong>:- Now we have to draw a random line, lets say we are drawing a line</p><p>y = mx+ c by taking slope(m) and y-intercept randomly. It looks like below.</p><p><strong>Terminology </strong>— In 2D we call it slope(m) and when it comes to nd we call it weights and y-intercept as bias in nd. One more thing in 2D we call it as Line and in 3D it is plane and in nd it becomes hyperplane.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/432/1*sM5GSbWvqTQJzp1afPdRQw.png" /></figure><p>We have drawn a line in the above step with some slope and 0 bias(y-intercept).</p><p>But if you look at the above line it is not fitting all the points correctly.</p><p><strong>Step3</strong>:- Now we are going to calculated the loss function. In linear regression, we will use Mean Squared Error(MSE) as a loss function.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/638/0*QZ97ZYyWK1DQup6d" /></figure><p>Here if you observe in the formula we have yi and yi^.</p><p>yi = Actual Value that we plot initially</p><p>yi^ = Predicted value that comes from the line we have drawn.</p><p>n = number of data points in the dataset(Above ex we have 13)</p><p>You have to calculate (yi — yi^)2 i.e squared error for each data point and at the end you have to sum up all the squared errors. So that you will get final loss or MSE.</p><p><strong>Step 4</strong>:- Basically you will get a very high Loss. Because you have taken slope and bias randomly. Now your task is to decrease the loss.</p><p>To decrease a loss we will use a Gradient Descent algorithm.</p><p><strong>Step 5</strong>:- So what Gradient Descent will do was it will calculate Gradients i.e derivatives of the loss function with respect to the slope(weights) and bias.</p><p>After calculating Gradients it will update the original slope(weights) and bias that we took randomly by using newly calculated gradients.</p><p><strong>Step 6</strong>:- Now we got a new slope and bias. With that again we can calculate a new line by applying slope(m), bias in y = mx+c formula.</p><p>Now again we will calculate loss function and gradients and then we will update slope and bias.</p><p>This process will repeat till we got the best line that fits the given data.</p><p><strong>Conclusion</strong> — After getting the best line or best model you can predict upcoming employees&#39; salary by using that best fit line or model.</p><p>Thanks for Reading.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=90d7adb2e7bb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Basic Understanding of How Images and Videos will work in OpenCV]]></title>
            <link>https://anaparthivijay79.medium.com/basic-understanding-of-how-images-and-videos-will-work-in-opencv-443477ae01cb?source=rss-79b3dbe635ba------2</link>
            <guid isPermaLink="false">https://medium.com/p/443477ae01cb</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[computer-vision]]></category>
            <category><![CDATA[opencv]]></category>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[Vijay Anaparthi]]></dc:creator>
            <pubDate>Tue, 06 Apr 2021 03:01:28 GMT</pubDate>
            <atom:updated>2021-04-06T10:10:36.055Z</atom:updated>
            <content:encoded><![CDATA[<h3>OpenCV(Basics)-Understanding of How Images and Videos will work in OpenCV</h3><p>OpenCV is an open-source computer vision library. It deals with images and video data. Before moving into the coding part let&#39;s understand the images and videos.</p><h4>Image</h4><p>Color Image is a 3-dimensional matrix or Tensor why 3D means because it has 3 channels(R, G, B). When it comes to grayscale images it has only 1 channel.</p><p>Every Image has pixels. The pixel range is between 0 to 255. If the particular pixel in the image has a value of 0 then it looks black if it has 255 then it is white.</p><p>I said the color image has a 3D matrix so all 3 matrices are of the same shape. Look at the below image you can understand it clearly.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AT7SPmKOA-mIn9ffnU9Eqg.jpeg" /><figcaption>Color_Image</figcaption></figure><p>Let&#39;s understand the basic operations of OpenCV on images.</p><pre>import cv2 as cv<br>import numpy as np</pre><pre>img = cv.imread(&#39;yuvi_dhoni.jpg&#39;)<br>cv.imshow(img) #Use this If you are coding in your local machine or<br>cv2_imshow(img)# If you are coding in Google collab</pre><p><strong>Output:-</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/301/1*jMHgFqHaVDUbQPizfZ_JzA.png" /></figure><p>In the above code what we are doing was initially we are reading the image by using an image file and then we are printing the image.</p><p>One thing to remember if you are using google collab then you have to use cv2_imshow or if you are using your local machine(Jupyter, Pycharm, Vscode) then use cv.imshow</p><p>The below code will print the grayscale image. You just need to pass 0 as 2nd parameter in imread function.</p><pre>gray_img = cv.imread(&#39;yuvi_dhoni.jpg&#39;,0)<br>cv.imshow(gray_img)</pre><p><strong>Output:-</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/301/1*ND-ybIRJ3zpVQtvm-TaNpQ.png" /><figcaption>Gray Scale Image</figcaption></figure><pre>cv.imshow(&#39;yuvi_dhoni_picture&#39;,img)<br>cv.waitKey(0)<br>cv.destroyAllWindows()</pre><p>you can pass window names also while printing images. So it will print images with window names. In the above code, ‘yuvi_dhoni_picture’ is the window name.</p><p>You can create as many windows as possible but you have to give different window names.</p><p><strong>cv2.waitKey()</strong> is a keyboard binding function. Its argument is the time in milliseconds. The function waits for specified milliseconds for any keyboard event.</p><p><strong>cv2.destroyAllWindows()</strong> simply destroy all the windows we created. If you want to destroy any specific window then give the name of that window.</p><pre>print(&quot;Color Image Shape : &quot;, img.shape)</pre><pre>print(&quot;Gray Scale Image Shape :&quot;,gray_img.shape)</pre><p><strong>Output :-</strong></p><p>Color Image Shape : (167, 301, 3)</p><p>Gray Scale Image Shape : (167, 301)</p><p>I told you at the beginning of the article the number of channels in Color(3 channels) and grayscale(1 channel) images.</p><h4>Videos</h4><p>Video is a sequence of frames or a combination of images.</p><pre>cap = cv.VideoCapture(0)<br><br>while(True):<br>    # Capture frame-by-frame<br>    ret, frame = cap.read()<br><br>    gray = cv.cvtColor(frame, cv2.COLOR_BGR2GRAY)<br><br>    # Display the resulting frame<br>    cv.imshow(&#39;frame&#39;,gray)<br>    if cv.waitKey(1) &amp; 0xFF == ord(&#39;q&#39;):<br>        break<br><br># When everything done, release the capture<br>cap.release()<br>cv.destroyAllWindows()</pre><p>VideoCapture(0) will capture the video from 1st camera in our machine, if you pass 1 to that then it will take the 2nd camera or you can pass the video file also.</p><p>The read object will return frame as well as return = bool(True or False). If the frame is read correctly then True or else false.</p><p>Thanks for reading.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=443477ae01cb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Logistic Regression(LR)]]></title>
            <link>https://anaparthivijay79.medium.com/logistic-regression-lr-6d76fdcc03db?source=rss-79b3dbe635ba------2</link>
            <guid isPermaLink="false">https://medium.com/p/6d76fdcc03db</guid>
            <category><![CDATA[logistic-regression]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[supervised-learning]]></category>
            <dc:creator><![CDATA[Vijay Anaparthi]]></dc:creator>
            <pubDate>Fri, 21 Aug 2020 08:43:59 GMT</pubDate>
            <atom:updated>2020-08-23T03:35:07.436Z</atom:updated>
            <content:encoded><![CDATA[<p>Logistic regression is a classification model. Most of the people will train logistic regression on their data set first then they will go for other algorithms.</p><p>In LR ground truth is that data has to be linearly separable. If i speak mathematically <strong>[ ∑</strong> <strong>yiwTxi</strong> <strong>for i=1 to n ]&gt;0</strong> for as many points as possible. I will explain what is that equation means later.</p><p>Lets take simple example that we are predicting review is positive or negative.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0qCHy0_hNJ1tjbu1cInvNA.jpeg" /><figcaption><strong>Logistic regression by Vijay Anaparthi</strong></figcaption></figure><p>Look at above diagram we are drawing hyperplane(pi) that separates positive data points from negative data points.</p><p>The equation of hyperplane is <strong>wTx+b</strong> it looks like line equation <strong>y=mx+c. </strong>Actually we call line in 2D, plane in 3D and hyperplane in nD.</p><p><strong>Step1 :-</strong> <strong>If [wTxi &gt; 0] then yi = +1</strong> because vector(w) is pointing towards positive data points.</p><p><strong>If [wTxi &lt; 0] then yi = -1</strong></p><p>Where, yi is output class label either +1(positive) or -1(negative)</p><p><strong>Step2 :- </strong>I said earlier that <strong>[ ∑ yiwTxi for i=1 to n ]&gt;0</strong> for as many points as possible. Now i will explain how it came. Here ’<strong>n</strong>’ is no.of data points.</p><p>First lets take positive point i.e <strong>yi=+1 </strong>and <strong>wTxi&gt;0(positive)</strong>. So if you multiply both i.e <strong>yiwTxi &gt; 0(positive).</strong></p><p>Now take negative data point i.e <strong>yi=-1</strong> and <strong>wTxi&lt;0(negative)</strong>. So if you multiply both i.e <strong>yiwTxi&gt;0(positive)</strong></p><p>So that is why for particular data point <strong>yiwTxi&gt;0</strong> then that data point is correctly classified otherwise incorrectly classified point.</p><p><strong>Step3 :- </strong>Now lets apply activation function i.e <strong>sigmoid</strong> on above equation.</p><p><strong>a)</strong> Sigmoid function will eliminate <strong>outliers problem.</strong></p><p><strong>b) </strong>Outliers means suppose if you have list like [1, 2, 5,9,876]. In that list 876 is definitely outlier because 876 is very large number compare to remaining numbers in list.</p><p><strong>Step4 :- Equation of sigmoid = </strong>[<strong>σ(x)=1/1+e−x</strong>]</p><p>Now substitute our yiwTxi in sigmoid function in the place of ‘X’.</p><p>i.e <strong>w* =</strong> [<strong>argmax ∑ 1/1+e−yiwTxi for i=1 to n</strong>]</p><p><strong>Step5 :- </strong>We know <strong>log(x)</strong> is a<strong> monotonic function.</strong> i.e If ‘<strong>x</strong>’ increases then log(x) is also increases monotonically.</p><p>Now we can apply log function on above equation.</p><p><strong>w* = argmax [log[∑ 1/1+e−yiwTxi for i=1 to n]]</strong></p><p><strong>w*</strong> = <strong>argmax -[log[∑ 1+e−yiwTxi for i=1 to n]]</strong></p><p><strong>w*</strong> = <strong>argmin [log[∑ 1+e−yiwTxi for i=1 to n]] this is final equation</strong></p><p><strong>Step6:- </strong>To reduce <strong>over fitting</strong> we can add regularization i.e <strong>L1 or L2 regularization.</strong></p><p><strong>w*</strong> = <strong>argmin [log[∑ 1+e−yiwTxi for i=1 to n]] + <em>λ||w||2</em></strong></p><p>Here we added L2 regularization.</p><p>Logistic regression has some drawbacks i.e data has to be linearly separable otherwise we have to apply some feature engineering techniques.</p><p>We can eliminate this problem in SVM model by using kernels.</p><p>But i can say that logistic regression is baseline model for classification problems. People first try LR then they will train other algorithms.</p><p>Thanks for reading.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6d76fdcc03db" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Algorithms or Models in Machine learning]]></title>
            <link>https://anaparthivijay79.medium.com/algorithms-or-models-in-machine-learning-f9712152d2b0?source=rss-79b3dbe635ba------2</link>
            <guid isPermaLink="false">https://medium.com/p/f9712152d2b0</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[unsupervised-learning]]></category>
            <category><![CDATA[supervised-learning]]></category>
            <category><![CDATA[machine-learning-models]]></category>
            <dc:creator><![CDATA[Vijay Anaparthi]]></dc:creator>
            <pubDate>Thu, 20 Aug 2020 11:02:36 GMT</pubDate>
            <atom:updated>2020-08-20T11:02:36.350Z</atom:updated>
            <content:encoded><![CDATA[<h3>Supervised Learning Algorithms</h3><ol><li>K nearest neighbor classification</li><li>Logistic Regression</li><li>Linear Regression</li><li>Naive bayes</li><li>Support Vector Machine(SVM)</li><li>Decision tree</li><li>Random Forest</li><li>Xgboost</li></ol><p>Here K-nn and Logistic regression is classification models. Naive bayes is probability based model. Linear regression is regression model. Remaining all models are useful in classification and regression problems.</p><p>Random forest and Xgboost are ensemble models. They uses decision tree as base learner.</p><h3>Unsupervised Learning Algorithms</h3><ol><li>K-means Clustering</li><li>Density-Based Spatial Clustering(DB-Scan)</li><li>Hierarchical clustering</li></ol><p>There are lot of other algorithms also present but these models most widely used algorithms in machine learning.</p><p>Thanks for reading.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f9712152d2b0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Bag Of Words And TFIDF]]></title>
            <link>https://anaparthivijay79.medium.com/bag-of-words-and-tfidf-48ab9481a069?source=rss-79b3dbe635ba------2</link>
            <guid isPermaLink="false">https://medium.com/p/48ab9481a069</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[nlp]]></category>
            <category><![CDATA[bow]]></category>
            <category><![CDATA[tfidf-vectorizer]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Vijay Anaparthi]]></dc:creator>
            <pubDate>Wed, 19 Aug 2020 11:14:11 GMT</pubDate>
            <atom:updated>2020-08-19T11:14:11.533Z</atom:updated>
            <content:encoded><![CDATA[<p>Bag of words(BOW) and Term frequency and inverse document frequency(TFIDF) are used to convert text data to vector or numerical data.</p><p>For clear understanding Lets take simple example suppose if you have dataset which contain text feature or column. If you want to train machine learning models like logistic regression or SVM etc on above dataset then we will get error because they only understood numerical data not text data for that we have to convert text data to vector form.</p><p>For converting text data to numeric form we use simple techniques like BOW, TFIDF, Word2Vec and TFIDF-w2v. In this blog i will discuss about BOW and TFIDF.</p><h3>Bag of words(BOW)</h3><p>Lets take simple example for that i am taking 2 reviews from ecommerce website.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/603/1*T6k-qTQuhVsG0lwM1ebeqg.jpeg" /></figure><p>Step1:- Take unique words from both reviews. i.e</p><p>It, is, very, good, mobile, phone, for, android, users, but, expensive, cheap, not are unique words.</p><p>step2:- Look at above step clearly we have taken unique words not all words now every unique word will become one feature/column in dataset like below.</p><p>How i am inserting 0 and 1 to each word feature is that suppose if the word occur in that review then 1 otherwise 0. If the word occur more than 1 time in review then insert that number instead of 1.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/619/1*KtVT7faFXfO9bHRADGU-gQ.jpeg" /></figure><p>Now you can train your machine learning models by using this dataset because it is numerical form.</p><h3>Term Frequency And Inverse Document Frequency(TFIDF)</h3><p>TFIDF is more useful than BOW because it gives importance to both frequently occur words and rare words. All the reviews in dataset are called document or corpus.</p><p>First we calculate term frequency then IDF</p><blockquote>Term frequency(TF) = Number of times word occur in review/Total no.of words in review</blockquote><blockquote>IDF = log(In how many reviews that word is present/ Total no.of reviews in corpus)</blockquote><p>TFIDF = TF * IDF</p><p>Here also we will take unique words but instead of 0 and 1 we will replace each word by tf-idf value.</p><p>Thanks for reading if you want you can use word2vec technique as well.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=48ab9481a069" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Predictive-maintanance-of-machine-by-using-Machine-learning]]></title>
            <link>https://anaparthivijay79.medium.com/predictive-maintanance-of-machine-by-using-machine-learning-e59383ae320e?source=rss-79b3dbe635ba------2</link>
            <guid isPermaLink="false">https://medium.com/p/e59383ae320e</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[classification-algorithms]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[manintanceofmachine]]></category>
            <dc:creator><![CDATA[Vijay Anaparthi]]></dc:creator>
            <pubDate>Sun, 02 Aug 2020 07:38:38 GMT</pubDate>
            <atom:updated>2020-08-02T07:38:38.556Z</atom:updated>
            <content:encoded><![CDATA[<p><a href="https://github.com/VijayAnaparthi/Predictive-maintanance-of-machine-by-using-Machine-learning.git">VijayAnaparthi/Predictive-maintanance-of-machine-by-using-Machine-learning</a></p><p>The machines will fail at any stage because of some mechanical problems. So we have to predict these problems as early as possible for that we have to do predictive modelling.</p><h4>Mapping Real world problem to an ML Problem</h4><ol><li>Type of ML problem — Classification problem</li><li>Data set contains 30 columns including 29 features and 1 class label or target variable. So here failure column was target variable it has two values 0 and 1. So I am assuming this as binary classification problem.</li></ol><h4>Exploratory Data Analysis(EDA)</h4><ol><li>By looking at target variable value counts it is clearly indicating that dataset is imbalanced.</li><li>First I did univariate and bivariate analysis I.e plotting Pdf, Cdf and scatter plot between features and target variable but I didn’t get any conclusion from this plots because there are only two classes and both are overlapping very much in every plot.</li></ol><h4>Correlation</h4><ol><li>Printed the Pearson correlation heat map of features and I found out that every feature is less correlated or dependent on another feature except the features like voltmean_3h and voltmean_24h, pressuremean_3h and pressuremean_24h etc.</li><li>I did univariate feature reduction I.e remove the low correlation features with target variable(failure). Here I set the threshold value so if the feature is having less correlation value compare to that threshold then I am removing that feature.</li></ol><h4>Feature Engineering, Performance metrics and Model training</h4><ol><li>The training dataset is imbalanced, So algorithms like k-nearest neighbor and Log regression will not work perfectly especially KNN because it depends on nearest neighbor so if I train the model on this dataset then if I predict values on test data it will give me mostly failure=0 class because this class label is more dominating in train dataset.</li><li>So because of this problem I chosen ensemble models like Random forest classifier and XGBoost classifier. The one more advantage by using bagging and boosting algorithms is we will reduce overfitting problem. I.e train error and test error is low. Along with training a model I did hyper parameter tuning by using Randomsearchcv.</li><li>After training the model I did feature importance in both RF and Xgboost and found out top 18 features out of 26 then created new dataset with these features and trained the model again with these features. In both models I got almost same features with higher importance.</li><li>I chosen confusion matrix, precision and recall as performance metrices. Because in confusion matrix we can print true positive, true negative , fp and fn. So here we can found out how many datapoints in test data is correctly predicted and how many are incorrectly predicted. RF correctly predicting 99% values.</li></ol><h4>Oversampling(SMOTE)</h4><p>We know that dataset is imbalanced but I don’t want to change actual dataset so that is why first I trained the model with actual dataset without doing any sampling. But once completion of that process I did synthetic minority oversampling technique. But after training the model with this data I found out that actual dataset is giving better performance compare to this sampled dataset.</p><h4>Conclusion</h4><p>I have choosen Random forest classifier with original dataset as final predicted values.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e59383ae320e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Air Quality prediction by using Machine learning]]></title>
            <link>https://anaparthivijay79.medium.com/air-quality-prediction-by-using-machine-learning-4e656a08ebf?source=rss-79b3dbe635ba------2</link>
            <guid isPermaLink="false">https://medium.com/p/4e656a08ebf</guid>
            <category><![CDATA[air-quality]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[supervised-learning]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Vijay Anaparthi]]></dc:creator>
            <pubDate>Sat, 01 Aug 2020 15:41:52 GMT</pubDate>
            <atom:updated>2020-08-01T15:55:35.235Z</atom:updated>
            <content:encoded><![CDATA[<p>Predicting Air quality by using Machine learning supervised algorithms.</p><p><a href="https://github.com/VijayAnaparthi/Air-Quality-Prediction.git">VijayAnaparthi/Air-Quality-Prediction</a></p><h4>About Data set(AirPi Data — AirPi.csv file)</h4><ol><li>Data set contains 9 features and 1 target variable i.e air_quality.</li><li>It contains 14572 data points and i divide data into 70%(train) and 30%(test).</li><li>Basically i am not did any exploratory data analysis on this data set. If you are interested you can contribute to that.</li></ol><h4>Trained models</h4><p>It is a regression problem so i trained 3 models i.e</p><ol><li>Linear regression</li><li>Random forest regressor</li><li>XGboost regressor</li></ol><p>In this process i also did hyper parameter tuning by using Randomsearchcv then trained the model again.</p><h4>Performance metrices</h4><ol><li>Mean squared error(MSE)</li><li>Mean absolute percentage error(MAPE)</li><li>R2 score</li></ol><h4>Conclusion</h4><ol><li>I found out XGboost regressor is less overfitting compare to remaining two models. But Random forest regressor giving the best results in terms of error.</li><li>So in above Airpi_output.csv file i added 3 more columns and appended predicted values of every model for each data point.</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4e656a08ebf" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>