<?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 Syed Muhammad Shahir Ul Haq on Medium]]></title>
        <description><![CDATA[Stories by Syed Muhammad Shahir Ul Haq on Medium]]></description>
        <link>https://medium.com/@syed_shahir?source=rss-d05dd16de0b3------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*8z18ZKsOVHSI3i0m2iBvXg.jpeg</url>
            <title>Stories by Syed Muhammad Shahir Ul Haq on Medium</title>
            <link>https://medium.com/@syed_shahir?source=rss-d05dd16de0b3------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 05:06:33 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@syed_shahir/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[Week 6 Bytewise Fellowship Report]]></title>
            <link>https://medium.com/@syed_shahir/week-6-bytewise-fellowship-report-b375bef757ff?source=rss-d05dd16de0b3------2</link>
            <guid isPermaLink="false">https://medium.com/p/b375bef757ff</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[supervised-learning]]></category>
            <category><![CDATA[bytewise]]></category>
            <category><![CDATA[classification]]></category>
            <category><![CDATA[syed-shahir]]></category>
            <dc:creator><![CDATA[Syed Muhammad Shahir Ul Haq]]></dc:creator>
            <pubDate>Sat, 24 Aug 2024 05:14:37 GMT</pubDate>
            <atom:updated>2024-08-24T05:14:37.039Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-U14Zku7eJODHQEcqRaSZw.png" /></figure><h3><strong>Introduction</strong></h3><p>This week in the Bytewise Fellowship Program was packed with diverse machine-learning tasks that deepened my understanding of various algorithms and evaluation techniques. From logistic regression to decision trees, and random forests to gradient boosting, each task provided valuable insights into the nuances of machine learning model development. Here’s a detailed look at the tasks undertaken, the concepts learned, and the outcomes achieved.</p><h3>Main Machine Learning Concepts</h3><ol><li><strong>Logistic Regression</strong></li></ol><p><strong>Description</strong>: Logistic regression is a statistical model used for binary(commonly) classification tasks. It estimates the probability of a binary outcome based on one or more predictor variables. The logistic function (sigmoid) maps predicted values to a probability between 0 and 1.</p><p><strong>Key Metrics</strong>:</p><ul><li><strong>Accuracy</strong>: The ratio of correctly predicted instances to the total instances.</li><li><strong>Precision</strong>: The ratio of true positives to the sum of true positives and false positives.</li><li><strong>Recall</strong>: The ratio of true positives to the sum of true positives and false negatives.</li><li><strong>F1-Score</strong>: The harmonic mean of precision and recall, providing a balance between the two.</li></ul><p><strong>2. Decision Trees</strong></p><p><strong>Description</strong>: Decision trees are a non-parametric model used for classification and regression. They split the data into subsets based on feature values to form a tree-like structure of decisions. Each internal node represents a feature, each branch represents a decision rule, and each leaf node represents an outcome.</p><p><strong>Key Metrics</strong>:</p><ul><li><strong>Confusion Matrix</strong>: A table used to describe the performance of a classification model by showing true positives, true negatives, false positives, and false negatives.</li><li><strong>ROC Curve</strong>: A graphical plot of the true positive rate against the false positive rate at various threshold settings.</li><li><strong>AUC (Area Under the Curve)</strong>: A measure of the model’s ability to distinguish between classes; higher AUC indicates better model performance.</li></ul><p><strong>3. Cross-Validation</strong></p><p><strong>Description</strong>: Cross-validation is a technique used to assess the generalizability of a model by dividing the dataset into multiple subsets or “folds”. The model is trained on some folds and tested on others. Common methods include k-fold cross-validation, where the data is split into k subsets, and each subset is used as a test set while the remaining k-1 subsets are used for training.</p><p><strong>Benefits</strong>: Provides a more reliable estimate of model performance compared to a single train-test split, as it evaluates the model on multiple folds of the data.</p><p><strong>4. Overfitting and Underfitting</strong></p><p><strong>Description</strong>:</p><p><strong>Overfitting</strong>: Occurs when a model learns the noise or random fluctuations in the training data rather than the underlying pattern. It results in high accuracy on the training data but poor performance on unseen data.</p><p><strong>Underfitting</strong>: Occurs when a model is too simple to capture the underlying patterns in the data. It results in poor performance on both training and test data.</p><p><strong>Detection</strong>: Analyzed by plotting training and validation errors or accuracies with varying model complexities.</p><p><strong>5. Random Forest</strong></p><p><strong>Description</strong>: Random Forest is an ensemble learning method that constructs multiple decision trees during training and outputs the mode of the classes (for classification) or mean prediction (for regression) of the individual trees. It helps in improving model accuracy and robustness.</p><p><strong>Key Metrics</strong>:</p><ul><li><strong>Cross-Validation</strong>: Used to evaluate model stability and performance by averaging results across multiple folds.</li></ul><p><strong>6. Gradient Boosting</strong></p><p><strong>Description</strong>: Gradient Boosting is an ensemble technique that builds models sequentially, each new model correcting errors made by the previous ones. It combines weak learners (typically decision trees) to create a strong learner by minimizing the loss function iteratively.</p><p><strong>Key Metrics</strong>:</p><ul><li><strong>ROC Curve and AUC</strong>: Evaluates the model’s performance in distinguishing between classes.</li></ul><p><strong>7. Precision, Recall, and F1-Score</strong></p><ul><li><strong>Precision</strong>: Measures the accuracy of positive predictions. High precision indicates fewer false positives.</li><li><strong>Recall</strong>: Measures the ability of a model to find all relevant instances. High recall indicates fewer false negatives.</li><li><strong>F1-Score</strong>: A combined metric that balances precision and recall, useful for imbalanced datasets where one class may be more important than the other.</li></ul><p><strong>8. Model Performance Metrics</strong></p><ul><li><strong>Accuracy</strong>: The proportion of correctly classified instances among the total instances.</li><li><strong>Confusion Matrix</strong>: Helps in understanding the types of errors made by the model by showing a breakdown of true positives, true negatives, false positives, and false negatives.</li></ul><p><strong>9. Comparing Models</strong></p><ul><li><strong>Concept</strong>: Involves evaluating different models (e.g., SVM, random forest, gradient boosting) based on various metrics such as accuracy, precision, recall, F1-score, and ROC-AUC. This helps in selecting the best model based on performance and suitability for the given task.</li></ul><h3>About Tasks:</h3><h3><strong>Task 1: Predictive Modeling and Classification</strong></h3><p><strong>1.1) Predicting Diabetes Onset Using Logistic Regression</strong></p><ul><li><strong>Concepts Covered</strong>: Logistic Regression, Model Evaluation Metrics</li><li><strong>Learning Outcomes</strong>: Implemented logistic regression to predict diabetes onset. Evaluated the model using accuracy, precision, and recall. This task reinforced the importance of choosing the right metrics for binary classification problems to understand model performance beyond mere accuracy.</li></ul><p><strong>1.2) Classifying Iris Species Using Decision Trees</strong></p><ul><li><strong>Concepts Covered</strong>: Decision Trees, Confusion Matrix</li><li><strong>Learning Outcomes</strong>: Applied a decision tree classifier to classify iris species. Used a confusion matrix and accuracy to evaluate model performance. Learned how decision trees can be visualized and the impact of model depth on performance.</li></ul><p><strong>1.3) Predicting Titanic Survival Using Logistic Regression</strong></p><ul><li><strong>Concepts Covered</strong>: Logistic Regression, ROC-AUC</li><li><strong>Learning Outcomes</strong>: Implemented logistic regression to predict Titanic survival. Evaluated the model using ROC-AUC, which provided a comprehensive view of the model’s performance across various thresholds.</li></ul><p><strong>1.4) Classifying Emails as Spam Using Decision Trees</strong></p><ul><li><strong>Concepts Covered</strong>: Decision Trees, Precision, Recall, F1-Score</li><li><strong>Learning Outcomes</strong>: Built a decision tree classifier to identify spam emails. Evaluated performance using precision, recall, and F1-score. This task highlighted the importance of these metrics in handling imbalanced datasets.</li></ul><p><strong>1.5) Predicting Customer Satisfaction Using Logistic Regression</strong></p><ul><li><strong>Concepts Covered</strong>: Logistic Regression, Accuracy, Confusion Matrix</li><li><strong>Learning Outcomes</strong>: Predicted customer satisfaction and evaluated the model using accuracy and a confusion matrix. This exercise emphasized how logistic regression can be used for binary classification tasks and the need for a balanced evaluation approach.</li></ul><h4><a href="https://github.com/Syed-Shahir/100DaysOfBytewise/blob/main/BTW_W6_Task1.ipynb">Check out the Jupyter Notebook with codes and graphs</a></h4><h3><strong>Task 2: Advanced Classification and Model Evaluation</strong></h3><p><strong>2.1) Predicting Employee Attrition Using Logistic Regression</strong></p><ul><li><strong>Concepts Covered</strong>: Logistic Regression, Precision, Recall, F1-Score</li><li><strong>Learning Outcomes</strong>: Implemented logistic regression for predicting employee attrition. Evaluated using precision, recall, and F1-score, which provided a deeper understanding of model performance in real-world scenarios.</li></ul><p><strong>2.2) Classifying Credit Card Fraud Using Decision Trees</strong></p><ul><li><strong>Concepts Covered</strong>: Decision Trees, ROC-AUC</li><li><strong>Learning Outcomes</strong>: Applied a decision tree classifier to detect credit card fraud. Used ROC-AUC to assess model performance, which highlighted the effectiveness of decision trees in handling fraud detection tasks.</li></ul><p><strong>2.3) Predicting Heart Disease Using Logistic Regression</strong></p><ul><li><strong>Concepts Covered</strong>: Logistic Regression, ROC-AUC</li><li><strong>Learning Outcomes</strong>: Predicted heart disease with logistic regression and evaluated using ROC-AUC. This task reinforced the importance of ROC-AUC in evaluating classification models, especially in healthcare scenarios.</li></ul><p><strong>2.4) Classifying Emails as Spam Using Decision Trees</strong></p><ul><li><strong>Concepts Covered</strong>: Decision Trees, Precision, Recall, F1-Score</li><li><strong>Learning Outcomes</strong>: Implemented a decision tree for spam classification. Evaluated using precision, recall, and F1-score, which underscored the significance of these metrics in spam detection.</li></ul><p><strong>2.5) Predicting Customer Satisfaction Using Logistic Regression</strong></p><ul><li><strong>Concepts Covered</strong>: Logistic Regression, Accuracy, Confusion Matrix</li><li><strong>Learning Outcomes</strong>: Implemented logistic regression to predict customer satisfaction. Evaluated using accuracy and a confusion matrix, reinforcing the value of these metrics in customer-related tasks.</li></ul><h4><a href="https://github.com/Syed-Shahir/100DaysOfBytewise/blob/main/BTW_W6_Task2.ipynb">Check out the Jupyter Notebook with codes and graphs</a></h4><h3><strong>Task 3: Advanced Model Evaluation</strong></h3><p><strong>3.1) Classifying Loan Status Using Decision Trees</strong></p><ul><li><strong>Concepts Covered</strong>: Decision Trees, Accuracy, ROC-AUC</li><li><strong>Learning Outcomes</strong>: Implemented a decision tree classifier to predict loan status. Evaluated using accuracy and ROC-AUC, highlighting the versatility of decision trees in financial applications.</li></ul><p><strong>3.2) Predicting Hospital Readmission Using Logistic Regression</strong></p><ul><li><strong>Concepts Covered</strong>: Logistic Regression, Precision, Recall, F1-Score</li><li><strong>Learning Outcomes</strong>: Used logistic regression to predict hospital readmission. Evaluated with precision, recall, and F1-score, which provided insights into model performance for healthcare data.</li></ul><p><strong>3.3) Classifying Digit Images Using Decision Trees</strong></p><ul><li><strong>Concepts Covered</strong>: Decision Trees, Accuracy, Confusion Matrix</li><li><strong>Learning Outcomes</strong>: Applied decision trees to classify digit images. Evaluated using accuracy and a confusion matrix, emphasizing the challenge of classifying high-dimensional data.</li></ul><p><strong>3.4) Predicting Loan Approval Using Logistic Regression</strong></p><ul><li><strong>Concepts Covered</strong>: Logistic Regression, Accuracy, Confusion Matrix</li><li><strong>Learning Outcomes</strong>: Predicted loan approval with logistic regression. Used accuracy and a confusion matrix to evaluate model performance, reinforcing the practical applications of logistic regression.</li></ul><p><strong>3.5) Classifying Wine Quality Using Decision Trees</strong></p><ul><li><strong>Concepts Covered</strong>: Decision Trees, Accuracy, ROC-AUC</li><li><strong>Learning Outcomes</strong>: Implemented a decision tree classifier to assess wine quality. Evaluated using accuracy and ROC-AUC, highlighting the model’s effectiveness in quality assessment tasks.</li></ul><h4><a href="https://github.com/Syed-Shahir/100DaysOfBytewise/blob/main/BTW_W6_Task3.ipynb">Check out the Jupyter Notebook with codes and graphs</a></h4><h3><strong>Task 4: Model Evaluation and Comparison</strong></h3><p><strong>4.1) Evaluating Logistic Regression with Cross-Validation</strong></p><ul><li><strong>Concepts Covered</strong>: Cross-Validation, Logistic Regression</li><li><strong>Learning Outcomes</strong>: Implemented logistic regression and evaluated using k-fold cross-validation. Compared with a single train-test split evaluation to understand the benefits of cross-validation in assessing model stability.</li></ul><p><strong>4.2) Analyzing Overfitting and Underfitting in Decision Trees</strong></p><ul><li><strong>Concepts Covered</strong>: Decision Trees, Overfitting, Underfitting</li><li><strong>Learning Outcomes</strong>: Explored overfitting and underfitting by training decision trees with varying depths. Plotted training and validation accuracies to visualize these effects.</li></ul><p><strong>4.3) Calculating Precision, Recall, and F1-Score for Logistic Regression</strong></p><ul><li><strong>Concepts Covered</strong>: Precision, Recall, F1-Score, Logistic Regression</li><li><strong>Learning Outcomes</strong>: Implemented logistic regression and calculated precision, recall, and F1-score. Discussed how these metrics provide insights into model performance.</li></ul><p><strong>4.4) ROC Curve Analysis for Decision Trees</strong></p><ul><li><strong>Concepts Covered</strong>: ROC Curve, AUC, Decision Trees</li><li><strong>Learning Outcomes</strong>: Implemented a decision tree classifier and plotted the ROC curve. Computed the AUC to interpret the model’s ability to distinguish between classes.</li></ul><p><strong>4.5) Comparing Model Performance with and without Cross-Validation</strong></p><ul><li><strong>Concepts Covered</strong>: Cross-Validation, Model Comparison</li><li><strong>Learning Outcomes</strong>: Compared logistic regression and decision tree models with and without cross-validation. Evaluated performance metrics including accuracy, precision, and recall to understand the impact of cross-validation.</li></ul><h4><a href="https://github.com/Syed-Shahir/100DaysOfBytewise/blob/main/BTW_W6_Task4.ipynb">Check out the Jupyter Notebook with codes and graphs</a></h4><h3><strong>Task 5: Advanced Classification and Performance Comparison</strong></h3><p><strong>5.1) Applying Cross-Validation to Random Forest Classifier</strong></p><ul><li><strong>Concepts Covered</strong>: Random Forest, Cross-Validation</li><li><strong>Learning Outcomes</strong>: Implemented a random forest classifier and evaluated using k-fold cross-validation. Analyzed cross-validation scores to assess model stability.</li></ul><p><strong>5.2) Investigating Overfitting and Underfitting in Gradient Boosting Machines</strong></p><ul><li><strong>Concepts Covered</strong>: Gradient Boosting, Overfitting, Underfitting</li><li><strong>Learning Outcomes</strong>: Trained gradient boosting classifiers with varying estimators and learning rates. Evaluated for overfitting and underfitting by comparing training and validation performance.</li></ul><p><strong>5.3) Evaluating Precision, Recall, and F1-Score for Random Forests</strong></p><ul><li><strong>Concepts Covered</strong>: Random Forest, Precision, Recall, F1-Score</li><li><strong>Learning Outcomes</strong>: Implemented a random forest classifier and calculated precision, recall, and F1-score. Discussed trade-offs between these metrics in classification tasks.</li></ul><p><strong>5.4) ROC Curve and AUC for Gradient Boosting Classifier</strong></p><ul><li><strong>Concepts Covered</strong>: ROC Curve, AUC, Gradient Boosting</li><li><strong>Learning Outcomes</strong>: Implemented a gradient boosting classifier and plotted the ROC curve. Computed the AUC to interpret model performance.</li></ul><p><strong>5.5) Model Performance Comparison with Different Metrics</strong></p><ul><li><strong>Concepts Covered</strong>: Model Comparison, Cross-Validation, Metrics</li><li><strong>Learning Outcomes</strong>: Compared SVM, random forest, and gradient boosting classifiers using cross-validation. Evaluated and compared models based on accuracy, precision, recall, F1-score, and ROC-AUC.</li></ul><h4><a href="https://github.com/Syed-Shahir/100DaysOfBytewise/blob/main/BTW_W6_Task5.ipynb">Check out the Jupyter Notebook with codes and graphs</a></h4><h3>Conclusion:</h3><p>This week’s tasks provided a comprehensive exploration of various machine learning models and evaluation techniques. From implementing basic classifiers to analyzing advanced metrics and performance, the tasks offered practical insights into model selection, evaluation, and improvement. These experiences will significantly enhance my ability to tackle complex machine learning challenges in future projects.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b375bef757ff" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Week 5 Bytewise Fellowship Report]]></title>
            <link>https://medium.com/@syed_shahir/week-5-bytewise-fellowship-report-e7e8c980a0ec?source=rss-d05dd16de0b3------2</link>
            <guid isPermaLink="false">https://medium.com/p/e7e8c980a0ec</guid>
            <category><![CDATA[artficial-intelligence]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[syed-shahir]]></category>
            <category><![CDATA[data-preprocessing]]></category>
            <category><![CDATA[bytewise]]></category>
            <dc:creator><![CDATA[Syed Muhammad Shahir Ul Haq]]></dc:creator>
            <pubDate>Fri, 23 Aug 2024 15:40:44 GMT</pubDate>
            <atom:updated>2024-08-23T15:40:44.576Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PGM8vcQZ_MS3wZkQz_g6AQ.png" /></figure><h3>Introduction</h3><p>Hi, I’m Syed Shahir, an AI/DL fellow in the Bytewise Fellowship Program. This article summarizes my experiences and learnings from the fifthweek of the program. This week, the assignments comprised of one main task,and there were 10 coding sub tasks , each requiring the application of new knowledge gained through various articles and tutorials. Let’s dive into the details of these tasks and what I learned from them.</p><h3>Main Agenda:</h3><p>The main idea and focus of this week task was to learn and practice about data Preprocessing.</p><p><em>What is Data Preprocessing?</em></p><p>Data preprocessing involves preparing raw data to make it suitable for a machine learning model. Since machine learning models rely on the data provided during training, having more and better-quality data typically leads to improved results.</p><p><em>Difference Between Data Preprocessing and Feature Engineering:</em></p><p>Data Preprocessing involves actions that we need to perform on the dataset in order to make it ready to be fed to the machine learning model, While Feature Engineering is the process of using domain knowledge to extract features from raw data via data mining techniques.</p><h3>Main Points:</h3><p>Some of the key concepts covered and practiced in this week are the following…</p><ol><li><strong>Detecting and Handling Outliers</strong>:Outliers are data points that deviate significantly from other observations. They can be detected using statistical methods like the Z-score or IQR (Interquartile Range). Once detected, you can decide to remove them, transform them, or keep them, depending on whether they provide valuable information or distort the model’s performance.</li><li><strong>Missing Values Imputation</strong>:Missing values can cause issues in data analysis and modeling. Imputation involves filling in these gaps using strategies like mean, median, mode, or more complex methods like regression or k-nearest neighbors. The goal is to maintain the integrity of the dataset while minimizing the impact of missing data.</li><li><strong>Encoding Categorical Features</strong>:Categorical features, such as “color” or “type,” need to be converted into numerical values for machine learning algorithms. Common methods include one-hot encoding, where each category is turned into a binary column, and label encoding, which assigns a unique number to each category. The choice of method can impact the model’s performance.</li><li><strong>Feature Scaling</strong>:Feature scaling is crucial for algorithms that compute distances, like k-nearest neighbors or support vector machines. Methods like normalization (scaling data between 0 and 1) and standardization (scaling data to have a mean of 0 and a standard deviation of 1) ensure that features contribute equally to the model.</li><li><strong>Extracting Information</strong>:This involves generating new features from existing data. For example, extracting the day of the week from a date, or creating new variables from text data, like word counts or sentiment scores. Proper feature extraction can significantly enhance the model’s predictive power.</li><li><strong>Combining Information</strong>:Sometimes, combining multiple features or data sources can provide more insights than using them separately. For instance, combining latitude and longitude into a single location feature, or aggregating data over time, can lead to better model performance by capturing more complex relationships.</li></ol><p>You can find the Jupyter notebooks from the following link with proper coding in order to understand the above main points.</p><h4><a href="https://github.com/Syed-Shahir/100DaysOfBytewise/blob/main/BTW_W5_Task1_Part1.ipynb">SOLUTION PART ONE(1)</a></h4><h4><a href="https://github.com/Syed-Shahir/100DaysOfBytewise/blob/main/BTW_W5_Task1_Part2.ipynb">SOLUTION PART TWO(2)</a></h4><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e7e8c980a0ec" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Marketing Campaign Analysis: Optimizing ROI in the Hospital Sector]]></title>
            <link>https://medium.com/@syed_shahir/marketing-campaign-analysis-optimizing-roi-in-the-hospital-sector-2322fa554c72?source=rss-d05dd16de0b3------2</link>
            <guid isPermaLink="false">https://medium.com/p/2322fa554c72</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[data-analysis]]></category>
            <category><![CDATA[bytewise]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[machine-learning-projects]]></category>
            <dc:creator><![CDATA[Syed Muhammad Shahir Ul Haq]]></dc:creator>
            <pubDate>Sun, 14 Jul 2024 18:55:40 GMT</pubDate>
            <atom:updated>2024-07-14T18:55:40.805Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OwJr6TLrKVe5d8sx-Grh6Q.jpeg" /></figure><h3>1) Introduction</h3><p>In today’s competitive healthcare market, understanding the effectiveness of marketing campaigns is crucial for maximizing Return on Investment (ROI). This project explores how different marketing strategies — such as Phone, Email, Flyers, and Sales Contacts — affect ROI across various hospital types (Medium, Large, Small, Private Facilities).</p><h3>2) Problem Statement</h3><p>In this project, we will analyze a dataset to provide insights into the effectiveness of different marketing campaigns in the hospital sector. We aim to determine which marketing campaigns yield the highest return on investment (ROI) for different hospital field types. The hospital field types include Medium, Large, Small, and Private Facilities. The marketing campaigns being evaluated are Phone, Email, Flyers, and Sales Visitors (Sales Contacts).</p><p>Using machine learning techniques, we will identify which marketing strategies are most effective for each field type, helping to optimize marketing efforts and maximize ROI.</p><h3>3) Project Overview</h3><p>This article presents a comprehensive analysis of marketing campaign data in the hospital sector. We leverage machine learning techniques to identify which marketing strategies yield the highest ROI for different hospital types, thereby optimizing marketing efforts.</p><h3>4) Dataset Used:</h3><p>The main credit goes to <a href="https://www.youtube.com/watch?app=desktop&amp;v=GHxOtLtZqWU"><strong>Absent Data</strong></a><strong> </strong>for providing the dataset and related guidance, but you can download the dataset from here :<strong> </strong><a href="https://github.com/Syed-Shahir/100DaysOfBytewise/blob/main/BTW_Project1_Marketing_Campaign_Analysis/Campaign-Data.csv"><strong><em>DATASET</em></strong></a><strong><em>.</em></strong></p><p>The dataset used in this analysis contains detailed records of marketing campaigns conducted in the hospital sector. Here are the attributes included in the dataset:</p><ul><li><strong>Client ID</strong>: Unique identifier for each client.</li><li><strong>Client Type</strong>: Classification of hospital facilities (e.g., Medium Facility, Large Facility).</li><li><strong>Number of Customers</strong>: Number of customers associated with each client.</li><li><strong>Monthly Target</strong>: Target amount set for monthly collections.</li><li><strong>Zip Code</strong>: Location identifier for the client.</li><li><strong>Calendar Date</strong>: Date of the marketing campaign activity.</li><li><strong>Amount Collected</strong>: Amount collected as a result of the campaign.</li><li><strong>Unit Sold</strong>: Number of units sold during the campaign.</li><li><strong>Campaign (Email)</strong>: Effectiveness of Email campaigns (binary indicator).</li><li><strong>Campaign (Flyer)</strong>: Effectiveness of Flyer campaigns (binary indicator).</li><li><strong>Campaign (Phone)</strong>: Effectiveness of Phone campaigns (binary indicator).</li><li><strong>Sales Contact 1–5</strong>: Effectiveness of various sales contacts.</li><li><strong>Number of Competition</strong>: Level of competition faced by each client (e.g., Low, High).</li></ul><p>This dataset allows us to analyze how different marketing strategies impact the financial outcomes of hospital facilities, helping us optimize marketing efforts and maximize ROI using machine learning techniques.</p><h3>5) Data Preprocessing</h3><p>In this stage of the project, we prepared the dataset to meet our analytical requirements. We began by checking for any missing values and found that there were none. However, we observed that the <strong><em>Calender Date</em></strong> column was stored as an object datatype and needed to be formatted into a proper datetime format for our analysis. Furthermore for our model training and testing we didn&#39;t require certain columns that needed to be dropped because they are used for identification purposes columns like <strong><em>zip code</em></strong> and <strong><em>client ID.</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3ViLnQMyK2NIE6OctAzQCQ.png" /><figcaption>Sample of Dataset</figcaption></figure><h3>6) Exploratory Data Analysis (EDA)</h3><p>Exploratory analysis provided valuable insights into the distribution of data and relationships between variables. Visualizations such as histograms and correlation matrices helped uncover trends and patterns in the dataset.</p><h4>6.1) Distribution of Data</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fgX0nGj_VDK5YSXMQTaKNg.png" /><figcaption>Distribution of Data</figcaption></figure><p>The distribution of Data based on client type is following Client Type<br><strong><em>Large Facility 0.4597 , Small Facility 0.2822, Medium Facility 0.1694<br>Private Facility 0.0887</em></strong></p><h4>6.2) Cross table Evaluation</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/835/1*oeDuyldT-dJPjxhLDmgmVw.png" /><figcaption>Cross Table</figcaption></figure><p>The cross-tabulation table shows the distribution of Client Type by Number of Competition. The table reveals that:Across all Client Type categories, the majority (83.33%) have a low number of competition, while a smaller proportion (16.67%) have a high number of competition.</p><h4>6.3) Mean Calculation</h4><p>mean of the dataset is calculated to get some insights from data especially about the target variable <strong><em>Amount Collected</em></strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/735/1*crGPtcVeaScT56d60VMiSw.png" /><figcaption>Mean by Client Type wise</figcaption></figure><p>If we see at the means of each Client type for amount collection and unit sold it shows that Medium Facility has good number as compared to other in terms of amount collected and unit sold</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/468/1*7QsOUZiQ9QHVVqk4rTZemg.png" /><figcaption>Mean by Number of competition</figcaption></figure><p>The mean value for the amount collected and unit sold is better for a high number of competition as compared to low.</p><h4>6.4) Correlation Analysis</h4><p>Correlation analysis was performed to identify the strength of the linear relation between the code was designed to perform correlation analysis between <strong><em>Amount Collected</em></strong> and selected marketing campaign and sales contact variables. It computes Pearson correlation coefficients to quantify the linear relationships, organizes results into a DataFrame, and sorts them by correlation strength. Finally, it applies a color gradient to visualize correlations, highlighting which variables have the strongest impact on the amount collected, aiding in optimizing marketing strategies for maximizing ROI in the hospital sector.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/652/1*72iDNXjH6IWhqPWfE5jgPg.png" /><figcaption>Correlation Visulization</figcaption></figure><p>As we can see from the above visualization sales contact 2 has the highest positive correlation while campaign flyer and sales contact 3 are near to sales contact 2, other variables have no good correlation but still the above variable can be considered as they show a positive correlation.</p><h4>6.5) Correlation Analysis based on Client Type</h4><p>in this correlation analysis First, the dataset is grouped by <strong><em>Client Type</em></strong> which categorizes data points by different types of clients (e.g., Medium, Large, Small, Private Facilities).For each client type group, the correlation coefficients between <strong><em>Amount Collected </em></strong>and the selected marketing campaign and sales contact variables <strong><em>(Campaign Email, Campaign Flyer, Campaign Phone and Sales Contact 1 to Sales Contact 5) </em></strong>is calculated<strong><em>.</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*3eGH4A--TBjTTiRs8obMng.png" /><figcaption>Bar Plot</figcaption></figure><p><strong>Bar Plot</strong>: The plot displays a bar plot where each bar represents the impact of different variables <strong><em>(Campaign Email, Campaign Flyer, Campaign Phone and Sales Contact 1 to Sales Contact 5)</em></strong> on sales <strong><em>Amount Collected</em></strong>. The bars are grouped by <strong><em>Client Type</em></strong>, allowing visual comparison of variable impacts across client types.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/765/1*_7X8mMhG9WRn1nP5yIQ7DQ.png" /><figcaption>Heatmap</figcaption></figure><p><strong>Heatmap</strong>: The plot generates a heatmap illustrating the correlation coefficients in a tabular form. Each cell in the heatmap represents the correlation coefficient between a specific variable and <strong><em>Amount Collected </em></strong>for a particular client type.</p><h3>7) Regression Modeling</h3><p>Using a machine learning model, specifically linear regression, we built a model to predict ROI based on various marketing strategies. This approach allowed us to quantify the impact of each marketing campaign on ROI.</p><p>we first used the sci-kit learn library for linear regression but our ROI decision-making was based on the P value for which we then moved towards the stats models library to perform a regression analysis, specifically an Ordinary Least Squares (OLS) regression. The goal is understanding the relationship between the amount collected and various marketing campaign efforts. The dependent variable <strong><em>Amount Collected </em></strong>is modeled as a function of the independent variables <strong><em>(Campaign Email, Campaign Flyer, Campaign Phone and Sales Contact 1 to Sales Contact 5)</em></strong>.The <strong><em>fit() </em></strong>method is called on the model to estimate the coefficients of the regression equation.</p><blockquote>This method performs the OLS regression and calculates various statistics, such as coefficients, standard errors, t-values, and p-values, which help in understanding the significance and impact of each independent variable on the dependent variable.</blockquote><h3>8) Determining the Return On Investment(ROI)</h3><p>To gain deeper insights into the return on investment (ROI) of various marketing strategies across different client types, we conducted a detailed regression analysis. We began by segmenting the dataset by client type and performed an Ordinary Least Squares (OLS) regression for each segment to assess the impact of different marketing campaigns on the amount collected. Only significant variables, identified by their p-values being less than 0.05, were retained for further analysis. These variables were then ranked based on their coefficients to determine the most influential factors. The results were compiled into a comprehensive summary, showcasing the ROI for each marketing strategy by client type. This analysis enables us to provide targeted recommendations, ensuring marketing efforts are optimized to maximize returns for different hospital field types.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/733/1*1GF49KlKzM3cmbrsxSCH7Q.png" /><figcaption>Return On Investment Table</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_gsqtts8lGBot0pzckyvIA.png" /><figcaption>Bar plot for ROI</figcaption></figure><h3>9) Conclusion</h3><p>Using the table and visualization, we can observe the return derived from each dollar spent on different marketing campaigns. It becomes evident that the effectiveness of various campaigns and sales contacts varies across different account types. This detailed breakdown allows us to tailor marketing strategies to specific client types, optimizing the return on investment for each segment.</p><h4><a href="https://github.com/Syed-Shahir/100DaysOfBytewise/tree/main/BTW_Project1_Marketing_Campaign_Analysis">Complete solution to the project</a></h4><p>Connect with me : <a href="http://www.linkedin.com/in/syedshahir"><strong><em>LinkedIn</em></strong></a><strong><em>, </em></strong><a href="https://www.instagram.com/syed._.shahir/"><strong><em>Instagram</em></strong></a><strong><em> and </em></strong><a href="https://github.com/Syed-Shahir"><strong><em>Github</em></strong></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2322fa554c72" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Week 3 Bytewise Fellowship Report]]></title>
            <link>https://medium.com/@syed_shahir/week-3-bytewise-fellowship-report-a0e492248861?source=rss-d05dd16de0b3------2</link>
            <guid isPermaLink="false">https://medium.com/p/a0e492248861</guid>
            <category><![CDATA[theicompleteengineer]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[statistics]]></category>
            <category><![CDATA[data-visualization]]></category>
            <dc:creator><![CDATA[Syed Muhammad Shahir Ul Haq]]></dc:creator>
            <pubDate>Sun, 14 Jul 2024 15:44:46 GMT</pubDate>
            <atom:updated>2024-07-14T15:44:46.362Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/706/1*Naoft_fWEoPosF1PTtxXng.png" /></figure><h3>Introduction</h3><p>Hi, I’m Syed Shahir, an AI/DL fellow in the Bytewise Fellowship Program. This article summarizes my experiences and learnings from the third week of the program. This week, the assignments comprised three coding tasks, each requiring the application of new knowledge gained through various articles and tutorials. Let’s dive into the details of these tasks and what I learned from them.</p><h3>Main Topics</h3><ul><li><strong>Data Visualization</strong>: Exploring various techniques and tools for presenting data effectively.</li><li><strong>Basic Statistics and Probability</strong>: Understanding key concepts and their applications in data analysis.</li><li><strong>Linear Regression</strong>: Learning the theory and implementation of this fundamental predictive modeling technique.</li></ul><h3>Data Visualization</h3><p>In this task, we explored the Python data visualization libraries Matplotlib and Seaborn. The tasks were based on these libraries. Some common visualization graphs, their descriptions, and use cases are as follows:</p><p><strong>Line Plot</strong></p><ul><li><strong>Description</strong>: A line plot displays data points connected by straight line segments. It is used to show trends over a period of time or another continuous variable.</li><li><strong>Use Case</strong>: To visualize trends or changes over time.</li></ul><p><strong>Relplot (Relationship Plot)</strong></p><ul><li><strong>Description</strong>: relplot is a high-level interface for creating relational plots in Seaborn. It combines the functionality of scatterplot and lineplot.</li><li><strong>Use Case</strong>: Use relplot when you want to create scatter or line plots with additional dimensions of data (e.g., faceting by rows and/or columns, adding hue for categorical variables).</li></ul><p><strong>Scatter Plot</strong></p><ul><li><strong>Description</strong>: A scatter plot displays points representing the values of two variables. It is useful for visualizing the relationship between two continuous variables.</li><li><strong>Use Case</strong>: To identify correlations, trends, or outliers between two variables.</li></ul><p><strong>Count Plot</strong></p><ul><li><strong>Description</strong>: A count plot displays the count of observations in each categorical bin using bars. It is similar to a bar plot but specifically for counts of observations.</li><li><strong>Use Case</strong>: To visualize the count of categories in a categorical variable.</li></ul><p><strong>Bar Plot</strong></p><ul><li><strong>Description</strong>: A bar plot displays the distribution of a categorical variable. It shows the quantity of each category with rectangular bars.</li><li><strong>Use Case</strong>: To compare the values of different categories.</li></ul><p><strong>Histogram</strong></p><ul><li><strong>Description</strong>: A histogram displays the distribution of a single continuous variable. It uses bins to divide the range of values into intervals and shows the frequency of values in each bin.</li><li><strong>Use Case</strong>: To visualize the distribution of a variable.</li></ul><p><strong>Box Plot</strong></p><ul><li><strong>Description</strong>: A box plot displays the distribution of a continuous variable through quartiles. It shows the median, upper and lower quartiles, and potential outliers.</li><li><strong>Use Case</strong>: To visualize the distribution of a variable and detect outliers.</li></ul><p><strong>Violin Plot</strong></p><ul><li><strong>Description</strong>: A violin plot combines a box plot with a density plot. It provides a richer display of the distribution shape and density.</li><li><strong>Use Case</strong>: To visualize the distribution of a variable and its density.</li></ul><p><strong>Pair Plot</strong></p><ul><li><strong>Description</strong>: A pair plot creates a matrix of scatter plots for all pairs of numerical variables in a DataFrame. It is useful for exploring relationships between multiple variables.</li><li><strong>Use Case</strong>: To visualize pairwise relationships in a dataset.</li></ul><p><strong>Heatmap</strong></p><ul><li><strong>Description</strong>: A heatmap displays data in a matrix format, with colors representing different values. It is useful for visualizing correlations between variables.</li><li><strong>Use Case</strong>: To show the correlation matrix or visualize data with color gradients.</li></ul><h4><a href="https://github.com/Syed-Shahir/Data_PreProcessing_Python/blob/main/Matplotlib.ipynb">Check out Graphs and Codes of Matplotlib Common Graphs</a></h4><h4><a href="https://github.com/Syed-Shahir/Data_PreProcessing_Python/blob/main/Seaborn.ipynb">Check out Graphs and Codes of Seaborn Common Graphs</a></h4><h4><a href="https://github.com/Syed-Shahir/100DaysOfBytewise/blob/main/BTW_W3_Task1.ipynb">Check out the Task 1 statements and solution in Jupyter Notebook</a></h4><h3>Basic Statistics and Probability</h3><p>This week, we delved into fundamental statistical concepts and their applications using the Iris dataset. These concepts are crucial for understanding and interpreting data. Here are the key concepts we covered:</p><h4>Mean, Median, and Mode</h4><ul><li><strong>Mean</strong>: The average value of a dataset, calculated by summing all values and dividing by the number of values. It provides a measure of central tendency.</li><li><strong>Median</strong>: The middle value of a dataset when sorted in ascending order. It is a robust measure of central tendency, especially in the presence of outliers.</li><li><strong>Mode</strong>: The most frequently occurring value in a dataset. It is useful for identifying the most common value.</li></ul><h4>Variance and Standard Deviation</h4><ul><li><strong>Variance</strong>: A measure of the dispersion of a dataset, calculated as the average of the squared differences from the mean. It indicates how spread out the values are.</li><li><strong>Standard Deviation</strong>: The square root of the variance. It provides a measure of dispersion in the same units as the data, indicating the typical distance from the mean.</li></ul><h4>Summary Statistics</h4><ul><li><strong>Summary Table</strong>: Creating a comprehensive table that includes the mean, median, variance, and standard deviation for all numerical features in the dataset. This facilitates comparison and analysis.</li></ul><h4>Probability Distribution</h4><ul><li><strong>Random Variable</strong>: A variable whose values are determined by the outcomes of a random phenomenon. In this case, sepal length is treated as a random variable.</li><li><strong>Probability Distribution</strong>: A function that describes the likelihood of different outcomes for a random variable. It provides insight into the frequency of occurrence for each value.</li></ul><h4>Cumulative Distribution Function (CDF)</h4><ul><li><strong>CDF</strong>: A function that represents the cumulative probability of a random variable being less than or equal to a certain value. It provides a cumulative view of the distribution.</li><li><strong>Visualization</strong>: Plotting the CDF helps understand the cumulative probabilities and the distribution of values.</li></ul><h4>Probability Density Function (PDF)</h4><ul><li><strong>PDF</strong>: A function that represents the density of probabilities for a continuous random variable. It describes the likelihood of the variable taking on a specific value.</li><li><strong>Visualization</strong>: Plotting the PDF helps understand the density and distribution of values.</li></ul><h4>Hypothesis Testing</h4><ul><li><strong>Hypothesis Test</strong>: A statistical method used to determine if there is a significant difference between two or more groups. In this case, it tests the mean petal lengths of different iris species.</li><li><strong>Significance</strong>: Assessing statistical significance helps determine if observed differences are likely due to chance or if they reflect true differences in the population.</li></ul><h4>Covariance and Correlation</h4><ul><li><strong>Covariance</strong>: A measure of the joint variability of two random variables. It indicates the direction of the linear relationship between the variables.</li><li><strong>Correlation</strong>: A standardized measure of the strength and direction of the linear relationship between two variables. It ranges from -1 to 1, with values close to 1 or -1 indicating strong relationships.</li></ul><h4><a href="https://github.com/Syed-Shahir/100DaysOfBytewise/blob/main/BTW_W3_Task2.ipynb">Check out the Task 2 statements and solution in Jupyter Notebook</a></h4><h3>Linear Regression</h3><p>Linear regression is a fundamental technique in predictive modeling and machine learning. It aims to model the relationship between a dependent variable and one or more independent variables by fitting a linear equation to observed data.</p><h4>Concept of Linear Regression</h4><ul><li><strong>Linear Regression Model</strong>: At its core, linear regression assumes a linear relationship between the dependent variable <strong>Y</strong> and the independent variable <strong>X</strong>. The model can be represented by the equation:</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/129/1*SLnI1dSAV8Bhh_sArU57_w.gif" /><figcaption>linear regression equation</figcaption></figure><ul><li>Here, β0​ is the intercept, β1​ is the slope (or coefficient) of the independent variable X, and <strong>ϵ </strong>represents the error term (the difference between the observed and predicted values).</li><li><strong>Intercept (β0​)</strong>: The intercept is the value of Y when X is zero. It provides a baseline value for the dependent variable.</li><li><strong>Slope (β1​)</strong>: The slope indicates the change in the dependent variable for a one-unit change in the independent variable. It shows the direction and strength of the relationship. In the context of multi-variable linear regression, each independent variable has its own slope (β₁, β₂, …, βₙ), which quantifies its impact on the dependent variable.</li><li><strong>Ordinary Least Squares (OLS)</strong>: The most common method to fit a linear regression model. OLS estimates the parameters (β0​ and β1​) by minimizing the sum of the squared differences between the observed and predicted values.</li></ul><h3>Key Concepts and Implementation</h3><h4>Data Preparation</h4><p><strong>Loading and Preparing Data</strong>: For linear regression, it is essential to prepare the data by handling missing values, normalizing features, and selecting relevant variables. For example, we used the Boston Housing dataset and split it into training and testing sets.</p><h4>Implementing Linear Regression</h4><p><strong>Model Implementation</strong>: We implemented linear regression using the <strong><em>LinearRegression</em></strong> class from Scikit-Learn. The model was fit to the training data, estimating the best-fitting line for our data points.</p><h4>Predicting the Target Variable</h4><p><strong>Making Predictions</strong>: Using the fitted linear regression model, we predicted the target variable for the test set. This step applies the model to new, unseen data to generate predictions.</p><h4>Evaluating Model Performance</h4><ul><li><strong>Mean Squared Error (MSE)</strong>: MSE is calculated as the average of the squared differences between observed and predicted values. It quantifies the model’s accuracy. We used <strong><em>mean_squared_error</em></strong> from <strong><em>sklearn.metrics</em></strong> to compute MSE. The equation for MSE is</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/177/1*YtTqCTulRj6KAmFyMwBLAQ.gif" /><figcaption>Equation of MSE</figcaption></figure><p><strong><em>yi</em></strong>: Observed value of the dependent variable for observation,<strong><em>y^​i</em></strong>: Predicted value of the dependent variable for observation, <strong><em>n</em></strong>: Number of observations</p><ul><li><strong>R-squared</strong>: R-squared measures the proportion of variance in the dependent variable that is predictable from the independent variables. It indicates the goodness of fit of the model, with values closer to 1 signifying a better fit.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/191/1*5qUuTe8HZzHMqu4ODotuPQ.gif" /><figcaption>Equation for R Square</figcaption></figure><p><strong><em>yˉ</em></strong>: Mean of the observed values of the dependent variable y, <strong><em>yi</em></strong>: Observed value of the dependent variable for observation,<strong><em>y^​i</em></strong>: Predicted value of the dependent variable for observation, <strong><em>n</em></strong>: Number of observations</p><h4>Visualizing the Regression Line</h4><ul><li><strong>Plotting the Regression Line</strong>: To assess the model’s performance visually, we plotted the regression line along with the actual data points. This helps to see how well the model fits the data and identify any patterns or discrepancies.</li></ul><h4>Comparing Predicted and Actual Values</h4><ul><li><strong>Scatter Plot of Predicted vs. Actual Values</strong>: We evaluated the model’s performance by comparing the predicted values with the actual values. A scatter plot of predicted vs. actual values helps to visualize the accuracy of the predictions and identify any systematic errors.</li></ul><h4>Interpreting Model Coefficients</h4><ul><li><strong>Coefficient Interpretation</strong>: Understanding the impact of each feature on the target variable involves interpreting the coefficients of the linear regression model. The intercept represents the expected value of the dependent variable when all independent variables are zero, while the slope indicates the expected change in the dependent variable for a one-unit change in the independent variable.</li></ul><h4><a href="https://github.com/Syed-Shahir/100DaysOfBytewise/blob/main/BTW_W3_Task3.ipynb">Check out the Task 3 statements and solution in Jupyter Notebook</a></h4><h3>Conclusion</h3><p>Throughout this article, we’ve explored fundamental concepts in data analysis and machine learning, focusing on data visualization, basic statistics and probability, and linear regression. Here’s a recap of what we’ve covered:</p><h4>Data Visualization</h4><p>We began by leveraging Python’s data visualization libraries such as Matplotlib and Seaborn to create insightful plots like line plots, scatter plots, histograms, and more. These visualizations allowed us to gain valuable insights into data relationships, distributions, and trends.</p><h4>Basic Statistics and Probability</h4><p>Next, we dived into basic statistical measures such as mean, median, mode, variance, and standard deviation. These measures provided us with tools to understand data distributions and variability, essential for drawing meaningful conclusions from datasets. We also explored probability distributions, cumulative distribution functions (CDF), and probability density functions (PDF), enabling us to quantify uncertainties and explore random variables.</p><h4>Linear Regression</h4><p>Finally, we delved into linear regression — a powerful tool for modeling relationships between variables. We explored its theory, implementation using Scikit-Learn, and evaluation through metrics like Mean Squared Error (MSE) and R-squared. Visualizing the regression line and interpreting coefficients further enhanced our understanding of how independent variables influence the dependent variable.</p><h3>Key Takeaways</h3><ul><li><strong>Visualization</strong>: Effective data visualization is crucial for understanding patterns and relationships within data.</li><li><strong>Statistics</strong>: Basic statistical measures help quantify data characteristics and variability.</li><li><strong>Linear Regression</strong>: Provides a methodical approach to modeling and predicting relationships between variables.</li></ul><h3>Let’s Connect: LinkedIN , Instagram and Github</h3><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a0e492248861" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Week 2 Bytewise Fellowship Report]]></title>
            <link>https://medium.com/@syed_shahir/week-2-bytewise-fellowship-report-860ef894c79a?source=rss-d05dd16de0b3------2</link>
            <guid isPermaLink="false">https://medium.com/p/860ef894c79a</guid>
            <category><![CDATA[datasciencecourse]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[bytewise]]></category>
            <category><![CDATA[syed-shahir]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <dc:creator><![CDATA[Syed Muhammad Shahir Ul Haq]]></dc:creator>
            <pubDate>Sat, 13 Jul 2024 19:06:08 GMT</pubDate>
            <atom:updated>2024-07-14T15:48:25.804Z</atom:updated>
            <content:encoded><![CDATA[<h4>This is weekly report of fellowship at Bytewise,The concepts and tasks covered are related to Machine Learning and Data Handling.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/721/1*16gTj-dFvo9aExIB2gHq_g.png" /></figure><p>Hi, I’m Syed Shahir, an AI/DL fellow in the Bytewise Fellowship Program. This article summarizes my experiences and learnings from the second week of the program. The week’s assignments comprised two coding tasks. Let’s dive into the details of these tasks and what I learned from them.</p><h4><strong>Introduction To Machine Learning and Artificial Intelligence:</strong></h4><p><em>What is AI(Artificial Intelligence)?</em></p><p>Artificial Intelligent(AI) is the branch of computer science that is concerned with building smart and intelligent machines. It’s a broad field with applications ranging from robotics to natural language processing and beyond.</p><p><em>What is ML(Machine Learning)?</em></p><p>Machine Learning (ML) is a subset of AI that involves developing algorithms and models that allow computers to learn from and make predictions or decisions based on data. Unlike traditional programming, where explicit instructions are given for every task, in machine learning, algorithms are trained on data to identify patterns and make decisions or predictions without being explicitly programmed for each scenario.</p><p><em>What is DL(Deep Learning)?</em></p><p>Deep Learning (DL) is a specialized subset of Machine Learning that utilizes neural networks with many layers (hence the term “deep”) to learn from large amounts of data. These neural networks are inspired by the structure and function of the human brain, specifically designed to learn representations of data through layers of abstraction automatically.</p><h4>Types of Machine Learning:</h4><p>There 3 main types of Machine Learning</p><ol><li><strong><em>Supervised Learning:</em></strong> In supervised learning, the algorithm learns from labeled data, where each example is paired with a desired output. The goal is to learn a mapping from inputs to outputs to make predictions or classifications on new, unseen data.</li><li><strong><em>Unsupervised Learning:</em></strong> Unsupervised learning involves learning patterns and relationships from unlabeled data. The algorithm explores the data without specific outputs and finds hidden structures or representations within it, such as clustering similar data points together.</li><li><strong><em>Reinforcement Learning:</em></strong> Reinforcement learning deals with how agents (like robots or software agents) ought to take actions in an environment to maximize some notion of cumulative reward. It involves learning by trial and error, where actions are taken to achieve a specific goal or maximize a reward, with feedback provided by the environment.</li></ol><h4>Task # 01: Linear Regression &amp; Decision Tree Classifier</h4><p>In this task there were 2 sub tasks one was related to linear regression and other was about decision tree classifier as the begginers these tasks were just to get us used to how to search the content and solve the problems.</p><p>Now lets discuss the basic idea of these concepts</p><h4>Linear Regression:</h4><ul><li><strong>Objective:</strong> Linear Regression is a supervised learning algorithm used for predicting continuous values (numeric values) based on input features.</li><li><strong>Model:</strong> It assumes a linear relationship between the input variables (features) and the output variable (target). The goal is to find the best-fit line (or hyperplane in higher dimensions) that minimizes the difference between predicted and actual values.</li><li><strong>Usage:</strong> It’s commonly used for tasks like predicting house prices based on features like size and location, forecasting sales based on marketing spend, etc.</li><li><strong>Regression Line:</strong> The line that best fits the data, described by parameters like slope and intercept.</li></ul><h4>Decision Tree Classifier:</h4><ul><li><strong>Objective:</strong> Decision Tree Classifier is a supervised learning algorithm used for both classification and regression tasks.</li><li><strong>Model:</strong> It builds a tree-like structure where each node represents a decision rule based on input features. It recursively splits the data into subsets that are more homogeneous in terms of the target variable (for classification, this could be classed as “yes” or “no”).</li><li><strong>Usage:</strong> It’s used when the relationship between features and target variables is non-linear or when the interpretability of the model is important.</li><li><strong>Nodes:</strong> Represent decision points based on feature values.</li><li><strong>Leaves:</strong> Terminal nodes that represent the final decision or outcome.</li><li><strong>Splitting Criteria:</strong> Methods for choosing which feature to split and where to split (e.g., Gini impurity, entropy).</li></ul><h4><a href="https://github.com/Syed-Shahir/100DaysOfBytewise/blob/main/BTW_W2_Task1.ipynb">Checkout Task # 01 Jupyter Notebook</a></h4><h4>Task # 02: “Foundations of Data Analysis and Machine Learning: Hands-On Exercises”</h4><p>Exploring the core principles of data analysis and machine learning through a series of practical exercises designed to build and practice skills in Python. These exercises will cover essential tasks from loading datasets to implementing basic machine learning models, providing a solid foundation for beginners in the field.</p><h4>Exercises Overview:</h4><ol><li><strong>Loading and Previewing Data:</strong> Start by loading and examining datasets like the Iris dataset from Scikit-Learn. Understand how to access and display the initial rows of data to grasp its structure and content.</li><li><strong>Basic Dataset Operations:</strong> Implement functions to determine the number of features (columns) and samples (rows) in a dataset. This exercise emphasizes understanding the dimensions and scope of your data.</li><li><strong>Data Splitting:</strong> Learn to partition datasets into training and testing sets using an 80/20 split ratio. This essential step prepares data for model training and evaluation.</li><li><strong>Statistical Exploration:</strong> Gain insights into data characteristics by computing basic statistics such as mean, median, and standard deviation for each feature. Understand the distribution and variability within your dataset.</li><li><strong>Visualization Techniques:</strong> Use histograms to visualize the distribution of data features, facilitating the identification of patterns and anomalies.</li><li><strong>Python Scripting for Basic Statistics:</strong> Practice Python scripting by creating lists of numbers and calculating metrics such as mean, median, and standard deviation. Strengthen your programming skills in data analysis.</li><li><strong>Function-Based Analysis:</strong> Develop functions to automate statistical calculations, generating comprehensive summaries including counts, means, medians, and standard deviations for input data.</li><li><strong>Matrix Operations:</strong> Generate and manipulate random matrices, a foundational skill for matrix-based computations and data transformations.</li><li><strong>Data Handling with Pandas:</strong> Load CSV files into Pandas DataFrames and compute summary statistics for each column. Master data manipulation techniques using one of Python’s most powerful libraries.</li><li><strong>Introduction to Linear Regression:</strong> Implement a basic linear regression model using Scikit-Learn. Explore how to fit a model to data, interpret coefficients, and make predictions based on learned relationships.</li></ol><h4><a href="https://github.com/Syed-Shahir/100DaysOfBytewise/blob/main/BTW_W2_Task2.ipynb">Checkout Task # 02 Jupyter Notebook</a></h4><p>These exercises are designed to introduce beginners to essential concepts and techniques in data analysis and machine learning. By completing these tasks, we will develop practical skills that are crucial for exploring and understanding data, as well as laying the groundwork for more advanced topics in the field.</p><h4>Learning Outcomes and Conclusion</h4><p>Throughout the second week of the Bytewise Fellowship Program, I delved into fundamental concepts of Artificial Intelligence (AI) and Machine Learning (ML). I gained a clear understanding of how AI builds intelligent machines, while ML focuses on algorithms that learn from data to make predictions and decisions autonomously. Exploring supervised, unsupervised, and reinforcement learning taught me diverse approaches in training algorithms with labeled and unlabeled data, as well as optimizing actions to maximize rewards. Practical tasks involving Linear Regression and Decision Tree Classifier not only familiarized me with predictive modeling techniques but also honed my skills in data analysis and model evaluation. Additionally, hands-on exercises in data handling, statistical exploration, and basic machine learning implementation using Python equipped me with essential tools for interpreting data and building foundational models. This week’s experiences have set a strong foundation for my journey in mastering AI and ML, preparing me to tackle more advanced challenges ahead.</p><p><strong><em>Connect with Me!!!</em></strong></p><h4><a href="https://www.instagram.com/syed._.shahir/">Intstagram,</a> <a href="http://www.linkedin.com/in/syedshahir">LinkedIN</a> and <a href="https://github.com/Syed-Shahir">GitHUB</a></h4><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=860ef894c79a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Week 1 Bytewise Fellowship Report]]></title>
            <link>https://medium.com/@syed_shahir/week-1-bytewise-fellowship-report-1dcf2b3b6ee1?source=rss-d05dd16de0b3------2</link>
            <guid isPermaLink="false">https://medium.com/p/1dcf2b3b6ee1</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[python-programming]]></category>
            <category><![CDATA[data-structure-algorithm]]></category>
            <category><![CDATA[bytewise-fellowship-2024]]></category>
            <dc:creator><![CDATA[Syed Muhammad Shahir Ul Haq]]></dc:creator>
            <pubDate>Fri, 21 Jun 2024 18:31:01 GMT</pubDate>
            <atom:updated>2024-07-15T14:56:22.395Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/712/1*pVzQyiiWIWZuyg8Ti-f-gg.png" /></figure><h3>Introduction:</h3><p>Hi, I’m Syed Shahir, an AI/DL fellow in the Bytewise Fellowship Program. This article summarizes my experiences and learnings from the first week of the program. The week’s assignments comprised four coding tasks and a weekly report. Let’s dive into the details of these tasks and what I learned from them</p><h3>Task #01: Basic Python Proficiency</h3><p><strong><em>Objective:</em></strong> The primary goal was to solidify my basic understanding of Python by practicing foundational coding concepts. This included getting familiar with the basic syntax, taking user input, printing output, type casting, control flow, decision-based program control, and working with lists and strings</p><p>Check out the task statements and solutions: <a href="https://github.com/Syed-Shahir/100DaysOfBytewise/blob/main/BTW_W1_Task1.ipynb">Click Here</a></p><p><strong><em>Learning Outcomes:</em></strong> This task reinforced my foundational knowledge of Python, ensuring I am comfortable with basic coding practices and syntax. It was a good refresher and set the stage for more complex tasks.</p><h3>Task #02: Intermediate Python Challenges</h3><p><strong><em>Objective:</em></strong> To practice intermediate-level Python programming by solving problems such as palindrome identification, Fibonacci sequence generation, prime number identification, working with random numbers, palindrome sentences, reversing sentences, and temperature conversions. The aim was to enhance problem-solving skills and understand more complex Python constructs.</p><p>Check out the tasks and solution: <a href="https://github.com/Syed-Shahir/100DaysOfBytewise/blob/main/BTW_W1_Task2.ipynb">Click Here</a></p><p><strong><em>Learning Outcomes:</em></strong> These tasks helped me improve my problem-solving skills and understand more complex Python constructs. It was particularly useful in learning how to manipulate strings and numbers effectively.</p><h3>Task #03: Data Structures and Algorithms</h3><p><strong><em>Objective:</em></strong> To introduce and practice concepts of Data Structures and Algorithms (DSA) by attempting tasks based on dynamic programming and DSA. This included tackling problems like recursive factorial, palindrome linked list, merging sorted arrays, Binary Search Tree operations, longest palindrome, merge intervals, maximum subarray, reverse linked list, minimum edit distance, and Boggle game. The focus was on understanding and implementing these concepts to solve complex problems.</p><p>Check out the tasks and their solutions: <a href="https://github.com/Syed-Shahir/100DaysOfBytewise/blob/main/BTW_W1_Task3.ipynb">Click Here</a></p><p>I took help from the following resources to understand concepts and implement the tasks. You can check them out.</p><p><a href="https://www.geeksforgeeks.org/learn-data-structures-and-algorithms-dsa-tutorial/">Geek For Geeks</a>, <a href="https://www.youtube.com/watch?v=jQqQpPMYPXs">Neural Nine Youtube,</a> <a href="https://www.youtube.com/watch?v=PGsgv6nXhLw&amp;list=PLDzeHZWIZsTomOPnCiU3J95WufjE36wsb">Code Help Babar</a>, <a href="https://www.youtube.com/watch?v=DXa7q2tv670&amp;list=PLdylWCIGC6gfyVmaXtrd_RKnbNvjZ81gq">dsaa2z</a> and ChatGPT</p><p><strong><em>Learning Outcomes:</em></strong> This task significantly advanced my understanding of DSA and dynamic programming. It was challenging and required extensive research and practice, but it was extremely rewarding. I learned how to approach complex problems and break them down into manageable parts.</p><h3>Task # 04: Data Structures and Algorithms(Conti…)</h3><p><strong>Objective:</strong> To further explore advanced DSA topics and dynamic programming by implementing algorithms like Quick Sort, solving the Knapsack problem, performing graph traversals (DFS &amp; BFS), implementing Dijkstra’s Algorithm, and finding the Longest Common Subsequence. The aim was to gain deeper insights into algorithmic thinking and efficient problem-solving techniques.</p><p>Check out the tasks and their solution: <a href="https://github.com/Syed-Shahir/100DaysOfBytewise/blob/main/BTW_W1_Task4.ipynb">Click Here</a></p><p>I took help for these tasks from ChatGPT, articles like Geek For Geeks, and some tutorials on YouTube.</p><h3>Conclusion:</h3><p>Week 1 of the Bytewise Fellowship was intense and enriching. The tasks covered a broad range of topics, from basic Python to advanced algorithms, providing a solid foundation for the weeks to come. I look forward to expanding my network, exchanging ideas, and gaining valuable skills throughout this fellowship journey, Insha’Allah.</p><p>connect with me: <a href="https://www.instagram.com/syed._.shahir/https://www.instagram.com/syed._.shahir/">Instagram,</a> <a href="https://www.linkedin.com/in/syedshahir/">LinkedIn</a> or Email me</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1dcf2b3b6ee1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Unlocking Opportunities:]]></title>
            <link>https://medium.com/@syed_shahir/unlocking-opportunities-432846c158d9?source=rss-d05dd16de0b3------2</link>
            <guid isPermaLink="false">https://medium.com/p/432846c158d9</guid>
            <dc:creator><![CDATA[Syed Muhammad Shahir Ul Haq]]></dc:creator>
            <pubDate>Tue, 18 Jun 2024 08:09:22 GMT</pubDate>
            <atom:updated>2024-06-18T08:11:03.157Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>My Path to the Bytewise Fellowship in ML/Deep Learning</strong></h3><h3>Introduction:</h3><p>Hi!! This is <a href="https://www.linkedin.com/in/syedshahir/">Syed Shahir</a>, a student of Computer Engineering. I am currently pursuing my Bachelor’s Degree from <a href="http://attock.comsats.edu.pk/">COMSATS University Islamabad, Attock Campus.</a></p><p>As we all know, the trends of today’s world and the projects within the technology sector increasingly involve Artificial Intelligence. Whether it’s a final year project (FYP) or an industrial-level project, everyone is trying to make their projects and products smarter. This trend has created a significant demand for knowledge and skills in fields like Data Science and Artificial Intelligence.</p><p>Read this <a href="https://www.linkedin.com/pulse/chatgpt-effect-data-driven-dive-ai-hiring-aura-ceo/">Click Here</a> to learn more about in demand skills of AI</p><p>Based on this understanding and after consulting with my senior fellows, I concluded that I needed a platform where I could learn and practice AI and Machine Learning. This is where <a href="https://www.bytewiseltd.com/about">Bytewise Limited</a> came into play. I was introduced to their <a href="https://www.bytewiseltd.com/fellowship">fellowship program</a> last year. I applied for it but couldn’t secure the opportunity.</p><p>However, when they started recruitment for the 2024 fellowship, I doubted myself and initially considered not applying. At the last moment, just before the application deadline, I contacted my senior fellow, <a href="https://www.linkedin.com/in/iammkullah/">Muhammad Kaleem Ullah</a>, who participated in this fellowship program last year. He encouraged me to apply, emphasizing how beneficial it would be for my field and my Final Year Project. So, I applied, and Alhamdulillah, I was selected.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UY2q9AH-m7SYejuBRDDfHQ.png" /><figcaption>Image Attached with the selection mail</figcaption></figure><h3><strong>Bytewise &amp; Fellowship:</strong></h3><p><em>What is Bytewise?</em></p><p>Bytewise Limited is a technology company committed to innovation and excellence. Their talented and motivated team provides top-tier solutions in data engineering, AI, data science, and web development. They leverage cutting-edge technologies to deliver high-quality, efficient, and scalable solutions tailored to meet the needs of various industries.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*L_AytzBrzPabp4Y8yf_1yQ.png" /><figcaption><a href="https://www.bytewiseltd.com/about">About Bytewise</a></figcaption></figure><p>Visit <a href="https://www.bytewiseltd.com/">Bytewise</a> to learn more</p><p><em>What is Bytewise Fellowship?</em></p><p>The Bytewise Fellowship Program is diverse community of like-minded individuals. Where you get the opportunity to gain hands-on experience, work on exciting projects, and earn valuable certificates. With flexible hours and fully remote options, this free program is perfect for self-taught individuals, boot camp graduates, students, and community college degree holders. They look for ambitious engineers eager to learn and grow, regardless of their technical work experience.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UAMQBkBx_qRfAhUtqkkkpA.png" /><figcaption><a href="https://www.bytewiseltd.com/fellowship">Bytewise fellowship</a></figcaption></figure><p><em>My Selection:</em></p><p>Bytewise fellowship offered 20+ tracks where I opted to be part of Machine Learning , a sneak peak of tracks and their details can be found from the following link <a href="https://www.instagram.com/p/C6qPNe-gXc6/?utm_source=ig_web_copy_link&amp;igsh=MzRlODBiNWFlZA==">Part 1,</a> <a href="https://www.instagram.com/p/C6sfX0DItMh/?utm_source=ig_web_copy_link&amp;igsh=MzRlODBiNWFlZA==">Part 2,</a> and <a href="https://www.instagram.com/p/C6siDkjIs_A/?utm_source=ig_web_copy_link&amp;igsh=MzRlODBiNWFlZA==">Part 3.</a></p><p>Initially when I filled the form so I was part of selected pool who were shortlisted by the 2300+ applicants,Later on there was a final stage in which we had to sub a video where we had to answer some questions.</p><p><em>Watch my video :</em> <a href="https://www.youtube.com/watch?v=M6pIH2usPCg">Click Here</a></p><p>After a week of anticipation, I received a selection email from Bytewise Limited. The email congratulated me on my selection and shared several resources to help me announce the good news on social media. These resources included a congratulatory message image, a Canva template, and other shareable content.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/529/1*EkAMvxeZabvpAVBO3rR54g.png" /><figcaption>I am a Bytewise Fellow now</figcaption></figure><p><em>About my Team Lead:</em></p><p><strong>Nimra Waqar: Leading the Fellowship Journey</strong></p><p><a href="https://www.linkedin.com/in/nimrah-waqar/">Nimra Waqar</a>, a software engineering graduate from COMSATS University Islamabad, Attock Campus, will lead us through this fellowship journey. With a strong passion for data analysis and coding, Nimra has honed her skills in TensorFlow, Firebase, and Flutter, using them to develop various impactful projects. She holds multiple certifications in machine learning and artificial intelligence from IBM and Coursera, demonstrating her commitment to continuous learning.</p><p>Beyond academia, Nimra is dedicated to empowering women in technology as the founder of Women In Tech Live, where she highlights the achievements of women in the IT sector.</p><p>As the operational team lead at Microsoft Learn Student Ambassador COMSATS Attock, she drives community outreach and fosters innovation around Microsoft technologies. Nimra’s active participation in the Google Developer Student Club (GDSC) and TensorFlow User Group (TFUG) Islamabad showcases her collaborative spirit and enthusiasm for cutting-edge technologies.</p><p>Nimra’s expertise lies in Machine Learning and Data Science, with her Final Year Project focusing on NLP (Sentiment Analysis). Her ultimate goal is to lead impactful projects that advance both the IT sector and society as a whole.</p><p><a href="https://www.linkedin.com/in/nimrah-waqar/">Nimra’s LinkedIn</a></p><p><a href="https://github.com/am-nimrah/">Nimra’s Portfolio</a></p><p>Being part of a diverse cohort of fellows from various backgrounds and institutions will provide me with an excellent platform to expand my networks, exchange ideas, and collaborate with people from diverse cultures. I look forward to a knowledgeable and skillful journey,<strong> inshAllah!!</strong> by the grace of <strong>Allah</strong>, where I can enhance my expertise and contribute meaningfully to our collective goals.</p><h3>Conclusion:</h3><p>Joining the Bytewise fellowship in Machine Learning/Deep Learning marks the beginning of an exciting journey for me. Surrounded by diverse peers and guided by industry experts at Bytewise, I anticipate expanding my network, exchanging ideas, and gaining valuable skills. With a strong commitment to continuous learning, I look forward to leveraging this experience to make meaningful contributions in the field, aiming to advance both my career and the broader technological landscape.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=432846c158d9" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>