<?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 saransh srivastava on Medium]]></title>
        <description><![CDATA[Stories by saransh srivastava on Medium]]></description>
        <link>https://medium.com/@saransh.311?source=rss-93a1e4f6de68------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*qb-jcXscXrhlBHhSOQsFrQ.jpeg</url>
            <title>Stories by saransh srivastava on Medium</title>
            <link>https://medium.com/@saransh.311?source=rss-93a1e4f6de68------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 19:10:22 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@saransh.311/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[8 statistical models for data scientists in R]]></title>
            <link>https://medium.com/analytics-vidhya/8-statistical-models-for-data-scientists-in-r-3342f0e2ef79?source=rss-93a1e4f6de68------2</link>
            <guid isPermaLink="false">https://medium.com/p/3342f0e2ef79</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[data-analysis]]></category>
            <category><![CDATA[data-science-training]]></category>
            <category><![CDATA[statistics]]></category>
            <dc:creator><![CDATA[saransh srivastava]]></dc:creator>
            <pubDate>Wed, 08 Jul 2020 07:13:08 GMT</pubDate>
            <atom:updated>2020-07-17T16:31:19.868Z</atom:updated>
            <content:encoded><![CDATA[<h3>8 statistical models in R for data scientists</h3><p>Data science has become this unique amalgamation of computer science and statistics. Most people are trained in at least one of these disciples and while I will write most on machine learning in my other articles, this one will give a brief overview of different statistical models one can create using R language and will come handy to any data scientist. Statistics is an enormous discipline in itself and sometimes quite intimidating for people not trained in it. There are books and books on each of these models, so it will be impossible to compress all that information in one article. Thus, this one will be a starting point towards building your understanding of these data-model relationships. Also, this article will assume certain basic statistical definitions that are taught in all undergraduate statistics courses. However, if you feel more confident reviewing them first, I encourage you to study those concepts in your own time and then come back to this article.</p><p>The following 8 models will briefly explain each dataset and then the most appropriate model we used. You will not find in-depth details about the model but enough encouragement to exploit them on your own. Each of these examples are either taken directly or inspired from the books (<a href="https://www.amazon.com/Linear-Models-Chapman-Statistical-Science/dp/1584884258">1</a> &amp; <a href="https://www.amazon.com/Extending-Linear-Model-Generalized-Nonparametric/dp/149872096X">2</a>) by J.J. Faraway and I encourage you to check them out as well. The two books are a great source of understanding statistical models and their implementation in R and will come handy throughout your career.</p><p>Now, in each model, I will introduce a problem, give a brief overview of the data we have to analyse and based on it, choose the model we consider most appropriate.</p><p><strong>Model 1: Quantitative response with quantitative covariate</strong></p><p><strong>Data:</strong> The <a href="https://stat.ethz.ch/R-manual/R-patched/library/datasets/html/swiss.html">swiss data</a> in R contains observations of standardized Fertility measure and 5 social-economic indicators for each of 47 French-speaking provinces of Switzerland at about 1888.</p><p><strong>Covariates:</strong> (5 continuous variables) Agriculture, Examination, Education, Catholic, Infant.Mortality</p><p><strong>Predictor:</strong> (1 continuous variable) Fertility</p><p><strong>Model:</strong> linear regression model without interaction (Alternative could be choosing covariates as qualitative)</p><figure><img alt="Model 1" src="https://cdn-images-1.medium.com/max/1024/1*zO-IJe7r4qpb4xIHKwrdbA.png" /><figcaption>Model 1: Linear regression model</figcaption></figure><p>Final model and analysis:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8lfv-xV7aBvYa84EN3BdYw.png" /></figure><p>This is the most basic linear model one can make. Since we considered no interactive, it is easy to interpret this model.</p><p><strong>Model 2 : Binary response with quantitative covariate</strong></p><p><strong>Data:</strong> <a href="http://search.r-project.org/library/faraway/html/wcgs.html"><em>wcgs</em></a> in faraway</p><p><strong>Covariate:</strong> <em>height</em> and <em>cigs</em></p><p><strong>Predictor (Y):</strong> <em>chd</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PkzfDYN6vkZbZUASw_rUJg.png" /></figure><p><strong>Model fitting and hypothesis testing:</strong></p><p>Firstly, identify the important covariates. This is formally done in statistics by testing the null hypothesis that the covariate parameters are all zero vs. that they are not all zero.</p><p>The small p-value (&lt;0.05) at 95% confidence level concludes here that there is a significant relationship between the predictor <em>height</em> and <em>cigs,</em> and the response <em>chd</em>. But are both the covariates significant? One way of testing this is to create a smaller model and test using deviance difference as follows.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*unWJQrJpOtWRSOD21DxuRQ.png" /><figcaption>Model 2: Analysis of deviancetest</figcaption></figure><p>The analysis of deviance table shows that using the Likelihood ratio test, <em>height</em> is not significant in a model that already includes cigarettes (with p-value=0.3374) at 95% confidence level.</p><p><strong>Model selection:</strong></p><p>One of the easiest ways is to select a model given the covariates in R, is by using the <a href="https://www.rdocumentation.org/packages/stats/versions/3.6.2/topics/step"><em>step</em></a> function and AIC (Akaike information criterion). The model having the smallest AIC value among all candidate models is selected. The goodness of fit of the model cannot be measured using deviance in a binary response GLM, so we can either use Hosmer-Lemeshow statistics or ROC curve visually.</p><p><strong>Model 3: Binary response with categorical/qualitative covariates where categories &lt;=2</strong></p><p><strong>Data:</strong> Cars- Users were asked if they bought a locally manufactured car or not and classified into their type of residence (city vs. country) and gender (male vs. female)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NmpNpJeIHYCXJRycldVLTA.png" /><figcaption>Model 3: Data table</figcaption></figure><p><strong>Response:</strong> No. of people who bought local cars</p><p><strong>Covariate:</strong> gender and residence</p><p><strong>Model:</strong> Logistic Regression Model</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3QiLaCfJHbfX7dhN_R90JQ.png" /></figure><p>How do we decide if both gender and residence are relevant for the model?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1001/1*NQv2WQ4hgFaWX6L252_Q_g.png" /><figcaption>Model 3: Parameter relevance analysis</figcaption></figure><p>This analysis of deviance using Chi-sq test shows that residence is significant without gender, but not significant after allowing for gender. However, gender is significant with or without allowance for residence.</p><p><strong>Final model and analysis:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uq45mnmrgvAA2TIsqL9HUw.png" /></figure><p><strong>Model 4: Non-binary categorical response variable with categories&gt;= 2</strong></p><p><strong>Data:</strong> A 3-way contingency table relating occupation, education level and aptitude of the individual</p><p><strong>Response:</strong> Count of people at different education level</p><p><strong>Covariate:</strong> occupation, education, and aptitude as categorical covariates</p><p><strong>Model:</strong> Poisson regression model with log link</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/764/1*8ZzMYJ6jv2PlicJCIWb_tA.png" /><figcaption>Model 4: Data table</figcaption></figure><p><strong>Adequacy of model fitting:</strong></p><p>In a 3-way or higher degree tables, we need to find out which model is most adequate using the Chi-sq test.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/962/1*wj6MzuD-Y0gGYLH2dh_DWA.png" /><figcaption>Model 5: Model selection</figcaption></figure><p>Forming a deviance table:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/930/1*sazcbuKULz8Wopg2VNLoUw.png" /><figcaption>Model 5: Deviance and degree of freedom table</figcaption></figure><p>Now, if we find out p-values <em>(1-pchisq(deviance, df)</em> for each of these models, we will observe that the model [OE][EA] (interpretation: given education, occupation is independent of aptitude of a person) provides a good fit to the data (p-value=0.36), but the model [OE][OA][EA] provides a significantly better fit ( 1-pchisq(51–25,48–36)=0.0107)</p><p>Further analysis can be performed on the data by looking at the residuals to figure out the effect of teachers (code 2 in occupation) and what happens when they are removed because they show the maximum residuals. Another aspect in such tables is collapsibility, i.e. we try to collapse higher-order tables over one or mode factors to simplify the analysis and further interpretation. 2 important associations required for collapsibility of a table are the following:</p><p>Consider that the association between factors A and B in the collapsed table will be the same as in the three-way table if and only if in the three-way table:</p><p>1. There is no three-factor interaction and,</p><p>2. At least one of the two -factor interactions involving C is zero.</p><p><strong>Model 5: Non-binary Categorical response variable with categories &gt; 2 (Two-way contingency table — With missing information)</strong></p><p>Contingency table sometimes can be incomplete due to various reasons (Sampling zeros vs structural zeros). How do we model such data? One way of solving structural zero problems is by assuming quasi-independence.</p><p><strong>Data:</strong> <a href="https://en.wikipedia.org/wiki/Purum_people">Purum People</a>: A contingency table of Purum people of Manipur, India. Purums marry only in selected <a href="https://en.wikipedia.org/wiki/Sib_(anthropology)">sibs</a> and the allowed sibs are fixed by traditional customs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ie7gLk85uGk8tqbSKut7jw.png" /><figcaption>Model 5: Purum dataset</figcaption></figure><p>So, to fit a model, we transform the data and include another column with frequencies and typically assign nonvalue as a very different outlier frequency (eg: 99) whereas rest as their normal frequency. One way is the following table and then fit the model as above:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/897/1*DqB5UCyhD0w5OD89zVDXpg.png" /><figcaption>Model 5: Data transformation</figcaption></figure><p>We next look at the deviance to analyse the parameters.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*WXnVeVMW3NGRccdslDR3lQ.png" /><figcaption>Model 5: ANOVA</figcaption></figure><p>Based on the p-value we fail to reject our null hypothesis that the parameters of <em>purum.1</em> are insignificant. This scenario thus needs further investigation and here we will just look at the residuals to draw some preliminary conclusions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/745/1*GCYuWnWxWyyoPVWIkciMjg.png" /><figcaption>Model 5: Residual analysis</figcaption></figure><p>Excluding those disallowed marriage types, some combinations of sibs are more favoured than others. The more favoured combinations are those with large, positive residuals, the less favoured combinations are those with large, negative residuals.</p><p><strong>Model 6: Multi-categorical response variable with nominal responses</strong></p><p><strong>Data:</strong> In package faraway, the dataset is called <a href="https://www.rdocumentation.org/packages/faraway/versions/1.0.7/topics/pneumo"><em>pneumo</em></a>. We will use the same dataset for the next model as well. Dataset storing information of 371 coal miners who went through radiological examination and were classified into 3 categories of pneumoconiosis: normal, mild and severe, and 8 groups depends on the number of years they have worked in a coal mine.</p><p><strong>Response variable</strong>: pneumonoconiosis status</p><p><strong>Model:</strong> Multivariate categorical logit model. Here we use the library <a href="https://cran.r-project.org/web/packages/nnet/nnet.pdf"><em>nnet</em></a> and the method <em>multinorm</em> for our model fitting.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/848/1*YSnWR2Gtjg7KC6Dy4twR0g.png" /><figcaption>Model 6: Model fitting</figcaption></figure><p>The final model is the following:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*8av0eRpjznELtZ4bIEPMDA.png" /><figcaption>Model 6: Model equation</figcaption></figure><p><strong>Interpretation:</strong> Every unit increase of year increases the severe pneumomonoconiosis odds ratio to 1.115497 or log odds ratio to 0.1093 as compared to normal status.</p><p><strong>Model 7: Multi-categorical response variable with ordinal responses</strong></p><p><strong>Data:</strong> Using the same data as above but with the additional information from the data that the 3 stages: normal, mild and severe are interrelated. A person who has normal status will pass through mild status before becoming severely ill. This inherent property of the data is called ordinal (having an order)</p><p><strong>Model</strong>: For ordinal response variable, we will use a different function <a href="https://www.rdocumentation.org/packages/MASS/versions/7.3-51.6/topics/polr"><em>polr</em></a> from the library <em>MASS</em> as follows:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/928/1*ZZ3OV0z-Ezaw9Xs_H7sH6w.png" /><figcaption>Model 7: Model fitting</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/854/1*kXuyW0udiq0Wi1-c_gtjKw.png" /></figure><p>When the number of years classification group increases by 1 unit, the odds ratio of having a normal status vs not normal status in the examination decreases to a factor of exp(-0.0959) =0.9085 of the current one.</p><p><strong>Model 8: Multivariate models for correlated responses (Longitudinal study)</strong></p><p><strong>Data:</strong> The <a href="https://www.rdocumentation.org/packages/faraway/versions/1.0.7/topics/ohio"><em>Ohio</em></a> data concern 537 children from Steubenville, Ohio and were taken as part of a study on the effect of air pollution, Children were in the study for four years from age seven to ten.</p><p><strong>Response variable:</strong> The response is whether they wheezed or not. (1=wheezed)</p><p><strong>Covariates: </strong>ID to identify the child, age and mother’s smoking status (1=smoker)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/307/1*v-06UJU2NICSQea3vjqVkA.png" /><figcaption>Model 8: Ohio data</figcaption></figure><p><strong>Model:</strong> We will use a function <a href="https://www.rdocumentation.org/packages/geepack/versions/1.3-1/topics/geeglm">gee<em>glm</em></a><em> (Generalized estimating equation)</em> from the package <a href="https://cran.r-project.org/web/packages/geepack/geepack.pdf"><em>geepack</em></a> to fit a model. Note that for a Gaussian response, there is no problem to perform maximum likelihood estimation, since the specification of means and covariances determines the likelihood function. But for non-Gaussian data as in this case, the generalised estimating approach is proposed. This package (and another package <a href="https://cran.r-project.org/web/packages/gee/gee.pdf"><em>gee</em></a><em>()</em> ) do suffer from some problems and are actively under research and development.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1016/1*zlrYRJ2wWxJ7BUdDVyvn4A.png" /><figcaption>Model 8: Model fitting</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1010/1*0BV2uyiMo1uMSzr-B0QTNA.png" /></figure><p>A similar interpretation can be drawn here, i. e. the odds ratio of a 10-year-old child with a smoking mother versus a 9-year old child with a non-smoking mother is</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/659/1*1UZw5u1fFLHtwWhsDPxOcA.png" /></figure><p>If you have come this far, you would have realised a lot more information can be deduced from these models and I encourage you to do that. My lack of thoroughness in this article is so that I can fit different data scenarios into 1 easy read. Some of the topics to discuss in these models that I leave for the readers to work out are variance calculation, parameter estimate confidence interval and probability calculations.</p><p>However, a few points that are key to understanding a model fitting problem are addressed here and I would like to emphasize some easy steps to remember before I end. Firstly, the Anova test can be used in multiple ways, three of them highlighted here are:</p><blockquote>Parameter adequacy — Look for parameters having low ( &lt; 0.05) p-values;</blockquote><blockquote>Model adequacy compared to a null model where applicable — look for high p-values (&gt;0.05) and,</blockquote><blockquote>Comparing two models for better fit — if the p-value is low (&lt;0.05) chose the more complex model, if the p-value is high (&gt;0.05) choose the simpler model at 95% confidence level.</blockquote><p>Second, if the null model (only intercept model) shows more adequate fit, go back to your data and look at the residuals — there may be some outliers you need to remove or use as another dimension in covariates and then fit the model again.</p><p>Statistical model fitting requires mathematical understanding, testing and patience, and there is always a trade-off between adequacy of fit and simplicity to remember. I hope I was able to ignite some curiosity by giving a glimpse of the data and model variety. Curious to understand more? — Read the books!</p><p>Till next time!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3342f0e2ef79" width="1" height="1" alt=""><hr><p><a href="https://medium.com/analytics-vidhya/8-statistical-models-for-data-scientists-in-r-3342f0e2ef79">8 statistical models for data scientists in R</a> was originally published in <a href="https://medium.com/analytics-vidhya">Analytics Vidhya</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Coronavirus: Towards stochastic modeling (Part 1)]]></title>
            <link>https://medium.com/@saransh.311/coronavirus-towards-stochastic-modeling-part-1-5bf2c1cde010?source=rss-93a1e4f6de68------2</link>
            <guid isPermaLink="false">https://medium.com/p/5bf2c1cde010</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[stochastic-gradient]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[covid19]]></category>
            <dc:creator><![CDATA[saransh srivastava]]></dc:creator>
            <pubDate>Sat, 30 May 2020 11:12:52 GMT</pubDate>
            <atom:updated>2020-05-30T11:12:52.163Z</atom:updated>
            <content:encoded><![CDATA[<p>Nothing ever happened at such a worldwide scale as the novel Covid19 pandemic. People started building predictive models of this pandemic as early as March 2020 but there was no sufficient data to validate those models. Fast forward 3 months, I believe we are at a stage where we have sufficient data to at least fit learning models on it and make more accurate predictions.</p><p>At the onset, I should tell you that I do not have all the answers, nor am I claiming that this is going to be a complete model. The main purpose of this blog is to ask for your opinion and also to make you aware of the complexities of real-world problems. A typical data science viewpoint of the project requires the following:</p><ol><li>Understanding the data and its nuance.</li><li>Inventing a model based on the scenario (usually inspired by a basic model).</li><li>Fitting the parameters of the model — based on some loss function: a)Loss function optimization is in itself a whole area to explore. b) This also requires to put some constraint on parameters, in the sense that our hypothesis requires a certain parameter to be within a certain range (eg: probability is in [0,1] — aka constrained optimization</li><li>Using the fitted parameters to make predictions and also, as you might see in our case, the debate about the genuineness of the model and data.</li></ol><h3>The Data</h3><p>There are hundred of sources you can use to get the latest updated data of every country each day. I earlier used an R package (<a href="https://kjhealy.github.io/covdata/">covdata</a>) for preliminary analysis but based on my present requirement, I decided to use a much simpler way to pull data from <a href="https://covid.ourworldindata.org/data/owid-covid-data.csv">here</a>. To build my first model, I was just looking for data that can give me cumulative deaths and infections each data per country. The following is a snapshot of the data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hU2XeTKtgLhjglbnx9bhDA.png" /><figcaption>Snapshot of the structured Covid19 data avaialble</figcaption></figure><p><em>Note1: The start of outbreak date recorded in each country was different, so we need to extract only a subset of the data</em></p><blockquote>For analysis sake, I will use United Kingdom as a country to analyse. It’s important to think about the country you want to fit the data because that gives you some sort of confidence in the reported data.</blockquote><h3>Model Selection</h3><p>If you are reading this article, then you probably know about the <a href="https://www.maa.org/press/periodicals/loci/joma/the-sir-model-for-spread-of-disease-the-differential-equation-model">SIR model</a> for infectious diseases (Susceptible-Infected-Recovered). The most basic form of the model considers these three types of people in the population. In order to remotely align this model with real-world data, one needs to think of major variables that affect each of these types of people.</p><p>With the help of my colleagues, we came up with our interpretation of the real world in terms of the SEIR model (E=Exposed) inspired by the SIR model. Our hypothesis segregates people into 2 groups in each of these types — people who follow their country government rules and protect themselves by wearing masks for example (group 1) vs. people who do not follow the process (group 2). The model has 7 equations representing:</p><figure><img alt="Equations explaining the SEIR model" src="https://cdn-images-1.medium.com/max/1024/1*rX6llIn3Pmk0uTaW2J8VTA.png" /></figure><p>The differential equations are the following:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VLI-cH6LjKPhwONHXfcqiw.png" /><figcaption>SEIR model differential equations</figcaption></figure><p>The parameters used in these equations represent the following:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IFEul2cRsaF52AyMLYnmqg.png" /><figcaption>Parameters in the SEIR model</figcaption></figure><p>Now, these equations look complex but believe me the difficult part hasn’t come yet. As you can imagine, the population movement is not an easy equation to formulate.</p><h3><strong>Curve Fitting</strong></h3><p>How do we figure out what values these parameters should take in our actual model? Python libraries to the rescue!</p><p>SciPy provides <a href="https://docs.scipy.org/doc/scipy/reference/generated/scipy.integrate.odeint.html">odeint</a> for the integration of the differential equations and for the fitting of the model to the actual data. The underline loss function is the n<a href="https://lmfit.github.io/lmfit-py/">on-linear least square loss</a>. The aim of the function is to reduce the difference between the actual and predicted value statistically.</p><p><em>Note 2: Important aspect to note here is the bounds of the parameters! These parameters can take more than 1 set of values to fit the data. Choosing a range, forces the model to choose only parameter values within that range and aligning it with the real world.</em></p><p>There are 7 equations and 90 days of actual data. Which data column should we choose?</p><p><em>Note 3: The differential equations are all related, so the value obtained by 1 equation affects.others. So fitting data to one of these equations should be enough to obtain parameter values.</em></p><p>The contenders for model fitting are the number of cases related to the infection group and the death numbers related to the dead group. The most reliable data point out of the data available is the number of deaths each day reported (<em>What do you reckon?</em>). So taking the cumulative deaths of the last 90 days and some hypotheses bound on the parameters, we fit the model.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QeJSYi6exhiF-l29JjQMow.png" /><figcaption>Model fitting the actual deaths and SEIR model parameters for United Kingdom</figcaption></figure><p>That’s fitting almost perfectly!(Remember it’s only forUnited Kingdom)</p><h3><strong>Model Prediction</strong></h3><p>So far so good. Next, we predict the infection rate and see if that fits the infected people&#39;s data as well.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*X7NvuOc_7PQVJlqZRap6VA.png" /><figcaption>Prediction of infected people vs actual infected reported</figcaption></figure><h3><strong>The Analysis</strong></h3><p>It could be that the model does not consider an important aspect of the real-world scenario and thus is shooting so high. Maybe the age information in the data or the information about diabetes is important. It could also be that the data reported by the government is much less than the actual infected people. Hard to judge, that’s why it is important to think of a reliable source of information at the very least.</p><p>It’s an ongoing work, there are more parts to the problem, and it will be interesting to dig deeper. Feel free to comment your suggestions. What do you think the model is missing? Are the constraints justified? Is the population of the country constant? With many parameters and different countries having different sets of rules, it’s important to narrow down the problem and then think of it. I realized it is also important that I validate my model on at least 1 reliable source of information (read country) in order to have some confidence in the model.</p><p>The research community is pouring in with publications every day. It is important to read, absorb, and contemplate. I hope this article helped you in formulating the problem and thinking in the direction of the solution.</p><p>Till next time!</p><p><a href="https://github.com/srivastava-sar/COVID_model">Sourc Code</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5bf2c1cde010" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>