<?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"><channel><title><![CDATA[Devi Sri Blogs]]></title><description><![CDATA[Devi Sri Blogs]]></description><link>https://devisriblogs.hashnode.dev</link><image><url>https://cdn.hashnode.com/uploads/logos/6a1001291f237623eab980e8/9bbe94b6-b417-4d03-b281-d0f96e944aef.jpg</url><title>Devi Sri Blogs</title><link>https://devisriblogs.hashnode.dev</link></image><generator>RSS for Node</generator><lastBuildDate>Thu, 17 Sep 2026 07:36:08 GMT</lastBuildDate><atom:link href="https://devisriblogs.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Chargeback Assistant: An AI-Powered Chargeback Risk System]]></title><description><![CDATA[Chargebacks are a common problem for online businesses. When a customer disputes a payment, the merchant needs to decide whether to fight the dispute, accept the loss, or collect more evidence.
To sol]]></description><link>https://devisriblogs.hashnode.dev/chargeback-assistant-an-ai-powered-chargeback-risk-system</link><guid isPermaLink="true">https://devisriblogs.hashnode.dev/chargeback-assistant-an-ai-powered-chargeback-risk-system</guid><category><![CDATA[Machine Learning]]></category><category><![CDATA[finance]]></category><category><![CDATA[chargeback solutions]]></category><category><![CDATA[Docker]]></category><category><![CDATA[FastAPI]]></category><category><![CDATA[React]]></category><category><![CDATA[SHAP]]></category><category><![CDATA[Xgboost]]></category><category><![CDATA[langgraph]]></category><category><![CDATA[JWT]]></category><dc:creator><![CDATA[Devi Sri Ramasamy]]></dc:creator><pubDate>Sat, 12 Sep 2026 06:40:31 GMT</pubDate><content:encoded><![CDATA[<p>Chargebacks are a common problem for online businesses. When a customer disputes a payment, the merchant needs to decide whether to fight the dispute, accept the loss, or collect more evidence.</p>
<p>To solve this problem, I developed <strong>Chargeback Assistant</strong>, an AI-assisted system that helps merchants analyze chargeback disputes and make better decisions.</p>
<p>The system predicts the <strong>probability of winning a dispute</strong>, explains the important factors behind the prediction, and provides a recommendation.</p>
<h2>What is a Chargeback?</h2>
<p>A chargeback happens when a customer disputes a transaction through their bank or payment provider.</p>
<p>For example, a customer may claim:</p>
<ul>
<li><p>The product was not delivered</p>
</li>
<li><p>The transaction was unauthorized</p>
</li>
<li><p>The customer did not receive the expected product</p>
</li>
<li><p>A refund was not received</p>
</li>
</ul>
<p>The merchant then needs to investigate the case and provide evidence.</p>
<p>Handling many disputes manually can be difficult and time-consuming.</p>
<h2>My Solution</h2>
<p>I built <strong>Chargeback Assistant</strong> to make this process easier.</p>
<p>The system takes chargeback information and uses a Machine Learning model to calculate the <strong>win probability</strong> of the dispute.</p>
<p>Based on the result, it recommends one of three actions:</p>
<p><strong>Fight the dispute</strong><br /><strong>Accept liability</strong><br /><strong>Gather more evidence</strong></p>
<p>The basic workflow is:</p>
<pre><code class="language-plaintext">Chargeback
     ↓
Machine Learning Prediction
     ↓
Win Probability
     ↓
SHAP Explanation
     ↓
LangGraph Investigation
     ↓
Recommendation
</code></pre>
<h2>Machine Learning</h2>
<p>For prediction, I used <strong>XGBoost</strong> with scikit-learn.</p>
<p>The model considers chargeback-related information such as:</p>
<ul>
<li><p>Reason code</p>
</li>
<li><p>Delivery evidence</p>
</li>
<li><p>Signature evidence</p>
</li>
<li><p>AVS match</p>
</li>
<li><p>CVV match</p>
</li>
<li><p>Refund status</p>
</li>
<li><p>Previous chargeback history</p>
</li>
</ul>
<p>The target variable is:</p>
<pre><code class="language-plaintext">won_dispute
</code></pre>
<p>where:</p>
<pre><code class="language-plaintext">1 = Merchant won
0 = Merchant lost
</code></pre>
<p>The current project uses a <strong>synthetic dataset</strong> for demonstration.</p>
<h2>Explainable AI with SHAP</h2>
<p>A Machine Learning model gives a prediction, but it is also important to understand <strong>why</strong> the model made that prediction.</p>
<p>For this, I used <strong>SHAP</strong>.</p>
<p>SHAP identifies the features that contributed to the prediction.</p>
<p>For example:</p>
<pre><code class="language-plaintext">Delivery confirmed     → Positive
Signature available    → Positive
CVV matched            → Positive
Previous chargebacks   → Negative
</code></pre>
<p>This helps the analyst understand the reason behind the prediction instead of treating the model as a black box.</p>
<h2>LangGraph Agent</h2>
<p>I also used <strong>LangGraph</strong> to create an investigation workflow.</p>
<p>The workflow contains three steps:</p>
<pre><code class="language-plaintext">Analyze Risk
     ↓
Explain Factors
     ↓
