<?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>DEV Community: Angelica Lo Duca</title>
    <description>The latest articles on DEV Community by Angelica Lo Duca (@alod83).</description>
    <link>https://dev.to/alod83</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%2F667160%2Fb3649dcb-375a-4206-b408-394c01473ac2.jpeg</url>
      <title>DEV Community: Angelica Lo Duca</title>
      <link>https://dev.to/alod83</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/alod83"/>
    <language>en</language>
    <item>
      <title>How Generative AI Can Help You Improve Your Data Visualization Charts</title>
      <dc:creator>Angelica Lo Duca</dc:creator>
      <pubDate>Mon, 29 Jan 2024 11:03:24 +0000</pubDate>
      <link>https://dev.to/alod83/how-generative-ai-can-help-you-improve-your-data-visualization-charts-38on</link>
      <guid>https://dev.to/alod83/how-generative-ai-can-help-you-improve-your-data-visualization-charts-38on</guid>
      <description>&lt;p&gt;🚀 Exciting News in Data Visualization! 📊✨&lt;/p&gt;

&lt;p&gt;Transform your data visualization game with the power of generative AI! 🤖📈 Check out our latest blog article with 5 Key Takeaways:&lt;/p&gt;

&lt;p&gt;1️⃣ Master the basic structure of a data visualization chart.&lt;br&gt;
2️⃣ Harness the potential of Python Altair for chart creation.&lt;br&gt;
3️⃣ Turbocharge your chart generation with GitHub Copilot.&lt;br&gt;
4️⃣ Elevate your content using ChatGPT for relevant annotations.&lt;br&gt;
5️⃣ Spice up your charts with engaging images from DALL-E.&lt;/p&gt;

&lt;p&gt;🕒 Tired of spending hours on mundane charts? Discover how generative AI tools like Altair, Copilot, ChatGPT, and DALL-E can revolutionize your data visualization process. 🚀💡&lt;/p&gt;

&lt;p&gt;Follow the steps outlined in the article:&lt;/p&gt;

&lt;p&gt;1️⃣ Write your basic chart with GitHub Copilot.&lt;br&gt;
2️⃣ Utilize ChatGPT to generate catchy titles and annotations.&lt;br&gt;
3️⃣ Enhance readability and captivate your audience by adding DALL-E generated images to your chart.&lt;/p&gt;

&lt;p&gt;Ready to dive in? 💻🔍 &lt;a href="https://www.kdnuggets.com/how-generative-ai-can-help-you-improve-your-data-visualization-charts"&gt;Read here&lt;/a&gt;&lt;/p&gt;

</description>
      <category>datavisualization</category>
      <category>datascience</category>
      <category>python</category>
      <category>generativeai</category>
    </item>
    <item>
      <title>How to Tailor A Column Chart for Communication</title>
      <dc:creator>Angelica Lo Duca</dc:creator>
      <pubDate>Thu, 18 Jan 2024 04:56:39 +0000</pubDate>
      <link>https://dev.to/alod83/how-to-tailor-a-column-chart-for-communication-5bcb</link>
      <guid>https://dev.to/alod83/how-to-tailor-a-column-chart-for-communication-5bcb</guid>
      <description>&lt;p&gt;❓Ever found yourself lost in the complexity of a column chart, struggling to decipher its meaning amidst a sea of information? You're not alone. Drawing a column chart is a fantastic way to represent categories and values, but it can become overwhelming with unnecessary details. In this blog post, we're diving into a strategy to simplify column charts, particularly when dealing with three main categories.&lt;/p&gt;

&lt;p&gt;🤔 The Challenge: Overwhelming Complexity&lt;br&gt;
Yes, column charts can sometimes be too much to handle, making it challenging for your audience to extract meaningful insights. But fear not, as we propose a strategic methodology to cut through the noise and bring clarity to your visualizations.&lt;/p&gt;

&lt;p&gt;🔍 The Three-Step Methodology:&lt;/p&gt;

&lt;p&gt;📊 Analyze Data: Start by understanding your data deeply. Identify the key categories and values crucial for your message.&lt;br&gt;
❌ Delete Useless Data: Streamline your chart by removing irrelevant data points. Less clutter means a clearer focus on the essentials.&lt;br&gt;
✂️ Approximate Remaining Data: Strike a balance by approximating the remaining data points. This step simplifies the chart while retaining vital trends.&lt;br&gt;
🚀 Drawing Results with Altair:&lt;br&gt;
Implementing this methodology is a breeze with Altair, a Python library for data visualization. Transform complex data into visually compelling charts that captivate your audience's attention and convey your message with impact.&lt;/p&gt;

