<?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[Machine Learning]]></title><description><![CDATA[Machine Learning]]></description><link>https://ml-blogs.hashnode.dev</link><generator>RSS for Node</generator><lastBuildDate>Fri, 16 Oct 2026 06:44:35 GMT</lastBuildDate><atom:link href="https://ml-blogs.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Traffic Sign Recognition using CNN]]></title><description><![CDATA[In this article, I explored a deep learning project that applies the concept of supervised learning, specifically using Convolutional Neural Networks (CNNs) for image classification.
The main idea behind this project is to classify traffic sign image...]]></description><link>https://ml-blogs.hashnode.dev/traffic-sign-recognition-using-cnn</link><guid isPermaLink="true">https://ml-blogs.hashnode.dev/traffic-sign-recognition-using-cnn</guid><category><![CDATA[Traffic Sign Recognition using CNN]]></category><category><![CDATA[Traffic Sign Recognition System ]]></category><category><![CDATA[ML]]></category><dc:creator><![CDATA[Zaman Ali]]></dc:creator><pubDate>Sun, 10 Aug 2025 11:32:53 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/stock/unsplash/gFWI-sylBac/upload/1adde64981c4885944ea5e292ea7e100.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>In this article, I explored a deep learning project that applies the concept of <strong>supervised learning</strong>, specifically using <strong>Convolutional Neural Networks (CNNs)</strong> for image classification.</p>
<p>The main idea behind this project is to classify traffic sign images into predefined categories, enabling potential use cases in autonomous driving, driver assistance systems, and road safety.</p>
<p>For this project, I used a traffic sign dataset containing <strong>43 classes</strong> of images.<br />The dataset also included a <code>labels.csv</code> file mapping each class ID to its respective traffic sign name.</p>
<ul>
<li><p><strong>Image Dimensions:</strong> 32×32 pixels</p>
</li>
<li><p><strong>Channels:</strong> RGB (converted to grayscale during preprocessing)</p>
</li>
<li><p><strong>Splits:</strong> Training, Validation, and Test sets</p>
</li>
</ul>
<p>The key takeaway from this project was understanding how <strong>CNN architectures</strong> can effectively extract features from images and classify them with high accuracy.<br />It also reinforced the importance of <strong>preprocessing</strong> and <strong>data augmentation</strong> in improving model performance.</p>
<p>Before training the model, I applied preprocessing steps to improve accuracy and reduce noise:</p>
<ul>
<li><p><strong>Grayscale Conversion</strong> – Simplifies data while keeping important features.</p>
</li>
<li><p><strong>Histogram Equalization</strong> – Improves contrast for better feature detection.</p>
</li>
<li><p><strong>Normalization</strong> – Scales pixel values to a range of 0–1.</p>
</li>
</ul>
<pre><code class="lang-python">pythonCopyEditdef grayscale(img):
    <span class="hljs-keyword">return</span> cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)

<span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">equalize</span>(<span class="hljs-params">img</span>):</span>
    <span class="hljs-keyword">return</span> cv2.equalizeHist(img)

<span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">preprocessing</span>(<span class="hljs-params">img</span>):</span>
    img = grayscale(img)
    img = equalize(img)
    img = img / <span class="hljs-number">255.0</span>
    <span class="hljs-keyword">return</span> img