Recommend Action
</code></pre>
<p>The agent uses the model result and SHAP factors to create a structured investigation trace.</p>
<p>The recommendation can be:</p>
<pre><code class="language-plaintext">FIGHT
</code></pre>
<pre><code class="language-plaintext">ACCEPT LIABILITY
</code></pre>
<p>or</p>
<pre><code class="language-plaintext">GATHER MORE EVIDENCE
</code></pre>
<p>The workflow is deterministic, so the project can run without requiring an LLM API key.</p>
<h2>React Frontend</h2>
<p>I developed the frontend using <strong>React and Tailwind CSS</strong>.</p>
<p>The application includes pages such as:</p>
<ul>
<li><p>Login</p>
</li>
<li><p>Dashboard</p>
</li>
<li><p>Chargebacks</p>
</li>
<li><p>Chargeback Details</p>
</li>
<li><p>New Chargeback</p>
</li>
<li><p>Analytics</p>
</li>
<li><p>Audit Logs</p>
</li>
</ul>
<p>The frontend communicates with the FastAPI backend using APIs.</p>
<p>Charts are created using <strong>Recharts</strong> to display chargeback analytics.</p>
<h2>FastAPI Backend</h2>
<p>The backend was developed using <strong>FastAPI</strong>.</p>
<p>It provides APIs for:</p>
<ul>
<li><p>User registration and login</p>
</li>
<li><p>Chargeback prediction</p>
</li>
<li><p>Viewing chargebacks</p>
</li>
<li><p>Updating chargeback status</p>
</li>
<li><p>Audit logs</p>
</li>
<li><p>Analytics</p>
</li>
</ul>
<p>FastAPI also provides interactive Swagger documentation.</p>
<pre><code class="language-plaintext">http://localhost:8000/docs
</code></pre>
<hr />
<h2>PostgreSQL Database</h2>
<p>I used <strong>PostgreSQL</strong> to store application data.</p>
<p>The database stores information such as:</p>
<ul>
<li><p>Users</p>
</li>
<li><p>Chargebacks</p>
</li>
<li><p>Predictions</p>
</li>
<li><p>Audit logs</p>
</li>
</ul>
<p>SQLAlchemy is used to communicate with the database from the FastAPI backend.</p>
<h2>JWT Authentication</h2>
<p>For authentication, I implemented <strong>JWT-based authentication</strong>.</p>
<p>The basic flow is:</p>
<pre><code class="language-plaintext">Register
   ↓
Login
   ↓
JWT Token
   ↓
Access Protected APIs
</code></pre>
<p>This helps protect the application's API endpoints.</p>
<h2>Docker</h2>
<p>I also used <strong>Docker and Docker Compose</strong> to run the project.</p>
<p>The application contains multiple services:</p>
<pre><code class="language-plaintext">React Frontend
       ↓
FastAPI Backend
       ↓