&lt;p&gt;💡 Considerations:&lt;br&gt;
While this methodology offers a simplified view, it comes with a trade-off—a loss of information. Perfect for targeted communication during presentations, it might not be ideal for detailed technical reports. Choose wisely based on your communication goals.&lt;/p&gt;

&lt;p&gt;🌐 Learn More &lt;a href="https://medium.com/towards-artificial-intelligence/how-to-tailor-a-column-chart-for-communication-3e36e452113b"&gt;here&lt;/a&gt;&lt;/p&gt;

</description>
      <category>datastorytelling</category>
      <category>datavisualization</category>
      <category>python</category>
      <category>columnchart</category>
    </item>
    <item>
      <title>Using Vega-Lite for Data Visualization</title>
      <dc:creator>Angelica Lo Duca</dc:creator>
      <pubDate>Tue, 26 Dec 2023 16:49:41 +0000</pubDate>
      <link>https://dev.to/alod83/using-vega-lite-for-data-visualization-1bnk</link>
      <guid>https://dev.to/alod83/using-vega-lite-for-data-visualization-1bnk</guid>
      <description>&lt;p&gt;Hi all,&lt;br&gt;
Today I want to share with you an article about Vega-lite, a data visualization grammar. The article is a tutorial for beginners, showing how to get started with Vega-lite. &lt;br&gt;
The idea behind Vega-lite is to write your data visualization in JSON and use a renderer to show the chart.&lt;/p&gt;

&lt;p&gt;Read the full article &lt;a href="https://pub.towardsai.net/using-vega-lite-for-data-visualization-546020f46be2"&gt;here&lt;/a&gt;&lt;/p&gt;

</description>
      <category>datavisualization</category>
      <category>datastorytelling</category>
      <category>datascience</category>
      <category>programming</category>
    </item>
    <item>
      <title>How to Improve Your ChatGPT Outputs Using Configuration Parameters</title>
      <dc:creator>Angelica Lo Duca</dc:creator>
      <pubDate>Thu, 14 Dec 2023 09:34:15 +0000</pubDate>
      <link>https://dev.to/alod83/how-to-improve-your-chatgpt-outputs-using-configuration-parameters-1cao</link>
      <guid>https://dev.to/alod83/how-to-improve-your-chatgpt-outputs-using-configuration-parameters-1cao</guid>
      <description>&lt;p&gt;📚 Excited to share insights from my recent read! 🌟 David Clinton's "The Complete Obsolete Guide to Generative AI" from Manning Publications has been an eye-opener, especially diving into the second chapter.&lt;/p&gt;

&lt;p&gt;Ever wondered about the key parameters shaping an AI model? This book delves deep into configuring them to match specific needs. Parameters like temperature, Top P value, frequency penalty, and presence penalty play a pivotal role in fine-tuning output.&lt;/p&gt;

&lt;p&gt;Understanding and tweaking these settings can significantly impact ChatGPT's output. Setting parameters enables tailoring the output, whether you seek a more deterministic response closely linked to the input or desire a more creative and diverse output.&lt;/p&gt;

&lt;p&gt;To get hands-on, we'll simulate a scenario extracted from my book Data Storytelling with Generative AI using Python and Altair.&lt;/p&gt;

&lt;p&gt;Read the full article here 👇👇👇&lt;br&gt;
&lt;a href="https://towardsdatascience.com/how-to-improve-your-chatgpt-outputs-using-configuration-parameters-0eebd575646e"&gt;https://towardsdatascience.com/how-to-improve-your-chatgpt-outputs-using-configuration-parameters-0eebd575646e&lt;/a&gt;&lt;/p&gt;

</description>
      <category>chatgpt</category>
      <category>generativeai</category>
      <category>books</category>
      <category>python</category>
    </item>
    <item>
      <title>Using Slope Charts to Simplify Your Data Visualization</title>
      <dc:creator>Angelica Lo Duca</dc:creator>
      <pubDate>Fri, 08 Dec 2023 21:55:31 +0000</pubDate>
      <link>https://dev.to/alod83/using-slope-charts-to-simplify-your-data-visualization-3767</link>
      <guid>https://dev.to/alod83/using-slope-charts-to-simplify-your-data-visualization-3767</guid>
      <description>&lt;p&gt;We may plot charts to include as many concepts as possible in our visualization. As a result, our chart could be difficult to read and distracting. For this reason, before plotting anything, sit in your chair and plan what you want to communicate. Then, look at your data and decide what is effectively necessary to plot. Leave the rest out of your visualization.&lt;/p&gt;

