<?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 Amr Ahmed Fouad on Medium]]></title>
        <description><![CDATA[Stories by Amr Ahmed Fouad on Medium]]></description>
        <link>https://medium.com/@amrahmedfouad?source=rss-2d253032f42------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*xZfMeGYi4-eMldQ3c5dDeA.jpeg</url>
            <title>Stories by Amr Ahmed Fouad on Medium</title>
            <link>https://medium.com/@amrahmedfouad?source=rss-2d253032f42------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 20 Nov 2026 01:01:41 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@amrahmedfouad/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[Feature Engineering]]></title>
            <link>https://amrahmedfouad.medium.com/feature-engineering-63e02ee8822e?source=rss-2d253032f42------2</link>
            <guid isPermaLink="false">https://medium.com/p/63e02ee8822e</guid>
            <category><![CDATA[feature-engineering]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[datascience-training]]></category>
            <category><![CDATA[data-scientist]]></category>
            <dc:creator><![CDATA[Amr Ahmed Fouad]]></dc:creator>
            <pubDate>Thu, 07 Jul 2022 18:46:59 GMT</pubDate>
            <atom:updated>2022-07-07T18:46:59.847Z</atom:updated>
            <content:encoded><![CDATA[<p>Feature engineering is an essential part of building and implementing machine learning models. In this article, we will learn about the context of feature engineering in machine learning workflow. Additionally, you’ll get a brief overview of the many data science tools involved in feature engineering and how they assist data scientists in model diagnostics.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*c3qPPbFohlMWlUd5CH-nHw.png" /><figcaption>[Source]: <a href="https://www.inovex.de/de/blog/automated-feature-engineering-open-source-libraries/">https://www.inovex.de/de/blog/automated-feature-engineering-open-source-libraries/</a></figcaption></figure><h3>Introduction</h3><p>Let us now talk about the fuel of feature Engineering, which is ‘features.’ A feature is a measurable property in a dataset, and a feature is used as input to a machine learning model. Features are the independent variables used by machine learning models to make predictions, which may be either continuous or discrete values. So, for example, if we want a model that predicts a patient has specific diseases, we use age, blood pressure, etc., as inputs to make a prediction.</p><p>Feature engineering is a way to address these challenges. These challenges include that there might be too many features and do not know which features to use. In addition, some features might be highly correlated, and some might not vary much with the outcome variable. Unsurprisingly, a data scientist might spend much time working on the independent variables to decide which one may fit his model.</p><h3>Why do we need feature engineering?</h3><p>Many things could happen and make the model make a wrong prediction. Bad features are one of these factors.</p><p>Lets us talk about the effect of feature engineering on ML algorithms:</p><ol><li><strong>Performance: </strong>The performance of our ML model increases dramatically when we engineer the features very well.</li><li><strong>Runtime: </strong>Engineered features can help the algorithm learn the input data’s estimated function very fast. Computational power available during any ML project affects the algorithm and the amount of data used during learning.</li><li><strong>Generalizability: </strong>Our model is going to generalize well on unseen data when the model is trained on a well-engineered and representative feature.</li></ol><p>Feature engineering is a toolkit used when the algorithm can not learn from the data and miss one of the above properties.</p><h3>Feature Engineering and the Machine Learning Workflow</h3><p>The machine learning process is iterative, which means that each step in the workflow is repeated till we have a good model. In many tutorials, feature engineering is introduced as a step after the exploratory data analysis and it seems that the process is linear but actually it is not linear.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RtT6KbGkiWC1NMJpbpy_Bg.png" /><figcaption>[Source]: <a href="https://github.com/glc12125/Machine-Learning-Workflow-with-Python/blob/master/A%20Comprehensive%20ML%20Workflow%20with%20Python.ipynb">https://github.com/glc12125/Machine-Learning-Workflow-with-Python/blob/master/A%20Comprehensive%20ML%20Workflow%20with%20Python.ipynb</a></figcaption></figure><p>The feature Engineering process can be divided into some categories as follow:<br>1. Feature Transformation methods:<br>This one involves doing some numerical transformation, e.g., log, scaling, binning, etc. These techniques improve the performance, runtime, and explainability of the model.</p><p>2. Feature Selection methods</p><p>A set of techniques is used to choose the best working features for our use case. They usually belong to one of these three categories:</p><p>i. Filter methods:<br>These are statistical techniques used to “filter” out valuable features. It can be used for any model and is usually done before modeling. They include correlation coefficients, chi², ANOVA, Mutual Information calculations, etc.</p><p>ii. Wrapper methods:<br>This method depends on the ‘greedy search strategy. This strategy depends on picking a subset of features, training the model, and evaluate on them. Then, the previous steps are repeated with a different subset of features. Finally, train a model again until the best performant model with the best features is reached. Usually, stopping criteria are used based on the number of features or if the desired performance is reached. This method is applied by forward Feature Selection, Backward Feature Elimination, or Sequential Floating.</p><p>iii. Embedded methods:<br>This method is usually implemented during the model building step. This method depends on some techniques built-in in each algorithm. For example, Lasso and Ridge are two regularization techniques used to tweak the model to make it generalize better to unseen data. In addition, tree-based models have a built-in function to determine each feature’s importance.</p><p>3. Dimensionality Reduction methods:<br>This technique is mainly used when the data at hand has a problem which is the “Curse of dimensionality.” Reducing dimensionality allows for faster runtimes and better performance. Therefore, this tool is beneficial when working with a high dimension dataset and saves a lot of computational time and resources. The most popular dimensionality reduction techniques are Principal Component Analysis (PCA), Linear Discriminant Analysis (LDA), etc.</p><h3>Summary</h3><p>In this article, we discussed the techniques of feature engineering methods. We have covered in this article the attributes they seek to improve and where they fit within the machine learning workflow.</p><p>Resources:</p><ol><li><a href="https://medium.com/@orinangare/feature-engineering-and-selection-for-machine-learning-with-python-61c4d2eebfeb">https://medium.com/@orinangare/feature-engineering-and-selection-for-machine-learning-with-python-61c4d2eebfeb</a></li><li><a href="https://www.codecademy.com/learn/paths/fe-path-feature-engineering">https://www.codecademy.com/learn/paths/fe-path-feature-engineering</a></li><li><a href="https://github.com/glc12125/Machine-Learning-Workflow-with-Python">https://github.com/glc12125/Machine-Learning-Workflow-with-Python</a></li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=63e02ee8822e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Polynomial Regression]]></title>
            <link>https://amrahmedfouad.medium.com/polynomial-regression-48826604146e?source=rss-2d253032f42------2</link>
            <guid isPermaLink="false">https://medium.com/p/48826604146e</guid>
            <category><![CDATA[polynomial-regression]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Amr Ahmed Fouad]]></dc:creator>
            <pubDate>Sat, 23 Jan 2021 20:12:22 GMT</pubDate>
            <atom:updated>2021-01-23T20:12:22.620Z</atom:updated>
            <content:encoded><![CDATA[<p>Polynomial regression use when your data is more complex that a simple straight line. You can fit a linear model on a nonlinear data by adding powers of each feature as new features then train a linear model on this extended set of features.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/121/0*cCHEkwSxbk9OVU2f.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/185/0*v7TZBbz1FNOWNoXM.png" /></figure><p>when there are multiple features, polynomial regression is capable of finding relationship between features, this is made by the fact that polynomial regression adds up all the combination of features up to the given degree.</p><p>it transforms an array containing n features into an array containing ( n + d)! / (d!)(n!) where d is the degree of the polynomial.</p><p>Very high degree of polynomial may leads to data overfitting and usage of linear model causes underfitting, so how to decide the degree of the model?</p><p>Cross validation used to get an estimation of model generalization, if model perform well on training data but sucks at the test set so it’s overfitting while doing badly on both set then it’s underfitting.</p><p>another way is to look at the learning curves, there are plots of the model performance on the training set and validation set as a function of the training set size, and from this curve u could see if your model overfitting or underfitting the data.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=48826604146e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Linear Regression]]></title>
            <link>https://amrahmedfouad.medium.com/linear-regression-28c3c7867e5?source=rss-2d253032f42------2</link>
            <guid isPermaLink="false">https://medium.com/p/28c3c7867e5</guid>
            <category><![CDATA[linear-regression]]></category>
            <category><![CDATA[linear-regression-model]]></category>
            <dc:creator><![CDATA[Amr Ahmed Fouad]]></dc:creator>
            <pubDate>Sun, 17 Jan 2021 23:28:45 GMT</pubDate>
            <atom:updated>2021-01-17T23:31:15.032Z</atom:updated>
            <content:encoded><![CDATA[<p>Linear Regression</p><p>As a ML Practitioner, mainly the first thing to do is to frame the problem you are gonna work on, This will helps you to decide which algorithm to select and what performance measure you will us to evaluate your model and how much effort you should spend tweaking it.</p><p>The next question to ask is what the current solution looks like. it will often gives you a reference performance and insights to solve the problem.</p><p>Your next step is to select a performance Measure that is suitable for our case(Linear Regression) is the Root Mean Square Error (RMSE) as it gives idea of how much error the system typically make it prediction with a higher weight for large errors.</p><p>The root mean square error (RMSE) has been used as a standard statistical parameter to measure model performance in several natural sciences. The parameter indicates the standard deviation of the residuals or how far the points are from the regression or modelled line. The following figure shows the residuals as green arrows and its location between the point data and the regression line.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/274/1*hHtLc2T1yhcMgKUSSnwVAQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*ZPvs5GWwDUkg5Ae2tHjmpQ.jpeg" /><figcaption>Formula</figcaption></figure><p>RMSE is preferred for regression problems but in some other context another method used, such as when the data containing a lot of Outliers then Mean Absolute Error used(MAE).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/335/1*zHQV-hp5Y3_QIfMvV3-bUA.png" /></figure><p>Both RMSE and MAE are ways to measure the distance between two vectors a ( predictions vector , vector of target value)</p><p>Linear regression to a process to get the best fit line for data. Firstly we have a training data then we start to fit a line on it and during the learning process the model tries to learn the parameter of a line the best fits the training data.</p><p>y = B0 + B1*x, this is the equation of a line and ( B0, B1) are the parameter that the model learn from data</p><p>When Parameters become zero, it effectively removes the influence of the input variable on the model and therefore from the prediction made from the model (0 * x = 0). This becomes relevant if you look at regularization methods that change the learning algorithm to reduce the complexity of regression models by putting pressure on the absolute size of the parameters, driving some to zero.</p><h3>Regularization</h3><p>Regularization seeks to both minimize the sum of the squared error of the model on the training data but also to reduce the complexity of the model (like the number or absolute size of the sum of all coefficients in the model).</p><p>Two popular examples of regularization procedures for linear regression are:</p><ul><li><a href="https://en.wikipedia.org/wiki/Lasso_(statistics)">Lasso Regression</a>: where Ordinary Least Squares is modified to also minimize the absolute sum of the coefficients (called L1 regularization).</li><li><a href="https://en.wikipedia.org/wiki/Tikhonov_regularization">Ridge Regression</a>: where Ordinary Least Squares is modified to also minimize the squared absolute sum of the coefficients (called L2 regularization).</li><li><a href="https://en.wikipedia.org/wiki/Elastic_net_regularization">Elastic_net_regularization</a>: Elastic Net first emerged as a result of critique on lasso, whose variable selection can be too dependent on data and thus unstable. The solution is to combine the penalties of ridge regression and lasso to get the best of both worlds.</li></ul><p>Resources:</p><ol><li>Machine Learning Mastery</li><li>Machine learning with Python( book)</li><li>Wikipedia</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=28c3c7867e5" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>