PostgreSQL
</code></pre>
<p>Docker makes it easier to set up and run all these components together.</p>
<p>The complete application can be started using:</p>
<pre><code class="language-plaintext">docker compose up --build
</code></pre>
<p>The application runs at:</p>
<pre><code class="language-plaintext">Frontend → http://localhost:5173
Backend → http://localhost:8000
Swagger → http://localhost:8000/docs
</code></pre>
<h2>Technology Stack</h2>
<table>
<thead>
<tr>
<th>Technology</th>
<th>Purpose</th>
</tr>
</thead>
<tbody><tr>
<td>React</td>
<td>Frontend</td>
</tr>
<tr>
<td>Tailwind CSS</td>
<td>UI styling</td>
</tr>
<tr>
<td>FastAPI</td>
<td>Backend API</td>
</tr>
<tr>
<td>PostgreSQL</td>
<td>Database</td>
</tr>
<tr>
<td>SQLAlchemy</td>
<td>Database ORM</td>
</tr>
<tr>
<td>XGBoost</td>
<td>Machine Learning</td>
</tr>
<tr>
<td>scikit-learn</td>
<td>ML processing</td>
</tr>
<tr>
<td>SHAP</td>
<td>Explainable AI</td>
</tr>
<tr>
<td>LangGraph</td>
<td>Investigation workflow</td>
</tr>
<tr>
<td>JWT</td>
<td>Authentication</td>
</tr>
<tr>
<td>Recharts</td>
<td>Data visualization</td>
</tr>
<tr>
<td>Docker</td>
<td>Containerization</td>
</tr>
<tr>
<td>Docker Compose</td>
<td>Service management</td>
</tr>
</tbody></table>
<h2>What I Learned</h2>
<p>This project helped me understand how different technologies can be combined to build a complete AI application.</p>
<p>I learned about:</p>
<ul>
<li><p>Machine Learning</p>
</li>
<li><p>Explainable AI</p>
</li>
<li><p>AI agents</p>
</li>
<li><p>REST APIs</p>
</li>
<li><p>React</p>
</li>
<li><p>PostgreSQL</p>
</li>
<li><p>JWT authentication</p>
</li>
<li><p>Docker</p>
</li>
<li><p>Full-stack application development</p>
</li>
</ul>
<p>The biggest lesson I learned was that an AI application should not only give a prediction, but should also <strong>explain the prediction and help the user take action</strong>.</p>
<h2>Future Improvements</h2>
<p>In the future, I would like to improve the project by:</p>
<ul>
<li><p>Using real historical chargeback data</p>
</li>
<li><p>Improving model accuracy and validation</p>
</li>
<li><p>Adding LLM-generated investigation summaries</p>
</li>
<li><p>Adding evidence/document upload</p>
</li>
<li><p>Adding better role-based authorization</p>
</li>
<li><p>Adding model monitoring</p>
</li>
<li><p>Supporting multiple merchants</p>
</li>
</ul>
<h2>Conclusion</h2>
<p><strong>Chargeback Assistant</strong> combines Machine Learning, Explainable AI, and an agent workflow to help merchants analyze chargeback disputes.</p>
<p>Instead of simply saying that a transaction is risky, the system focuses on a more useful question:</p>
<blockquote>
<p><strong>How likely is the merchant to win the dispute?</strong></p>
</blockquote>
<p>The project gave me practical experience in building an AI-powered full-stack application using <strong>React, FastAPI, XGBoost, SHAP, LangGraph, PostgreSQL, JWT, and Docker</strong>.</p>
<p>I am excited to continue improving this project and explore more real-world applications of AI.</p>
<h2>Project</h2>
<p><strong>GitHub:</strong> <code>github.com/devisri424/chargeback-assistant</code></p>
<p>Live Demo Video: <a href="https://drive.google.com/file/d/1JkQho24SVHyorQfBXf2BgN3qmfUuRleV/view?usp=sharing">Watch the Live Demo</a></p>
<p>Thanks for reading! ❤️</p>
]]></content:encoded></item><item><title><![CDATA[Building an AI-Based Crop Recommendation & Fertilizer Suggestion System Using Machine Learning and Streamlit
]]></title><description><![CDATA[Introduction:
Agriculture is the backbone of many economies, yet farmers often struggle to decide which crop is most suitable for their land and what fertilizer should be applied to maximize yield. To]]></description><link>https://devisriblogs.hashnode.dev/building-an-ai-based-crop-recommendation-fertilizer-suggestion-system-using-machine-learning-and-streamlit</link><guid isPermaLink="true">https://devisriblogs.hashnode.dev/building-an-ai-based-crop-recommendation-fertilizer-suggestion-system-using-machine-learning-and-streamlit</guid><category><![CDATA[AI]]></category><category><![CDATA[agriculture]]></category><category><![CDATA[Gemini API]]></category><category><![CDATA[OpenWeather API]]></category><category><![CDATA[youtube api]]></category><category><![CDATA[news api]]></category><category><![CDATA[streamlit]]></category><category><![CDATA[Python]]></category><category><![CDATA[npk fertilizers]]></category><category><![CDATA[crop prediction]]></category><category><![CDATA[Agro Ai System]]></category><dc:creator><![CDATA[Devi Sri Ramasamy]]></dc:creator><pubDate>Thu, 30 Jul 2026 07:00:12 GMT</pubDate><enclosure url="https://cdn.hashnode.com/uploads/covers/6a1001291f237623eab980e8/7cd8d149-3470-4486-8dd3-ba851688b735.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2>Introduction:</h2>
<p>Agriculture is the backbone of many economies, yet farmers often struggle to decide which crop is most suitable for their land and what fertilizer should be applied to maximize yield. To address this challenge, I built an <strong>AI-Based Crop Recommendation and Fertilizer Suggestion System</strong> that combines Machine Learning, AI, and real-time APIs to provide intelligent agricultural insights.</p>
<p>In this blog, I'll walk through the complete development process, the technologies I used, the APIs integrated, and the lessons I learned.</p>
<h2><strong>Project Overview:</strong></h2>
<p>The application predicts the most suitable crop based on soil and environmental conditions. It also recommends appropriate fertilizers and provides farmers with weather updates, agriculture news, and an AI chatbot for answering farming-related questions.</p>
<p>The project was built using <strong>Python</strong>, <strong>Streamlit</strong>, <strong>Machine Learning</strong>, and <strong>Google Gemini API</strong>.</p>
<h2><strong>Features:</strong></h2>
<h2><strong>Crop Recommendation</strong></h2>
<p>The system predicts the best crop using parameters such as:</p>
<ul>
<li><p>Nitrogen (N)</p>
</li>
<li><p>Phosphorus (P)</p>
</li>
<li><p>Potassium (K)</p>
</li>
<li><p>Temperature</p>
</li>
<li><p>Humidity</p>
</li>
<li><p>pH value</p>
</li>
<li><p>Rainfall</p>
</li>
</ul>
<p>A trained Machine Learning model processes these inputs and recommends the most suitable crop.</p>
<h2><strong>Fertilizer Suggestion:</strong></h2>
<p>After selecting a crop and entering soil information, the application recommends fertilizers that improve soil fertility and crop productivity.</p>
<h2><strong>Gemini AI Chatbot:</strong></h2>
<p>One of the exciting features of the project is the AI chatbot powered by the <strong>Google Gemini API</strong>.</p>
<p>Users can ask questions like:</p>
<ul>
<li><p>Which crop grows well during monsoon?</p>
</li>
<li><p>How can I improve soil fertility?</p>
</li>
<li><p>What causes yellow leaves?</p>
</li>
<li><p>Best farming practices for rice?</p>
</li>
</ul>
<p>The chatbot provides intelligent, natural-language responses.</p>
<h2><strong>Live Weather Information:</strong></h2>
<p>The application integrates the <strong>OpenWeather API</strong> to display real-time weather information, including:</p>
<ul>
<li><p>Temperature</p>
</li>
<li><p>Humidity</p>
</li>
<li><p>Weather conditions</p>
</li>
<li><p>Wind speed</p>
</li>
</ul>
<p>Weather plays an important role in crop selection, making this feature highly valuable.</p>
<h2><strong>Agriculture News:</strong></h2>
<p>To help users stay updated, the project fetches live agriculture-related news using:</p>
<ul>
<li><p>NewsAPI</p>
</li>
<li><p>YouTube Data API</p>
</li>
</ul>
<p>Users can read the latest farming news and discover relevant agriculture videos without leaving the application.</p>
<h2><strong>Machine Learning Model:</strong></h2>
<p>The crop recommendation system was trained using supervised machine learning.</p>
<h2><strong>Dataset:</strong></h2>
<p>The crop prediction dataset was obtained from <strong>Kaggle</strong>.</p>
<p>The fertilizer recommendation model was also trained using publicly available agricultural datasets.</p>
<h2><strong>Data Preprocessing:</strong></h2>
<p>Before training the models:</p>
<ul>
<li><p>Missing values were checked</p>
</li>
<li><p>Categorical values were encoded</p>
</li>
<li><p>Features were cleaned</p>
</li>
<li><p>Data was prepared for training</p>
</li>
</ul>
<h2><strong>Libraries Used:</strong></h2>
<ul>
<li><p>Pandas</p>
</li>
<li><p>NumPy</p>
</li>
<li><p>Scikit-learn</p>
</li>
<li><p>Streamlit</p>
</li>
</ul>
<p>The trained models were saved and loaded directly into the Streamlit application for fast predictions.</p>
<h2>Tech Stack:</h2>
<h3>Programming Language</h3>
<ul>
<li>Python</li>
</ul>
<h3>Framework</h3>
<ul>
<li>Streamlit</li>
</ul>
<h3>Machine Learning</h3>
<ul>
<li>Scikit-learn</li>
</ul>
<h3>Data Processing</h3>
<ul>
<li><p>Pandas</p>
</li>
<li><p>NumPy</p>
</li>
</ul>
<h3>APIs</h3>
<ul>
<li><p>Google Gemini API</p>
</li>
<li><p>OpenWeather API</p>
</li>
<li><p>NewsAPI</p>
</li>
<li><p>YouTube Data API</p>
</li>
</ul>
<h3>Dataset</h3>
<ul>
<li><p>Kaggle Crop Recommendation Dataset</p>
</li>
<li><p>Kaggle Fertilizer Dataset</p>
</li>
</ul>
<h2><strong>Application Workflow:</strong></h2>
<ol>
<li><p>User enters soil and environmental details.</p>
</li>
<li><p>The trained ML model predicts the most suitable crop.</p>
</li>
<li><p>The fertilizer model suggests appropriate fertilizers.</p>
</li>
<li><p>Weather information is retrieved using the OpenWeather API.</p>
</li>
<li><p>Agriculture news is fetched using NewsAPI and YouTube Data API.</p>
</li>
<li><p>Users can ask additional questions through the Gemini AI chatbot.</p>
</li>
</ol>
<h2><strong>What I Learned:</strong></h2>
<p>This project strengthened my understanding of:</p>
<ul>
<li><p>Machine Learning model development</p>
</li>
<li><p>Data preprocessing</p>
</li>
<li><p>Streamlit application development</p>
</li>
<li><p>REST API integration</p>
</li>
<li><p>Environment variable management</p>
</li>
<li><p>AI chatbot integration using Gemini</p>
</li>
<li><p>Model deployment</p>
</li>
<li><p>Git and GitHub workflows</p>
</li>
</ul>
<p>Most importantly, I learned how to combine multiple technologies into a single real-world application.</p>
<h2><strong>GitHub Repository</strong></h2>
<h3>You can explore the complete source code here:</h3>
<p><a href="https://github.com/devisri424/AI-based-Crop-recommendation-and-Fertilizer-suggestion-System">https://github.com/devisri424/AI-based-Crop-recommendation-and-Fertilizer-suggestion-System</a></p>
<h2><strong>Live Demo</strong></h2>
<p><a href="https://ai-based-crop-recommendation-and-fertilizer-suggestion-system.streamlit.app/">https://ai-based-crop-recommendation-and-fertilizer-suggestion-system.streamlit.app/</a></p>
<h2><strong>Conclusion</strong></h2>
<p>Building this project allowed me to combine Machine Learning, Artificial Intelligence, and real-time APIs into a practical solution for agriculture. From predicting crops to recommending fertilizers, displaying weather information, providing live agricultural news, and answering farming questions with Gemini AI, the project demonstrates how modern AI technologies can support smarter farming decisions.</p>
<p>I hope this project inspires others to explore AI-powered solutions for real-world challenges. Feedback and suggestions are always welcome!</p>
]]></content:encoded></item><item><title><![CDATA[Sentiment Analysis using Naive Bayes -Text Based Algorithm]]></title><description><![CDATA[Introduction:
Sentiment Analysis is a Natural Language Processing (NLP) technique used to identify whether a piece of text expresses a positive or negative sentiment. It is widely used in analyzing cu]]></description><link>https://devisriblogs.hashnode.dev/sentiment-analysis-using-naive-bayes-text-based-algorithm</link><guid isPermaLink="true">https://devisriblogs.hashnode.dev/sentiment-analysis-using-naive-bayes-text-based-algorithm</guid><category><![CDATA[naive bayes]]></category><category><![CDATA[algorithms]]></category><category><![CDATA[Sentiment analysis]]></category><category><![CDATA[Python]]></category><category><![CDATA[Machine Learning]]></category><dc:creator><![CDATA[Devi Sri Ramasamy]]></dc:creator><pubDate>Thu, 23 Jul 2026 04:40:17 GMT</pubDate><content:encoded><![CDATA[<h2>Introduction:</h2>
<p>Sentiment Analysis is a Natural Language Processing (NLP) technique used to identify whether a piece of text expresses a <strong>positive</strong> or <strong>negative</strong> sentiment. It is widely used in analyzing customer reviews, social media posts, product feedback, and emails.</p>
<p>In this project, we use the <strong>Multinomial Naive Bayes</strong> algorithm along with <strong>CountVectorizer</strong> from Scikit-learn. The <code>CountVectorizer</code> converts text into numerical features, and the <code>Multinomial Naive Bayes</code> classifier learns from the training data to predict the sentiment of new text.</p>
<h2><strong>Implementation:</strong></h2>
<pre><code class="language-python">#Sentiment Analysis using Multinomial Naive Bayes Algorithm