&lt;p&gt;In this tutorial, we’ll see &lt;strong&gt;how to use slope charts to simplify an overwhelming trendline&lt;/strong&gt;. If you are a data analyst, you might jump out of your chair and get scared because, using a slope chart, you will see a significant loss of information. But I assure you that, in some cases, it will really be worth it.&lt;/p&gt;

&lt;p&gt;Let’s see the cases where a slope chart can be used.&lt;/p&gt;

&lt;p&gt;Read more on &lt;a href="https://medium.com/towards-data-science/using-slope-charts-to-simplify-your-data-visualization-be1f0eaf1f0f"&gt;Towards Data Science&lt;/a&gt;&lt;/p&gt;

</description>
      <category>datascience</category>
      <category>datastorytelling</category>
      <category>datavisualization</category>
      <category>python</category>
    </item>
    <item>
      <title>3 Ways to Embed a Matplotlib Chart into an HTML Page</title>
      <dc:creator>Angelica Lo Duca</dc:creator>
      <pubDate>Thu, 22 Jun 2023 20:32:36 +0000</pubDate>
      <link>https://dev.to/alod83/3-ways-to-embed-a-matplotlib-chart-into-an-html-page-48a1</link>
      <guid>https://dev.to/alod83/3-ways-to-embed-a-matplotlib-chart-into-an-html-page-48a1</guid>
      <description>&lt;p&gt;Are you struggling with integrating Matplotlib charts into your HTML pages? We've got you covered! Our latest article dives deep into innovative techniques for seamlessly embedding stunning charts while preserving interactivity. 🚀&lt;/p&gt;

&lt;p&gt;Discover three powerful solutions:&lt;br&gt;
1️⃣ mpld3 library: Unleash the potential of Matplotlib with mpld3's effortless chart integration.&lt;br&gt;
2️⃣ Base64 Encoding: Learn how to encode charts as base64 for seamless HTML integration.&lt;br&gt;
3️⃣ Leveraging py-script: Dive into the power of py-script to embed interactive charts with ease.&lt;/p&gt;

&lt;p&gt;Don't miss this comprehensive guide that takes you step-by-step through each solution, providing clear instructions and examples. Elevate your data visualization game and conquer the complexities of chart integration effortlessly. 💪&lt;/p&gt;

&lt;p&gt;Read more on &lt;a href="https://towardsdatascience.com/3-ways-to-embed-a-matplotlib-chart-into-an-html-page-8e11fa66a4b0"&gt;Towards Data Science&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>python</category>
      <category>matplotlib</category>
      <category>datavis</category>
    </item>
    <item>
      <title>How to Organize a Data Science Project</title>
      <dc:creator>Angelica Lo Duca</dc:creator>
      <pubDate>Sat, 10 Jun 2023 07:51:40 +0000</pubDate>
      <link>https://dev.to/alod83/how-to-organize-a-data-science-project-52a1</link>
      <guid>https://dev.to/alod83/how-to-organize-a-data-science-project-52a1</guid>
      <description>&lt;p&gt;Having trouble figuring out the best way to organize your data science projects?&lt;/p&gt;

&lt;p&gt;Check out these strategies for efficient planning and manual installation, Cookiecutter, or utilizing a cloud service 🤓 💻 #datascience #organization&lt;/p&gt;

&lt;p&gt;More details in this article: &lt;a href="https://towardsdatascience.com/how-to-organize-your-data-science-project-3710a476bf8c"&gt;https://towardsdatascience.com/how-to-organize-your-data-science-project-3710a476bf8c&lt;/a&gt;&lt;/p&gt;

</description>
      <category>datascience</category>
      <category>projectmanagement</category>
      <category>developers</category>
      <category>python</category>
    </item>
    <item>
      <title>Book: Comet for Data Science</title>
      <dc:creator>Angelica Lo Duca</dc:creator>
      <pubDate>Thu, 22 Sep 2022 11:56:29 +0000</pubDate>
      <link>https://dev.to/alod83/book-comet-for-data-science-263c</link>
      <guid>https://dev.to/alod83/book-comet-for-data-science-263c</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--7-K2hyWN--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/l8kh9n67hzmrisfg757k.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--7-K2hyWN--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/l8kh9n67hzmrisfg757k.png" alt="Image description" width="113" height="148"&gt;&lt;/a&gt;&lt;br&gt;
