<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: myrabel</title>
    <description>The latest articles on Forem by myrabel (@myrabel).</description>
    <link>https://forem.com/myrabel</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1792300%2F530b907d-ceec-4f31-9961-7a67c812ec2b.png</url>
      <title>Forem: myrabel</title>
      <link>https://forem.com/myrabel</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/myrabel"/>
    <language>en</language>
    <item>
      <title>Feature Engineering: The Ultimate Guide</title>
      <dc:creator>myrabel</dc:creator>
      <pubDate>Sun, 25 Aug 2024 18:33:16 +0000</pubDate>
      <link>https://forem.com/myrabel/feature-engineering-the-ultimate-guide-331e</link>
      <guid>https://forem.com/myrabel/feature-engineering-the-ultimate-guide-331e</guid>
      <description>&lt;p&gt;&lt;strong&gt;What Is Feature Engineering&lt;/strong&gt;&lt;br&gt;
This is the process of selecting, manipulating and transforming raw data into features that can be used in supervised learning. A feature is a measurable input that can be used in a predictive model. Features can be numerical, text based or categorical since they represent different aspects of data that are relevant to the problem being “solved”.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Farod8zoekln59kfaz24p.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Farod8zoekln59kfaz24p.png" alt="Image description" width="800" height="464"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Benefits&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The model has a higher efficiency&lt;/li&gt;
&lt;li&gt;Algorithms fit the data and detect patterns easily&lt;/li&gt;
&lt;li&gt;Greater flexibility of the features&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;What is the need for feature engineering?&lt;/strong&gt;&lt;br&gt;
Feature engineering helps to:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; Improve user experience – feature engineering’s primary reason is to enhance product or service offering to make it more effective/efficient and increase satisfaction in customers.&lt;/li&gt;
&lt;li&gt; Give a competitive advantage – offering unique and innovative features helps differentiate products in the market.&lt;/li&gt;
&lt;li&gt; Meet customer needs – identify areas that new features can be used to enhance product value and meet customer needs.&lt;/li&gt;
&lt;li&gt; Increase revenue – development of a new feature that provides additional functionality leading to more uptake by customers.&lt;/li&gt;
&lt;li&gt; Future proofing – anticipating future trends and potential customer needs to help develop features that keep a product relevant.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Feature engineering consists of the following processes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;em&gt;Feature Creation&lt;/em&gt;&lt;/strong&gt;
This is the process of generating new features based on domain knowledge. This can reveal hidden patterns and relationships that were not initially apparent&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Methods used include:&lt;br&gt;
&lt;em&gt;Aggregation&lt;/em&gt; – combining multiple data points to create a more holistic view. Standard functions include count, sum, average, minimum, maximum, percentile, standard deviation and co-efficient of variation.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Differences and Ratios&lt;/em&gt; – these are effective methods of representing changes in numeric features for purposes of anomaly detection and prediction&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;em&gt;Feature extraction&lt;/em&gt;&lt;/strong&gt;
The process of creating new features from existing ones to provide more information to the model.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;Dimensionality reduction&lt;/em&gt; for example, reduces the number of features while preserving the most important information.&lt;br&gt;
Types: dimensionality reduction, feature combination, feature aggregation, feature transformation&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;&lt;em&gt;Feature selection&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
The process of selecting a subset of relevant features from the dataset to be used in the model.  Selecting the most relevant and informative features reduces the complexity of the model and improves its performance by eliminating irrelevant features.&lt;br&gt;
Types: filter method, wrapper method, embedded method&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;&lt;em&gt;Feature scaling&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
The process of transforming the features so that they have a similar scale. This prevents a single feature from dominating the analysis.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;Normalization&lt;/em&gt; is the process of scaling the data values in such a way that that the value of all the features lies between 0 and 1. This method works well when the data is normally distributed.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Standardization&lt;/em&gt; is the process of scaling the data values in such a way that that they gain the properties of standard normal distribution. The features now have a mean value of 0 and a standard deviation of 1.&lt;br&gt;
Types: min-max scaling, standard scaling, robust scaling&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Techniques&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;&lt;em&gt;Cleaning and Imputation&lt;/em&gt;&lt;/strong&gt; - the process of addressing missing values and inconsistencies in the data to ensure the information used to train a model is reliable and consistent.&lt;br&gt;
Numerical imputation and categorical imputation are the types used.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;&lt;em&gt;Feature scaling&lt;/em&gt;&lt;/strong&gt; – the process of standardizing the range of numerical features to ensure they equally contribute to the model’s training process.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;&lt;em&gt;Encoding&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;One hot encoding&lt;/strong&gt; transforms categorical values into numerical values that can be used by models. Each category is transformed into a binary value indicating presence (1) or absence (0).&lt;br&gt;
&lt;strong&gt;Binning&lt;/strong&gt; is a technique that transforms continuous variables into categorical variables. Ranges of values are divided into several “bins” and each assigned a categorical value. &lt;br&gt;
&lt;em&gt;Example&lt;/em&gt;: Age group bins from ages 18-80 [18-25 young adults, 26-35 middle aged adults 36-60 older adults and 61-80 as elderly]&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>data</category>
      <category>machinelearning</category>
      <category>featureengineering</category>
    </item>
    <item>
      <title>Understanding Your Data: The Essentials of Exploratory Data Analysis</title>
      <dc:creator>myrabel</dc:creator>
      <pubDate>Fri, 09 Aug 2024 19:14:07 +0000</pubDate>
      <link>https://forem.com/myrabel/understanding-your-data-the-essentials-of-exploratory-data-analysis-2ok2</link>
      <guid>https://forem.com/myrabel/understanding-your-data-the-essentials-of-exploratory-data-analysis-2ok2</guid>
      <description>&lt;p&gt;Exploratory data analysis is a popular approach to analyse data sets and visually present your findings. It helps provide maximum insights into the data set and structure. This identifies exploratory data analysis as a technique to understand the various aspects of data.&lt;br&gt;