</code></pre>
<h3 id="heading-data-augmentation"><strong>Data Augmentation</strong></h3>
<p>To make the model more robust and prevent overfitting, I used <strong>ImageDataGenerator</strong> from Keras for:</p>
<ul>
<li><p>Width and height shifts</p>
</li>
<li><p>Zoom</p>
</li>
<li><p>Shear transformation</p>
</li>
<li><p>Rotation</p>
</li>
</ul>
<h3 id="heading-model-architecture"><strong>Model Architecture</strong></h3>
<p>I designed a <strong>CNN</strong> using Keras’ Sequential API with:</p>
<ul>
<li><p>Two convolution layers (60 filters, 5×5 kernel)</p>
</li>
<li><p>MaxPooling layer</p>
</li>
<li><p>Two convolution layers (30 filters, 3×3 kernel)</p>
</li>
<li><p>Dropout layers to reduce overfitting</p>
</li>
<li><p>Fully connected dense layer (500 neurons)</p>
</li>
<li><p>Output layer with softmax activation</p>
</li>
</ul>
<h3 id="heading-training-the-model"><strong>Training the Model</strong></h3>
<p>The model was trained using:</p>
<ul>
<li><p><strong>Batch Size:</strong> 32</p>
</li>
<li><p><strong>Epochs:</strong> 10</p>
</li>
<li><p><strong>Optimizer:</strong> Adam</p>
</li>
<li><p><strong>Loss Function:</strong> Categorical Crossentropy</p>
</li>
</ul>
<p>After training, I evaluated the model on the <strong>test set</strong> to measure accuracy and loss.<br />I also plotted training vs. validation accuracy and loss to monitor learning trends.</p>
<h3 id="heading-predictions"><strong>Predictions</strong></h3>
<p>For predictions, the workflow was:</p>
<ol>
<li><p>Load an image.</p>
</li>
<li><p>Resize to 32×32.</p>
</li>
<li><p>Convert to grayscale.</p>
</li>
<li><p>Apply histogram equalization.</p>
</li>
<li><p>Normalize pixel values.</p>
</li>
<li><p>Predict class and display confidence.</p>
</li>
</ol>
<p>After training for 10 epochs, the model achieved the following performance:</p>
<ul>
<li><p><strong>Test Accuracy:</strong>0.9657177925109863</p>
</li>
<li><p><strong>Test Score:</strong> 0.11213602125644684</p>
</li>
</ul>
<p>The training and validation accuracy curves showed consistent improvement, while the loss curves indicated a good fit without significant overfitting.</p>
<p><strong>Accuracy Plot:</strong></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1754824417266/6d44fd7a-630e-4b3d-9915-b16f69115e6e.png" alt class="image--center mx-auto" /></p>
<p><strong>Loss Plot:</strong></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1754824428162/3e6bcc7d-4839-41f5-bd22-31af4c397009.png" alt class="image--center mx-auto" /></p>
<p>These results demonstrate that the CNN model can accurately classify traffic signs and is suitable for real-world deployment after further fine-tuning.</p>
<p>I tested the trained model on multiple unseen traffic sign images and achieved consistently good results.</p>
<p>Here is one example:</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1754824535706/06969f7d-3558-445d-b297-a6d04a86064f.jpeg" alt class="image--center mx-auto" /></p>
<pre><code class="lang-python">Predicted <span class="hljs-class"><span class="hljs-keyword">class</span>:</span> <span class="hljs-number">9</span> (No passing), confidence: <span class="hljs-number">0.95</span>
</code></pre>
<p>You can view the complete code, dataset preparation steps, and prediction examples here:<br /><a target="_blank" href="https://github.com/Mehar-Zaman-Ali/Traffic-Sign-Recognition-Description">https://github.com/Mehar-Zaman-Ali/Traffic-Sign-Recognition-Description</a></p>
]]></content:encoded></item><item><title><![CDATA[Movie Recommendation System]]></title><description><![CDATA[In this article, I discuss my recent project, a Movie Recommendation System. The system recommends movies based on a user’s input movie title. To determine similarity, I used Cosine Similarity and Pearson Correlation to compare relationships between ...]]></description><link>https://ml-blogs.hashnode.dev/movie-recommendation-system</link><guid isPermaLink="true">https://ml-blogs.hashnode.dev/movie-recommendation-system</guid><category><![CDATA[movie recommendation system]]></category><category><![CDATA[ML]]></category><dc:creator><![CDATA[Zaman Ali]]></dc:creator><pubDate>Sun, 10 Aug 2025 11:01:20 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1754822014527/13cf45e1-78a2-4c54-8b3b-0f2080bd17a1.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>In this article, I discuss my recent project, a <strong>Movie Recommendation System</strong>. The system recommends movies based on a user’s input movie title. To determine similarity, I used <strong>Cosine Similarity</strong> and <strong>Pearson Correlation</strong> to compare relationships between movies (or users) and generate relevant recommendations.</p>
<p>For this project, I used two types of datasets.</p>
<ul>
<li><p><strong>Movie Dataset:</strong> Contains the movie ID, title, and genre.</p>
</li>
<li><p><strong>Ratings Dataset:</strong> Contains the user ID, movie ID, and the rating each user gave to multiple movies.</p>
</li>
</ul>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1754821824727/ff0d758c-b9b5-4ae2-b1fd-66c41a2acb6b.png" alt class="image--center mx-auto" /></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1754821846349/93bda6a4-dc96-4767-a9fb-e752b321011d.png" alt class="image--center mx-auto" /></p>
<p>By combining these datasets, I was able to link movie details with their corresponding user ratings, which served as the foundation for building the recommendation system.</p>
<p>I used <code>TfidfVectorizer</code> from <code>sklearn.feature_extraction.text</code> to convert the cleaned movie titles into numerical form using <strong>TF-IDF (Term Frequency–Inverse Document Frequency)</strong>.</p>
<pre><code class="lang-python">pythonCopyEditfrom sklearn.feature_extraction.text <span class="hljs-keyword">import</span> TfidfVectorizer

