<?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 Volkan İllik on Medium]]></title>
        <description><![CDATA[Stories by Volkan İllik on Medium]]></description>
        <link>https://medium.com/@volkanillik?source=rss-dc140780a8bf------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*VQn3tT1XbmoDyfBEPRqJFg.jpeg</url>
            <title>Stories by Volkan İllik on Medium</title>
            <link>https://medium.com/@volkanillik?source=rss-dc140780a8bf------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 04 Dec 2026 23:36:54 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@volkanillik/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[Evaluation Metrics for Classification Problems]]></title>
            <link>https://medium.com/@volkanillik/evaluation-metrics-for-classification-problems-db8b6a6f7d52?source=rss-dc140780a8bf------2</link>
            <guid isPermaLink="false">https://medium.com/p/db8b6a6f7d52</guid>
            <category><![CDATA[evaluation-metric]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[confusion-matrix]]></category>
            <category><![CDATA[classification]]></category>
            <dc:creator><![CDATA[Volkan İllik]]></dc:creator>
            <pubDate>Mon, 20 Mar 2023 14:15:18 GMT</pubDate>
            <atom:updated>2023-03-20T14:15:18.078Z</atom:updated>
            <content:encoded><![CDATA[<p>In classification problems, we use machine learning models for the classes we want to predict. There are many classification models available, but not all of them are suitable for every dataset. Generally, more than one model is applied to the data set for classification and the most suitable one is selected among them. There are certain evaluation metrics to choose the most suitable one among these models. These; Accuracy, Recall, Precision, F1 Score.</p><p>The most well-known of these metrics is the Accuracy score. However, evaluating only the Accuracy score may mislead us in choosing the right model. The Accuracy score tells us how accurately the model predicted all classes. However, if we have an unbalanced data set, this score is insufficient to give information about the success of the model. For example, 99% of students in a school are healthy and 1% are sick. In this case, an Accuracy score of 99% does not show us that the model is successful. Because our model could not predict the sick students. To avoid this situation, we should also evaluate other error metrics. To explain these metrics, it is first necessary to understand the confusion matrix.</p><p><strong>Confusion Matrix:</strong></p><p>The Confusion Matrix represents the relationship between the values ​​predicted by the model and the actual values. Thanks to this matrix, the evaluation metrics mentioned above are calculated.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/816/0*j-lBVhu83Mz3XFYA" /></figure><p>To calculate the scores of the mentioned metrics, we need the TP, TN, FP and FN values ​​you see in the confusion matrix. Let us explain these concepts simply with an example. Suppose we had a Covid-19 test.</p><p><strong>True Positive (TP): </strong>We predict we are sick (we anticipate the test will be positive) and the test actually came back positive.</p><p><strong>False Positive (FP): </strong>We guessed we were sick (we guessed positive) but the test result came back negative.</p><p><strong>True Negative (TN): </strong>We guessed we weren’t sick (we guessed negative) but the test result came back negative.</p><p><strong>False Negative( FN): </strong>We guessed we weren’t sick (we guessed negative) but the test result came back negative.</p><p>Thanks to the TP, TN, FP and FN values ​​in the confusion matrix, we can find out how many of the data belonging to each class are classified correctly and how many are incorrectly classified. Now that we have learned to read the confusion matrix, we can move on to the interpretation of evaluation metrics.</p><p><strong>Accuracy:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/290/0*-JLhWK3S-blcEPNR" /></figure><p>As understood from the formula, the Accuracy value tells us how accurately the model predicts all classes. As I mentioned above, it can be misleading to evaluate the model only according to the Accuracy score in unstable data sets.</p><p><strong>Recall:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/125/0*469OmWxL48ruKU2L" /></figure><p>It indicates how many of the people who test positive for the Covid test, we predict the test result as positive. If we predict positive people as negative (FN), it indicates a big problem. So guessing that someone who is sick is not sick can cause big problems. Accordingly, this metric should be used in cases where the FN value cannot be ignored.</p><p><strong>Precision</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/122/0*2TYy0NEY_2oFZ_Uh" /></figure><p>It gives information about how many of those we predicted as positive are actually positive. In other words, how many of the people we estimate as sick are actually sick. To give another example, if your model marks the mails that should arrive in your mailbox as spam (FP), then it will not be able to see the important mails you need to receive, and this may cause a problem. As can be seen, Recall and Precision are inversely proportional to each other, and a balance must be struck between them for a suitable model.</p><p><strong>F1 Score: Recall &amp; Precision</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/0*ZijJZO8MkL3UJNfP" /></figure><p>Especially when we want to perfect our predictions for a single class, we want to keep precision and recall as high as possible. The reason for taking the harmonic mean of these metrics is that we want to ignore the extreme cases. The main reason for using F1 Score value instead of Accuracy is not to make an incorrect model selection in unbalanced data sets. If we’re looking for a balance between precision and recall, we look for cases where the F1-Score is maximum, we maximize the recall and minimize the precision to keep the F1 score high.</p><p>In addition to these metrics, there are two more important concepts for classification problems. These are the ROC Curve and the AUC Score.</p><p><strong>ROC Curve &amp; AUC Score:</strong></p><p>ROC is a probability curve and the area under it, AUC, represents the degree or measure of separability. In the ROC curve, there is FPR (False Positive Rate) on the X axis and TPR (True Positive Rate) on the Y axis.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/576/0*8FVwcYUvRQGjM6bi.png" /></figure><p>The higher the level under the curve, the higher the discrimination performance between classes. AUC tells how well the model can distinguish classes. For example, the higher the AUC in a dataset of sick and non-patient people, the better the model performs in distinguishing between patients with and without the disease.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/841/0*_G3Tu7OfWNS-FlHZ.JPG" /></figure><p>As can be seen in the graphs, the higher the AUC value, the better the classes are separated from each other.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=db8b6a6f7d52" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Understanding and Interpreting of The Linear Regression]]></title>
            <link>https://medium.com/@volkanillik/understanding-and-interpreting-of-the-linear-regression-b48d103fd568?source=rss-dc140780a8bf------2</link>
            <guid isPermaLink="false">https://medium.com/p/b48d103fd568</guid>
            <category><![CDATA[evaluation-metric]]></category>
            <category><![CDATA[linear-regression]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Volkan İllik]]></dc:creator>
            <pubDate>Wed, 22 Feb 2023 14:43:25 GMT</pubDate>
            <atom:updated>2023-02-22T16:50:02.198Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/512/0*Nep2oAY9OVoyG1j9.png" /></figure><p>Linear Regression is a frequently used method in statistical data analysis. Regression analysis is a way to find the trend in the data. It helps us understand the relationship between two or more variables. For example, it can help us recognize if there is a correlation between the price of a car and its age. If there is a relationship, it tells us what kind of relationship (positive or negative) it is. You can demonstrate the relationship by drawing a straight line on a graph, where the independent variable is on the x-axis and the dependent on the y-axis. An example is determining different prices of a car, whereby the ages are the independent variable, and the prices are the dependent variable. There are two main types of linear regression. They are:</p><ul><li><strong>Simple:</strong> This type involves estimating the relationship between two quantitative variables, such as the value of a dependent variable at a particular value of the independent variable. An example is determining the number of sales when customer engagement on social media is at a certain percentage.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/897/1*nfy_T95Gh30KvZ_YVbEogA.png" /></figure><ul><li><strong>Multiple:</strong> In this type, you can determine the relationship between several independent variables and a dependent variable. An example is determining how the price of a product, interest rates and competitive prices affect a company’s sales.</li></ul><p>Regression models give us information about the relationships we want to see, but is this information correct? There are certain evaluation metrics to find out. These: R2 Score, Adjusted R2 Score, Mean Absolute Error(MAE), Mean Squared Error(MSE), Root Mean Square Error(RMSE).</p><p><strong>R2 Score: </strong>R2 represents the percentage accuracy of the predictions made for our target variable, Y, of the features determined by our regression model. Obtaining R2 values ​​close to 1 is one of the desired results.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/652/1*Ayi-e-IqswjleT1gmoW2RA.png" /></figure><p><strong>Adjusted R2 Score:</strong> Adjusted R2 value penalizes the features with small coefficient value and unnecessary features in our model to create a better model and an R2 Score value is calculated accordingly.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/740/1*vNiN-g4J_0qP8PGc8tzgDg.png" /></figure><p><strong>Mean Absolute Error(MAE): </strong>It is an error metric that indicates the absolute value of the difference between the predicted values ​​generated by the model and the actual values.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/391/1*KiT6nNr4Bn_E59LRhwxRUw.png" /></figure><p><strong>Mean Squared Error(MSE): </strong>It is an error metric obtained by squaring the difference between the prediction of the regression model and the actual data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*5YAaxP9sGauXu9tJ.png" /></figure><p><strong>Root Mean Square Error(RMSE): </strong>It is an error metric obtained by taking the square root of the difference between the prediction of the regression model and the actual data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/274/0*tEqshE2TaDaVQcro" /></figure><p>Thank you for reading. In my next article, I will share a linear regression application based on the phone data I obtained with Web Scraping methods from epey.com</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b48d103fd568" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[MTA New York Turnstile Data Analysis with EDA]]></title>
            <link>https://medium.com/@volkanillik/mta-new-york-turnstile-data-analysis-with-eda-c786fbbedc32?source=rss-dc140780a8bf------2</link>
            <guid isPermaLink="false">https://medium.com/p/c786fbbedc32</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[exploratory-data-analysis]]></category>
            <category><![CDATA[data-analysis]]></category>
            <dc:creator><![CDATA[Volkan İllik]]></dc:creator>
            <pubDate>Thu, 05 Jan 2023 13:54:01 GMT</pubDate>
            <atom:updated>2023-01-17T14:28:44.957Z</atom:updated>
            <content:encoded><![CDATA[<p>In this blog post, MTA New York subway data is analyzed using EDA techniques. First of all, explanatory information about EDA was mentioned, and then the metro data were analyzed in line with these explanations.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wIw-OvVlU6g7In4tvFyyUw.jpeg" /></figure><h4>What is Exploratory Data Analysis (EDA) ?</h4><p>Exploratory Data Analysis is the name given to all of the methods used to understand and make sense of data. Generally, it is aimed to extract meaning from data by using statistical techniques and data visualization methods. The main purpose here is to provide a preliminary impression of the data before making any assumptions. Almost every study that targets data uses ‘EDA’. Real-life data may not always be clean and consistent. Therefore; A correct EDA approach makes things easier in examining the quality of raw data, making sense of it, and answering relevant questions. It is not enough to use statistical and visual techniques in EDA, the importance of the techniques here is determined by the correct interpretation of the visual and statistical results we get as output.</p><p>Usually, EDA is applied on raw data before AI, ML and DL models. Giving the data as input to the model in its raw form is not a healthy approach for model results. First of all, separating the data into subsets and making analysis on these sets helps us to understand the data. The techniques to be used here depend entirely on the person who created the model and the data. A correct ‘EDA’ approach will increase the success of the model as it will increase the quality of the data that will be input to the model.</p><p>Not only is EDA used in AI models, we can make assumptions on data using EDA and get ideas accordingly. In this direction, let’s analyze and interpret the New York subway data using EDA.</p><h4>Analysis with EDA</h4><p>The data of the MTA metro is as follows:</p><pre>df_2022.head()</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IlkE5Bt9yO0pDJyqVyJnnQ.png" /></figure><p>ariables included in initially processed data:</p><ul><li><strong>C/A</strong> = Control Area</li><li><strong>UNIT</strong> = Remote Unit for a station</li><li><strong>SCP</strong> = Subunit Channel Position represents an specific address for a device (e.g., 02–00–00)</li><li><strong>STATION</strong> = C/A + unit, locating a station</li><li><strong>TURNSTILE</strong> = C/A + unit + SCP, locating a turnstile</li><li><strong>DATE </strong>= Represents the date (MM-DD-YY)</li><li><strong>TIME </strong>= Represents the time (hh:mm:ss) for a scheduled audit event</li><li><strong>DESC </strong>= Represent the “REGULAR” scheduled audit event</li><li><strong>ENTRIES</strong> = The comulative entry register value for a device</li><li><strong>EXITS</strong> = The cumulative exit register value for a device</li></ul><p>‘ENTRIES’ and ‘EXITS’ are cumulative values, quantiles do not mean anything, but there should not be any negative values.</p><p>Since the C/A + unit + SCP columns represent the turnstile, we created a new column called ‘TURNSTILE’.</p><pre>df_2022[&quot;TURNSTILE&quot;] = df_2022[&quot;C/A&quot;] + &quot;-&quot; + df_2022[&quot;UNIT&quot;] + &quot;-&quot; + df_2022[&quot;SCP&quot;]</pre><p>Check the ‘Null’ values:</p><pre>df_2022.isnull().sum()</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/754/1*_KDeiihfQSB7skykbPaBrg.png" /></figure><p>We see that no Null values in the data.</p><pre>df_2022.info()</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/558/1*IBe3RBMhScATCvFq6YCepA.png" /></figure><p>It seems that the ‘DATE’ and ‘TIME’ columns are not in datetime format. To represent the number of ‘ENTRIES’ and ‘EXITS’ with certain periods, we need to combine ‘DATE’ AND ‘TIME’ columns into a new column as ‘DATETIME’ in datetime format. In this way, we can represent the entries and exits numbers by taking the difference between the two time periods. The purpose of doing this is, as mentioned above, the number of ‘ENTRIES’ and ‘EXITS’ ​​are cumulatively added to the data.</p><pre>df_2022[&#39;DATETIME&#39;] = df_2022[&quot;DATE&quot;]+ &quot; &quot; + df_2022[&quot;TIME&quot;]<br>df_2022[&#39;DATETIME&#39;] = pd.to_datetime(df_2022[&#39;DATETIME&#39;], format=&#39;%m/%d/%Y %H:%M:%S&#39;)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sKV5ZUT1BgVR2eVvnakyXg.png" /></figure><p>Check and handle the dublicates data:</p><pre>(df_2022.groupby([&#39;TURNSTILE&#39;, &#39;STATION&#39;, &#39;DATE&#39;, &#39;TIME&#39;])[&#39;ENTRIES&#39;,&#39;EXITS&#39;]<br> .count()<br> .reset_index()<br> .sort_values([&#39;ENTRIES&#39;,&#39;EXITS&#39;],ascending=False)).head()</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/825/1*g5jIMmD-tMMCb1pAkTivzg.png" /></figure><pre>df_2022 = df_2022.drop_duplicates(subset=[&#39;TURNSTILE&#39;,&#39;STATION&#39;,&#39;DATE&#39;,&#39;TIME&#39;])</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/687/1*80PxicpWUr5kQQ-kikir2g.png" /></figure><p>As you can see, duplicate data has been removed.</p><p>We obtained the entries and exits numbers from the cumulative values ​​with the following code:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ogdWTVsqBiAMUvt2-sM67Q.png" /></figure><p>Next, we assigned the value 0 to the empty values ​​in the ‘ENTRIES’ and ‘EXITS’ columns. However, when we examined the data, we found that there were negative values ​​in the numbers of entries and exits. Since the number of negative data represents a very small part of the data, we excluded these values ​​from the data.</p><pre>df.fillna(0,inplace=True)</pre><pre>df_2022_positive = df[(df[&#39;ENTRIES_COUNT&#39;]&gt;0) &amp; (df[&#39;EXIT_COUNT&#39;]&gt;0)]</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aX6rJqi5tT4KeK7Tktk9EQ.png" /></figure><p>We’ve also set an upper threshold here to detect outliers in the entries and exits columns. Accordingly, we removed values ​​above 4800 from the data.</p><pre>df_2022_positive.describe()</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*TP3TsZ1nTi-TsvA4FqnS6g.png" /></figure><p>Top ten busiest stations:</p><pre>df_2022_ten_busiest_stations = (df_2022_positive.groupby([&#39;STATION&#39;])[&#39;ENTRIES_COUNT&#39;, &#39;EXIT_COUNT&#39;].sum().reset_index().sort_values([&#39;ENTRIES_COUNT&#39;, &#39;EXIT_COUNT&#39;], ascending=False)).head(10)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/504/1*w9Vb9YLQOLJ8t2DJV6y1wA.png" /></figure><p>We determined the most crowded stations by using the sum of the number of entries and exits at the stations.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/708/1*GUz8czvOVEUOdDNQ-fU33A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/816/1*S4Tg94IPNLysxhoSDZgoAg.png" /></figure><p>When we think of our daily life, people go to work on weekdays and travel to places to visit on the weekend. In line with this idea, it would be healthier to analyze the most crowded stations as weekdays and weekends.</p><p>Distribution of the 10 most crowded stations by days:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wiAa7nmHEhiW-ce72e_2BQ.png" /></figure><p>The 10 most crowded stations for weekdays:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/316/1*C_2axhiBaMo-G_dv8uVo4A.png" /></figure><p>The 10 most crowded stations for weekend:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/321/1*Khbyt2CgONpqLrVMOwxuqg.png" /></figure><p>As can be seen in the graphs above, the densities of the stations can change according to the days of the week or even the hours. Accordingly, the analyzes can be further customized.</p><p>Thanks for your time.</p><p><a href="https://github.com/volkanillik/New-York-MTA-Turnstile-Analysis.git">GitHub - volkanillik/New-York-MTA-Turnstile-Analysis</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c786fbbedc32" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Outlier Detection with Local Outlier Factor (LOF)]]></title>
            <link>https://medium.com/@volkanillik/outlier-detection-with-local-outlier-factor-lof-8d1e29acabb4?source=rss-dc140780a8bf------2</link>
            <guid isPermaLink="false">https://medium.com/p/8d1e29acabb4</guid>
            <category><![CDATA[outlier-detection]]></category>
            <category><![CDATA[outliers]]></category>
            <category><![CDATA[local-outlier-factor]]></category>
            <dc:creator><![CDATA[Volkan İllik]]></dc:creator>
            <pubDate>Sat, 10 Sep 2022 22:22:19 GMT</pubDate>
            <atom:updated>2022-09-10T22:48:13.811Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/697/1*soyo2_VCMgu0Kd6Gwspzrw.png" /></figure><p>Today, classifications and predictions are produced in many areas with artificial intelligence, machine learning and deep learning algorithms. It is very important that the data to be input into the algorithm is of high quality so that the predictions that are the output of these algorithms are accurate and consistent. Outliers are one of the most important factors affecting the quality of data.</p><p><strong>What Is This Outlier ?</strong></p><p>An outlier is a data point that differs significantly from other observations. These outliers may occur due to some external factors, exceptional circumstances and incorrect data entry. Ignoring the outliers ensures that the analyzes to be made or the estimations to be made based on these data yield highly accurate results.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/602/1*1pzlJfAkr20PN_cSpX_KVg.png" /></figure><p>In the above graph, the data points observed in green are clustered together, while the red data points are located far away from the majority of the data. In this case, we can say that the data points marked in red are outliers.</p><p>To explain with an example, the Mathematics course grades of a 4-person class are as follows:</p><p>1. Student: 40<br>2. Student: 50<br>3. Student: 60<br>4. Student: 100</p><p>The average of the class’s Mathematics exam grades is ‘62.5’. Looking at these values, we would be wrong if we said that class is success. Except for the 4th Student, there is no student exceeding ‘62.5’. Taking into account the outlier 4th Student in this dataset while calculating the success of the class will cause wrong inferences.</p><p>Now that we understand what outliers are, let’s try to figure out how to detect them. In this article, I will talk about Local Outlier Factor, which is one of the methods of detecting outliers.</p><p>Local Outlier Factor is an unsupervised outlier detection method. It enables detection of outliers by performing density-based scoring. It is similar to the KNN (K- Nearest Neighbors) algorithm, but while close values ​​are detected in KNN, far values ​​are detected in LOF.</p><p>The LOF algorithm can be divided into four parts:<br>1. K-distance and K-Neighbors<br>2. Reachability Distance<br>3. Local Reachabilit Density<br>4. Local Outlier Factor Calculation</p><ol><li><strong>K-distance and K-neighbors</strong></li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/424/1*vJYNDZeaD2yz3PVhnfi5ow.png" /></figure><p>To find the distance between observations, it is necessary to determine the parameter k. Here, k = 3 indicates that the distance of the data to the 3rd closest data point will be checked.</p><p><strong>2. Reachability Distance (RD)</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/250/1*uC0_ceoi03z92_eyNV7Z-g.png" /></figure><p>It is the maximum distance between two points. When calculating the distance between these two points, it may be measured with any of the Euclidean, Manhattan, and Minkowski measures.</p><p><em>RD(a, b) = max{k-distance (b) , normal_distance (a, b)}</em></p><p><strong>3. Local Reachability Density (LRD)</strong></p><p>It expresses how far we have to go from our current point to reach the next point or set of points. Calculate the reach distance for all k nearest neighbors of a and add the found values ​​and divide by the k value. LRD is calculated when this value is reversed.</p><p><em>LRD ( a) = 1 / ( sum( RD (a , b) ) / k)</em></p><p><strong>4. Local Outlier Factor(LOF) Calculation</strong></p><p><em>LOF ( a ) =[ ( LRD (1.Neighbor) + LRD ( 2. Neighbor) + ….. + LRD ( k. Neighbor ) ) / LRD ( a ) ] / k</em></p><p>The LOF value produces a value for each point. <strong>If LOF &gt; 1, we can accept it as an outlier.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*t21gTdvJrmEm-DCDsqNFUQ.jpeg" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8d1e29acabb4" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>