For one to better understand the data one must ensure that the data is clean, has no redundancy, missing values, or even NULL values.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Types of Exploratory Data Analysis&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;There are three main types:&lt;br&gt;
&lt;em&gt;Univariate&lt;/em&gt;: This is where you look at one variable (column) at any single time. It helps one understand more about the variable’s nature and is termed as the easiest type of EDA.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Bivariate&lt;/em&gt;: This is where one looks at two variables together. It helps one understand the relationship between variables A and B whether they are independent or correlated.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Multivariate&lt;/em&gt;: This involves looking at three or more variables at a time. It is identified as an “advanced” bivariate.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Methods&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;em&gt;Graphical&lt;/em&gt;: This involves exploring data through visual representations such as graphs and charts. Common visualisations include box plots, bar graphs, scatter plots and heat maps.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Non-graphical&lt;/em&gt;: This is done through statistical techniques. Metrics used include mean, median, mode, standard deviation and percentiles.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Exploratory Data Analysis Tools&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Some of the most common tools used for EDA include&lt;br&gt;
&lt;em&gt;Python&lt;/em&gt;: An object oriented programming language used to connect existing components and identify missing values&lt;/p&gt;

&lt;p&gt;&lt;em&gt;R&lt;/em&gt;: An open source programming language used in statistical computing&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Steps&lt;/strong&gt;
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt; &lt;em&gt;Understand the data&lt;/em&gt; - See what type of data you are working with; number of columns, rows, and data types.&lt;/li&gt;
&lt;li&gt; &lt;em&gt;Clean the data&lt;/em&gt; – this involves working on irregularities like missing values, missing rows, and NULL values.&lt;/li&gt;
&lt;li&gt; &lt;em&gt;Analysis&lt;/em&gt; – Analyse the relationship between variables.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Sample EDA using Python&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;The dataset in use for this example is the Iris data set - available &lt;a href="https://www.kaggle.com/datasets/uciml/iris" rel="noopener noreferrer"&gt;here&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Load the data using the pandas library.
```
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;df = pd.read_csv(io.BytesIO(uploaded['Iris.csv']))&lt;br&gt;
df.head()&lt;/p&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jc0v1bsat7wwso2fwvow.png)

2. Identify data types
`df.info()`

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/u72xoee9g1viirjge81r.png)

3. Clean data e.g. checking for NULL values
`df.isnull().sum()`

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7b1mg3m5brmegcahh7dt.png)

4. Non-graphical analysis of the data to give variable info
`df.describe()`

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fc0ln6hh5g64c428qbj3.png)

5. Graphical analysis to show variable correlation or independence

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;df.plot(kind='scatter', x='SepalLengthCm', y='SepalWidthCm') ;&lt;br&gt;
plt.show()&lt;/p&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/msztylnnkbxfqw41j98c.png)








&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

</description>
      <category>data</category>
      <category>python</category>
      <category>analytics</category>
    </item>
    <item>
      <title>The Ultimate Guide to Data Analysis: Techniques and Tools</title>
      <dc:creator>myrabel</dc:creator>
      <pubDate>Sat, 03 Aug 2024 17:33:41 +0000</pubDate>
      <link>https://forem.com/myrabel/the-ultimate-guide-to-data-analysis-techniques-and-tools-i07</link>
      <guid>https://forem.com/myrabel/the-ultimate-guide-to-data-analysis-techniques-and-tools-i07</guid>
      <description>&lt;p&gt;Data Analysis as a career can help businesses transform by propelling them towards success in the information age.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is data Analysis?
&lt;/h2&gt;

&lt;p&gt;A data analyst examines data sets to reveal patterns, relationships and predict trends that help organisations make better decisions regarding their current and potential customer base. The role typically includes collecting, cleaning and making sense of data sets to answer questions provided by the business. Gathering insights from data helps businesses solve problems that are glaring at them or even hiding in the shadows. It also helps with informed decision-making and helps to bring improvements to the organisation overall.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;The Data Analysis Process&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;First, one must need to understand the business needs to help with the definition a question that needs to be answered using data. Identifying the root cause of an issue is a good place to start.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Data Collection&lt;/strong&gt;:
&lt;/h3&gt;

&lt;p&gt;The next process involves collecting the data that you will eventually analyse for answers. This data can come from surveys, marketing data or even customer interviews. First party data is data collected by the organisation itself. Second party data comes from an organisation used by the main business and third party data can come from multiple other sources.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Data Cleaning&lt;/strong&gt;:
&lt;/h3&gt;

&lt;p&gt;Raw data is messy and requires a lot of transformation before it can be deemed useful. Data must also be restructured to make it make sense. Gaps need to be filled to ensure data accuracy. Accurate data provides better insights.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Data Validation&lt;/strong&gt;:
&lt;/h3&gt;

&lt;p&gt;This happens once the data is cleaned and made usable. This involves verifying whether it meets certain requirements before any analysis can be done.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Data Analysis&lt;/strong&gt;:
&lt;/h3&gt;

&lt;p&gt;This happens in in four major formats&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fn7v6yzwf44yxqilqlh37.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fn7v6yzwf44yxqilqlh37.png" alt="Image description" width="700" height="410"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;What&lt;/strong&gt; happened? – Descriptive&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Why&lt;/strong&gt; did it happen? – Diagnostic&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;What&lt;/strong&gt; will happen? – Predictive&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;What&lt;/strong&gt; actions can be taken? – Prescriptive&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Techniques&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Predictive models are developed using statistical techniques to help with optimising processes. Techniques such as regression analysis, time series analysis, cluster analysis, classification analysis, text analysis (natural language processing), data mining, among others come in handy at this stage.&lt;/p&gt;

&lt;p&gt;Visualising insights allows stakeholders to easily understand them while also seeing patterns and trends from the data analysed. Tools such as Tableau, Power BI and python libraries like Matplotlib are useful for this task.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Skills&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Data analysis involves proficiency in the use of tools such as Excel, Python, R and SQL to help query and analyse the data.&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