#Import Libraries

from sklearn.feature_extraction.text import CountVectorizer
from sklearn.naive_bayes import MultinomialNB

#Data Collection

text=["I love AI","I Likes Cakes","I hate bugs","social meadia is toxic"]
label=["Positive","Positive","Negative","Negative"]

##CONVERTING THE TEXT INTO NUMERICAL FEATURES

vectorizer=CountVectorizer()
inputs=vectorizer.fit_transform(text)

#now we are going to train 

model=MultinomialNB()
model.fit(inputs,label)

testdata=["I love Deeplearning"]
newinput=vectorizer.transform(testdata)

#predict

prediction=model.predict(newinput)
print("Prediction:",prediction[0])
</code></pre>
<h2><strong>Output:</strong></h2>
<img src="https://cdn.hashnode.com/uploads/covers/6a1001291f237623eab980e8/097807f1-4f3f-4005-bae8-acbdfeed69ff.png" alt="" style="display:block;margin:0 auto" />

<h2>Explanation of the Output</h2>
<p>The input sentence <strong>"I love Deeplearning"</strong> contains the word <strong>"love"</strong>, which appeared in the positive training examples. Based on the learned word probabilities, the <strong>Multinomial Naive Bayes</strong> model predicts the sentiment as <strong>Positive</strong>.</p>
<h2>Conclusion:</h2>
<p>This simple project demonstrates how to perform sentiment analysis using <strong>CountVectorizer</strong> and <strong>Multinomial Naive Bayes</strong>. Even with a small dataset, the model can classify text as <strong>Positive</strong> or <strong>Negative</strong>. This approach serves as a good starting point for beginners learning <strong>Natural Language Processing (NLP)</strong> and <strong>Machine Learning</strong>.</p>
]]></content:encoded></item><item><title><![CDATA[Building a Simple Hen Maze Game Using HTML, CSS, and JavaScript]]></title><description><![CDATA[Introduction
I recently built a Hen Maze Game using HTML, CSS, and JavaScript. In this game, the player helps a hen navigate through a randomly generated maze to reach the farmhouse.
The game features]]></description><link>https://devisriblogs.hashnode.dev/building-a-simple-hen-maze-game-using-html-css-and-javascript</link><guid isPermaLink="true">https://devisriblogs.hashnode.dev/building-a-simple-hen-maze-game-using-html-css-and-javascript</guid><category><![CDATA[Web Development]]></category><dc:creator><![CDATA[Devi Sri Ramasamy]]></dc:creator><pubDate>Wed, 15 Jul 2026 03:51:58 GMT</pubDate><content:encoded><![CDATA[<h2>Introduction</h2>
<p>I recently built a <strong>Hen Maze Game</strong> using <strong>HTML, CSS, and JavaScript</strong>. In this game, the player helps a hen navigate through a randomly generated maze to reach the farmhouse.</p>
<p>The game features keyboard-based movement using the arrow keys, randomly placed obstacles, and a restart option that generates a new maze each time. This project helped me strengthen my understanding of JavaScript concepts such as DOM manipulation, event handling, arrays, and basic game logic.</p>
<h3>Tech Stack</h3>
<ul>
<li><p>HTML</p>
</li>
<li><p>CSS</p>
</li>
<li><p>JavaScript</p>
</li>
</ul>
<h3>Features</h3>
<ul>
<li><p>Random maze generation</p>
</li>
<li><p>Arrow key navigation</p>
</li>
<li><p>Wall collision detection</p>
</li>
<li><p>Win screen with replay option</p>
</li>
<li><p>Simple and responsive interface</p>
</li>
</ul>
<h3>Live Demo</h3>
<p><strong>Play the game:</strong> <a href="https://henmazegame.netlify.app/">https://henmazegame.netlify.app/</a></p>
<h3>Source Code</h3>
<p><strong>GitHub Repository:</strong> <a href="https://github.com/devisri424/Hen-Maze-Game">https://github.com/devisri424/Hen-Maze-Game</a></p>
<p>Thank You for Reading !....</p>
]]></content:encoded></item><item><title><![CDATA[Understanding Linear Activation Function in Neural Networks Using Iris Dataset]]></title><description><![CDATA[Introduction
Neural Networks are a part of Deep Learning that help computers learn patterns from data and make predictions. A neural network consists of layers of neurons, and each neuron applies an a]]></description><link>https://devisriblogs.hashnode.dev/understanding-linear-activation-function-in-neural-networks-using-iris-dataset</link><guid isPermaLink="true">https://devisriblogs.hashnode.dev/understanding-linear-activation-function-in-neural-networks-using-iris-dataset</guid><category><![CDATA[Activation Function]]></category><dc:creator><![CDATA[Devi Sri Ramasamy]]></dc:creator><pubDate>Sun, 28 Jun 2026 16:01:41 GMT</pubDate><enclosure url="https://cdn.hashnode.com/uploads/covers/6a1001291f237623eab980e8/055a88b0-2a4b-476d-8449-86b1892d7f77.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2>Introduction</h2>
<p>Neural Networks are a part of Deep Learning that help computers learn patterns from data and make predictions. A neural network consists of layers of neurons, and each neuron applies an activation function to decide the output.</p>
<p>An activation function plays an important role in controlling the output of neurons. It helps the model learn from the given input data.</p>
<p>In this blog, we will explore the <strong>Linear Activation Function</strong> and implement it using a simple neural network model for classification using the Iris dataset.</p>
<h2>What is Linear Activation Function?</h2>
<p>The Linear Activation Function is one of the simplest activation functions used in neural networks.</p>
<p>It returns the same value that is given as input.</p>
<p>Formula:</p>
<p><strong>f(x) = x</strong></p>
<p>Example:</p>
<p>Input = 10</p>
<p>Output = 10</p>
<p>The output is directly proportional to the input value.</p>
<p>Linear activation is mostly used in simple problems and regression tasks where the relationship between input and output is linear.</p>
<h2>Dataset Used</h2>
<p>For this implementation, we are using the <strong>Iris Dataset</strong> from Scikit-Learn.</p>
<p>The Iris dataset is a popular dataset used for machine learning experiments.</p>
<p>It contains information about three types of iris flowers:</p>
<ul>
<li><p>Iris Setosa</p>
</li>
<li><p>Iris Versicolor</p>
</li>
<li><p>Iris Virginica</p>
</li>
</ul>
<p>The dataset contains 4 input features:</p>
<ul>
<li><p>Sepal Length</p>
</li>
<li><p>Sepal Width</p>
</li>
<li><p>Petal Length</p>
</li>
<li><p>Petal Width</p>
</li>
</ul>
<p>The goal is to build a neural network model that predicts the flower category based on these features.</p>
<h2>Implementation</h2>
<pre><code class="language-python">from sklearn.datasets import load_iris
from sklearn.model_selection import train_test_split
from sklearn.preprocessing import StandardScaler, OneHotEncoder
from tensorflow.keras.models import Sequential
from tensorflow.keras.layers import Dense
import matplotlib.pyplot as plt

