<?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 Madhumitha V on Medium]]></title>
        <description><![CDATA[Stories by Madhumitha V on Medium]]></description>
        <link>https://medium.com/@vmadhumitha?source=rss-cbb5c7bfab84------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*tyvBwgdTA2pgDUNBHsi66Q.jpeg</url>
            <title>Stories by Madhumitha V on Medium</title>
            <link>https://medium.com/@vmadhumitha?source=rss-cbb5c7bfab84------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 07:07:33 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@vmadhumitha/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[5 Key Lessons I Learned from My AI Experiments (That You Should Know Too)]]></title>
            <link>https://medium.com/@vmadhumitha/5-key-lessons-i-learned-from-my-ai-experiments-that-you-should-know-too-2e57ac8f489b?source=rss-cbb5c7bfab84------2</link>
            <guid isPermaLink="false">https://medium.com/p/2e57ac8f489b</guid>
            <category><![CDATA[research]]></category>
            <category><![CDATA[visual-analytics]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[Madhumitha V]]></dc:creator>
            <pubDate>Wed, 19 Mar 2025 06:53:15 GMT</pubDate>
            <atom:updated>2025-03-20T18:04:57.590Z</atom:updated>
            <content:encoded><![CDATA[<p>Lessons learnt from my Master’s Thesis project</p><p>Artificial Intelligence (AI) research is as much about discovery as it is about failure. Over the past year, through my Master’s thesis project which was primarily based on extensive time-series classification experiments, I’ve encountered unexpected results, optimization challenges, and insightful breakthroughs. Here are five key lessons I’ve learned that every AI researcher and practitioner should know.</p><h3>1. Data Representation Matters More Than You Think</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3yC18hmrrMaOHyRLYkTo9w.png" /><figcaption>Numeric vs. Graphical Approach</figcaption></figure><p>One of my biggest takeaways is that how you represent your data can drastically affect model performance. The aim of my project was to experiment and see if simple chart representations of a time-series signal would outperform raw numerical representations of the same time-series signal. Hence, I conducted experiments with converting numerical time-series data into different chart types (line, scatter, bar, and area) into image format and initially trained CNNs on them. Some datasets performed significantly better with certain visual representations, while some performed best with others. Visual representation of data is also powerful, sometimes even more informative than feeding numbers to a model. This taught me the importance of <strong>choosing the right feature representation</strong> before focusing on model complexity.</p><h4>Takeaway:</h4><ul><li>Experiment with different data representations to uncover hidden patterns.</li><li>Don’t blindly rely on raw numerical data as simple visual transformations like charts can also represent data intuitively.</li></ul><h3>2. Simpler Models Can Sometimes Perform Better</h3><p>I initially assumed that deeper CNN architectures would <strong>always</strong> outperform simpler models. However, after conducting more than 200 experiments, I found that a well-preprocessed large dataset combined with a <strong>lightweight model,</strong> such as a CNN with few layers, often outperformed a deeper architecture. I learned that while larger datasets can sometimes benefit from deeper networks, <strong>dataset size alone does not dictate the optimal model complexity.</strong> Factors like feature quality, class imbalance, noise levels, and overfitting risks play a significant role in determining the best architecture.</p><h4>Takeaway:</h4><ul><li>Prioritize preprocessing to address class imbalance before adding model complexity.</li><li>Run a baseline with a simple model first — it might surprise you!</li></ul><h3>3. Multimodal Fusion Is Powerful but Tricky</h3><p>The next stage of our project involved experimenting with multimodal data by integrating numerical features. Combining multiple data modalities is exciting but requires careful feature fusion to prevent one modality from dominating over the other. I tested <strong>concatenation </strong>and <strong>weighted summation</strong> for fusing CNN-extracted features with numerical data.</p><p>To further understand how multimodal fusion impacts model performance, I tested two different architectures: a <strong>2-branch network</strong> and a <strong>5-branch network</strong>. The 2-branch model combined one chart-based CNN with numerical data, whereas the 5-branch model incorporated four different chart types alongside numerical data. The results showed that the <strong>5-branch network mostly outperformed the 2-branch model</strong>, indicating that combining multiple perspectives of the same data led to better feature extraction and classification accuracy. However, this came with the challenge of <strong>modality alignment</strong>, as different representations contributed to varying degrees.</p><p>One key challenge in multimodal fusion is the risk of <strong>overfitting</strong>, as the model is exposed to repetitive information from different sources. Concatenation was used as our baseline since it is widely used in feature fusion. However, we aimed to identify whether a particular chart type provided more intuitive insights than others. To tackle this, we experimented with <strong>weighted summation</strong>, where random weights were initially assigned to each chart, and these weights were dynamically optimized through backpropagation. This approach allowed the model to emphasize the most informative features, improving performance where possible.</p><h4>Takeaway:</h4><ul><li>Always analyze individual modality contributions before fusing them.</li><li>Multi-branch architectures can enhance feature extraction, but balancing contributions from different modalities is crucial.</li><li>Consider modality alignment issues and address them with attention-based weighting or normalization techniques.</li></ul><h3>4. Hyperparameter Tuning Isn’t Optional</h3><p>I initially skipped extensive hyperparameter tuning, assuming standard values would work fine. However, my experiments showed that <strong>batch size, learning rate, and dropout rates</strong> significantly influenced model performance.</p><p>To efficiently navigate this high-dimensional search space, I used <strong>grid search and Bayesian optimization</strong> using the <strong>Optuna</strong> library. Bayesian optimization provided an adaptive approach to hyperparameter tuning by intelligently selecting promising configurations based on previous evaluations. Also, <strong>early stopping and learning rate schedulers</strong> played a crucial role in preventing overfitting while improving training efficiency.</p><p>Automating the tuning process not only enhanced model performance but also allowed me to systematically evaluate different architectures without manual intervention. The key takeaway was that hyperparameter tuning is not just an optimization step — it is essential for ensuring the <strong>robustness and generalizability</strong> of deep learning models.</p><h4>Takeaway:</h4><ul><li>Even minor tweaks in hyperparameters can lead to <strong>big performance gains</strong>.</li><li>Use <strong>Bayesian optimization</strong> over grid search for a more efficient and intelligent tuning process.</li><li>Automate hyperparameter tuning where possible to save time.</li></ul><h3>5. Ensemble Learning Requires Careful Architecture Selection</h3><p>During my experiments, I tested an <strong>ensemble model</strong> that combined predictions from different CNNs trained on various chart configurations. While ensemble learning is known for improving accuracy, I found that simply averaging multiple model predictions was not always the best strategy. Instead, I experimented with <strong>stacked ensembling</strong>, where a meta-model was trained to learn the optimal way to combine predictions from individual models. This approach improved classification accuracy by dynamically weighting the influence of each CNN based on its performance on different chart types.</p><p>I also explored <strong>model diversity</strong>, ensuring that the individual models used in the ensemble had complementary strengths. For example, a simple CNN might excel at capturing global patterns in a line chart, while a deeper CNN could be better at extracting finer details from an area chart. This balance helped prevent overfitting and improved generalization.</p><h4>Takeaway:</h4><ul><li>Simply averaging predictions may not always yield the best results — consider more nuanced approaches.</li><li>Ensure diversity in ensemble models to capture different aspects of the data.</li><li>Optimize how models contribute to the final prediction dynamically.</li></ul><h3>Final Thoughts</h3><p>AI experimentation is a learning process filled with surprises. These five lessons are just some of the lessons I have learnt that have shaped how I approach AI research. Whether you’re a beginner or an expert, embracing these principles will help you develop more reliable and effective models.</p><p>Have you encountered similar insights in your AI experiments? Let’s discuss in the comments!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2e57ac8f489b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Confusion Matrix and its Metrics: Explained]]></title>
            <link>https://medium.com/@vmadhumitha/confusion-matrix-and-its-metrics-explained-90d3218faedd?source=rss-cbb5c7bfab84------2</link>
            <guid isPermaLink="false">https://medium.com/p/90d3218faedd</guid>
            <category><![CDATA[confusion-matrix]]></category>
            <category><![CDATA[classification]]></category>
            <category><![CDATA[computer-science]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Madhumitha V]]></dc:creator>
            <pubDate>Mon, 21 Aug 2023 11:34:04 GMT</pubDate>
            <atom:updated>2023-08-22T06:51:37.326Z</atom:updated>
            <content:encoded><![CDATA[<h4>Accuracy, Recall, Specificity, Precision, and F1 score.</h4><p>Say an airline company owns 100 airplanes and wants to inspect each of them to see if they are safe for travel. You have to predict if an airplane is <strong>malfunctioning</strong> or in a <strong>perfect state </strong>for travel. You have 2 outcomes. Since you have 2 outcomes, the problem becomes a<em> binary classification problem</em>. You need to run a supervised machine-learning algorithm to implement that classification. You chose an algorithm and ran the code.</p><p>Well, now what?</p><p>How do you know if this algorithm is giving you the best result? How do you know how accurately this particular algorithm is performing its classification? How do you measure this?</p><p>Fret not, this is where the Confusion Matrix steps in.</p><h4><strong>What is a Confusion Matrix?</strong></h4><p>The Confusion Matrix is basically a performance measure and evaluator for a machine learning algorithm. It is a visual way for you to read your model’s outcome.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/356/0*nCr140gV2xKABQnG.png" /><figcaption>Confusion Matrix</figcaption></figure><p>It makes <strong><em>combinations</em></strong><em> </em>of the outcomes of the problem statement as they are the possible results of the algorithm. Here, in a binary classification scenario, as the above figure suggests, there are 4 combinations. Let us understand it in terms of the airplane.</p><h3><strong>Note</strong>:</h3><p><em>Here, I have considered the following:</em></p><blockquote><strong><em>Malfunctioning = TRUE or POSITIVE</em></strong></blockquote><blockquote><strong><em>Perfect Condition = FALSE or NEGATIVE</em></strong></blockquote><h4>Possible Classifications:</h4><ol><li><strong>True Positive (TP):</strong></li></ol><p>You predicted it is <strong>true</strong> and it is <strong>actually true</strong>.</p><p><em>Scenario</em>: You predicted the airplane to be malfunctioning and it is actually malfunctioning.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/752/1*49H2i3BSrVBy-RS_qSZy9Q.png" /><figcaption>True Positive</figcaption></figure><p><strong>2. False Positive (FP):</strong></p><p>You predicted it is <strong>true</strong> but it is <strong>actually false</strong>.</p><p><em>Scenario: </em>You predicted the airplane to be malfunctioning but it is actually perfectly functioning.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/791/1*lhcnIaTBZIFK2vMHlmvp1Q.png" /><figcaption>False Positive</figcaption></figure><p><strong>3. False Negative (FN):</strong></p><p>You predicted it is <strong>false</strong> but it is <strong>actually true</strong>.</p><p><em>Scenario: </em>You predicted the airplane to be perfectly functioning but it is actually malfunctioning.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/762/1*PtWih7tSrgWOE0xNhfe2KQ.png" /><figcaption>False Negative</figcaption></figure><p><strong>4. True Negative (TN):</strong></p><p>You predicted it is <strong>false</strong> and it is<strong> actually false</strong>.</p><p><em>Scenario: </em>You predicted the airplane to be perfectly functioning and it is actually perfectly functioning.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/752/1*x5crwKNJwOv_SrJnDaawaQ.png" /><figcaption>True Negative</figcaption></figure><p>We require a high number of <strong>true positives</strong> and <strong>true negatives</strong>. Since a machine learning model cannot attain 100% accurate results, it is bound to make faulty classifications, hence giving rise to <strong>false positives</strong> and <strong>false negatives</strong>, as shown above.</p><p>Now, coming back to our plane situation. Let us consider 100 planes that have to be inspected. Out of these planes, 70 are malfunctioning and 30 are perfectly working. We need our model to classify which planes are ready for takeoff and which planes are heading for a disaster in the clouds.</p><p>The confusion matrix will look like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/672/1*Xd8-Rj2DYD9k4EL1nYD9dQ.png" /><figcaption>Classification Matrix</figcaption></figure><p>Considering our airplane scenario, our confusion matrix will look like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/721/1*kE6iR8zEIUfBX-TXBiJxWA.png" /><figcaption>A more visual breakdown of the Confusion Matrix</figcaption></figure><p>In our case, the airplane company has 100 planes, out of which 70 are malfunctioning and 30 are in perfect condition. Say, our machine learning model has finished its classification task. Out of 70 malfunctioning airplanes, it has correctly classified 55 as malfunctioning but incorrectly classified 15 as perfect. Likewise, out of 30 perfectly working airplanes, 25 were classified correctly as perfect whereas 5 were incorrectly classified as malfunctioning.</p><p>Therefore, our <strong>TP = 55, FP = 5, TN = 25, FN = 15</strong>. Let us visualize this in the confusion matrix:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/752/1*BxUSmjCfWHdYxl1vBcMwkw.png" /><figcaption>Confusion matrix for airplane scenario</figcaption></figure><h3><strong>Metrics:</strong></h3><h4>1. Accuracy: How often is the classifier correct?</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/780/0*EjCjoCOYHIoLldUf.png" /></figure><p>Accuracy represents the total number of correct classifications over the total instances.</p><p>Here, ( 55 + 25 ) / ( 25 + 15 + 55 + 5)</p><p>= 80/100</p><p>= <strong>80%</strong></p><h4>Is accuracy reliable?</h4><p>Accuracy does not give accurate results when the dataset is imbalanced. Consider the same scenario, but say the classifier classified all the 70 malfunctioning airplanes as malfunctioning. However, it classified all 30 of the perfect airplanes as malfunctioning as well. This would give us a high accuracy for the model but it possesses a discrepancy in its results. It can also cause damage to the business. Since 30 of the perfect planes were classified as malfunctioning, extra time and resources have to be set up by the company to inspect 30 additional airplanes. This can cause monetary loss to the company. Hence, accuracy does not provide the best results always.</p><h4>2. Recall/ Sensitivity/ True Positive Rate: When actually YES, how often does the classifier predict YES?</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Mkw_q31LUBW9TltmuA1yrg.png" /></figure><p><strong>Recall</strong>, also referred to as <strong>Sensitivity</strong>, is the <strong><em>fraction of the predicted correct true positives over the total actual positives, regardless of its prediction</em></strong>. It is the metric that evaluates a model’s ability to predict the true positives of the actual positives.</p><p>Here, <strong><em>Recall</em></strong> = 55 / ( 55 + 15 )</p><p>= 55 / 70</p><p>= <strong>0.785</strong></p><p>Ideally, the <strong>Recall score </strong>should be close to 1 to suggest that the classifier is a good model. That means the number of positive instances the classifier predicted should be<strong><em> near equal </em></strong>to the total number of actual positive instances. False Negatives should also be <em>low</em> such that a fraction of 1 is obtained. A <strong>0.785 score</strong> suggests that the classifier has predicted 78.5 percent of the actual true malfunctioning airplanes as malfunctioning. It predicted the remaining 21.5 percent as perfect.</p><h4>3. Specificity/True Negative Rate:</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*joTy5QhuRUYJO8_kbutkhg.png" /></figure><p><strong>Specificity</strong> is the metric that evaluates a model’s ability to predict the true negatives of the predicted negatives.</p><p>Here, 25 / ( 5 + 25 )</p><p>= 25 / 30</p><p>= <strong>0.83</strong></p><p>A score of 0.83 suggests that the model can predict well.</p><h4>4. Precision: When it predicts YES, how often is it correct?</h4><p>Precision is basically the <strong><em>fraction of the actual true positives over the predicted positives, regardless of their true value</em></strong>. It measures the model’s degree of correctly classifying a correct positive instance out of all its positive predicted instances.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*G7Byox91k0xgyYTQ.png" /></figure><p>Here, <strong><em>Precision</em></strong> = 55 / (55 + 5)</p><p>= 55 / 60</p><p>= <strong>0.916</strong></p><p>Precision becomes high only when the number of False Positives is close to 0. Here, we can infer that our model has classified most of its positive instances correctly due to its high score of <strong>0.916</strong>. This suggests that the model <strong>correctly</strong> predicted 91.6 percent as malfunctioning out of all its malfunctioning classification instances. The remaining 8.4 percent was inaccurately predicted as perfect.</p><blockquote>Just like many concepts in Data Science, there is also a trade-off between recall and precision. The more we increase a metric, the other would reduce. At times, depending on the scenario, we would want to maximize either recall or precision at the expense of the other metric. We would rather find out the number of malfunctioning airplanes correctly (High Recall) than find out the number of perfect planes accurately (High Precision). The cost of human life is more important than a company’s resources. Therefore, when we want to find an optimal blend of both high precision and high recall, we can combine the 2 metrics using the F1 score.</blockquote><h4>5. F1 Score</h4><p>The F1 score is the harmonic mean of precision and recall, taking both metrics into account in the following equation:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/533/1*AShJGI-V4DM_SeCOTOEOHQ.png" /></figure><p>The harmonic mean encourages similar values for precision and recall. That is, the more the precision and recall scores deviate from each other, the worse the harmonic mean. If we want to create a classification model with the optimal balance of precision and recall, then we try to <strong>maximize</strong> the F1 score.</p><p>In the airplane scenario, the F1 score is 2*(0.916*0.785)/(0.916+0.785) = <strong>0.845.</strong></p><p>A more deeper and mathematical explanation of the F1 score will be covered in later blogs.</p><p>I hope at least a little of your confusion on the Confusion matrix has now cleared up! If you like this post, a tad of extra motivation will be helpful by giving this post some claps 👏. I am always open to your questions and suggestions.</p><p>You can reach me at:</p><p>LinkedIn: <a href="http://www.linkedin.com/in/vmadhuuu">www.linkedin.com/in/vmadhuuu</a></p><p>Github: <a href="https://github.com/vmadhuuu">https://github.com/vmadhuuu</a></p><p><strong>Thanks for Reading!</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=90d3218faedd" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>