vectorizer = TfidfVectorizer(ngram_range=(<span class="hljs-number">1</span>, <span class="hljs-number">2</span>))
tfidf = vectorizer.fit_transform(movies[<span class="hljs-string">"clean_title"</span>])
</code></pre>
<ul>
<li><p><code>ngram_range=(1, 2)</code> means the vectorizer considers both single words (<strong>unigrams</strong>) and pairs of consecutive words (<strong>bigrams</strong>) when transforming the text into numbers.</p>
</li>
<li><p>The resulting <code>tfidf</code> matrix represents each movie title as a set of numerical values, allowing us to calculate similarity between titles.</p>
</li>
</ul>
<p>Before performing any of the recommendation steps, I carried out a <strong>data cleaning</strong> process. This involved removing any characters other than alphabets and numbers from the dataset. For this, I used <strong>regular expressions (Regex)</strong> to ensure the text was clean and consistent for processing.</p>
<pre><code class="lang-python"><span class="hljs-keyword">import</span> re
<span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">clean_title</span>(<span class="hljs-params">title</span>):</span>
    <span class="hljs-keyword">return</span> re.sub(<span class="hljs-string">"[^a-zA-Z0-9 ]"</span>,<span class="hljs-string">""</span>,title)
</code></pre>
<p>Based on these datasets, the recommendation process works as follows:</p>
<ol>
<li><p>When a user enters a specific movie, I first select all the users who have watched that movie.</p>
</li>
<li><p>From those users, I create a list of movies they have rated <strong>4 or above</strong>. This helps filter out lower-rated movies and focus on high-quality recommendations.</p>
</li>
<li><p>This results in a shorter list of movies, which I then refine further by keeping only the movies that are common among multiple users.</p>
</li>
<li><p>Finally, I calculate a <strong>similarity score</strong> for each remaining movie (using Cosine Similarity or Pearson Correlation) to rank and recommend the most relevant ones.</p>
</li>
</ol>
<p>In addition, I used <strong>Jupyter Notebook’s built-in widgets</strong> to create an interactive interface. This allowed users to search for a movie and instantly view the <strong>top 10 recommended movies</strong> based on their input.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1754821952197/85c0e77a-a277-43dd-b858-d21f2328054f.png" alt class="image--center mx-auto" /></p>
<p>GitHub Repository:<a target="_blank" href="https://github.com/Mehar-Zaman-Ali/Movie-Recommendation-System">https://github.com/Mehar-Zaman-Ali/Movie-Recommendation-System</a></p>
]]></content:encoded></item><item><title><![CDATA[Mall Customer Segmentation Project]]></title><description><![CDATA[In this article, I explored a small project that introduced the basic concept of unsupervised learning, specifically focusing on K-Means Clustering. The main idea behind clustering is to divide a dataset into distinct groups or clusters, where each d...]]></description><link>https://ml-blogs.hashnode.dev/mall-customer-segmentation-project</link><guid isPermaLink="true">https://ml-blogs.hashnode.dev/mall-customer-segmentation-project</guid><category><![CDATA[Mall Customer Segmentation]]></category><category><![CDATA[K means Clustering ]]></category><category><![CDATA[Machine Learning]]></category><dc:creator><![CDATA[Zaman Ali]]></dc:creator><pubDate>Fri, 01 Aug 2025 06:48:17 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1754029050335/a41e7b1b-adfa-43e4-bebd-810929b7cb88.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>In this article, I explored a small project that introduced the basic concept of <strong>unsupervised learning</strong>, specifically focusing on <strong>K-Means Clustering</strong>. The main idea behind clustering is to divide a dataset into distinct groups or clusters, where each data point is assigned to the group it most closely belongs to based on similarity.</p>
<p>For this project, I used the <strong>Mall Customer Segmentation dataset</strong>, which contains seven features. However, I focused on just two features for simplicity and visualization purposes: <em>"Annual Income" and "Spending Score"</em>.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1753979499328/e86ff7ac-6a36-4e54-b5c8-0a896cac63e5.png" alt class="image--center mx-auto" /></p>
<p>The key takeaway from this project was understanding how <strong>K-Means</strong> identifies natural groupings in data without labelled outcomes. It was a valuable introduction to one of the core techniques in unsupervised machine learning.</p>
<p>I also explored and worked with a new Python library called <strong>Seaborn</strong>, which is built on top of <strong>Matplotlib</strong> and makes data visualization more intuitive and aesthetically pleasing. Seaborn provides high-level functions that allow you to create visually appealing plots with less code.</p>
<p>As a comparison, I plotted the same scatter plot using both <strong>Matplotlib</strong> and <strong>Seaborn</strong> to observe the visual differences. Seaborn made it easier to style the charts and highlight patterns within the data. I included the results at the end of the article, in the <strong>Evaluation</strong> section.</p>
<p>After analyzing the data, I selected <strong>"Annual Income" and "Spending Score"</strong> as the features for clustering.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1754029124044/f50aa0d5-4935-4d72-89bf-f83520e55a87.png" alt class="image--center mx-auto" /></p>
<p>Next, I needed to determine the optimal number of clusters (K) for the <strong>K-Means Clustering</strong> algorithm. In K-Means, <strong>K</strong> represents the number of groups or clusters we want to divide the data into.</p>
<p>To find the best value for K, I used the <strong>Elbow Method</strong>. This technique works by running K-Means for a range of K values and plotting the <strong>Within-Cluster Sum of Squares (WCSS)</strong>. The idea is to identify the "elbow point" in the graph — the point after which increasing K yields minimal improvement. This helps estimate the optimal number of clusters by balancing accuracy and simplicity.</p>
<pre><code class="lang-python">wcss = [] 
<span class="hljs-keyword">for</span> i <span class="hljs-keyword">in</span> range(<span class="hljs-number">1</span>, <span class="hljs-number">11</span>): 
    km = KMeans(n_clusters = i)
    km.fit(m) 
    wcss.append(km.inertia_)