# Load Dataset
iris = load_iris()
X = iris.data
y = iris.target.reshape(-1,1)

# Preprocessing
encoder = OneHotEncoder(sparse_output=False)
y = encoder.fit_transform(y)

scaler = StandardScaler()
X = scaler.fit_transform(X)

X_train, X_test, y_train, y_test = train_test_split(
    X, y, test_size=0.2, random_state=42
)

# Model
model = Sequential([
    Dense(10, activation='linear', input_shape=(4,)),
    Dense(8, activation='linear'),
    Dense(3, activation='softmax')
])

model.compile(optimizer='adam',
              loss='categorical_crossentropy',
              metrics=['accuracy'])

history = model.fit(X_train, y_train,
                    epochs=50,
                    validation_split=0.2)

loss, accuracy = model.evaluate(X_test, y_test)

print("Linear Accuracy:", accuracy)

plt.plot(history.history['accuracy'], label='Train Accuracy')
plt.plot(history.history['val_accuracy'], label='Validation Accuracy')
plt.title('Linear Activation')
plt.xlabel('Epochs')
plt.ylabel('Accuracy')
plt.legend()
plt.show()
</code></pre>
<h3>Output</h3>
<img src="https://cdn.hashnode.com/uploads/covers/6a1001291f237623eab980e8/9cd048cf-dd40-4114-b913-62c45f24fa02.png" alt="" style="display:block;margin:0 auto" />

