<?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 pavanthi sudasinghe on Medium]]></title>
        <description><![CDATA[Stories by pavanthi sudasinghe on Medium]]></description>
        <link>https://medium.com/@pavanthi-sudasinghe?source=rss-e7cd6e421543------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*bb7qT8tS2Oa1ckfDpg9ZIA.jpeg</url>
            <title>Stories by pavanthi sudasinghe on Medium</title>
            <link>https://medium.com/@pavanthi-sudasinghe?source=rss-e7cd6e421543------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 02 Dec 2026 23:00:11 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@pavanthi-sudasinghe/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[Run like a pro: Analysis of stride length and step frequency.]]></title>
            <link>https://pavanthi-sudasinghe.medium.com/run-like-a-pro-analysis-of-stride-length-and-step-frequency-1eddaeee0c9f?source=rss-e7cd6e421543------2</link>
            <guid isPermaLink="false">https://medium.com/p/1eddaeee0c9f</guid>
            <category><![CDATA[sports-analytics]]></category>
            <category><![CDATA[running-tips]]></category>
            <category><![CDATA[sports-analysis]]></category>
            <dc:creator><![CDATA[pavanthi sudasinghe]]></dc:creator>
            <pubDate>Tue, 26 Jul 2022 02:06:06 GMT</pubDate>
            <atom:updated>2022-07-26T02:06:06.111Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*SYA-fBo7J1p0he7x" /><figcaption>Photo by <a href="https://unsplash.com/@bradencollum?utm_source=medium&amp;utm_medium=referral">Braden Collum</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>With the superb performances of sprinter Yupun Abeykoon, many Sri Lankans are talking about sprinting more than usual. He became the first South Asian to run the 100m in less than 10s. He finished the 100m race in just 9.96s on 3rd July 2022 in Switzerland and became the latest sub-10 second member.</p><p>In this article, I mainly consider stride length and step frequency, and I discuss the all-time top five fastest runners and compare Yupun Abeykoon with them. Then I compare Yupun to 100m finalists in the 100th National Athletics Championships 2022.</p><p>Stride length and step frequency are key measures considered in 100m sprints. Stride length or step length is the length of each step, and step frequency is the number of steps per second. <br>Those two measures can be calculated using the following equations:</p><p>Stride length = Race distance / Number of steps<br>Step frequency = Race distance / ( Finishing time * Stride length )</p><ol><li>All-time top 5 fastest runners and Yupun.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/538/1*Mu4TvE4VCYPGsJI0TfNUyw.png" /><figcaption>All-time top 5 faster runners — 100m</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/538/1*rfbUeaIcDLj8VrWOKnn8Zg.png" /><figcaption>Yupun’s top 3 performances — 100m</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/837/1*Kgbe06aijB0cd7hHYD5DUg.png" /></figure><p>Usain Bolt is the fastest sprinter in world athletic history. As you can see, Bolt has the lengthly stride length compared to the others, and his step frequency is the lowest. But when considering other elite sprinters, they have relatively the same stride length rather than Bolt. He needs only 41 strides to cover 100 meters, while other elite runners take nearly 43 to 46 stride lengths. But the most interesting finding in this graph is if you consider Yupun (Here I only take his top three personal times), his stride length for his best performance is somewhat closer to the stride length of Bolt, and it is somewhat away from other elite sprinters. And also, Yupun has lower step frequency for his best time than super elite sprinters other than Usain Bolt.</p><p>2. Yupun and 100m finalists in the 100th National Athletics Championships 2022.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/513/1*iW3hxscPdC-X8NxKm19RxA.png" /><figcaption>Finalists in the 100th National Athletics Championships 2022–100m</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/911/1*fApb6kTsZuZF_3jDdSs2oQ.png" /></figure><p>As you can see, blue dots, which represent finalists in the 100th National Athletics Championships 2022, are clustered together with lower stride length and higher step frequency when Yupun has higher stride length and lower step frequency.</p><p>However, stride length and step frequency are not a matter of technology. As you can see, sprinters who finish the race last have higher stride length than the most top runner.</p><p>Keep in your mind that if you suddenly decide to start running with longer strides, you will not be faster as you expect.</p><p>P.c. I collected these data by watching YouTube videos relevant to each observation. However, there can be some errors.</p><p>Ref:</p><ul><li><a href="https://www.econathletes.com/post/math-for-sprinters-steps-per-second-and-stride-length">Math for Sprinters - Step Frequency and Stride Length</a></li><li><a href="https://www.nytimes.com/2017/07/20/sports/olympics/usain-bolt-stride-speed.html">Something Strange in Usain Bolt&#39;s Stride (Published 2017)</a></li><li><a href="https://www.ceylonathletics.com/2022/07/05/22328/">The story of Yupun Abeykoon - newest member of Sub 10 club - Ceylon Athletics News</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1eddaeee0c9f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Model Selection]]></title>
            <link>https://towardsdev.com/model-selection-5d658958e097?source=rss-e7cd6e421543------2</link>
            <guid isPermaLink="false">https://medium.com/p/5d658958e097</guid>
            <category><![CDATA[subset-selection]]></category>
            <category><![CDATA[stepwise-algorithm-in-r]]></category>
            <category><![CDATA[backward-elimination]]></category>
            <category><![CDATA[choose-a-model-by-aic]]></category>
            <category><![CDATA[forward-selection]]></category>
            <dc:creator><![CDATA[pavanthi sudasinghe]]></dc:creator>
            <pubDate>Tue, 18 Jan 2022 08:14:08 GMT</pubDate>
            <atom:updated>2022-01-21T08:08:22.148Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*PROm47I4K4w89EdT" /><figcaption>Photo by <a href="https://unsplash.com/@mrthetrain?utm_source=medium&amp;utm_medium=referral">Joshua Hoehne</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>When dealing with a model, we want to select the best model properly. There are various types of methods to deal with model selection and validation.</p><ol><li>Subset selection — Here, the set of predictors is selected and fits a model using that set of predictors.</li><li>Shrinkage methods — This method reduces the variables by reducing the values of the predictor’s coefficients to zero or close to zero. Ex: Ridge Regression, Lasso Regression.</li><li>Dimension reduction- This method is helpful when we have a lot of features in our dataset to reduce the number of features. Here, it projects the P number of predictors on the M- dimensional subspace. These projections are used as predictors to fit linear regression models. Ex: Principal Component Analysis(PCA), Factor Analysis(FA).</li></ol><p>Here, I’m mainly focusing on the first method, which is the subset selection method. Under that, I hope to give an idea about best subset selection, forward selection, and backward elimination procedures.</p><p><strong>Best subset selection:</strong><br>It starts with the null model, then adding predictors to the model one at a time and fitting those models. Finally, pick the best model among all of the fitted models. However, this method has some disadvantages as well. For example, if your dataset has 20 predictors, there are 2²⁰combinations of models. It can be good on your training data, but it is not easy to deal with testing data. If the number of predictors is large, there can be many calculation problems. Even with a fast computer, it can be computationally infeasible. <br>Forward selection and backward elimination overcome this problem and, these two procedures present a more efficient alternative way to select the best model.</p><p><strong>Forward selection:</strong><br>This approach also starts with an empty model, adding one predictor at a time until there are no more significant terms to add. If you consider the p number of predictors, forward selection fits 1+(p(p+1))/2 number of models only. It is less than the number of models in the best subset selection. <br>The forward selection method can be used for high-dimensional data as well. If the matrix is not full-ranked, the inverse is not defined. Therefore, we can’t use the least square method on that. Due to this reason, if there are high-dimensional data, we can only build sub-models.</p><p><strong>Backward elimination: </strong><br>This method works in the reverse of the forward selection method. It starts with the model with all the variables and drops the least significant variable, one at a time. We stop the procedure after all remaining variables are statistically significant.</p><p>If the model-building procedure is complicated and you need a higher prediction accuracy with more variables, the backward elimination will give you a good model with fewer steps than the forward selection method.</p><p><strong>How to select the best model from among many models?</strong></p><p>For this, you can use</p><ol><li>Mallow’s Cp</li><li>AIC (Akaike information criterion)</li><li>BIC (Bayesian information criterion)</li><li>Adjusted R²</li></ol><p><strong>Choose a model by AIC in a Stepwise Algorithm using R.</strong></p><p>Here I’m performing a forward selection and a backward elimination for the <a href="https://archive.ics.uci.edu/ml/machine-learning-databases/concrete/compressive/">Concrete Compressive Strength Data Set</a>, which I considered in my previous article, <a href="https://towardsdev.com/fitting-a-multiple-linear-regression-model-in-r-5b4052121b93">Fitting a Multiple Linear Regression Model in R</a>,</p><pre>#loading libraries</pre><pre>library(MASS)</pre><pre>#forward selection method</pre><pre>null&lt;-lm(strength~ 1, data=data)</pre><pre>full&lt;-lm(strength~ ., data=data)</pre><pre>fwd_lm=stepAIC(null, scope=list(lower=null, upper=full),data=data, direction=&#39;forward&#39;)</pre><pre>#backward elimination method</pre><pre>null&lt;-lm(strength~ 1, data=data)</pre><pre>full&lt;-lm(strength~ ., data=data)</pre><pre>bwd_lm=stepAIC(full, scope=list(lower=null, upper=full),data=data, direction=&#39;backward&#39;)</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5d658958e097" width="1" height="1" alt=""><hr><p><a href="https://towardsdev.com/model-selection-5d658958e097">Model Selection</a> was originally published in <a href="https://towardsdev.com/">Towards Dev</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Fitting a Multiple Linear Regression Model in R]]></title>
            <link>https://towardsdev.com/fitting-a-multiple-linear-regression-model-in-r-5b4052121b93?source=rss-e7cd6e421543------2</link>
            <guid isPermaLink="false">https://medium.com/p/5b4052121b93</guid>
            <category><![CDATA[concrete-strength]]></category>
            <category><![CDATA[linearity-assumptions]]></category>
            <category><![CDATA[r]]></category>
            <category><![CDATA[transformation]]></category>
            <category><![CDATA[linear-regression]]></category>
            <dc:creator><![CDATA[pavanthi sudasinghe]]></dc:creator>
            <pubDate>Sun, 26 Dec 2021 09:08:46 GMT</pubDate>
            <atom:updated>2021-12-29T07:23:49.652Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*JmxxGNbJW8h0XT9w" /><figcaption>Photo by <a href="https://unsplash.com/@campaign_creators?utm_source=medium&amp;utm_medium=referral">Campaign Creators</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h4><strong>What is Multiple Linear Regression?</strong></h4><p>In simple linear regression, we only consider one independent variable. However, building a model using only one independent variable is not practical. Therefore, we use multiple linear regression to overcome this problem.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/596/1*2tPpDYm4FrwX78XOfKPT0Q.png" /></figure><p>Here I consider the concrete compressive strength data set. This data set consists of 9 variables and 1030 observations. The concrete compressive strength is our regression problem.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/713/1*6CsHqZKsWsd2R4EXRaLNrQ.png" /></figure><h4><strong>Model Building</strong></h4><p>Please note that I’m not going to use the full model here. This is only a model with main effects.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/593/1*Hi7OeUTsZvyNrs9VP943aQ.png" /></figure><p>According to the above output, our model equation will be</p><p>strength = -23.164+0.112 Cement+0.104 Blast_Furnace_Slag+ 0.088 Fly_Ash-0.15 Water+0.291 Superplasticizer+0.018 Coarse_Aggregate+0.02 Fine_Aggregate+0.114 Age</p><p>When Cement is increased by 1 Kg, strength will be increased by 0.112 units. Likewise, we can interpret other variables in this model.</p><p>However, except variables Coarse_Aggregate and Fine_Aggregate, other variables are more significant. You may be wondering how I tell these things directly. Do you notice there are some asterisks next to the p values? If a p-value is less than 0.001, it is flagged with three asterisks. If a p-value is less than 0.01, it is flagged with two asterisks. It is also mentioned below in that output as well.</p><p>We can also obtain the relevant R² value from this output. It gives the proportion of the variation in the response explained by the fitted model.</p><p>This model has an R² of 61.55%. This implies that the above model explains 61.55% of the total variation in the response (strength).</p><p>However, for this multiple linear regression problem, it may be good to use adjusted R² instead of multiple R² as our R² value.</p><h4><strong>Validation of the model</strong></h4><p>Multiple linear regression makes several key assumptions.</p><ol><li>Linearity</li><li>Independency</li><li>Multivariate Normality</li><li>Homoscedasticity</li><li>No multicollinearity</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/90/1*76vDQOXswnskz4KlowWE-Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/616/1*Vp6V9bHqhxx2I08ahppa1w.png" /></figure><p>Residual vs Fitted value plot used to check the assumptions linearity and homoscedasticity. The red line is not lying near the zero residual value. Also, that line is not horizontal. Therefore linearity assumption is not met. A pattern like a funnel is also observed. It indicates nonconstant variance. Therefore homoscedasticity assumption is also not met on residuals.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/616/1*zeQX62tQjC4Fdaz_rDYAcg.png" /></figure><p>The tail area of the above Q-Q plot looks deviate. It suggests the residuals are not normally distributed. Visual representation is usually unreliable. There are various statistical tests such as Anderson- Darling test, Kolmogorov-Smirnov test, Shapiro-Wilk test to test the normality.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/378/1*ICN9YWxRMAY0NOTccxF-2w.png" /></figure><p>Ho: Residuals are normally distributed</p><p>H1: Residuals are not normally distributed</p><p>Since the p-value is less than 0.05 we reject Ho. This test verifies what we obtained earlier. Therefore, multivariate normality is not met on residuals.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/393/1*Lc6ee6755oKsTY376jYvNA.png" /></figure><p>Here we check the residuals are independent or not by using Durbin Watson Test.</p><p>Ho: Residuals are independent</p><p>H1: Residuals are not independent</p><p>The above result shows that the p-value is smaller than 0.05. So we reject the null hypothesis. There is not enough evidence at a 5% level of significance to conclude that Residuals are independent.</p><p>Variation Inflation Factor (VIF) is one of the ways to detect multicollinearity. VIF&gt;10 indicates the presence of collinearity. Tolerance is the reciprocal of VIF. Therefore a tolerance smaller than 0.1 also indicates the presence of collinearity.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/925/1*d9WwgcfIyCMuk1GO86nBsw.png" /></figure><p>This output tells us that Coarse_Aggregate and Fine_Aggregate coefficients are non-significance may be due to multicollinearity. However, all the VIF values are smaller than 10. It indicates this model does not contain multicollinearity.</p><h4>Transformation of Variables</h4><p>If our model assumptions are violated then we can not trust our model. The followings are some ideas for further improvements to this model using transformation techniques.</p><ol><li>Adjusting non-normality, heteroscedasticity: transformation on Y</li><li>Adjusting non-linearity: transformation on X</li></ol><p>There are several transformations that can be helpful.</p><ol><li>Log transformation</li><li>Square root transformation</li><li>Arcsin</li><li>Power transformation</li></ol><p>There is no rule to use these transformation techniques. It is good to try each one and then decide which one is the best. So by fixing those issues we can obtain a better model than this.</p><p><em>Reference: </em><a href="https://rpubs.com/Abhilash333/396604">https://rpubs.com/Abhilash333/396604</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5b4052121b93" width="1" height="1" alt=""><hr><p><a href="https://towardsdev.com/fitting-a-multiple-linear-regression-model-in-r-5b4052121b93">Fitting a Multiple Linear Regression Model in R</a> was originally published in <a href="https://towardsdev.com/">Towards Dev</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>