plt.plot(range(<span class="hljs-number">1</span>,<span class="hljs-number">11</span>),wcss)
</code></pre>
<p>Here is the <strong>Elbow Point graph</strong> that I plotted to determine the optimal number of clusters for K-Means.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1754028805211/b7dd8c1d-0f56-43b0-bc24-65ac5e96bfe8.png" alt class="image--center mx-auto" /></p>
<p>After determining the optimal value of K, I applied <strong>K-Means clustering</strong> to the dataset. This segmented the data into distinct groups, giving us the desired output. Below is the <strong>scatter plot</strong> visualizing the clustered groups.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1754028884757/63c22e19-35d7-4ce9-ab50-af52bc6c2609.png" alt class="image--center mx-auto" /></p>
<p>This is the plot generated using <strong>Matplotlib</strong>. The purpose of including both Matplotlib and Seaborn visualizations is to highlight how each library displays the same data, showcasing the visual appeal and style differences between the two.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1754029033496/a2d4a950-8fe2-4c0c-baac-06c50fa78dfe.png" alt class="image--center mx-auto" /></p>
<p><strong>GitHub Repository:</strong><a target="_blank" href="https://github.com/Mehar-Zaman-Ali/student-performance-factors">https://github.com/Mehar-Zaman-Ali/mall-customer-segmentation</a></p>
]]></content:encoded></item><item><title><![CDATA[First Hands-On ML Model]]></title><description><![CDATA[In this article, I explain my first machine learning project, which focused on predicting student performance based on various factors. The dataset used for this project was the Student Performance Factors dataset, available on Kaggle. This dataset c...]]></description><link>https://ml-blogs.hashnode.dev/student-performance-factors</link><guid isPermaLink="true">https://ml-blogs.hashnode.dev/student-performance-factors</guid><category><![CDATA[Student Performance Factors]]></category><dc:creator><![CDATA[Zaman Ali]]></dc:creator><pubDate>Mon, 28 Jul 2025 06:56:24 GMT</pubDate><content:encoded><![CDATA[<p>In this article, I explain my first machine learning project, which focused on predicting student performance based on various factors. The dataset used for this project was the <a target="_blank" href="https://www.kaggle.com/datasets/lainguyn123/student-performance-factors"><strong>Student Performance Factors</strong></a> dataset, available on Kaggle. This dataset contains 19 features, and as a beginner, I started with a simple approach.</p>
<p>Initially, I focused on predicting student scores using just one feature: <strong>hours of study</strong>(Hours_Studied). This was my first step in the project. Afterward, I expanded the analysis to include all 19 features to understand which ones had an impact on student scores and which did not. I also identified which feature had the most significant effect on the students' grades.</p>
<h2 id="heading-getting-started-with-the-data">Getting Started with the Data</h2>
<p>As a beginner, I started with the basics by importing my data into <strong>Jupyter Notebook</strong>. The first thing I did was to analyze the dataset's structure, checking the shape, the appearance of the data, and identifying any missing values.</p>
<p>As a popular quote says, <em>“Half of the problem is solved by understanding the data.”</em> This is why I focused on gaining a deep understanding of the dataset.</p>
<h2 id="heading-data-manipulation-and-analysis">Data Manipulation and Analysis</h2>
<p>For data manipulation and analysis, I used the <strong>Pandas</strong> library in Python. I applied various functions to clean and analyze the data effectively. This step helped prepare the dataset for further modelling.</p>
<p>The <a target="_blank" href="http://data.info"><code>data.info</code></a><code>()</code> function provides information about the dataset, including the data types of each feature and the count of non-null values.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1753346864200/229dd29a-fa45-47f7-a9d0-769487791d1f.png" alt class="image--center mx-auto" /></p>
<p>The <code>data.isna().sum()</code> The function provides the total number of missing values in each column (feature).</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1753346882381/d36960b8-2db3-4564-a893-4a9365957660.png" alt class="image--center mx-auto" /></p>
<p>The <code>data.describe()</code> function provides statistical summaries of the numerical data, including metrics like:</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1753346844499/c431fe5c-ff38-49ea-8c94-49bb5e01292b.png" alt class="image--center mx-auto" /></p>
<h2 id="heading-data-visualization">Data Visualization</h2>
<p>Next, I visualized the data using <strong>Matplotlib</strong>. This tool enabled me to create various plots, such as box plots and scatter plots, which helped in better understanding the relationships between the features and student performance.</p>
<p>Here is the scatter plot showing the relationship between the input variable (<strong>Hours_Studied</strong>) and the output (<strong>Exam_Score</strong>).</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1753347702715/b67616ef-f817-447d-80e8-be83aee4ad61.png" alt class="image--center mx-auto" /></p>
<h2 id="heading-applying-the-machine-learning-model-linear-regression">Applying the Machine Learning Model: Linear Regression</h2>
<p>After manipulating and visualizing the data, it was time to apply my first machine learning model: <strong>Linear Regression</strong>. Before using the model, I needed to split the dataset into two parts: the <strong>training set</strong> and the <strong>validation set</strong>. The reason for this split is to evaluate the model's performance on unseen data. I used a 75-25 ratio, where 75% of the data was allocated to the training set and the remaining 25% was used for validation.</p>
<h2 id="heading-training-the-model">Training the Model</h2>
<p>With the data split, I proceeded to train the linear regression model on the training dataset. Once the model was trained, I evaluated its accuracy using the validation dataset.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1753348413682/48a546b2-4eb1-4428-8b50-8ebd9269eebb.png" alt class="image--center mx-auto" /></p>
<h2 id="heading-model-evaluation">Model Evaluation</h2>
<p>The final step in the process was the <strong>evaluation</strong> phase, where I assessed how well the model performed on the validation data. The evaluation metrics helped determine the accuracy and effectiveness of the model in predicting student performance.</p>
<p>Here are the evaluation metrics, including <strong>MAE</strong>, <strong>MSE</strong>, and <strong>RMSE</strong> results:</p>
<pre><code class="lang-plaintext">MAE: 2.5057653562271898
</code></pre>
<pre><code class="lang-plaintext">MSE: 12.130452140014187
</code></pre>
<pre><code class="lang-plaintext">RMSE: 3.4828801111037695
</code></pre>
<p>The results suggest that my model performs well with the <strong>Hours_Studied</strong> feature. Now, I will apply <strong>Polynomial Regression</strong> to see how this model performs.</p>
<h2 id="heading-why-do-we-need-polynomial-regression">Why Do We Need Polynomial Regression?</h2>
<p>The fundamental idea behind <strong>linear regression</strong> is that there is a linear relationship between the dependent variable (y) and the independent variable (X). Linear regression fits a straight line to the data, and while this approach gave decent results, the model still didn’t perform as well as expected.</p>
<p>To improve performance, I decided to try <strong>polynomial regression</strong>, which models the relationship between the independent variable (X) and the dependent variable (y) as an <strong>nth-degree polynomial</strong>. This allows the model to capture more complex, non-linear relationships in the data.</p>
<p>Polynomial regression is similar to linear regression, with the main difference being that we add <strong>polynomial terms</strong> (i.e., powers of the independent variable) to the feature space. This enables the model to better fit non-linear patterns in the data.</p>
<p>Let’s apply this model to our dataset and see how it performs.</p>
<pre><code class="lang-python">poly = PolynomialFeatures(degree=<span class="hljs-number">3</span>) 

x_poly = poly.fit_transform(train_X)

poly.fit(x_poly,train_y) 

lin = LinearRegression()

 lin.fit(x_poly,train_y)
</code></pre>
<h2 id="heading-model-evaluation-1">Model Evaluation</h2>
<pre><code class="lang-plaintext">MAE: 2.497633745495845
</code></pre>
<pre><code class="lang-plaintext">MSE: 11.83724466538172
</code></pre>
<pre><code class="lang-plaintext">RMSE: 3.440529707091877
</code></pre>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1753665648311/44c3c2bb-0af3-407d-9377-840182b1f29f.png" alt class="image--center mx-auto" /></p>
<p>As we can see, there is not much difference between the curve of <strong>linear regression</strong> and <strong>polynomial regression</strong>. This suggests that the relationship between the independent variable (X) and the dependent variable (y) is linear in our case.</p>
<p>You can find the code and further details in my GitHub repository: <a target="_blank" href="https://github.com/Mehar-Zaman-Ali/student-performance-factors">https://github.com/Mehar-Zaman-Ali/student-performance-factors</a></p>
]]></content:encoded></item></channel></rss>