<h3>Conclusion</h3>
<p>In this blog, we implemented a neural network using the <strong>Linear Activation Function</strong> on the Iris dataset.</p>
<p>The model successfully learned patterns from the dataset and achieved around <strong>93.37% accuracy</strong>.</p>
<p>The Linear Activation Function is simple and easy to understand, making it useful for learning the basics of neural networks. In upcoming blogs, we can explore other activation functions and understand how they improve neural network performance.</p>
]]></content:encoded></item><item><title><![CDATA[Building a YouTube Analytics Dashboard Using Python, YouTube Data API, and Power BI]]></title><description><![CDATA[Introduction
As a B.Tech student interested in Data Analytics and Artificial Intelligence, I wanted to build a project that would help me understand the complete data analytics workflow. Instead of wo]]></description><link>https://devisriblogs.hashnode.dev/building-a-youtube-analytics-dashboard-using-python-youtube-data-api-and-power-bi</link><guid isPermaLink="true">https://devisriblogs.hashnode.dev/building-a-youtube-analytics-dashboard-using-python-youtube-data-api-and-power-bi</guid><category><![CDATA[Python 3]]></category><category><![CDATA[PowerBI]]></category><category><![CDATA[data analytics]]></category><category><![CDATA[YouTubeAPI]]></category><category><![CDATA[beginnersguide]]></category><dc:creator><![CDATA[Devi Sri Ramasamy]]></dc:creator><pubDate>Sat, 06 Jun 2026 10:54:26 GMT</pubDate><content:encoded><![CDATA[<h2>Introduction</h2>
<p>As a <a href="http://B.Tech">B.Tech</a> student interested in Data Analytics and Artificial Intelligence, I wanted to build a project that would help me understand the complete data analytics workflow. Instead of working with a ready-made dataset, I decided to collect real-world data from YouTube using the YouTube Data API and build an interactive dashboard in Power BI.</p>
<p>This project helped me learn API integration, data preprocessing, data analysis, and dashboard development.</p>
<h2>Project Objective</h2>
<p>The goal of this project was to:</p>
<ul>
<li><p>Collect YouTube video performance data</p>
</li>
<li><p>Clean and process the data using Python</p>
</li>
<li><p>Analyze key metrics such as views, likes, comments, and engagement</p>
</li>
<li><p>Build an interactive Power BI dashboard to visualize insights</p>
</li>
</ul>
<h2>Technologies Used</h2>
<ul>
<li><p>Python</p>
</li>
<li><p>Pandas</p>
</li>
<li><p>YouTube Data API v3</p>
</li>
<li><p>Google Cloud Console</p>
</li>
<li><p>Power BI</p>
</li>
<li><p>GitHub</p>
</li>
</ul>
<h2>Project Workflow</h2>
<p>The project followed the workflow below:</p>
<p>YouTube Data API → Python → Pandas → CSV Dataset → Power BI Dashboard → GitHub</p>
<h2>Step 1: Setting Up the YouTube Data API</h2>
<p>I started by creating a project in Google Cloud Console and enabling the YouTube Data API v3.</p>
<p>After generating an API key, I used Python to connect to the API and fetch video statistics such as:</p>
<ul>
<li><p>Views</p>
</li>
<li><p>Likes</p>
</li>
<li><p>Comments</p>
</li>
<li><p>Channel Name</p>
</li>
<li><p>Video Title</p>
</li>
<li><p>Upload Date</p>
</li>
</ul>
<p>This allowed me to work with real YouTube data instead of a static dataset.</p>
<h2>Step 2: Data Collection and Processing</h2>
<p>Using Python and Pandas, I collected the data and stored it in CSV format.</p>
<p>Some preprocessing tasks included:</p>
<ul>
<li><p>Removing unnecessary columns</p>
</li>
<li><p>Handling missing values</p>
</li>
<li><p>Formatting dates</p>
</li>
<li><p>Creating calculated metrics for analysis</p>
</li>
</ul>
<p>The cleaned dataset was then exported for visualization.</p>
<h2>Step 3: Exploratory Data Analysis</h2>
<p>Before creating the dashboard, I explored the dataset to understand trends and patterns.</p>
<p>I analyzed:</p>
<ul>
<li><p>Most viewed videos</p>
</li>
<li><p>Most popular channels</p>
</li>
<li><p>Engagement metrics</p>
</li>
<li><p>Content performance</p>
</li>
</ul>
<p>This helped me identify the key metrics to include in the dashboard.</p>
<h2>Step 4: Building the Power BI Dashboard</h2>
<p>After importing the cleaned dataset into Power BI, I created an interactive dashboard with:</p>
<h3>KPI Cards</h3>
<ul>
<li><p>Total Views</p>
</li>
<li><p>Total Likes</p>
</li>
<li><p>Total Comments</p>
</li>
<li><p>Total Videos</p>
</li>
</ul>
<h3>Visualizations</h3>
<ul>
<li><p>Top Videos by Views</p>
</li>
<li><p>Top Channels by Views</p>
</li>
<li><p>Top Videos by Engagement Rate</p>
</li>
</ul>
<h3>Interactive Features</h3>
<ul>
<li><p>Channel Filter</p>
</li>
<li><p>Upload Year Filter</p>
</li>
<li><p>Upload Month Filter</p>
</li>
</ul>
<p>These features allow users to explore the data dynamically.</p>
<h2>Dashboard Preview</h2>
<img src="https://cdn.hashnode.com/uploads/covers/6a1001291f237623eab980e8/8f916e98-bd44-4562-a70f-760a13711d10.png" alt="" style="display:block;margin:0 auto" />

