<?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[Intern Elite - Medium]]></title>
        <description><![CDATA[A group of talented interns writing on topic of technology, life, current world scenarios. - Medium]]></description>
        <link>https://medium.com/intern-elite?source=rss----0e0957401f8d---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>Intern Elite - Medium</title>
            <link>https://medium.com/intern-elite?source=rss----0e0957401f8d---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 13 Nov 2026 16:12:42 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/intern-elite" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Understanding R-Squared, Adjusted R-Squared, and Hypothesis Testing in Simple Language]]></title>
            <link>https://medium.com/intern-elite/understanding-r-squared-adjusted-r-squared-and-hypothesis-testing-in-simple-language-1b2da1e6b5c9?source=rss----0e0957401f8d---4</link>
            <guid isPermaLink="false">https://medium.com/p/1b2da1e6b5c9</guid>
            <dc:creator><![CDATA[Riya ]]></dc:creator>
            <pubDate>Tue, 17 Jun 2025 09:22:49 GMT</pubDate>
            <atom:updated>2025-06-17T09:22:48.941Z</atom:updated>
            <content:encoded><![CDATA[<h3>1. What is R-Squared (R²)?</h3><p><strong>R-squared</strong> is a statistical measure that shows how well your <strong>independent variables</strong> (features) explain the <strong>variation</strong> in your <strong>dependent variable</strong> (target).</p><p>Think of it like this:</p><blockquote><strong><em>R² = How much of the change in your target variable is explained by your model.</em></strong></blockquote><h3>Example:</h3><p>If you’re predicting house prices using features like number of rooms, area, and location, an <strong>R² = 0.85</strong> means <strong>85% of the variation</strong> in house prices is explained by your model.</p><h3>Good to Know:</h3><ul><li><strong>R² = 1 →</strong> Perfect fit (very rare in real life)</li><li><strong>R² = 0 →</strong> Model explains nothing</li><li><strong>Higher R² →</strong> Better fit (but not always)</li></ul><h3>2. What is Adjusted R-Squared? Why Do We Need It?</h3><p>R² has one <strong>problem</strong>: it <strong>always increases</strong> when you add more variables — even if those variables are useless!</p><p>That’s where <strong>Adjusted R-Squared</strong> comes in. It <strong>adjusts</strong> the R² value by considering the number of variables you use. If you add a <strong>useless variable</strong>, <strong>Adjusted R²</strong> will <strong>go down</strong>.</p><h3>Use Adjusted R² when:</h3><ul><li>You are comparing <strong>multiple regression models</strong> with <strong>different numbers of features</strong>.</li><li>You want to <strong>penalize</strong> unnecessary complexity.</li></ul><h3>3. Hypothesis Testing: Making Decisions with Data</h3><p><strong>Hypothesis testing</strong> helps us decide if what we found in our data is <strong>real</strong> or just <strong>random chance</strong>.</p><h3>Terms You Need to Know:</h3><p><strong>Null Hypothesis (H₀)=&gt;</strong>There is <strong>no effect</strong> / nothing interesting is happening.</p><p><strong>Alternative Hypothesis (H₁)=&gt;</strong>There <strong>is</strong> an effect / something interesting is happening.</p><h3>4. Errors in Hypothesis Testing</h3><p><strong>Type I Error (False Positive)=&gt;</strong>You said something is happening when actually nothing is. (Rejecting a true H₀)</p><p><strong>Type II Error (False Negative)=&gt;</strong>You missed something real that is happening. (Failing to reject a false H₀)</p><h3>Easy Example:</h3><ul><li><strong>Type I Error →</strong> Telling a man he’s pregnant.</li><li><strong>Type II Error →</strong> Saying a pregnant woman isn’t pregnant.</li></ul><h3>5. What is P-Value?</h3><p><strong>P-value</strong> tells you <strong>how likely</strong> your results are <strong>if the null hypothesis were true</strong>.</p><blockquote><strong><em>Small p-value (≤ 0.05)</em></strong><em> → Strong evidence </em><strong><em>against</em></strong><em> H₀ → </em><strong><em>Reject H₀</em></strong><em><br> </em><strong><em>Large p-value (&gt; 0.05)</em></strong><em> → Weak evidence → </em><strong><em>Fail to reject H₀</em></strong></blockquote><h3>Summary:</h3><ul><li><strong>P-value ≤ 0.05 →</strong> Statistically significant.</li><li><strong>P-value &gt; 0.05 →</strong> Not statistically significant.</li></ul><h3>6. Common Statistical Tests and When to Use Them</h3><p>Let’s quickly cover some essential statistical tests and <strong>when to use each</strong>.</p><p><strong>T-Test=&gt; </strong>Comparing <strong>means</strong> of <strong>2 groups</strong> (e.g., average height of men vs. women).</p><p><strong>Chi-Square Test=&gt; </strong>Checking if <strong>categories</strong> are related (e.g., Gender vs. Favorite Color).</p><p><strong>ANOVA Test=&gt; </strong>Comparing <strong>means</strong> of <strong>3 or more groups</strong> (e.g., Exam scores of students from 3 schools).</p><h3>Final Thoughts</h3><p>Understanding <strong>R-squared</strong>, <strong>Adjusted R-squared</strong>, <strong>hypothesis testing</strong>, <strong>p-values</strong>, and these basic statistical tests gives you a powerful toolkit to interpret data properly and make smart decisions.</p><p>Remember:</p><blockquote><strong><em>Statistics doesn’t give certainty. It gives probability.</em></strong></blockquote><p>The <strong>goal</strong> is not to eliminate uncertainty, but to manage it wisely.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1b2da1e6b5c9" width="1" height="1" alt=""><hr><p><a href="https://medium.com/intern-elite/understanding-r-squared-adjusted-r-squared-and-hypothesis-testing-in-simple-language-1b2da1e6b5c9">Understanding R-Squared, Adjusted R-Squared, and Hypothesis Testing in Simple Language</a> was originally published in <a href="https://medium.com/intern-elite">Intern Elite</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Understanding Linear Regression in Machine Learning]]></title>
            <link>https://medium.com/intern-elite/understanding-linear-regression-in-machine-learning-b2fda6324633?source=rss----0e0957401f8d---4</link>
            <guid isPermaLink="false">https://medium.com/p/b2fda6324633</guid>
            <dc:creator><![CDATA[Nurin Shrestha]]></dc:creator>
            <pubDate>Mon, 16 Jun 2025 08:04:26 GMT</pubDate>
            <atom:updated>2025-06-16T08:04:26.006Z</atom:updated>
            <content:encoded><![CDATA[<p>Linear Regression is one of the simplest yet most powerful algorithms in supervised machine learning. It is used to predict a continuous dependent variable based on the value of one or more independent variables. The core idea behind linear regression is to find a linear relationship between the input variable (or features) and the output variable (or target). For instance, we can predict a student’s expected exam score based on the number of hours they study, or estimate the price of a house based on its size.</p><p>In its most basic form, linear regression uses the mathematical formula <strong>y = mx + c</strong>, where <em>y</em> is the predicted value, <em>x</em> is the input, <em>m</em> is the slope (or coefficient), and <em>c</em> is the intercept (or bias). The model tries to learn the best-fit line through the data by minimizing the difference between the actual and predicted values. This difference is quantified using metrics like Mean Squared Error (MSE), Root Mean Squared Error (RMSE), and the R² score, which measures how well the model explains the variability in the dataset.</p><p>To implement linear regression practically, Python libraries like Scikit-learn are commonly used. First, the data is loaded and preprocessed using libraries like Pandas and Numpy. The dataset is then split into training and testing subsets to evaluate the model’s performance objectively. The model is trained using the training data, and predictions are made on the test data. Key metrics such as MSE and R² score are computed to evaluate the accuracy of the model.</p><p>Visualization plays a key role in understanding how well the regression model fits the data. A scatter plot of the data points with the regression line overlaid helps in interpreting the trend visually. For example, plotting study hours against test scores with a red regression line gives immediate insight into the strength and direction of the relationship.</p><p>Overall, linear regression serves as a foundational concept for many advanced machine learning algorithms. It not only helps beginners grasp the essence of supervised learning but also provides real-world utility in fields like finance, healthcare, education, and marketing. Mastering this technique is a crucial step toward understanding more complex algorithms and developing intelligent systems that can learn from data.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b2fda6324633" width="1" height="1" alt=""><hr><p><a href="https://medium.com/intern-elite/understanding-linear-regression-in-machine-learning-b2fda6324633">Understanding Linear Regression in Machine Learning</a> was originally published in <a href="https://medium.com/intern-elite">Intern Elite</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Understanding Classification and the Foundations of K-Nearest Neighbors (KNN)]]></title>
            <link>https://medium.com/intern-elite/understanding-classification-and-the-foundations-of-k-nearest-neighbors-knn-a3f067016181?source=rss----0e0957401f8d---4</link>
            <guid isPermaLink="false">https://medium.com/p/a3f067016181</guid>
            <dc:creator><![CDATA[Nurin Shrestha]]></dc:creator>
            <pubDate>Mon, 16 Jun 2025 08:04:11 GMT</pubDate>
            <atom:updated>2025-06-16T08:04:11.488Z</atom:updated>
            <content:encoded><![CDATA[<p>As I ventured into machine learning, I found that one of the most essential concepts to grasp early on is the distinction between <strong>regression</strong> and <strong>classification</strong>. Both are supervised learning techniques, but they serve different purposes. While regression deals with predicting continuous values (such as price, temperature, or salary), classification focuses on categorizing input data into predefined classes or labels — for instance, identifying whether an email is spam or not.</p><p>One of the simplest yet effective algorithms for classification is the <strong>K-Nearest Neighbors (KNN)</strong> algorithm. Today, I focused on laying the theoretical groundwork for KNN and began familiarizing myself with the <strong>Iris dataset</strong>, a classic dataset used for classification problems.</p><h3><strong>What is Classification?</strong></h3><p><strong>Classification</strong> is a type of supervised learning where the model learns to categorize data into predefined labels. Some real-world examples include:</p><ul><li>Identifying whether a tumor is benign or malignant</li><li>Predicting whether a customer will churn</li><li>Recognizing handwritten digits</li></ul><p>In classification, the output variable is <strong>categorical</strong>, and the model aims to assign the most probable label to new, unseen data based on the training it received.</p><h3>Introduction to K-Nearest Neighbors (KNN)</h3><p>KNN is a <strong>lazy learning algorithm</strong>, meaning it doesn’t construct an internal model during training. Instead, it memorizes the training dataset and performs computation only when it needs to make a prediction.</p><p>Here’s how KNN works conceptually:</p><ol><li>When a new data point is introduced, the algorithm calculates the distance between this point and all other points in the training dataset.</li><li>It selects the <strong>k</strong> data points that are closest to the new point (using a distance metric like Euclidean distance).</li><li>It assigns the class that appears most frequently among those <strong>k neighbors</strong>.</li></ol><p>This approach makes KNN <strong>intuitive and effective</strong> for smaller datasets, although it can become slow for larger ones since the prediction phase requires comparing to all training data points.</p><h3>Understanding Euclidean Distance</h3><p>The most common way to measure closeness between two points in KNN is the <strong>Euclidean distance</strong>. For two points in 2D space, say (x₁, y₁) and (x₂, y₂), the Euclidean distance is:</p><p>((x2-x1)²+(y2-y1)²)^(1/2)</p><p>In multi-dimensional datasets like Iris, this formula is extended to include all features (sepal length, sepal width, etc.).</p><h3>Exploring the Iris Dataset</h3><p>The <strong>Iris dataset</strong> is one of the most famous datasets in machine learning. It contains 150 samples of iris flowers from three species:</p><ul><li>Iris setosa</li><li>Iris versicolor</li><li>Iris virginica</li></ul><p>Each sample includes the following features:</p><ul><li>Sepal length</li><li>Sepal width</li><li>Petal length</li><li>Petal width</li></ul><p>Each feature is a numerical value, and the goal is to classify the species of a flower based on these measurements.</p><p>Here’s a simple Python snippet to load and inspect the dataset:</p><p>from sklearn.datasets import load_iris</p><p>iris = load_iris()<br>print(“Feature names:”, iris.feature_names)<br>print(“Target names:”, iris.target_names)<br>print(“First five rows of data:\n”, iris.data[:5])<br>print(“First five target values:\n”, iris.target[:5])</p><h3>Learnings from the Day</h3><p>Today, I deepened my understanding of classification and the conceptual functioning of K-Nearest Neighbors (KNN). I now clearly understand:</p><ul><li>The difference between regression and classification</li><li>How KNN makes decisions based on proximity</li><li>The use of distance metrics like Euclidean distance</li><li>The structure and importance of the Iris dataset in machine learning experiments</li></ul><p>This foundational knowledge is essential before diving into model training and evaluation.</p><h3>Challenges I Faced</h3><p>One challenge I faced was visualizing what “closeness” means in multi-dimensional space. While it’s easy to picture KNN in two dimensions, visualizing how it works with four or more features (like in the Iris dataset) was tricky. I used scatter plots and pair plots with seaborn to partially overcome this and better understand feature relationships.</p><p>Another minor difficulty was interpreting the target values from the dataset — since they’re encoded as numbers (0, 1, 2), I had to map them to actual class names to make sense of the outputs.</p><h3>Conclusion</h3><p>Today laid the theoretical groundwork for using KNN effectively. Instead of jumping straight into coding the model, I focused on truly understanding what classification is and how KNN operates under the hood. This knowledge will serve as a strong foundation as I move on to implementing KNN, tuning it with different values of k, and evaluating its performance in the next phases of my journey.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a3f067016181" width="1" height="1" alt=""><hr><p><a href="https://medium.com/intern-elite/understanding-classification-and-the-foundations-of-k-nearest-neighbors-knn-a3f067016181">Understanding Classification and the Foundations of K-Nearest Neighbors (KNN)</a> was originally published in <a href="https://medium.com/intern-elite">Intern Elite</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Exposing Services with Kubernetes Ingress]]></title>
            <link>https://medium.com/intern-elite/exposing-services-with-kubernetes-ingress-4d29e354e526?source=rss----0e0957401f8d---4</link>
            <guid isPermaLink="false">https://medium.com/p/4d29e354e526</guid>
            <category><![CDATA[internship-experience]]></category>
            <category><![CDATA[kubernetes-cluster]]></category>
            <category><![CDATA[kubernetes]]></category>
            <dc:creator><![CDATA[Prahlad Acharya]]></dc:creator>
            <pubDate>Mon, 16 Jun 2025 08:03:46 GMT</pubDate>
            <atom:updated>2025-06-16T08:03:46.496Z</atom:updated>
            <content:encoded><![CDATA[<p>After successfully containerizing the frontend and backend of my chatbot, today I took the next big step: service exposure using Kubernetes Ingress. This is crucial for letting users access your app from a friendly URL like chatbot.local instead of remembering random NodePorts.</p><h3>Objectives</h3><ul><li>Enable Ingress on Minikube</li><li>Create Kubernetes Services for frontend and backend</li><li>Write and apply an Ingress resource</li></ul><h3>Key terms</h3><p><strong>Minikube</strong>: Minikube is a tool that lets you run Kubernetes clusters locally on your machine for development and testing.</p><p><strong>Pod</strong>: A pod is the smallest deployable unit in Kubernetes. It can contain one or more containers that share storage and network resources.</p><p><strong>Deployment</strong>: A Kubernetes Deployment manages the lifecycle of pods. It ensures that the desired number of pod replicas are running at all times.</p><p><strong>Service</strong>: A Service in Kubernetes exposes a set of pods and provides a stable IP or DNS name for accessing them, even if the pod instances change.</p><p><strong>NodePort</strong>: A type of Kubernetes service that exposes the application on a static port on each node’s IP address.</p><p><strong>Ingress</strong>: Ingress manages external access to services in a Kubernetes cluster, typically HTTP. It provides load balancing, SSL termination, and name-based virtual hosting.</p><p><strong>Ingress Controller</strong>: A controller that enforces the rules defined in Ingress resources. NGINX is a commonly used ingress controller.</p><p><strong>ImagePullBackOff</strong>: A Kubernetes error state indicating the cluster is unable to pull the container image from the specified registry.</p><p><strong>kubectl</strong>: The command-line tool for interacting with Kubernetes clusters.</p><p><strong>ClusterIP</strong>: The default Kubernetes service type that exposes the service only within the cluster.</p><h3>Step 1: Enabling Ingress in Minikube</h3><p>Minikube comes with several handy addons. I enabled the NGINX ingress controller with:</p><pre>minikube addons enable ingress</pre><p>This installs and configures the NGINX ingress controller in the ingress-nginx namespace.</p><p>To verify:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ftr61eRqFDALFPlMERBrQQ.png" /></figure><h3>Step 2: Creating Services</h3><p>I created two services:</p><p>backend-chatbot-service (ClusterIP on port 8000)</p><p>&amp;</p><p>frontend-chatbot-service (NodePort on port 80:30997)</p><p>These services allow Kubernetes to route internal traffic to the correct pods.</p><pre>kubectl get svc</pre><h3>Step 3: Ingress YAML Configuration</h3><p>To expose both services under one domain (chatbot.local), I wrote an Ingress manifest chatbot-ingress.yaml:</p><pre>apiVersion: networking.k8s.io/v1<br>kind: Ingress<br>metadata:<br> name: chatbot-ingress<br> annotations:<br> nginx.ingress.kubernetes.io/rewrite-target: /$1<br>spec:<br> ingressClassName: nginx<br> rules:<br> - host: chatbot.local<br> http:<br> paths:<br> - path: /(.*)<br> pathType: ImplementationSpecific<br> backend:<br> service:<br> name: frontend-chatbot-service<br> port:<br> number: 80<br> - path: /api/(.*)<br> pathType: ImplementationSpecific<br> backend:<br> service:<br> name: backend-chatbot-service<br> port:<br> number: 8000</pre><p>️ I learned that paths like /api(/|$)(.*) are not supported with Prefix pathType, so I switched to ImplementationSpecific.</p><h3>Step 4: Local DNS Setup</h3><p>To test the custom domain locally, I added this entry to /etc/hosts:</p><blockquote>192.168.49.2 chatbot.local</blockquote><p>Then accessed it in the browser using <a href="http://chatbot.local/">http://chatbot.local</a>.</p><h3>Bonus: Quick Local Access with kubectl port-forward</h3><p>Sometimes while using ingress, the chatbot.local doesn’t give results during local testing and debugging. So we can use kubectl port-forward.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Jgm-cfYNftWRmB2wg3dcjg.png" /></figure><p>This command forwards traffic from your local machine’s port 8080 to the service’s port 80 inside the Kubernetes cluster.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*s_6bkI9YqvgipwJyQCvx8g.png" /></figure><h3>Troubleshooting &amp; Fixes</h3><p><strong>Backend Pod Not Running:</strong><br>Initially, I got ImagePullBackOff due to a missing image. The image prahlad8ac/backend:latest wasn’t pushed to Docker Hub. After re-building and pushing the correct image, the pod started pulling it (slowly, since the image was large).</p><p><strong>No Active Endpoints:</strong><br>The ingress logs showed Service “default/backend-chatbot-service” does not have any active Endpoint. This happened because the pod wasn’t ready yet. Kubernetes waits until at least one pod is Running.</p><h3>Conclusion</h3><p>Hence, I successfully exposed both the frontend and backend of my chatbot using Kubernetes Ingress, enabling access through a clean and user-friendly domain (chatbot.local). This streamlined routing setup simplifies access, supports scalability, and lays the groundwork for future enhancements. Along the way, I tackled real-world issues like image pull errors and inactive endpoints, reinforcing the importance of careful container image management and pod readiness. With Ingress now configured, my containerized app feels one step closer to production-ready deployment.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4d29e354e526" width="1" height="1" alt=""><hr><p><a href="https://medium.com/intern-elite/exposing-services-with-kubernetes-ingress-4d29e354e526">Exposing Services with Kubernetes Ingress</a> was originally published in <a href="https://medium.com/intern-elite">Intern Elite</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Project: Containerizing with data persistence]]></title>
            <link>https://medium.com/intern-elite/project-containerizing-with-data-persistence-73a92cd6e263?source=rss----0e0957401f8d---4</link>
            <guid isPermaLink="false">https://medium.com/p/73a92cd6e263</guid>
            <category><![CDATA[docker-networking]]></category>
            <category><![CDATA[docker-compose]]></category>
            <category><![CDATA[data-persistence]]></category>
            <category><![CDATA[docker]]></category>
            <dc:creator><![CDATA[Prahlad Acharya]]></dc:creator>
            <pubDate>Mon, 16 Jun 2025 08:03:15 GMT</pubDate>
            <atom:updated>2025-06-17T09:23:05.507Z</atom:updated>
            <content:encoded><![CDATA[<p>In this blog, I’ll share my experience containerizing a full-stack application consisting of a frontend, backend, and database — and crucially, how I achieved data persistence across container restarts. This project not only helped me understand Docker better but also the importance of persistent storage when working with stateful applications.</p><h3>Project Overview</h3><p>The application stack consists of:<br>Frontend: Separate frontend for user and admin based on React<br>Backend: Nodejs/ExpressAPI server<br>Database: Mongodb for storing data</p><h3>Step 1: Containerizing Frontend for User</h3><p>The frontend architecture includes two distinct React apps — one for users and another for admins. In this part of the project, I containerized the user side of the frontend separately, ensuring clear separation of concerns and easier deployment.</p><pre>FROM node:18<br><br>WORKDIR /app<br><br>COPY package*.json ./<br>RUN npm install<br><br>COPY . .<br><br>EXPOSE 5173<br><br>CMD [&quot;npm&quot;, &quot;run&quot;, &quot;dev&quot;, &quot;--&quot;, &quot;--host&quot;]</pre><h3>Step 2- Containerizing Frontend for Admin</h3><p>The user frontend is built using React. I containerized it using the following Dockerfile:</p><pre>FROM node:18<br><br>WORKDIR /app<br><br>COPY package*.json ./<br>RUN npm install<br><br>COPY . .<br><br>EXPOSE 3000<br>CMD [&quot;npm&quot;, &quot;start&quot;]</pre><p>It uses node v18 image. Port 3000 is exposed and the app starts using npm start.</p><h3>Step 3: Containerizing Backend</h3><p>The backend is made using Nodejs/Express API server. The dockerfile is:</p><pre>FROM node:18<br><br>WORKDIR /app<br><br>COPY src/package*.json ./<br>RUN npm install<br><br>COPY src .<br><br>EXPOSE 5000<br>CMD [&quot;npm&quot;, &quot;start&quot;]</pre><p>It uses node v18 image. Port 5000 is exposed and the app starts using npm start.</p><h3>Step 4: Running all components</h3><p>To run everything together, I used the following docker-compose.yml file.</p><pre>version: &quot;3.9&quot;<br>services:<br>  backend:<br>    build:<br>      context: ./backend<br>    ports:<br>      - &quot;5000:5000&quot;<br>    env_file:<br>      - .env<br>    depends_on:<br>      - mongo<br><br>  frontend:<br>    build:<br>      context: ./frontend/admin<br>    ports:<br>      - &quot;3000:3000&quot;<br><br>  user:<br>    build:<br>      context: ./frontend/user<br>    ports:<br>      - &quot;5173:5173&quot;<br><br>  mongo:<br>    image: mongo:6<br>    ports:<br>      - &quot;27017:27017&quot;<br>    volumes:<br>      - mongo-data:/data/db<br><br>volumes:<br>  mongo-data:</pre><p>Here,<br>4 different containers are set up in this file. <br><strong>Backend </strong>builds from ./backend, uses .env file for environment variables, depends on mongo and exposes port 5000.<br><strong>Frontend </strong>which is for admin builds from ./frontend/rest-admin-portal-24 and exposes port 3000.<br><strong>User </strong>which is frontend for users builds from ./frontend/user and exposes port 5173. <br><strong>Mongo</strong> uses official mongo:6 image and exposes port 27017 and also uses volume for data persistence.</p><h3>Step 5: Running the application</h3><p>Once all the dockerfiles and docker-compose.yml file were ready, I ran the entire multi-container application using a single command:</p><pre>docker-compose up --build</pre><p><strong>Accessing the Application:</strong><br>User Frontend: <a href="http://localhost:5173/">http://localhost:5173</a><br>Admin Frontend: <a href="http://localhost:3000/">http://localhost:3000</a><br>Backend API: <a href="http://localhost:5000/">http://localhost:5000</a><br>MongoDB: Running in the background, storing data persistently via the volume mongo-data.</p><h3>Step 6: Verifying Data Persistence</h3><p>The main motive of this project was containerization with data persistence such that the data remained even if the container was stopped or deleted. This is achieved by mounting volume onto the Mongo service.</p><pre>mongo:<br>    image: mongo:6<br>    ports:<br>      - &quot;27017:27017&quot;<br>    volumes:<br>      - mongo-data:/data/db</pre><p>This can be verified by restarting the container. The data is not lost even when the container is restarted or stopped.</p><p>With this, I successfully achieved data persistence in a containerized environment — an essential requirement for any real-world application that stores user or system data.</p><h3><strong>Conclusion</strong></h3><p>In this project, I containerized a full-stack application with separate user and admin frontends, a backend service, and a MongoDB database. Using Docker and Docker Compose, I successfully ran all components in isolated environments while ensuring data persistence through Docker volumes.</p><p>This setup not only improved the modularity of the system but also ensured that data remains safe across container restarts — a critical feature for any real-world deployment.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=73a92cd6e263" width="1" height="1" alt=""><hr><p><a href="https://medium.com/intern-elite/project-containerizing-with-data-persistence-73a92cd6e263">Project: Containerizing with data persistence</a> was originally published in <a href="https://medium.com/intern-elite">Intern Elite</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Understanding Inheritance in Python]]></title>
            <link>https://medium.com/intern-elite/understanding-inheritance-in-python-e6e1c4aa528f?source=rss----0e0957401f8d---4</link>
            <guid isPermaLink="false">https://medium.com/p/e6e1c4aa528f</guid>
            <category><![CDATA[python-inheritance]]></category>
            <dc:creator><![CDATA[Neesha Basnet]]></dc:creator>
            <pubDate>Wed, 11 Jun 2025 14:18:16 GMT</pubDate>
            <atom:updated>2025-06-11T14:18:18.105Z</atom:updated>
            <content:encoded><![CDATA[<p>Python is known for its clean syntax and powerful object-oriented programming (OOP) capabilities. One of the core pillars of OOP is inheritance, a concept that allows you to build new classes based on existing ones.</p><ol><li><strong>What is Inheritance?</strong></li></ol><p>Inheritance allows one class (called the child or subclass) to inherit the properties and behaviors (methods and attributes) of another class (called the parent or superclass).</p><p>This makes it easier to reuse code and build a more hierarchical structure in our application.</p><p><strong>2. Why Use Inheritance?<br></strong>Imagine we’re building a game with different types of characters — like a Warrior, a Mage, and a Healer. All of them have some shared features like name, health, and attack().</p><p>Rather than defining these features separately in every class, we can define them once in a base class (Character) and then have the other classes inherit from it.</p><p><strong>Syntax of Inheritance</strong></p><p>Example:</p><pre>class Animal:<br>    def __init__(self, name):<br>        self.name = name<br><br>    def speak(self):<br>        return f&quot;{self.name} makes a sound.&quot;<br><br>class Dog(Animal):<br>    def speak(self):<br>        return f&quot;{self.name} barks.&quot;<br><br>class Cat(Animal):<br>    def speak(self):<br>        return f&quot;{self.name} meows.&quot;</pre><p>Note:</p><ul><li>Dog and Cat inherit from Animal.</li><li>They override the speak() method with their own implementation.</li></ul><p><strong>* Using super() to Access the Parent</strong><br>Sometimes, you’ll want to use methods from the parent class within the child class. That’s where super() comes in handy.</p><pre>class Bird(Animal):<br>    def speak(self):<br>        parent_sound = super().speak()<br>        return f&quot;{parent_sound} But specifically, {self.name} chirps.&quot;</pre><p><strong>Types of Inheritance in Python</strong><br>Python supports several types of inheritance:</p><ul><li>Single Inheritance — One child class inherits from one parent class.</li><li>Multiple Inheritance — A child class inherits from more than one parent class.</li><li>Multilevel Inheritance — A child class inherits from a class that itself inherited from another class.</li><li>Hierarchical Inheritance — Multiple child classes inherit from the same parent class.</li></ul><p>Here’s an example of multiple inheritance:</p><pre>class Flyer:<br>    def fly(self):<br>        return &quot;Flying high&quot;<br><br>class Swimmer:<br>    def swim(self):<br>        return &quot;Swimming fast&quot;<br><br>class Duck(Flyer, Swimmer):<br>    pass<br><br>d = Duck()<br>print(d.fly())   # Output: Flying high<br>print(d.swim())  # Output: Swimming fast</pre><p>Inheritance is a powerful tool in Python, helping us write cleaner, DRY (Don’t Repeat Yourself), and more organized code. Understanding how and when to use it will level up your programming game, especially when dealing with large, complex systems.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e6e1c4aa528f" width="1" height="1" alt=""><hr><p><a href="https://medium.com/intern-elite/understanding-inheritance-in-python-e6e1c4aa528f">Understanding Inheritance in Python</a> was originally published in <a href="https://medium.com/intern-elite">Intern Elite</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Telnet vs SSH : Managing Cisco Devices Through VTY lines]]></title>
            <link>https://medium.com/intern-elite/telnet-vs-ssh-managing-cisco-devices-through-vty-lines-38416d0f0606?source=rss----0e0957401f8d---4</link>
            <guid isPermaLink="false">https://medium.com/p/38416d0f0606</guid>
            <category><![CDATA[telnet]]></category>
            <category><![CDATA[networking]]></category>
            <category><![CDATA[ssh]]></category>
            <category><![CDATA[cisco]]></category>
            <category><![CDATA[ccna]]></category>
            <dc:creator><![CDATA[Mishan Jung Shah]]></dc:creator>
            <pubDate>Wed, 11 Jun 2025 14:17:57 GMT</pubDate>
            <atom:updated>2025-06-11T14:17:57.152Z</atom:updated>
            <content:encoded><![CDATA[<h3>Telnet vs SSH : Managing Cisco Devices Through VTY lines</h3><p>Remote access to networking devices is a critical part of any network administrator’s workflow. Whether managing a router from another floor or configuring a switch located in a data center, <strong>VTY (Virtual Teletype)</strong> lines make it possible to connect remotely. Two primary methods are used for this access : <strong>Telnet and SSH (Secure Shell).</strong></p><p>Understanding their differences and how to configure each is a key step in building secure, efficient networks.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/763/1*OS9yfDkzaMwhyk2Mhya2CQ.png" /><figcaption>Test for SSH and Telnet</figcaption></figure><h3>What Are VTY Lines?</h3><p>VTY lines are virtual access points that allow administrators to connect to a Cisco device over the network. These lines are commonly used for remote access via Telnet or SSH.</p><p>Cisco devices typically support five VTY lines by default (line vty 0 4), allowing up to five simultaneous remote sessions. Additional lines can be enabled if needed.</p><h3>Telnet Access: Simple but Unsecured</h3><p>Telnet has historically been used to connect remotely to Cisco routers and switches. While functional, it transmits all data — including usernames and passwords — in plaintext.</p><p><strong>Basic Telnet configuration:</strong></p><p>line vty 0 4</p><p>logical local</p><p>transport input telnet</p><p><strong>Risks:</strong></p><p>No encryption</p><p>Vulnerable to packet sniffing and man-in-the-middle attacks</p><p>Due to these security concerns, Telnet is rarely used in modern environments — especially over public or untrusted networks. But it is useful to make yourself familiar with it.</p><h3>SSH Access: Encrypted and Secure</h3><p>SSH (Secure Shell) is the modern, recommended method for remote management. It encrypts all data exchanged between the device and the administrator, making it safe for use over any network.</p><p><strong>Steps to configure SSH on a Cisco device:</strong></p><ol><li>Set a hostname and domain name :</li></ol><p>hostname Sw1</p><p>ip domain-name cisco.com</p><p>2. Generate cryptographic keys :</p><p>crypto key generate rsa</p><p>3. Create local user credentials :</p><p>username cisco password CCNA</p><p>4. Enable SSH and restrict VTY to use it only :</p><p>line vty 0 4</p><p>login local</p><p>transport input ssh</p><p>5. (Optional but recommended) Verify SSH version :</p><p>ip ssh version 2</p><p>SSH not only secures credentials but also protects all command-line input/output from eavesdropping.</p><h3><strong>CONCLUSION</strong></h3><p>Controlling access to networking devices through the VTY lines is fundamental to daily operations. Knowing how to configure both Telnet and SSH provides a strong foundation — but understanding why SSH is preferred is what distinguishes a secure network administration from casual setups.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=38416d0f0606" width="1" height="1" alt=""><hr><p><a href="https://medium.com/intern-elite/telnet-vs-ssh-managing-cisco-devices-through-vty-lines-38416d0f0606">Telnet vs SSH : Managing Cisco Devices Through VTY lines</a> was originally published in <a href="https://medium.com/intern-elite">Intern Elite</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Multicollinearity in Linear Regression & The Bias-Variance Tradeoff: A Deep Dive]]></title>
            <link>https://medium.com/intern-elite/multicollinearity-in-linear-regression-the-bias-variance-tradeoff-a-deep-dive-e0be65ca360a?source=rss----0e0957401f8d---4</link>
            <guid isPermaLink="false">https://medium.com/p/e0be65ca360a</guid>
            <dc:creator><![CDATA[Riya ]]></dc:creator>
            <pubDate>Tue, 10 Jun 2025 09:15:05 GMT</pubDate>
            <atom:updated>2025-06-10T09:15:05.309Z</atom:updated>
            <content:encoded><![CDATA[<p>Machine learning often feels like magic. Feed in data, tweak some parameters, and voilà — predictions. But under the hood, statistics and mathematics quietly dictate how well your model will perform.</p><p>Two of the most important, yet often misunderstood, concepts are:</p><ol><li><strong>Multicollinearity</strong> — lurking silently in your linear models.</li><li><strong>Bias-Variance Tradeoff</strong> — the philosophical heart of why machine learning works — or doesn’t.</li></ol><p>Let’s unpack both with <strong>clear intuition</strong> and practical understanding.</p><h3>Multicollinearity — The Hidden Threat in Linear Regression</h3><h3>What is Multicollinearity?</h3><p>Multicollinearity occurs when two or more independent variables in a regression model are <strong>highly correlated</strong>. This means that they carry <strong>overlapping information</strong> about the target variable.</p><p>Think of it like asking two friends the same question — they’ll likely give you similar answers. That doesn’t necessarily make your decision better; it can actually make it <em>worse</em>.</p><h3>Why is Multicollinearity a Problem?</h3><ol><li><strong>Unstable Coefficient Estimates</strong><br> The model can’t distinguish the individual contribution of correlated variables, causing wild swings in the coefficients depending on the data sample.</li><li><strong>Reduced Interpretability</strong><br> Understanding which feature is actually driving the predictions becomes difficult.</li><li><strong>Inflated Standard Errors</strong><br> This leads to <em>statistically insignificant</em> features even when they <em>should</em> matter.</li></ol><p>Example in Linear Regression:</p><pre>import pandas as pd<br>import statsmodels.api as sm<br><br># Suppose TV and radio ads are highly correlated:<br>df = pd.read_csv(&#39;Advertising.csv&#39;)<br>X = df[[&#39;TV&#39;, &#39;radio&#39;]]<br>y = df[&#39;sales&#39;]<br>X = sm.add_constant(X)<br>model = sm.OLS(y, X).fit()<br>print(model.summary())</pre><p>If <strong>TV</strong> and <strong>radio</strong> advertising budgets are correlated, their coefficients might be <strong>unstable</strong> or nonsensical despite strong overall model fit.</p><h3>Bias-Variance Tradeoff — The Balancing Act of Machine Learning</h3><p>If multicollinearity is a statistical nuisance, <strong>bias</strong> and <strong>variance</strong> are the philosophical pillars of machine learning performance.</p><h3>Understanding Bias and Variance</h3><p><strong>Bias:-</strong>Error due to simplifying assumptions in the model (underfitting)</p><p>Problem it causes:-Misses relevant relations</p><p><strong>Variance:-</strong>Error due to model sensitivity to small fluctuations in the training set (overfitting)</p><p>problem it causes:-Captures noise, poor generalization</p><h3>Visual Intuition: Target Analogy</h3><ul><li><strong>High Bias, Low Variance</strong> → Arrows clustered but far from the target center.</li><li><strong>Low Bias, High Variance</strong> → Arrows scattered wildly, but <em>around</em> the center.</li><li><strong>Low Bias, Low Variance</strong> → Bulls-eye. Goal of any learning algorithm.</li></ul><h3>The Tradeoff in Practice</h3><p>You can’t reduce both bias and variance simultaneously beyond a point:</p><ul><li><strong>Simple models (e.g., Linear Regression)</strong> → High bias, low variance.</li><li><strong>Complex models (e.g., Random Forest, Neural Nets)</strong> → Low bias, high variance.</li></ul><p>Regularization, cross-validation, and ensembling methods are tools to tame this tradeoff.</p><h3>Example:</h3><pre>from sklearn.linear_model import Ridge<br>from sklearn.model_selection import cross_val_score<br>import numpy as np<br><br>alphas = np.logspace(-4, 4, 100)<br>scores = [cross_val_score(Ridge(alpha=a), X, y, cv=5).mean() for a in alphas]</pre><h3>Final Thoughts: Why This Matters</h3><ul><li><strong>Multicollinearity</strong> confuses <em>interpretation</em> in regression.</li><li><strong>Bias-Variance Tradeoff</strong> governs <em>performance</em> in all machine learning.</li></ul><p>Knowing both makes you a more thoughtful, strategic machine learning practitioner — not just someone who tunes models blindly.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e0be65ca360a" width="1" height="1" alt=""><hr><p><a href="https://medium.com/intern-elite/multicollinearity-in-linear-regression-the-bias-variance-tradeoff-a-deep-dive-e0be65ca360a">Multicollinearity in Linear Regression &amp; The Bias-Variance Tradeoff: A Deep Dive</a> was originally published in <a href="https://medium.com/intern-elite">Intern Elite</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Project: Containerization and Docker Networking]]></title>
            <link>https://medium.com/intern-elite/project-containerization-and-docker-networking-e5d8f1b74e74?source=rss----0e0957401f8d---4</link>
            <guid isPermaLink="false">https://medium.com/p/e5d8f1b74e74</guid>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[docker-networking]]></category>
            <category><![CDATA[docker-compose]]></category>
            <dc:creator><![CDATA[Prahlad Acharya]]></dc:creator>
            <pubDate>Tue, 10 Jun 2025 09:14:46 GMT</pubDate>
            <atom:updated>2025-06-10T09:14:46.397Z</atom:updated>
            <content:encoded><![CDATA[<p>In this project, I containerized a simple web interface (Frontend) and a RAG-powered chatbot (Backend) using Docker inside Ubuntu WSL. Then, I created a custom Docker bridge network to allow the frontend to communicate with the backend’s API.</p><p>The goal was to simulate a microservice architecture where the frontend makes API requests to a chatbot backend, receives a response, and displays it in the browser — all within my local development environment.</p><p>The RAG chatbot (backend) and the simple web interface (frontend) were already developed by me during my Major project. The main objective of this project is to containerize them separately and establish a connection between them to create a fully functioning website with a Q&amp;A feature.</p><h3>Containerizing Backend</h3><p>To containerize the backend, we need a Dockerfile that defines the steps to build a Docker image. This image will include everything required to run the chatbot, such as system packages, Python dependencies, project files, and the knowledge base. Below is the breakdown of a basic Dockerfile:</p><pre># Use a Python base image, light one is recommended<br>FROM python:3.10-slim<br><br># Set working directory<br>WORKDIR /app<br># Install system dependencies<br>RUN apt-get update &amp;&amp; apt-get install -y \<br>    build-essential \<br>    libglib2.0-0 \<br>    libsm6 \<br>    libxext6 \<br>    libxrender-dev \<br>    &amp;&amp; rm -rf /var/lib/apt/lists/*<br># Install Python dependencies<br># Starting with the requirements for the application <br>COPY requirements.txt .<br># Knowledge base is copied into the container<br>COPY Knowledge_Base.pdf /app/<br>#Installation is carried on based on the requirements.txt file<br>RUN pip install --upgrade pip &amp;&amp; pip install --no-cache-dir -r requirements.txt<br># Copy project files<br>COPY . .<br># Expose the port<br>EXPOSE 8000<br># Run the server (development: `runserver`, production: `gunicorn`)<br>CMD [&quot;python&quot;, &quot;manage.py&quot;, &quot;runserver&quot;, &quot;0.0.0.0:8000&quot;]</pre><h3>Creating Docker-compose file</h3><p>Starting both containers separately can be tedious, so we create a docker-compose.yml file that defines all services and their configurations.</p><pre># docker-compose.yml file<br><br>version: &#39;3.8&#39;<br><br>services:<br>  rag-backend:<br>    image: backend  <br>    container_name: rag-backend<br>    ports:<br>      - &quot;8000:8000&quot;  <br>    networks:<br>      - rag-network<br><br>  rag-frontend:<br>      build: ./Frontend<br>      container_name: rag-frontend<br>      ports:<br>        - &quot;8080:80&quot;<br>      networks:<br>        - rag-network<br><br>networks:<br>  rag-network:<br>    driver: bridge</pre><p>Here, the image for frontend is built during startup as it is loghtweight. Both backend and frontend uses custom bridge network named rag-network. Frontend is exposed to port 8080 and backend is exposed to port 8000.</p><h3>Communication between Containers</h3><p>As both containers share same docker network, they can simply communicate with their service names. This eliminates the need to use IP addresses or localhost within the containers, enabling smooth inter-container communication in a microservices setup. Docker’s embedded DNS resolves the service name to the backend container’s IP address on this network.</p><p>Here is the code snippet from frontend that hits the backend API.</p><pre>const response = await fetch(&quot;http://rag-backend:8000/chatbot/chatbotresponse&quot;, {<br>          method: &quot;POST&quot;,<br>          headers: {<br>            &quot;Content-Type&quot;: &quot;application/json&quot;<br>          },<br>          body: JSON.stringify({ prompt: message })<br>        });</pre><h3><strong>Checking the chatbot</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OD8QvT2aJSCXpgqmMGrAlA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IRlIxTO_7eeJwWX7997prg.png" /></figure><h3>Conclusion</h3><p>Hence, this project demonstrates how to containerize the frontend and backend separately, create a docker-compose.yml file to build and manage the services, and use a Docker network to enable seamless communication between different components. This approach provides a practical foundation for simulating a microservice architecture and helps in understanding how containerized applications can interact effectively within a local development environment.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e5d8f1b74e74" width="1" height="1" alt=""><hr><p><a href="https://medium.com/intern-elite/project-containerization-and-docker-networking-e5d8f1b74e74">Project: Containerization and Docker Networking</a> was originally published in <a href="https://medium.com/intern-elite">Intern Elite</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Understanding Multiple Linear Regression using Python and scikit-learn]]></title>
            <link>https://medium.com/intern-elite/understanding-multiple-linear-regression-using-python-and-scikit-learn-af28918638d9?source=rss----0e0957401f8d---4</link>
            <guid isPermaLink="false">https://medium.com/p/af28918638d9</guid>
            <dc:creator><![CDATA[Riya ]]></dc:creator>
            <pubDate>Sun, 08 Jun 2025 12:56:37 GMT</pubDate>
            <atom:updated>2025-06-08T12:56:40.032Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction</h3><p>Multiple Linear Regression (MLR) extends simple linear regression to model a continuous outcome <strong>y</strong> based on multiple predictors <strong>X₁, X₂, …, Xₙ</strong>. Rather than fitting a line, we fit a <strong>hyperplane</strong> that best minimizes the sum of squared errors.</p><h3>Why Use MLR?</h3><ul><li><strong>Rich insight</strong>: Estimate the partial effect of each feature on the outcome.</li><li><strong>Better predictions</strong>: Exploit information from multiple variables simultaneously.</li><li><strong>Versatility</strong>: Used in diverse domains, e.g., house prices, sales forecasting, biomedical measurements.</li></ul><h3>The Model Equation</h3><p>y=β0+β1X1+β2X2+⋯+βnXn+εy</p><p>Where each <strong>βᵢ</strong> is estimated to minimize the residual sum of squares from the observed <strong>y</strong> values.</p><h3>Assumptions</h3><p>Before building the model, ensure:</p><ol><li><strong>Linearity</strong>: Predictors have a linear relationship with <strong>y</strong>.</li><li><strong>Independence</strong>: Each observation is independent.</li><li><strong>Homoscedasticity</strong>: Residuals have consistent variance.</li><li><strong>Normality of errors</strong>: Residuals are normally distributed.</li><li><strong>No multicollinearity</strong>: Predictors shouldn’t be highly correlated.</li></ol><h3>Step-by-Step with scikit-learn</h3><p>Here’s how to implement MLR in Python using scikit-learn:</p><pre>import pandas as pd<br>import numpy as np<br>from sklearn.model_selection import train_test_split<br>from sklearn.linear_model import LinearRegression<br>from sklearn.metrics import mean_squared_error, r2_score<br><br># Load data<br>:contentReference[oaicite:18]{index=18}<br><br># Pre-process (e.g., one-hot encode categorical features)<br>:contentReference[oaicite:19]{index=19}<br><br>:contentReference[oaicite:20]{index=20}<br>:contentReference[oaicite:21]{index=21}<br><br># Split into train/test<br>:contentReference[oaicite:22]{index=22}<br>    :contentReference[oaicite:23]{index=23}<br><br># Train the model<br>model = LinearRegression()<br>:contentReference[oaicite:24]{index=24}<br><br># Predict<br>:contentReference[oaicite:25]{index=25}<br><br># Evaluate<br>:contentReference[oaicite:26]{index=26}<br>:contentReference[oaicite:27]{index=27}<br><br>:contentReference[oaicite:28]{index=28}<br>:contentReference[oaicite:29]{index=29}<br>:contentReference[oaicite:30]{index=30}</pre><ul><li>LinearRegression().fit(X, y) handles the coefficient estimation.</li><li>Use get_dummies() or ColumnTransformer for encoding categoricals.</li><li>Measure performance via <strong>MSE</strong> and <strong>R²</strong> (coefficient of determination).</li></ul><h3>Interpreting Outputs</h3><ul><li><strong>Intercept (</strong><strong>β₀)</strong>: Expected value of <strong>y</strong> when all predictors are zero.</li><li><strong>Coefficients (</strong><strong>βᵢ)</strong>: Change in <strong>y</strong> for a one-unit increase in <strong>Xᵢ</strong>, holding others constant.</li><li><strong>R²</strong> tells how much variance in <strong>y</strong> is explained by the model.</li></ul><h3>Final Thoughts</h3><p>Multiple Linear Regression is a foundational and interpretable method — ideal when your problem has a linear structure and you seek explainability. Packages like scikit-learn and statsmodels make it practical and accessible. With good preprocessing and diagnostic checks, it provides reliable insights and predictive performance.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=af28918638d9" width="1" height="1" alt=""><hr><p><a href="https://medium.com/intern-elite/understanding-multiple-linear-regression-using-python-and-scikit-learn-af28918638d9">Understanding Multiple Linear Regression using Python and scikit-learn</a> was originally published in <a href="https://medium.com/intern-elite">Intern Elite</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>