<?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 Shriya Ejanthker on Medium]]></title>
        <description><![CDATA[Stories by Shriya Ejanthker on Medium]]></description>
        <link>https://medium.com/@shriyaejanthker?source=rss-5b748ebaafc9------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*Qn9isszA8I-I9JS6.</url>
            <title>Stories by Shriya Ejanthker on Medium</title>
            <link>https://medium.com/@shriyaejanthker?source=rss-5b748ebaafc9------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 05:12:07 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@shriyaejanthker/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[Bayesian Fourier-Feature PINNs for Option Pricing: A New Frontier in Financial Modeling]]></title>
            <link>https://medium.com/@shriyaejanthker/bayesian-fourier-feature-pinns-for-option-pricing-a-new-frontier-in-financial-modeling-667f33f6b33f?source=rss-5b748ebaafc9------2</link>
            <guid isPermaLink="false">https://medium.com/p/667f33f6b33f</guid>
            <category><![CDATA[statistics]]></category>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[bayesian-statistics]]></category>
            <category><![CDATA[finance]]></category>
            <category><![CDATA[neural-networks]]></category>
            <dc:creator><![CDATA[Shriya Ejanthker]]></dc:creator>
            <pubDate>Wed, 05 Mar 2025 06:48:01 GMT</pubDate>
            <atom:updated>2025-03-05T06:48:01.042Z</atom:updated>
            <content:encoded><![CDATA[<p>I was recently introduced to PINNs (Physics-Informed Neural Networks) at the Ann Arbor Tech Meetup a couple weeks ago in the context of CFD. The former mechanical engineer in me was intrigued. As someone who spent hours using CFD software to model air flow while working on vehicle design, this could’ve saved me hours if I’d used one of these.</p><p>But then, I got to thinking — what if we applied PINNs to financial data? As I recently worked on modeling S&amp;P 500 volatility, I found myself looking up financial models that rely on PDEs. Option pricing popped up. The Black-Scholes equation, the Heston model — finance was full of differential equations, yet the industry still relied heavily on numerical solvers and Monte Carlo methods. If PINNs could solve PDEs faster and more efficiently, why not use them for pricing options?</p><h3>Why PINNs for Option Pricing?</h3><p>Financial models, particularly those used in option pricing, are governed by PDEs. The Black-Scholes equation is the most well-known, but more advanced models like Heston’s stochastic volatility model and jump-diffusion models add further complexity. Traditionally, these are solved using finite difference methods, Monte Carlo simulations, or deep learning approximations, each with its drawbacks — slow computations, discretization errors, and lack of theoretical guarantees.</p><p>PINNs offer a new approach: instead of discretizing PDEs, they enforce the governing equations as soft constraints within a neural network loss function. Recent work has shown that PINNs can effectively solve option pricing PDEs, with studies by Dhiman and Hu (2023) demonstrating PINNs for Black-Scholes and American option pricing, and Hainaut and Casas (2024) successfully applying PINNs to Heston’s model. Their findings suggest that PINNs are capable of pricing options faster and with greater flexibility, adapting to different strikes and maturities without retraining.</p><h3>Going a Step Further: Bayesian PINNs for Uncertainty Quantification</h3><p>But then, I thought further — what if we incorporated Bayesian priors? Traditional PINNs provide a single best-fit solution, but financial markets don’t work like that. There’s noise, randomness, uncertainty. We don’t just want an option price; we want a range of possible prices with confidence intervals. Bayesian PINNs (B-PINNs) could do exactly that — combine the rigorous constraints of financial PDEs with probabilistic inference, allowing us to quantify uncertainty in pricing models.</p><p>Research has already explored B-PINNs for PDE-constrained problems, with Yang et al. (2021) applying them to forward and inverse PDE problems. Their study found that Bayesian inference improved generalization and robustness, particularly in noisy environments — exactly the kind of situation financial markets present. Further, Zong et al. (2023) extended Bayesian reasoning to PINNs for financial applications, demonstrating that B-PINNs can handle parameter uncertainty and market data noise more effectively than traditional PINNs.</p><p>Applying this to finance would be game-changing. Traders and risk managers could assess not just the price of an option, but also how uncertain that price is, which could revolutionize risk assessment. Calibration of stochastic volatility models, for example, could become far more robust, capturing market uncertainty explicitly rather than just assuming a single volatility curve.</p><h3>Pushing the Idea Even Beyond: Bayesian Fourier-Feature PINNs (BF-PINNs)</h3><p>One key issue with PINNs is spectral bias — they struggle with high-frequency changes. But markets? They are full of sudden jumps, volatility spikes, and chaotic behavior. Traditional neural networks have trouble capturing these rapid fluctuations, which makes them ill-suited for pricing exotic options or modeling jump-diffusion processes.</p><p>Enter Fourier feature networks. Ding et al. (2024) demonstrated that Fourier embeddings significantly improve PINN performance on high-frequency problems, particularly in wave propagation and turbulence modeling. This made me wonder — what if we combined Bayesian inference with Fourier features?</p><p>A Bayesian Fourier-Feature PINN (BF-PINN) would take the best of both worlds:<br>- Enforcing financial PDE constraints (Black-Scholes, Heston, jump-diffusion models) via PINNs.<br>- Incorporating uncertainty estimation using Bayesian inference.<br>- Capturing high-frequency movements in option prices using Fourier features to mitigate spectral bias.</p><p>This could make PINNs not only more robust to market noise but also better at handling sudden price changes, a major shortcoming of existing pricing models. Imagine a model that doesn’t just fit historical data but also adapts to changing market conditions, quantifies its own confidence, and accounts for abrupt price swings — essentially, an option pricing model built for reality, not just theory.</p><h3>Current Research</h3><p>While research on Bayesian PINNs in finance is gaining momentum, the integration of Fourier embeddings in B-PINNs remains largely unexplored. Studies like Hou et al. (2024) have applied multi-scale Bayesian PINNs (MB-PINNs) to high-frequency PDEs, but financial applications are still in their infancy. Given the success of random Fourier feature networks in option pricing PDEs, it’s only a matter of time before BF-PINNs are explored in greater depth.</p><p>Some open questions remain:</p><ul><li>Can BF-PINNs generalize across different asset classes and derivatives?</li><li>How computationally feasible is Bayesian training in real-time trading environments?</li></ul><p>Perhaps, in the future, we won’t be talking about Black-Scholes vs. Monte Carlo anymore. Maybe it’ll be PINNs vs. BF-PINNs — fast, uncertainty-aware, and ready to handle the chaos of financial markets. A model that doesn’t just provide a number but a full probabilistic picture of risk, one that can learn from the past but also adjust to the future.</p><p>Financial modeling has always evolved alongside technology. This could be the next step. PINNs have already shown promise for pricing options. Bayesian PINNs take that a step further by quantifying uncertainty. BF-PINNs might just be the bridge between financial theory and the unpredictable reality of markets.</p><p>We’re on the edge of something substantial here.</p><h3>References</h3><ol><li>Yang, L., Meng, X., &amp; Karniadakis, G. E. (2021). <em>B-PINNs: Bayesian physics-informed neural networks for forward and inverse PDE problems with noisy data</em>. <strong>Journal of Computational Physics, 425</strong>, 109913.</li><li>Dhiman, A., &amp; Hu, Y. (2023). <em>Physics-Informed Neural Network for Option Pricing.</em></li><li>Hainaut, D., &amp; Casas, A. (2024). <em>Option pricing in the Heston model with physics-inspired neural networks.</em> LIDAM Discussion Paper 2024002.</li><li>Zong, Y., et al. (2023). <em>Bayesian Reasoning for Physics Informed Neural Networks.</em> arXiv preprint arXiv:2308.13222.</li><li>Ding, Y., et al. (2024). <em>Physics-informed Neural Networks with Fourier Features for Seismic Wavefield Simulation.</em> arXiv preprint arXiv:2409.03536.</li><li>Hou, Y., Li, X., &amp; Wu, J. (2024). <em>Improvement of Bayesian PINN Training Convergence in Solving Multi-scale PDEs with Noise.</em> arXiv preprint arXiv:2408.09340.</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=667f33f6b33f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why is random state always set to 42?]]></title>
            <link>https://medium.com/@shriyaejanthker/why-is-random-state-always-set-to-42-2f4da0affead?source=rss-5b748ebaafc9------2</link>
            <guid isPermaLink="false">https://medium.com/p/2f4da0affead</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[statistics]]></category>
            <dc:creator><![CDATA[Shriya Ejanthker]]></dc:creator>
            <pubDate>Thu, 24 Oct 2024 02:51:57 GMT</pubDate>
            <atom:updated>2024-10-24T02:51:57.315Z</atom:updated>
            <content:encoded><![CDATA[<p>If you’re into data science at all, you might wonder why the random_state variable is always set to 42. I was working on a machine learning problem earlier and suddenly wondered why I was setting random_state to 42. Where does this number come from? So I looked it up.</p><p>Actually, there is no technical reason or statistical significance to the number 42. Setting random_state=42 is basically an inside joke in the data science world. It comes from <em>The Hitchhiker’s Guide to the Galaxy</em>, where 42 is the &quot;answer to the ultimate question of life, the universe, and everything.&quot; So, it’s just a fun reference.</p><p>On a practical level, setting random_state ensures your results are consistent. Like if you’re splitting data or initializing models, using the same number (like 42) guarantees you’ll get the same results every time you run your code. Why 42? No real reason—just nerdy humor that stuck around!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2f4da0affead" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Build Your Own ML Model: A Walkthrough A-Z]]></title>
            <link>https://medium.com/@shriyaejanthker/how-to-solve-any-prediction-problem-a-step-by-step-guide-0d6df1c4bd3f?source=rss-5b748ebaafc9------2</link>
            <guid isPermaLink="false">https://medium.com/p/0d6df1c4bd3f</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[predictive-modeling]]></category>
            <category><![CDATA[predictions]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Shriya Ejanthker]]></dc:creator>
            <pubDate>Thu, 10 Oct 2024 21:15:35 GMT</pubDate>
            <atom:updated>2024-10-11T19:35:36.293Z</atom:updated>
            <content:encoded><![CDATA[<p>Prediction problems are at the heart of many data science tasks, whether it’s forecasting sales, predicting customer churn, or diagnosing diseases. In this guide, we’ll go through the process of building your own prediction model from scratch. We’ll cover everything from preprocessing your data to choosing the right algorithm and tuning it for optimal performance. You can scroll all the way down to view example code.</p><h4>1. Preprocessing Data</h4><p>Data preprocessing is crucial because real-world data is messy. You’ll encounter missing values, incorrect formats, and a mix of numerical and categorical data. Let’s break down how to handle each type.</p><p><strong>Handling Missing Data:</strong> First, identify missing values. For numerical data, you can either replace them with the mean or median, or you can drop them entirely if there aren’t too many. For categorical data, you might replace missing values with the most frequent category.</p><p><strong>Treating Categorical Variables:</strong> Categorical variables (like “Gender” or “Country”) need to be converted into a numerical format for most algorithms to process them. Common methods include:</p><ul><li><strong>One-Hot Encoding:</strong> Create binary columns (1 or 0) for each category. For example, a column “Color” with values “Red,” “Green,” “Blue” becomes three columns: “Color_Red,” “Color_Green,” and “Color_Blue,” with a 1 or 0 to indicate presence.</li><li><strong>Label Encoding:</strong> Assign a unique number to each category (only use this if the categories have a natural order).</li></ul><p><strong>Scaling Numerical Data:</strong> For many algorithms, it’s essential to scale your numerical features to a similar range. For example, considering data from a morning run. 80 miles is a long distance while 80 calories isn’t much of a burn, but the model doesn’t know this. Thus, we scale the data so it’s comparable. Common techniques include:</p><ul><li><strong>Standardization:</strong> Transforming data to have a mean of 0 and a standard deviation of 1.</li><li><strong>Min-Max Scaling:</strong> Scaling values between 0 and 1.</li></ul><h4>2. Feature Engineering</h4><p>Feature engineering is about creating new features from the data you already have, to help the model understand patterns better.</p><ul><li><strong>Interaction Features:</strong> Multiply or combine two features that may have a relationship. For instance, multiplying “Age” by “Income” can create a new feature showing their interaction.</li><li><strong>Polynomial Features:</strong> Use polynomial terms (like x²) to allow the model to capture more complex relationships that are non-linear.</li><li><strong>Domain-Specific Features:</strong> Create new features based on your knowledge of the problem. For example, in a time-series problem, you might add features like “day of the week” or “holiday flag.”</li></ul><h4>3. Splitting the Data</h4><p>You should never train your model on the full dataset. To check if it will perform well on unseen data, split your data into:</p><ul><li><strong>Training Set (80%):</strong> Used to train your model.</li><li><strong>Test Set (20%):</strong> Used to evaluate the model’s performance on unseen data.</li></ul><p>Splitting ensures that we can measure how well the model generalizes to new data rather than just memorizing the training data.</p><h4>4. Building a Pipeline</h4><p>A machine learning pipeline organizes your workflow, ensuring that data preprocessing, feature engineering, and model training happen in a consistent manner. You can create a pipeline where you:</p><ul><li>Handle missing values</li><li>Scale numerical features</li><li>Encode categorical variables</li><li>Train your model</li></ul><h4>5. Choosing a Prediction Algorithm</h4><p>Next, you’ll want to choose the right prediction algorithm for your problem. Some common options based on different data:</p><ul><li><strong>Regression (Predicting a continuous value when relationship is linear):</strong> Linear Regression, Lasso, Ridge, ElasticNet</li><li><strong>Non-linear Relationships (Predicting continuous values):</strong> Decision Trees, Random Forest, Neural Networks, Gradient Boosting</li><li><strong>Binary/Multiclass Classification:</strong> Logistic Regression, Decision Trees, Random Forest, SVM, Naive Bayes</li><li><strong>Large Datasets:</strong> Random Forest, XGBoost, LightGBM, CatBoost</li><li><strong>Small Datasets:</strong> KNN, Decision Trees, Logistic Regression</li><li><strong>High-dimensional Data:</strong> SVM, PCA, Gradient Boosting</li></ul><p>Each algorithm has strengths and weaknesses, and you may need to try several to see what works best for your data.</p><h4>6. Cross-fold Validation</h4><p>Cross-validation is a method used to check how well a model will perform on unseen data. Instead of just splitting the data once into a training set and a test set, cross-validation splits the data into multiple parts, or <strong>folds</strong>, to get a more accurate measure of the model’s performance. The model is trained on a subset of the data and validated on the remaining subset. This process is repeated for different folds to ensure the model’s performance is not dependent on just one training set.</p><p><strong>K-Fold Cross-Validation</strong> is the most common method:</p><ul><li>The dataset is split into <strong>K</strong> equal-sized folds(e.g., 5 or 10 folds).</li><li>The model is trained on <strong>K-1</strong> folds and tested or validated on the remaining fold.</li><li>This process is repeated <strong>K</strong> times, each time with a different fold acting as the test set, which is called the validation set.</li><li>The results from all K runs are averaged, and this is used to evaluate the model.</li></ul><p>This helps reduce overfitting by ensuring the model doesn’t perform well just on a particular subset of the data. It also provides a more reliable estimate of model performance on unseen data, as each data point is used for both training and validation.</p><h4>7. Hyperparameter Tuning: Randomized or Grid Search (Optional)</h4><p>Once you’ve chosen an algorithm, you’ll need to fine-tune it by adjusting its hyperparameters (these are settings that control how the algorithm behaves, like the number of trees in a Random Forest).</p><ul><li><strong>Randomized Search:</strong> Randomly sample from a range of hyperparameters, which is quicker but less exhaustive.</li><li><strong>Grid Search:</strong> Test every possible combination of parameters.</li></ul><p>Scikit-Learn offers both methods to help you find the best model for your data, and both these methods inherently perform cross-fold validation by specifying the <em>cv</em> parameter.</p><h4>8. Completing the Pipeline and Making Predictions</h4><p>Once you’ve fine-tuned your model, plug it back into your pipeline by applying it to your test data. This ensures all the preprocessing steps (like scaling and encoding) are applied the same way to new data.</p><ul><li><strong>Fit the model:</strong> Train the model using your training data.</li><li><strong>Make predictions:</strong> Use the model to make predictions on your test set.</li></ul><h4>9. Evaluating Model Performance</h4><p>Once you’ve made predictions, it’s time to evaluate how well your model did. Depending on the type of problem you’re solving, you’ll use different evaluation metrics:</p><p><strong>For Regression:</strong></p><ul><li><em>Mean Squared Error (MSE):</em> Measures the average squared difference between predicted and actual values. Lower the value, better the model performed. MSE is sensitive to outliers (due to the squaring), a very high value could indicate poor performance or the presence of outliers.</li><li><em>R² Score:</em> Indicates how well the predictions fit the actual data. It ranges from 0 to 1, and a value closer to 1 is better. A high R² (0.7 or above) indicates the model explains a good portion of the variance in the data. However, very high R² (close to 1) can sometimes mean overfitting, so always check how it performs on unseen data.</li></ul><p><strong>For Classification:</strong></p><ul><li><em>Accuracy:</em> The percentage of correct predictions. Use accuracy only when the classes are well-balanced. It can be misleading in imbalanced datasets (where one class is much more frequent than the other). For example, if 95% of data belongs to Class A, a model that predicts Class A all the time would have 95% accuracy, but that’s not useful.</li><li><em>Precision &amp; Recall:</em> Precision measures how many of the predicted positives are actually correct. A high precision means fewer false positives. Use precision when the cost of false positives is high (e.g., predicting fraud cases). Recall measures how many actual positives were correctly identified by the model. A high recall means fewer false negatives. Use recall when missing actual positives is costly (e.g., in medical diagnosis, where you don’t want to miss a disease).</li></ul><p>Evaluating on the test set lets you know if your model is generalizing well or if it’s overfitting (performing well on training data but poorly on new data).</p><h3>Code:</h3><p>Here’s an example code for a simple prediction problem using Scikit-Learn involving everything we talked about.</p><p><strong>Define numerical and categorical features</strong></p><pre>import pandas as pd<br>from sklearn.model_selection import train_test_split, GridSearchCV<br>from sklearn.preprocessing import OneHotEncoder, StandardScaler<br>from sklearn.impute import SimpleImputer<br>from sklearn.pipeline import Pipeline<br>from sklearn.compose import ColumnTransformer<br>from sklearn.ensemble import RandomForestRegressor<br><br># Sample data<br>data = pd.DataFrame({<br>    &#39;Age&#39;: [25, 30, None, 22, 29],<br>    &#39;Gender&#39;: [&#39;Male&#39;, &#39;Female&#39;, &#39;Female&#39;, &#39;Female&#39;, &#39;Male&#39;],<br>    &#39;Occupation&#39;: [&#39;Engineer&#39;, &#39;Doctor&#39;, &#39;Lawyer&#39;, &#39;Engineer&#39;, &#39;Doctor&#39;],<br>    &#39;Income&#39;: [50000, 60000, 55000, 48000, 58000]<br>})<br><br># Define target variable and features<br>X = data.drop(columns=[&#39;Income&#39;])<br>y = data[&#39;Income&#39;]<br><br># Define numerical and categorical features<br>numerical_features = [&#39;Age&#39;]<br>categorical_features = [&#39;Gender&#39;, &#39;Occupation&#39;]</pre><p><strong>Create preprocessing pipelines for each type of data</strong></p><pre># Numerical pipeline: Impute missing values and scale<br>numerical_pipeline = Pipeline(steps=[<br>    (&#39;imputer&#39;, SimpleImputer(strategy=&#39;mean&#39;)),<br>    (&#39;scaler&#39;, StandardScaler())<br>])<br><br># Categorical pipeline: Impute missing values and One-Hot Encode<br>categorical_pipeline = Pipeline(steps=[<br>    (&#39;imputer&#39;, SimpleImputer(strategy=&#39;most_frequent&#39;)),<br>    (&#39;onehot&#39;, OneHotEncoder(handle_unknown=&#39;ignore&#39;))<br>])</pre><p><strong>Use ColumnTransformer to apply preprocessing</strong></p><pre>from sklearn.compose import ColumnTransformer<br><br># Combine the numerical and categorical pipelines<br>preprocessor = ColumnTransformer(<br>    transformers=[<br>        (&#39;num&#39;, numerical_pipeline, numerical_features),<br>        (&#39;cat&#39;, categorical_pipeline, categorical_features)<br>    ]<br>)</pre><p><strong>Build the full pipeline</strong></p><pre># Build the full pipeline<br>model_pipeline = Pipeline(steps=[<br>    (&#39;preprocessor&#39;, preprocessor),<br>    (&#39;model&#39;, RandomForestRegressor())<br>])<br><br># Split the data into training and test sets<br>X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42)</pre><p><strong>Find the best model by hyper-parameter tuning</strong></p><pre>param_grid = {<br>    &#39;model__n_estimators&#39;: [50, 100, 200],<br>    &#39;model__max_depth&#39;: [None, 10, 20],<br>    &#39;model__min_samples_split&#39;: [2, 5, 10],<br>    &#39;model__min_samples_leaf&#39;: [1, 2, 4]<br>}<br><br># Perform Grid Search with cross-validation<br>grid_search = GridSearchCV(estimator=model_pipeline, param_grid=param_grid, cv=5, n_jobs=-1, scoring=&#39;neg_mean_squared_error&#39;)<br><br># Train the model with Grid Search<br>grid_search.fit(X_train, y_train)<br><br># Get the best parameters from Grid Search<br>best_params = grid_search.best_params_<br>print(f&quot;Best parameters: {best_params}&quot;)</pre><p><strong>Make predictions</strong></p><pre># Get the best model from GridSearchCV (already trained)<br>best_model_pipeline = grid_search.best_estimator_<br><br># No need to fit the best model again, you can use it directly<br># Make predictions using the best model pipeline<br>y_pred = best_model_pipeline.predict(X_test)</pre><p><strong>Evaluate model performance</strong></p><pre>from sklearn.metrics import mean_squared_error, r2_score<br><br># Evaluate the model<br>mse = mean_squared_error(y_test, y_pred)<br>r2 = r2_score(y_test, y_pred)<br><br>print(f&#39;Mean Squared Error: {mse}&#39;)<br>print(f&#39;R² Score: {r2}&#39;)</pre><p>By following these steps, you’ve built a robust prediction model from start to finish. With practice, you’ll get better at experimenting with different techniques, feature engineering strategies, and algorithms, which will improve your model’s accuracy over time. Happy modeling!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0d6df1c4bd3f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Prediction and Inference — two different ways of thinking with data]]></title>
            <link>https://medium.com/@shriyaejanthker/prediction-and-inference-two-different-ways-of-thinking-with-data-655629cc2275?source=rss-5b748ebaafc9------2</link>
            <guid isPermaLink="false">https://medium.com/p/655629cc2275</guid>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Shriya Ejanthker]]></dc:creator>
            <pubDate>Sat, 05 Oct 2024 23:56:40 GMT</pubDate>
            <atom:updated>2024-10-05T23:56:40.098Z</atom:updated>
            <content:encoded><![CDATA[<h3>Prediction and Inference — two different ways of thinking with data</h3><p>In the world of data science, statistics, and machine learning, two terms often come up: <strong>inference</strong> and <strong>prediction</strong>. While they might sound similar, they actually refer to different goals and approaches when it comes to analyzing data.</p><h3>What is Prediction?</h3><p>At its core, prediction is about guessing the future or determining unknown outcomes based on patterns we’ve seen in past data. It’s the process of using a model to forecast something we don’t know yet. Imagine you’re a weather forecaster. Based on past weather data, you try to predict if it will rain tomorrow. That’s prediction.</p><p>For example, let’s say you run an online store. You’ve gathered data on your customers’ behavior over the past few months. Now, you want to predict which customers are likely to make a purchase next week. You build a prediction model based on your data, and it forecasts that 20% of your customers will buy something. You don’t necessarily care <em>why</em> they’re making the purchases; you just want your model to be accurate.</p><h3>What is Inference?</h3><p>Inference, on the other hand, is all about understanding relationships between variables and drawing conclusions from your data. It’s less about guessing the future and more about explaining what’s happening in the present. If we use the weather example again, inference would involve figuring out <em>why</em> certain weather patterns lead to rain. It’s about understanding cause and effect.</p><p>To think of an example, suppose you’re a health researcher studying the effects of different diets on heart health. You’re not necessarily trying to predict who will develop heart disease, but you want to <em>infer</em> if there’s a significant link between certain eating habits and heart problems. You’ll look at your data to see if people who eat more fruits and vegetables have lower rates of heart disease. Your goal is to draw conclusions and make informed recommendations, rather than predicting specific outcomes.</p><h3>When Should You Use Prediction vs. Inference?</h3><ul><li><strong>Use prediction</strong> when your main goal is to make accurate forecasts or estimates. This is common in machine learning applications where you care more about the end result than understanding the underlying relationships.</li><li><strong>Use inference</strong> when you need to understand the factors that influence your outcome, and you want to draw conclusions about the cause-and-effect relationships.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=655629cc2275" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A choice]]></title>
            <link>https://medium.com/@shriyaejanthker/a-choice-4e83e5d0a7de?source=rss-5b748ebaafc9------2</link>
            <guid isPermaLink="false">https://medium.com/p/4e83e5d0a7de</guid>
            <category><![CDATA[fiction]]></category>
            <category><![CDATA[poem]]></category>
            <category><![CDATA[father-and-daughter]]></category>
            <category><![CDATA[choices]]></category>
            <category><![CDATA[moral-responsibility]]></category>
            <dc:creator><![CDATA[Shriya Ejanthker]]></dc:creator>
            <pubDate>Mon, 22 May 2017 14:32:54 GMT</pubDate>
            <atom:updated>2024-10-05T23:49:18.176Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8X-yo7o_nZg2LkUagtomFg.jpeg" /></figure><p>Duty, honour, family.<br>She’d look up at him as a child,<br>and ask what the words meant.<br>He taught her these words,<br>her father,<br>and soon these words became more than mere linguistic forms to her.<br>“Duty comes first,” he’d say.</p><p>She closed her eyes,<br>and felt the words engulf her.<br>A hand of hers closed in on the badge on her chest,<br>gleaming gold in the sunlight;<br>while the other closed in around the trigger.<br>She drew a deep breath,<br>taking in the cold crisp air of the winter morning,<br>her finger pulling back the trigger,<br>twitching.<br>“Duty, honour, family,”<br>she repeated,<br>her heart hammering against her ribs,<br>as it had hammered on the day she took the oath.</p><p>A cold breath escaped her parched lips,<br>and she released the trigger.<br>She opened her eyes and there he lay,<br>hand clutched over his chest<br>where the bullet had entered;<br>still,<br>unmoving.<br>Her father,<br>Her beloved father.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4e83e5d0a7de" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Photograph]]></title>
            <link>https://medium.com/@shriyaejanthker/photograph-333fd946ebde?source=rss-5b748ebaafc9------2</link>
            <guid isPermaLink="false">https://medium.com/p/333fd946ebde</guid>
            <category><![CDATA[tragedy]]></category>
            <category><![CDATA[fatherhood]]></category>
            <category><![CDATA[tales]]></category>
            <category><![CDATA[fiction]]></category>
            <category><![CDATA[short-story]]></category>
            <dc:creator><![CDATA[Shriya Ejanthker]]></dc:creator>
            <pubDate>Sat, 20 May 2017 18:14:51 GMT</pubDate>
            <atom:updated>2024-10-05T23:44:51.459Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*H0PHXK9cJcnh-QnOaqxFNA.jpeg" /></figure><p>He opened the door and there they were, two little voices in the form of muffled laughter under the sheets. “You two still aren’t asleep? Come on now, off to sleep you go. I don’t want any more noise now. What is it? You want a story? Hmm.” He sat down on the edge of the bed. “Alright, quiet now. Once upon a time, there was a very prosperous kingdom. Oh, prosperous means doing well, Amar.” Amar was the bubbly little one, always bursting with questions. A mischievous little boy, sending echoes of careless laughter through the house. His elder sister Nita on the other hand, was the quiet one, wise for her age, always buried in her books. Quite the pair, they were.</p><p>“Now, the kingdom was ruled by a kind king and queen. Every citizen had sufficient amount of food, clothing, and good shelter, this was made sure of. The royal couple would take weekly rounds throughout the city to check on their subjects. Poverty and crime were rare and unheard of in the city. Everyone was happy. Then came along the birth of the princess, which fulfilled the kingdom’s only wish- the want of an heir. They named her Sati, and threw a big banquet in her name, to which everyone was invited. The citizens busied themselves in merrymaking. Sweets were exchanged, gifts were given, and streets were decorated with colour. But alas, their happiness was short-lived. Soon an evil magician from an unknown land arrived with his apprentices, disguised himself as a poor traveller and seeked an audience with the king. The magician then revealed himself in the court and struck the king with his magical powers, killing him. The queen whispered a command to her trusted handmaiden and unsheathed her sword, ready to face the magician. But her efforts turned out to be futile as her prowess was no match for the magician’s powers. He took her captive and proclaimed himself ruler.</p><p>Meanwhile, the queen’s handmaiden had secured the princess and fled the palace. She disguised herself as a potter and placing the princess in one of the large pots, made her way out of the city. She then assumed the name Panna and renamed Sati as Sumitra, and brought her up as her own daughter. Sumitra was a clever and swift-minded girl, just like you, Nita. She absorbed knowledge like a sponge, and helped her mother make a living with her pots. She grew up to be a strong, able young girl. When she came of age at 16, Panna revealed to Sati her true heritage and of how she came to live with her. Sati swore to get rid of the magician and free her queen mother. With Panna’s blessings, she set out to relieve her city of tyranny. She entered the city by pretending to sell pots, and spent time learning of the plight of the city and gleaning information on the magician and his apprentices. A famine had broken out in the years and many had died. Food, water, and safety had become scarce. Under the magician’s rule, the once-flourishing city had become a sad, desolate place. She also learned that the two apprentices, Keshav and Madhav, were very ambitious and always looked to spite each other. The next day, two letters mysteriously showed up. One letter, addressed to the magician by Keshav showed up at Madhav’s place, and another by Madhav at Keshav’s place. Each of the letters spoke of having earned the magician’s favour and demeaned the other apprentice.</p><p>That night, Madhav entered Keshav’s and the magician king’s chambers and stabbed them both in their sleep. ‘The kingdom is now mine’, he thought. He then retired to his chambers and drank to his victory- only to drop dead the next minute. His drink had been poisoned earlier by Keshav. Thus, with two clever letters, Sita won her kingdom back. She liberated her mother the next morning and assumed her rightful place as queen. Happiness returned to the city once again. The citizens celebrated their newfound freedom, and peace ensued thereafter. The end. Close your eyes now, it’s late.” He smiled sadly, clutching it longingly . The memory of the accident still pained him, the grief fresh as ever. He kissed the photograph and gazed at it with moist eyes, his two beloved children smiling at him through the frame. “Goodnight,” he whispered. With a heavy sigh, he took one last wistful look at the photograph before closing the door.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=333fd946ebde" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>