<hr />
<h2>Key Insights</h2>
<p>Some interesting insights from the analysis were:</p>
<ul>
<li><p>Certain educational channels generated significantly higher view counts.</p>
</li>
<li><p>Videos with high views generally received higher engagement.</p>
</li>
<li><p>Engagement rates varied across different types of content.</p>
</li>
<li><p>Dashboard filters made it easy to compare performance between channels and time periods.</p>
</li>
</ul>
<h2>What I Learned</h2>
<p>Through this project, I gained practical experience in:</p>
<ul>
<li><p>API Integration</p>
</li>
<li><p>Data Collection</p>
</li>
<li><p>Data Cleaning</p>
</li>
<li><p>Pandas for Data Analysis</p>
</li>
<li><p>Power BI Dashboard Development</p>
</li>
<li><p>Git and GitHub</p>
</li>
</ul>
<p>More importantly, I learned how to transform raw data into meaningful insights.</p>
<h2>Conclusion</h2>
<p>This project gave me hands-on experience with the complete data analytics pipeline, from collecting data through an API to building an interactive dashboard.</p>
<p>It strengthened my understanding of Python, Pandas, Power BI, and data visualization concepts. In the future, I would like to extend this project by adding machine learning features such as view prediction and engagement forecasting.</p>
<p>Thank you for reading!</p>
<p>GitHub Repository:<br /><a href="https://github.com/devisri424/YouTube-Analytics-Dashboard-using-Python-YouTube-Data-API-and-Power-BI">https://github.com/devisri424/YouTube-Analytics-Dashboard-using-Python-YouTube-Data-API-and-Power-BI</a></p>
]]></content:encoded></item><item><title><![CDATA[Understanding Backpropagation Through Spam Email Detection]]></title><description><![CDATA[Introduction
Have you ever wondered how email services automatically identify spam messages and move them to the spam folder?
Every day, millions of spam emails containing advertisements, scams, and p]]></description><link>https://devisriblogs.hashnode.dev/understanding-backpropagation-through-spam-email-detection</link><guid isPermaLink="true">https://devisriblogs.hashnode.dev/understanding-backpropagation-through-spam-email-detection</guid><category><![CDATA[Machine Learning]]></category><category><![CDATA[DeepLearning]]></category><category><![CDATA[Artificial Intelligence]]></category><category><![CDATA[neural networks]]></category><category><![CDATA[Beginner Developers]]></category><dc:creator><![CDATA[Devi Sri Ramasamy]]></dc:creator><pubDate>Thu, 28 May 2026 10:43:08 GMT</pubDate><enclosure url="https://cdn.hashnode.com/uploads/covers/6a1001291f237623eab980e8/5233591b-0f50-480f-9e7c-e44d11299bdd.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2>Introduction</h2>
<p>Have you ever wondered how email services automatically identify spam messages and move them to the spam folder?</p>
<p>Every day, millions of spam emails containing advertisements, scams, and phishing attempts are sent across the internet. To protect users, email providers use Machine Learning models that can distinguish between spam and legitimate emails.</p>
<p>But how do these models learn to make accurate decisions?</p>
<p>The answer lies in a learning algorithm called <strong>Backpropagation</strong>.</p>
<p>In this article, we will understand backpropagation using a simple and practical example: spam email detection.</p>
<h2>What is Backpropagation?</h2>
<p>Backpropagation is the process through which a neural network learns from its mistakes.</p>
<p>When a neural network makes a prediction, it compares the prediction with the correct answer. If the prediction is wrong, the network calculates the error and adjusts its internal weights to improve future predictions.</p>
<p>In simple terms:</p>
<ol>
<li><p>Make a prediction.</p>
</li>
<li><p>Check whether it is correct.</p>
</li>
<li><p>Measure the error.</p>
</li>
<li><p>Learn from the mistake.</p>
</li>
<li><p>Improve the prediction.</p>
</li>
</ol>
<p>This cycle repeats many times until the model becomes more accurate.</p>
<h2>Spam Email Detection Example</h2>
<p>Imagine we are training a neural network to identify spam emails.</p>
<p>Consider the following email:</p>
<p>"Congratulations! You have won a free iPhone. Click here to claim your reward."</p>
<p>This email is clearly spam.</p>
<p>Therefore:</p>
<p>Expected Output = Spam</p>
<p>Let's see what happens inside the neural network.</p>
<h3>Step 1: Forward Pass</h3>
<p>The email enters the neural network.</p>
<p>The model analyzes words such as:</p>
<ul>
<li><p>Congratulations</p>
</li>
<li><p>Won</p>
</li>
<li><p>Free</p>
</li>
<li><p>Reward</p>
</li>
</ul>
<p>Based on its current knowledge, the model predicts:</p>
<p>Prediction = Not Spam</p>
<p>Unfortunately, this prediction is incorrect.</p>
<h2>Step 2: Calculate the Error</h2>
<p>The correct answer is:</p>
<p>Actual Output = Spam</p>
<p>But the model predicted:</p>
<p>Predicted Output = Not Spam</p>
<p>Since the prediction is wrong, an error is generated.</p>
<p>The neural network now knows that something inside its decision-making process needs improvement.</p>
<h2>Step 3: Backpropagation Begins</h2>
<p>This is where backpropagation comes into action.</p>
<p>The error is sent backward through the network.</p>
<p>The model examines the connections and weights that contributed to the incorrect prediction.</p>
<p>Words like "free", "won", and "reward" should have received greater importance.</p>
<p>Backpropagation adjusts the weights associated with these features.</p>
<p>As a result, the network learns that such words are strong indicators of spam emails.</p>
<h2>Step 4: Improved Prediction</h2>
<p>After many training examples, the model becomes smarter.</p>
<p>Now consider a similar email:</p>
<p>"Win a free smartphone today. Click here now."</p>
<p>The model predicts:</p>
<p>Prediction = Spam</p>
<p>This time the prediction is correct because backpropagation helped the network learn from previous mistakes.</p>
<h2>Practical Implementation in Python</h2>
<p>To better understand how backpropagation is used in real-world applications, here's a simple spam email detection model built using Python and a neural network.</p>
<h3>Implementation</h3>
<img src="https://cdn.hashnode.com/uploads/covers/6a1001291f237623eab980e8/2d967172-712d-466c-8c2d-8bd3a025eebd.png" alt="" style="display:block;margin:0 auto" />

