<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Suryavanshiathrav on Medium]]></title>
        <description><![CDATA[Stories by Suryavanshiathrav on Medium]]></description>
        <link>https://medium.com/@suryavanshiathrav072?source=rss-311e1bfcd59b------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*h-YXEPZKM8nftZke</url>
            <title>Stories by Suryavanshiathrav on Medium</title>
            <link>https://medium.com/@suryavanshiathrav072?source=rss-311e1bfcd59b------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 04 Dec 2026 17:15:29 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@suryavanshiathrav072/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Steps Before Training a Machine Learning Model: A Complete Guide to Data Preparation]]></title>
            <link>https://medium.com/@suryavanshiathrav072/steps-before-training-a-machine-learning-model-a-complete-guide-to-data-preparation-88a6bab2f86b?source=rss-311e1bfcd59b------2</link>
            <guid isPermaLink="false">https://medium.com/p/88a6bab2f86b</guid>
            <category><![CDATA[feature-engineering]]></category>
            <category><![CDATA[dataset-train-ml-model]]></category>
            <category><![CDATA[prepare-dataset]]></category>
            <category><![CDATA[cleaningeda]]></category>
            <category><![CDATA[pre-processing]]></category>
            <dc:creator><![CDATA[Suryavanshiathrav]]></dc:creator>
            <pubDate>Thu, 30 Jul 2026 11:11:08 GMT</pubDate>
            <atom:updated>2026-07-30T11:11:08.174Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Author:</strong> <strong>Atharv Milind Suryavanshi</strong></p><h3>Introduction</h3><p>Machine Learning (ML) has transformed the way businesses, researchers, and developers solve real-world problems. From predicting house prices and detecting fraud to recommending movies and diagnosing diseases, ML models have become an essential part of modern technology.</p><p>However, one common misconception among beginners is that the machine learning algorithm is the most important part of the process. In reality, experienced data scientists often spend <strong>70–80% of their time preparing data</strong> and only <strong>20–30% training and evaluating models</strong>.</p><p>A machine learning model is only as good as the data used to train it. Even the most advanced algorithms, such as Random Forest, XGBoost, or Deep Neural Networks, cannot produce reliable predictions if the dataset contains missing values, duplicate records, inconsistent formatting, irrelevant features, or noisy data.</p><p>This article provides a complete guide to every step that should be performed <strong>before training a machine learning model</strong>. By understanding and applying these steps correctly, you can significantly improve model accuracy, reliability, and generalization.</p><h3>Complete Machine Learning Data Preparation Pipeline</h3><pre>Collect Dataset<br>        ↓<br>Understand Dataset<br>        ↓<br>Data Cleaning<br>        ↓<br>Exploratory Data Analysis (EDA)<br>        ↓<br>Feature Engineering<br>        ↓<br>Feature Selection<br>        ↓<br>Data Preprocessing<br>        ↓<br>Split Dataset<br>        ↓<br>Train Machine Learning Model</pre><p>Every stage in this pipeline has a specific purpose and contributes to building a high-quality machine learning model.</p><h3>1. Collect Dataset</h3><h3>What is Dataset Collection?</h3><p>Dataset collection is the process of gathering relevant information that will be used for model training. The quality, quantity, and relevance of the collected data directly influence the model’s performance.</p><p>The objective is not simply to collect a large amount of data but to collect <strong>accurate, representative, and unbiased</strong> data that reflects the real-world problem.</p><h3>Common Sources of Datasets</h3><p>Machine learning datasets can come from many different sources, including:</p><ul><li>CSV files</li><li>Excel spreadsheets</li><li>SQL and NoSQL databases</li><li>REST APIs</li><li>Public repositories (Kaggle, UCI Machine Learning Repository)</li><li>IoT devices and sensors</li><li>Company ERP or CRM systems</li><li>Web scraping</li><li>Surveys and questionnaires</li><li>Mobile applications</li></ul><h3>Example</h3><pre>import pandas as pd</pre><pre>df = pd.read_csv(&quot;insurance.csv&quot;)</pre><h3>Things to Verify</h3><p>Before using the dataset, ask the following questions:</p><ul><li>Is the dataset complete?</li><li>Is it relevant to the business problem?</li><li>Does it contain enough samples?</li><li>Are all important variables present?</li><li>Is the target variable clearly defined?</li><li>Is the data recent?</li><li>Does it contain sensitive or private information?</li></ul><h3>Why Dataset Collection Matters</h3><p>Poor-quality data inevitably leads to poor-quality predictions. This concept is commonly known as <strong>Garbage In, Garbage Out (GIGO)</strong>.</p><h3>2. Understand the Dataset</h3><p>Once the dataset has been collected, the next step is understanding its structure.</p><p>This stage allows data scientists to identify potential problems before preprocessing begins.</p><h3>Examine the Dataset</h3><pre>df.head()<br>df.tail()</pre><p>These functions display the first and last few records, helping identify formatting issues.</p><h3>Dataset Dimensions</h3><pre>df.shape</pre><p>Example:</p><pre>(1338, 7)</pre><p>Meaning:</p><ul><li>1338 observations</li><li>7 variables</li></ul><h3>View Column Names</h3><pre>df.columns</pre><p>Example:</p><pre>Age<br>Sex<br>BMI<br>Children<br>Smoker<br>Region<br>Charges</pre><h3>Data Types</h3><pre>df.info()</pre><p>Output:</p><pre>Age          int64<br>Sex          object<br>BMI          float64<br>Charges      float64</pre><p>Understanding data types helps identify:</p><ul><li>Numerical variables</li><li>Categorical variables</li><li>Boolean variables</li><li>Date/time variables</li></ul><h3>Statistical Summary</h3><pre>df.describe()</pre><p>Important statistics include:</p><ul><li>Mean</li><li>Median</li><li>Standard Deviation</li><li>Minimum</li><li>Maximum</li><li>Quartiles</li></ul><p>These values often reveal unusual observations or outliers.</p><h3>Identify Missing Values</h3><pre>df.isnull().sum()</pre><h3>Identify Unique Values</h3><pre>df.nunique()</pre><h3>Class Distribution</h3><p>For classification datasets:</p><pre>df[&quot;Smoker&quot;].value_counts()</pre><p>Checking class balance is essential before training.</p><h3>3. Data Cleaning</h3><p>Raw datasets are rarely perfect. Data cleaning transforms raw data into reliable and usable information.</p><h3>Handle Missing Values</h3><p>Missing values occur due to:</p><ul><li>Human error</li><li>Sensor failures</li><li>System crashes</li><li>Incomplete surveys</li></ul><p>Example:</p><pre>df.isnull().sum()</pre><p>Solutions include:</p><h3>Mean Imputation</h3><pre>df[&quot;BMI&quot;].fillna(df[&quot;BMI&quot;].mean(), inplace=True)</pre><h3>Median Imputation</h3><pre>df[&quot;BMI&quot;].fillna(df[&quot;BMI&quot;].median(), inplace=True)</pre><h3>Mode Imputation</h3><pre>df[&quot;Gender&quot;].fillna(df[&quot;Gender&quot;].mode()[0], inplace=True)</pre><h3>Remove Missing Records</h3><pre>df.dropna(inplace=True)</pre><h3>Remove Duplicate Records</h3><pre>df.duplicated().sum()</pre><p>Remove duplicates:</p><pre>df.drop_duplicates(inplace=True)</pre><h3>Correct Data Types</h3><p>Incorrect data types reduce analysis quality.</p><p>Example:</p><pre>&quot;25&quot;</pre><p>Convert to integer:</p><pre>df[&quot;Age&quot;] = df[&quot;Age&quot;].astype(int)</pre><h3>Standardize Categories</h3><p>Incorrect labels:</p><pre>Male<br>male<br>MALE</pre><p>Correct them:</p><pre>df[&quot;Gender&quot;] = df[&quot;Gender&quot;].str.lower()</pre><h3>Detect Outliers</h3><p>Outliers are unusually large or small values.</p><p>Detection methods include:</p><ul><li>Box Plot</li><li>IQR Method</li><li>Z-Score</li><li>Domain Expertise</li></ul><p>Example:</p><pre>df.boxplot()</pre><p>Outliers should only be removed when justified by business knowledge.</p><h3>4. Exploratory Data Analysis (EDA)</h3><p>EDA is the process of discovering patterns, trends, relationships, and anomalies in data before model training.</p><p>It helps answer questions such as:</p><ul><li>Which variables are important?</li><li>Are there strong relationships?</li><li>Are there unusual distributions?</li><li>Are classes balanced?</li></ul><h3>Univariate Analysis</h3><p>Study one variable.</p><p>Examples:</p><ul><li>Age distribution</li><li>BMI distribution</li><li>Salary distribution</li></ul><p>Visualization:</p><pre>df[&quot;Age&quot;].hist()</pre><h3>Bivariate Analysis</h3><p>Study relationships between two variables.</p><p>Example:</p><p>Age vs Charges</p><pre>plt.scatter(df[&quot;Age&quot;], df[&quot;Charges&quot;])</pre><h3>Correlation Analysis</h3><pre>df.corr(numeric_only=True)</pre><p>Visualization:</p><pre>sns.heatmap(df.corr(numeric_only=True), annot=True)</pre><p>Strong positive correlation approaches +1, strong negative correlation approaches -1, and values near 0 indicate little or no linear relationship.</p><h3>Categorical Analysis</h3><pre>sns.countplot(data=df, x=&quot;Smoker&quot;)</pre><h3>Multivariate Analysis</h3><p>Analyze three or more variables simultaneously.</p><p>Example:</p><ul><li>Age</li><li>BMI</li><li>Charges</li></ul><p>colored by smoker status.</p><h3>5. Feature Engineering</h3><p>Feature Engineering is the process of creating new variables that improve model performance.</p><p>Examples include:</p><ul><li>BMI Categories</li><li>Age Groups</li><li>Income Levels</li><li>Date Features</li><li>Interaction Features</li><li>Polynomial Features</li><li>Log Transformations</li></ul><p>Example:</p><pre>Age = 45</pre><pre>↓</pre><pre>Age Group = Adult</pre><p>Better features often lead to better models.</p><h3>6. Feature Selection</h3><p>Not every variable contributes useful information.</p><p>Irrelevant features increase computation time and may reduce model performance.</p><p>Common feature selection techniques include:</p><h3>Pearson Correlation</h3><p>Used for numerical variables.</p><h3>Chi-Square Test</h3><p>Used for categorical variables.</p><h3>ANOVA</h3><p>Compares numerical features across categorical classes.</p><h3>Mutual Information</h3><p>Measures both linear and non-linear relationships.</p><h3>Recursive Feature Elimination (RFE)</h3><p>Automatically removes weak features.</p><h3>Tree-Based Feature Importance</h3><p>Algorithms such as Random Forest rank features according to predictive importance.</p><h3>7. Data Preprocessing</h3><p>The cleaned dataset must now be converted into a format suitable for machine learning algorithms.</p><h3>Encoding</h3><p>Machine learning algorithms cannot directly process text values.</p><h3>Label Encoding</h3><pre>Male → 0</pre><pre>Female → 1</pre><h3>One-Hot Encoding</h3><pre>Region</pre><pre>↓</pre><pre>Region_North<br>Region_South<br>Region_East<br>Region_West</pre><h3>Feature Scaling</h3><p>Many algorithms perform better when numerical variables have similar scales.</p><h3>Standardization</h3><p>Produces data with:</p><ul><li>Mean = 0</li><li>Standard Deviation = 1</li></ul><p>Used by:</p><ul><li>Logistic Regression</li><li>SVM</li><li>Neural Networks</li></ul><h3>Normalization</h3><p>Scales values between 0 and 1.</p><p>Used by:</p><ul><li>KNN</li><li>K-Means</li></ul><h3>Handle Imbalanced Classes</h3><p>Classification datasets often contain uneven class distributions.</p><p>Solutions include:</p><ul><li>SMOTE</li><li>Random Oversampling</li><li>Random Undersampling</li><li>Class Weight Adjustment</li></ul><h3>8. Split the Dataset</h3><p>The dataset should be divided so the model can be evaluated on unseen data.</p><p>Common splits include:</p><pre>80% Training</pre><pre>20% Testing</pre><p>or</p><pre>70% Training</pre><pre>15% Validation</pre><pre>15% Testing</pre><p>Example:</p><pre>from sklearn.model_selection import train_test_split</pre><pre>X = df.drop(&quot;Charges&quot;, axis=1)<br>y = df[&quot;Charges&quot;]</pre><pre>X_train, X_test, y_train, y_test = train_test_split(<br>    X,<br>    y,<br>    test_size=0.2,<br>    random_state=42<br>)</pre><p>The training set is used to learn patterns, the validation set is used for tuning (when applicable), and the test set provides an unbiased estimate of model performance.</p><h3>Why These Steps Matter</h3><p>Skipping data preparation often results in:</p><ul><li>Lower model accuracy</li><li>Overfitting</li><li>Underfitting</li><li>Biased predictions</li><li>Poor generalization</li><li>Increased computational cost</li></ul><p>By following a structured preparation pipeline, the model learns from high-quality, consistent, and meaningful data.</p><h3>Best Practices</h3><ul><li>Clearly understand the business problem before collecting data.</li><li>Keep raw data unchanged and perform preprocessing on a working copy.</li><li>Document every cleaning and transformation step.</li><li>Use visualizations to understand the data before modeling.</li><li>Apply feature engineering only when it adds meaningful information.</li><li>Avoid data leakage by fitting preprocessing steps only on the training data.</li><li>Evaluate multiple models instead of relying on a single algorithm.</li><li>Validate results using cross-validation whenever possible.</li></ul><h3>Conclusion</h3><p>Data preparation is the foundation of every successful machine learning project. Although algorithms often receive the most attention, the quality of the data determines the quality of the final model. By systematically collecting, understanding, cleaning, exploring, engineering, selecting, preprocessing, and splitting the dataset, data scientists create reliable inputs that allow machine learning algorithms to discover meaningful patterns and make accurate predictions.</p><p>Whether you are working on healthcare analytics, financial forecasting, recommendation systems, or computer vision, mastering these preprocessing steps will significantly improve both model performance and your effectiveness as a machine learning practitioner.</p><p><strong>Author</strong></p><p><strong>Atharv Milind Suryavanshi</strong></p><p><em>Machine Learning | Data Analytics | AI Development | Software Engineering</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=88a6bab2f86b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[From Semester 4 to Semester 5: A New Chapter Begins ]]></title>
            <link>https://medium.com/@suryavanshiathrav072/from-semester-4-to-semester-5-a-new-chapter-begins-19abae6d5cc8?source=rss-311e1bfcd59b------2</link>
            <guid isPermaLink="false">https://medium.com/p/19abae6d5cc8</guid>
            <dc:creator><![CDATA[Suryavanshiathrav]]></dc:creator>
            <pubDate>Mon, 29 Jun 2026 07:01:16 GMT</pubDate>
            <atom:updated>2026-06-29T07:01:16.687Z</atom:updated>
            <content:encoded><![CDATA[<p>Every semester brings new lessons, challenges, and opportunities to grow. Looking back at my 4th semester, I’m grateful for the knowledge I gained, the skills I developed, and the experiences that shaped my journey. Receiving my results was a reminder that consistent effort always pays off and that every challenge is a stepping stone toward improvement.</p><p>Now, as I begin my 5th semester, I’m excited to explore subjects like <strong>Operating Systems, Software Engineering, Data Analytics, Entrepreneurship Development, and my 12-week Internship</strong>. This semester, my focus is not just on achieving good grades but on building practical skills, working on real-world projects, earning industry certifications, and strengthening my foundation in <strong>Data Science, Data Analytics, Python, and AI</strong>.</p><p>My goal is simple: <strong>learn consistently, build impactful projects, and grow into an industry-ready data professional.</strong></p><p>Here’s to another semester of learning, growth, and new opportunities. The journey continues! 🚀</p><p><em>Thank you for reading. Feel free to follow my journey as I share my learning, projects, and experiences in tech.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=19abae6d5cc8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Intro to Myself]]></title>
            <link>https://medium.com/@suryavanshiathrav072/intro-to-myself-11b82877bc6a?source=rss-311e1bfcd59b------2</link>
            <guid isPermaLink="false">https://medium.com/p/11b82877bc6a</guid>
            <category><![CDATA[myself]]></category>
            <dc:creator><![CDATA[Suryavanshiathrav]]></dc:creator>
            <pubDate>Sat, 27 Jun 2026 07:44:05 GMT</pubDate>
            <atom:updated>2026-06-27T07:44:05.434Z</atom:updated>
            <content:encoded><![CDATA[<p>This is my first blog on hte medium after creating the Medium account. In this blog i want to give the intro to myself. Hi, I am Atharv Milind Suryavanshi. I am the Student of the Diploma in Computer Science and Engineering at the DKTE Society’s Yashwantrao Chavan Polytechnic, Ichalkaranji. I am the Third Year Student doing the internship of 12 weeks at the Soft Tech training Institute, Sangli in Data Analytics &amp; Data Science. 4 weeks of internship is completed. I got 95.65 % mark in 4th semester.</p><p>I live in Kurundwad Dist.- Kolhapur, State-Maharastra.</p><p>Thank You.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=11b82877bc6a" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>