About one year ago, I have discovered Comet, an experimentation platform for model tracking and monitoring. Since then, I have used Comet’s features to keep my projects organized and make them move from the early stages to production. The simplicity of Comet’s platform helped me complete all of the projects on it.&lt;/p&gt;

&lt;p&gt;While studying Comet, I came across Heartbeat, a Medium publication edited by the Comet team, and started writing for them. Thanks to Heartbeat, I deepened several aspects of Comet, and I moved from the simple role of data analyst to that of a builder.&lt;/p&gt;

&lt;p&gt;I authored Comet for Data Science as the result of my studies and tests, after talking with the Comet team and performing my personal tests.&lt;/p&gt;

&lt;p&gt;Throughout the book, you will learn how to build a successful Data Science project, starting from the first steps, up to model deployment. In detail, the book will take you through the concepts of Data Science from a Comet perspective, with the hope that it will increase your productivity. By choosing this book, you will learn about data science from Comet’s point of view, with the hope that you will be able to increase your speed in creating these projects. Throughout the course of the book, you will see many practical examples that are used to better understand the concepts, and can also serve as starting points for your own projects.&lt;/p&gt;

&lt;p&gt;The book is organized as follows:&lt;/p&gt;

&lt;p&gt;Getting Started with Comet&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;An Overview of Comet&lt;/li&gt;
&lt;li&gt;Exploratory Data Analysis in Comet&lt;/li&gt;
&lt;li&gt;Model Evaluation in Comet&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A Deep Dive to Comet&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Workspaces, Projects, Experiments and Models&lt;/li&gt;
&lt;li&gt;How to Build a Narrative in Comet&lt;/li&gt;
&lt;li&gt;An Overview of DevOps concepts&lt;/li&gt;
&lt;li&gt;Extending the Gitlab DevOps platform with Comet&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Examples and Use Cases&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Comet for Machine Learning&lt;/li&gt;
&lt;li&gt;Comet for Natural Language Processing&lt;/li&gt;
&lt;li&gt;Comet for Deep Learning&lt;/li&gt;
&lt;li&gt;Comet for Time Series Analysis&lt;/li&gt;
&lt;li&gt;You can find more details about the book at 
&lt;a href="https://www.cometfordatascience.com/"&gt;https://www.cometfordatascience.com/&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Happy reading!&lt;/p&gt;

</description>
      <category>books</category>
      <category>datascience</category>
      <category>python</category>
      <category>programming</category>
    </item>
    <item>
      <title>Model Evaluation in Scikit-learn</title>
      <dc:creator>Angelica Lo Duca</dc:creator>
      <pubDate>Tue, 22 Mar 2022 12:16:22 +0000</pubDate>
      <link>https://dev.to/alod83/model-evaluation-in-scikit-learn-4g6p</link>
      <guid>https://dev.to/alod83/model-evaluation-in-scikit-learn-4g6p</guid>
      <description>&lt;p&gt;Scikit-learn is one of the most popular Python libraries for Machine Learning. It provides models, datasets, and other useful functions. In this article, I will describe the most popular techniques provided by scikit-learn for Model Evaluation.&lt;/p&gt;

&lt;p&gt;Model Evaluation permits us to evaluate the performance of a model, and compare different models, to choose the best one to send into production. There are different techniques for Model Evaluation, which depend on the specific task we want to solve. In this article, we focus on the following tasks:&lt;br&gt;
Regression&lt;br&gt;
Classification&lt;br&gt;
For each task, I will describe how to calculate the most popular metrics, through a practical example.&lt;/p&gt;

&lt;h2&gt;
  
  
  1 Loading the Dataset
&lt;/h2&gt;