<h3>Output</h3>
<img src="https://cdn.hashnode.com/uploads/covers/6a1001291f237623eab980e8/4b0e2a7c-8af5-44a5-bda3-668af914c54f.png" alt="" style="display:block;margin:0 auto" />

<p>This model learns from training examples and improves its predictions using backpropagation.</p>
<h2>Visualizing the Process</h2>
<p>The following diagram shows how a neural network learns from its mistakes during spam email detection.</p>
<img src="https://cdn.hashnode.com/uploads/covers/6a1001291f237623eab980e8/737f7ae5-bc6b-45b4-b6b1-fad386f2563f.png" alt="" style="display:block;margin:0 auto" />

<p>Each training cycle helps the model improve its accuracy.</p>
<h2>Why Backpropagation Matters</h2>
<p>Without backpropagation, neural networks would never improve.</p>
<p>The model would continue making the same mistakes because it would have no way of learning from them.</p>
<p>Backpropagation enables neural networks to:</p>
<ul>
<li><p>Learn patterns from data</p>
</li>
<li><p>Reduce prediction errors</p>
</li>
<li><p>Improve accuracy over time</p>
</li>
<li><p>Solve complex real-world problems</p>
</li>
</ul>
<p>It is one of the most important algorithms in modern Deep Learning.</p>
<h2>Real-World Applications</h2>
<p>Although we explored spam email detection, backpropagation is used in many other applications:</p>
<ul>
<li><p>Face recognition</p>
</li>
<li><p>Handwriting recognition</p>
</li>
<li><p>Medical diagnosis</p>
</li>
<li><p>Recommendation systems</p>
</li>
<li><p>Self-driving vehicles</p>
</li>
<li><p>Voice assistants</p>
</li>
<li><p>Language models and chatbots</p>
</li>
</ul>
<p>In each case, the model learns by making predictions, measuring errors, and updating itself through backpropagation.</p>
<h2>Conclusion</h2>
<p>Backpropagation is the learning engine of neural networks. It allows models to learn from mistakes and continuously improve their performance.</p>
<p>Using spam email detection as an example, we saw how a neural network can initially make incorrect predictions, calculate its errors, and then adjust itself to make better decisions in the future.</p>
<p>Understanding backpropagation is an important step toward learning Deep Learning because it explains how neural networks become smarter over time.</p>
]]></content:encoded></item></channel></rss>