Exploring Data

Step 1 of the machine learning workflow

NoteExploring Data · at a glance
Workflow step Step 1 of 5 · Explore
What you’ll learn How to summarize a dataset, read its distributions, and reason about feature types.
Standards assessed FLOW · EDA-STAT
Key terms target · features · distribution · feature type · summary statistic · skew
Materials readings · slides · homework · lab
Self-quiz standards & practice →

Overview

Exploratory data analysis (EDA) is the first step in our machine learning workflow. It involves running general statistical tests to see whether our target variable is worth pursuing, checking for oddities in the data such as missingness, outliers, and correlations, and designing visualizations to help us explore the data further. Together, these steps provide evidence for supporting our research goal, while also offering key insights into how best to work with our data moving forward.

Readings

Before class, read the assigned material and take notes.

Cheat sheets

The following cheatsheets may be helpful for your reference: data storytelling, data visualizations, matplotlib, plotly, seaborn.

Slides

Model workflow

EDA1: Overview of the 5step workflow, learning paradigms, and features types.
Open in new tab

Statistics

EDA2: Descriptive statistics (mean, median, standard deviation), statistical tests and hypothesis testing.
Open in new tab

Visualizations

EDA3: How to tell a story, and creating visualizations with mathplotlib, plotnine, seaborn.
Open in new tab

Homework

This homework goes over looking at summary tables for a dataset, explaining statistical terms to non-tech folks, exploring statistics, and interpretting statistical tests. Click to view pdf.

Lab

In this lab, we will explore how to critique and refine code outputted by a language model, and practice a bit of prompt engineering. We will be using the Titanic dataset to perform exploratory data analysis tasks, including calculating statistical measures, conducting statistical tests, and creating visualizations. Click to view Colab Notebook.

Self-quiz

Use the standards below as a checklist, then try the practice questions to test yourself.

Standards

FLOW

You should be able to:

  • Define learning approaches (supervised vs. unsupervised learning) and learning tasks (regression, classification, and clustering).
  • Interpret a dataset summary table.
  • Describe a model’s goal and explain who might benefit from the model.
  • Describe the five steps ML workflow and give a few examples of tasks for each step

EDA-STAT

You should be able to:

  • Understand and describe statistical measures, distributions, and tests
  • Read and interpret charts, including identifying key features (skew, balance, shape) and chart types (histogram, boxplot, scatterplot)
  • Identify different feature types (numeric, discrete, continuous, ordinal, categorical, binary, or none).
  • Explain what factors to consider when deciding whether a feature type is appropriate to include in a machine learning model.

Practice questions

Click a question to reveal the answer.

Supervised learning means we have labels for each of our observations. The model learns general characteristics for each type of label, and then predicts a label for an unseen observation. Unsupervised learning has no labels, so we group observations based on how similar they are.
Analogies may vary.

(a) The distribution is left-skewed (mean < median), unimodal (one main peak), and not symmetric
(b) The median would be a better representations since the mean gets pulled in the direction of the tail. This means that it will looks like the average student sleeps less than they actually do. With heavy skews, the median is more robust to outliers/extremes.
(c) A boxplot would be good since it shows the median and IQR (middle 50% range) as well as the mean. This allows us to see general percentage cutoffs (25%, 50%, 75%)