&lt;p&gt;As an example dataset, I use the Wine Quality Data Set, provided by the UCI Machine Learning Repository. To use this dataset, you should cite the source properly, as follows:&lt;br&gt;
Dua, D. and Graff, C. (2019). UCI Machine Learning Repository [&lt;a href="http://archive.ics.uci.edu/ml"&gt;http://archive.ics.uci.edu/ml&lt;/a&gt;]. Irvine, CA: the University of California, School of Information and Computer Science.&lt;br&gt;
P. Cortez, A. Cerdeira, F. Almeida, T. Matos and J. Reis.&lt;br&gt;
Modeling wine preferences by data mining from physicochemical properties. In Decision Support Systems, Elsevier, 47(4):547–553, 2009.&lt;/p&gt;

&lt;p&gt;I download the data folder, which contains two datasets: one for the red wine, and the other for the white wine. I build a single dataset, which is the concatenation of the two datasets, as follows.&lt;/p&gt;

&lt;p&gt;I load both datasets as Pandas Dataframes, and, then, I merge them:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;import pandas as pd&lt;br&gt;
targets = ['red', 'white']&lt;br&gt;
df_list = []&lt;br&gt;
df = pd.DataFrame()&lt;br&gt;
for target in targets:&lt;br&gt;
    df_temp = pd.read_csv(f"../Datasets/winequality-{target}.csv", sep=';')&lt;br&gt;
    df_temp['target'] = target&lt;br&gt;
    df_list.append(df_temp)&lt;br&gt;
    print(df_temp.shape)&lt;br&gt;
df = pd.concat([df_list[0], df_list[1]])&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;I have added a new column, which contains the original dataset name (red or white). &lt;/p&gt;

&lt;p&gt;The dataset contains 6497 rows and 13 columns.&lt;br&gt;
Now, I define a function, which encodes all the categorical columns:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;from sklearn.preprocessing import LabelEncoder&lt;br&gt;
def transform_categorical(data):&lt;br&gt;
    categories = (data.dtypes =="object")&lt;br&gt;
    cat_cols = list(categories[categories].index)&lt;br&gt;
    label_encoder = LabelEncoder()&lt;br&gt;
    for col in cat_cols:&lt;br&gt;
        data[col] = label_encoder.fit_transform(data[col])&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;I also define another function, which scales numerical columns:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;from sklearn.preprocessing import MinMaxScaler&lt;br&gt;
def scale_numerical(data):&lt;br&gt;
    scaler = MinMaxScaler()&lt;br&gt;
    data[data.columns] = scaler.fit_transform(data[data.columns])&lt;/code&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  2 Regression
&lt;/h2&gt;

&lt;p&gt;To evaluate a regression model, the most popular metrics are:&lt;/p&gt;

&lt;p&gt;Continue Reading on &lt;a href="https://towardsdatascience.com/model-evaluation-in-scikit-learn-abce32ee4a99"&gt;Towards Data Science&lt;/a&gt;&lt;/p&gt;

</description>
      <category>machinelearning</category>
      <category>python</category>
      <category>scikitlearn</category>
      <category>datascience</category>
    </item>
    <item>
      <title>An Overview of Visual Techniques for Exploratory Data Analysis in Python</title>
      <dc:creator>Angelica Lo Duca</dc:creator>
      <pubDate>Wed, 02 Mar 2022 14:27:49 +0000</pubDate>
      <link>https://dev.to/alod83/an-overview-of-visual-techniques-for-exploratory-data-analysis-in-python-f46</link>
      <guid>https://dev.to/alod83/an-overview-of-visual-techniques-for-exploratory-data-analysis-in-python-f46</guid>
      <description>&lt;p&gt;Before we can carry out our Data Science project, we must first try to understand the data and ask ourselves some questions. Exploratory Data Analysis (EDA) is the preliminary phase of a Data Science project, that allows us to extract important information from the data, understand which questions it can answer, and which ones it cannot.&lt;/p&gt;

&lt;p&gt;We can perform EDA using different techniques, such as visual and quantitative techniques. In this article, we focus on visual techniques. Many different types of graphs can be used to analyze data visually. They include line charts, bar charts, scatter plots, area plots, table charts, histograms, lollipop charts, maps, and much more.&lt;/p&gt;

&lt;p&gt;During the Visual EDA phase, the type of chart we use depends on the type of question we want to answer. We do not focus on aesthetics during this phase, because we are only interested in answering our questions. Aesthetics will be attended to in the final data narrative phase.&lt;br&gt;
We can perform two types of EDA:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;univariate analysis, which focuses on a single variable at a time&lt;/li&gt;
&lt;li&gt;multivariate analysis, which focuses on multiple variables at a time.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;When performing EDA, we can have the following types of variables:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Numerical — a variable that can be quantified. It can be either discrete or continuous.&lt;/li&gt;
&lt;li&gt;Categorical — a variable that can assume only a limited number of values.&lt;/li&gt;
&lt;li&gt;Ordinal — a numeric variable that can be sorted&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In this article, I show you some of the most common visual techniques for EDA through a practical example, that uses the matplolib and seaborn Python libraries. The described concepts are general so you can easily adapt them to the other Python libraries or programming languages.&lt;br&gt;
The article is organized as follows:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Setup of the Scenario&lt;/li&gt;
&lt;li&gt;Visual Techniques for Univariate Analysis&lt;/li&gt;
&lt;li&gt;Visual Techniques for Multivariate Analysis&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  1 Setup of the Scenario
&lt;/h2&gt;

&lt;p&gt;The purpose of this scenario is to illustrate the main graphs for Visual EDA. As a sample dataset, we use the IT Salary Survey for EU Region, available under the CC0 license. I would like to thank Parul Pandey, who wrote a fantastic article about 5 real-world datasets for EDA. I discovered the dataset used in this article there.&lt;/p&gt;

&lt;p&gt;Firstly we load the dataset as a Pandas dataframe:&lt;br&gt;
&lt;code&gt;import pandas as pd&lt;br&gt;
df = pd.read_csv('../Datasets/IT Salary Survey EU  2020.csv', parse_dates=['Timestamp'])&lt;br&gt;
df.head()&lt;/code&gt;&lt;br&gt;
The dataset contains 1253 rows and the following 23 columns:&lt;br&gt;
'Timestamp', &lt;br&gt;
'Age', &lt;br&gt;
'Gender', &lt;br&gt;
'City', &lt;br&gt;
'Position ',&lt;br&gt;
'Total years of experience', &lt;br&gt;
'Years of experience in Germany',&lt;br&gt;
'Seniority level', &lt;br&gt;
'Your main technology / programming language',&lt;br&gt;
'Other technologies/programming languages you use often',&lt;br&gt;
'Yearly brutto salary (without bonus and stocks) in EUR',&lt;br&gt;
'Yearly bonus + stocks in EUR',&lt;br&gt;
'Annual brutto salary (without bonus and stocks) one year ago. Only answer if staying in the same country',&lt;br&gt;
'Annual bonus+stocks one year ago. Only answer if staying in same country',&lt;br&gt;
'Number of vacation days', &lt;br&gt;
'Employment status', &lt;br&gt;
'Сontract duration',&lt;br&gt;
'Main language at work', &lt;br&gt;
'Company size', &lt;br&gt;
'Company type',&lt;br&gt;
'Have you lost your job due to the coronavirus outbreak?',&lt;br&gt;
'Have you been forced to have a shorter working week (Kurzarbeit)? If yes, how many hours per week',&lt;br&gt;
'Have you received additional monetary support from your employer due to Work From Home? If yes, how much in 2020 in EUR'&lt;/p&gt;

&lt;h2&gt;
  
  
  2 Visual Techniques for Univariate Analysis
&lt;/h2&gt;

&lt;p&gt;Univariate Analysis considers a single variable at a time. We can consider two types of univariate analysis:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;categorical variables&lt;/li&gt;
&lt;li&gt;numerical variables&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  2.1 Categorical Variables
&lt;/h3&gt;

&lt;p&gt;The first graph we can plot is the count plot, which counts the frequency of each category. In our example, we can plot the frequency of the Position column, by considering only positions with a frequency greater than 10. Firstly, we create the mask:&lt;br&gt;
&lt;code&gt;mask = df['Position '].value_counts()&lt;br&gt;
df_10 = df[df['Position '].isin(mask.index[mask &amp;gt; 10])]&lt;/code&gt;&lt;br&gt;
Then, we build the graph:&lt;br&gt;
&lt;code&gt;import matplotlib.pyplot as plt&lt;br&gt;
import seaborn as sns&lt;br&gt;
colors = sns.color_palette('rocket_r')&lt;br&gt;
plt.figure(figsize=(15,6))&lt;br&gt;
sns.set(font_scale=1.2)&lt;br&gt;
plt.xticks(rotation = 45)&lt;br&gt;
sns.countplot(df_10['Position '], palette=colors)&lt;br&gt;
plt.show()&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;The second type of graph we can plot is the pie chart, which shows the same information of the count plot, but it also adds the percentage:&lt;br&gt;
&lt;code&gt;values = df_10['Position '].value_counts()&lt;br&gt;
plt.figure(figsize=(10,10))&lt;br&gt;
values.plot(kind='pie', colors = colors,fontsize=17, autopct='%.2f')&lt;br&gt;
plt.legend(labels=mask.index, loc="best")&lt;br&gt;
plt.show()&lt;/code&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  2.2 Numerical Variables
&lt;/h2&gt;

&lt;p&gt;In this case, we may be interested in data distribution, so we could plot a histogram. The histogram breaks up all the possible values down into bins, then works out which bin a value belongs to. In our example, we could plot a histogram of the top 10 salaries, so we build a mask as follows:&lt;/p&gt;

&lt;p&gt;Continue Reading on &lt;a href="https://towardsdatascience.com/an-overview-of-visual-techniques-for-exploratory-data-analysis-in-python-d35703d43faf"&gt;Towards Data Science&lt;/a&gt;&lt;/p&gt;

</description>
      <category>python</category>
      <category>datascience</category>
      <category>machinelearning</category>
      <category>datavis</category>
    </item>
    <item>
      <title>Is a Small Dataset Risky?</title>
      <dc:creator>Angelica Lo Duca</dc:creator>
      <pubDate>Mon, 21 Feb 2022 10:17:37 +0000</pubDate>
      <link>https://dev.to/alod83/is-a-small-dataset-risky-43p6</link>
      <guid>https://dev.to/alod83/is-a-small-dataset-risky-43p6</guid>
      <description>&lt;p&gt;Recently I have written an article about the risks of using the &lt;code&gt;train_test_split()&lt;/code&gt; function provided by the scikit-learn Python package. That article has raised a lot of comments, some positives, and others with some concerns. The main concern in the article was that I used a small dataset to demonstrate my theory, which was: be careful when you use the &lt;code&gt;train_test_split()&lt;/code&gt;function, because the different seeds may produce very different models.&lt;/p&gt;

&lt;p&gt;The main concern was that the &lt;code&gt;train_test_split()&lt;/code&gt; function does not behave strangely; the problem is that I used a small dataset to demonstrate my thesis.&lt;/p&gt;

&lt;p&gt;In this article, I try to discover which is the performance of a Linear Regression model by varying the dataset size. In addition, I compare the obtained performance of the algorithm with that obtained by varying the random seed in the train_test_split() function.&lt;/p&gt;

&lt;p&gt;I organize the article as follows:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Possible issues with a small dataset&lt;/li&gt;
&lt;li&gt;Possible countermeasures&lt;/li&gt;
&lt;li&gt;Practical Example&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  1 Possible issue of a small dataset
&lt;/h2&gt;

&lt;p&gt;A small dataset is a dataset with a little number of samples. The quantity small depends on the nature of the problem to solve. For example, if we want to analyze the average opinion about a given product, 100,000 reviews may be a lot, but if we have the same number of samples to calculate the most discussed topic on Twitter, the number of samples is really small.&lt;/p&gt;

&lt;p&gt;Let us suppose that we have a small dataset, i.e. the number of samples is not sufficient to represent our problem. We could encounter at least the following issues:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Outliers — an outlier is a sample that significantly deviates from the rest of the dataset.&lt;/li&gt;
&lt;li&gt;Overfitting — a model performs well with the training set, but it has poor performance with the test test&lt;/li&gt;
&lt;li&gt;Sampling Bias — the dataset does not reflect reality.&lt;/li&gt;
&lt;li&gt;Missing Values — a sample is not complete, some features could miss.&lt;/li&gt;
&lt;li&gt;…&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  2 Possible Countermeasures
&lt;/h2&gt;

&lt;p&gt;One obvious countermeasure to the issue of having a small dataset could be to increase the size of the dataset. We could achieve this result by collecting new data or producing new synthetic data.&lt;/p&gt;

&lt;p&gt;Another possible solution could be using an ensemble approach, where instead of using just one best model, we can train different models and then combine them to get the best model.&lt;br&gt;
Other countermeasures could include the usage of regularization, confidence intervals, and consortium approach, as described in this very interesting article entitled Problems of Small Data and How to Handle Them.&lt;/p&gt;
&lt;h2&gt;
  
  
  3 A Practical Example
&lt;/h2&gt;

&lt;p&gt;In this example, we use the Weather Conditions in World War Two available on Kaggle, under the U.S. Government Works license. The experiment builds a very simple linear regression model that tries to predict the maximum temperature, provided the minimum temperature.&lt;/p&gt;

&lt;p&gt;We run two batteries of tests: the first varies the dataset size, the second varies the random seed provided as input to the &lt;code&gt;train_test_split()&lt;/code&gt; function.&lt;br&gt;
In the first battery of tests, we run 1190 tests with a variable number of samples (from 100 up to the full dataset size), extracted randomly, and then, for each test, we calculate the Root Mean Squared Error (RMSE).&lt;/p&gt;

&lt;p&gt;In the second battery of tests, we run other 1000 tests with a variable value for random_seed provided as input to the &lt;code&gt;train_test_split()&lt;/code&gt;, and we calculate RMSE. Finally, we compare the results of the two batteries of tests, in terms of mean and standard deviation.&lt;/p&gt;
&lt;h2&gt;
  
  
  3.1 Load dataset
&lt;/h2&gt;

&lt;p&gt;First, we load the dataset as a Pandas dataframe:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import pandas as pd
df = pd.read_csv('Summary of Weather.csv')
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The dataset has 119,040 rows and 31 columns. For our experiment, we use only the MinTemp and MaxTemp columns.&lt;/p&gt;

&lt;p&gt;Continue reading on &lt;a href="https://towardsdatascience.com/is-a-small-dataset-risky-b664b8569a21"&gt;Towards Data Science&lt;/a&gt;&lt;/p&gt;

</description>
      <category>datascience</category>
      <category>machinelearning</category>
      <category>python</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Why You Should Not Trust the train_test_split() Function</title>
      <dc:creator>Angelica Lo Duca</dc:creator>
      <pubDate>Mon, 14 Feb 2022 16:29:59 +0000</pubDate>
      <link>https://dev.to/alod83/why-you-should-not-trust-the-traintestsplit-function-2c74</link>
      <guid>https://dev.to/alod83/why-you-should-not-trust-the-traintestsplit-function-2c74</guid>
      <description>&lt;p&gt;Surely almost all data scientists have tried to use the &lt;code&gt;train_test_split()&lt;/code&gt; function at least once in their life. The &lt;code&gt;train_test_split()&lt;/code&gt; function is provided by the scikit-learn Python package. Usually, we do not care much about the effects of using this function, because with a single line of code we obtain the division of the dataset into two parts, train and test set.&lt;/p&gt;

&lt;p&gt;Indeed, using this function could be dangerous. And in this article, I will try to explain why.&lt;/p&gt;

&lt;p&gt;The article is organized as follows:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Overview of the train_test_split() function&lt;/li&gt;
&lt;li&gt;Potential risks&lt;/li&gt;
&lt;li&gt;Possible countermeasures.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  1 Overview of the train_test_split() function
&lt;/h2&gt;

&lt;p&gt;The &lt;code&gt;train_test_split()&lt;/code&gt; function is provided by the model_selection subpackage available under the sklearn package. The function receives as input the following parameters:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;arrays — the dataset to be split;&lt;/li&gt;
&lt;li&gt;test_size — the size of the test set. It could be either a float or an integer number. If it is a float, it should be a number between 0.0 and 1.0 and represents the proportion of the dataset to include in the test set. If it is an integer, it is the total number of samples to include in the test set. If the test_size is not set, the value is set automatically to the complement of the train size;&lt;/li&gt;
&lt;li&gt;train_size — the size of the train set. Its behavior is complementary to the test_size variable;&lt;/li&gt;
&lt;li&gt;random_state — before applying to split, the dataset is shuffled. The random_state variable is an integer that initializes the seed used for shuffling. It is used to make the experiment reproducible;&lt;/li&gt;
&lt;li&gt;shuffle — it specifies whether to shuffle data before splitting or not. The default value is True;&lt;/li&gt;
&lt;li&gt;stratify — if not None, it specifies an array of frequencies for class labels. This permits the splitting phase the preserve the frequency of class labels as specified.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Usually, we copy the example of how to use the &lt;code&gt;train_test_split()&lt;/code&gt; from the scikit-learn documentation and we use it as follows:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;from sklearn.model_selection import train_test_split&lt;br&gt;
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.33, random_state=42)&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;We don’t care much about the effects of this feature. Let’s just go ahead with the code.&lt;br&gt;
But there are potential risks, which I will show you in the next section.&lt;/p&gt;

&lt;h2&gt;
  
  
  2 Potential Risks
&lt;/h2&gt;

&lt;p&gt;Internally, the &lt;code&gt;train_test_split()&lt;/code&gt; function uses a seed that allows you to pseudorandomly separate the data into two groups: training and test set.&lt;/p&gt;

&lt;p&gt;The number is pseudorandom because the same data subdivision corresponds to the same seed value. This aspect is very useful to ensure the reproducibility of the experiments.&lt;br&gt;
Unfortunately, the use of one seed rather than another could lead to totally different datasets, and even modify the performance of the chosen Machine Learning model that receives the training set as input.&lt;/p&gt;

&lt;p&gt;To understand the problem, let's take an example. &lt;/p&gt;

&lt;p&gt;Continue reading on &lt;a href="https://towardsdatascience.com/why-you-should-not-trust-the-train-test-split-function-47cb9d353ad2"&gt;Towards Data Science&lt;/a&gt;&lt;/p&gt;

</description>
      <category>machinelearning</category>
      <category>datascience</category>
      <category>python</category>
      <category>scikitlearn</category>
    </item>
  </channel>
</rss>
