{ "cells": [ { "attachments": {}, "cell_type": "markdown", "metadata": { "id": "HQHMfCs-ZVq8" }, "source": [ "# 16. Regression\n", "\n", "Seaborn is a great tool if you want to quickly explore data and relations between variables. In addition to just plotting scatterplots you can also perform regression while plotting, a task for which seaborn uses the statsmodels package. **Note that you cannot extract fit values from the plots. The goal here is rather exploratory or to generate figures**. If you need the fit values you will need to use statsmodels directly." ] }, { "cell_type": "code", "execution_count": 2, "metadata": { "colab": { "base_uri": "https://localhost:8080/", "height": 204 }, "executionInfo": { "elapsed": 2950, "status": "ok", "timestamp": 1615194508960, "user": { "displayName": "Guillaume Witz", "photoUrl": "https://lh3.googleusercontent.com/a-/AOh14GgT0K2JVYzEsjzsS5nhkUVjUrSIJ5jHzXnBoYrmVf8=s64", "userId": "16033870147214403532" }, "user_tz": -60 }, "id": "0oroh_5FaHxJ", "outputId": "2756da28-75f9-4713-98df-864b5c6f4749", "tags": [] }, "outputs": [ { "data": { "text/html": [ "
\n", " | carat | \n", "colour | \n", "clarity | \n", "certification | \n", "price | \n", "
---|---|---|---|---|---|
1 | \n", "0.30 | \n", "D | \n", "VS2 | \n", "GIA | \n", "1302 | \n", "
2 | \n", "0.30 | \n", "E | \n", "VS1 | \n", "GIA | \n", "1510 | \n", "
3 | \n", "0.30 | \n", "G | \n", "VVS1 | \n", "GIA | \n", "1510 | \n", "
4 | \n", "0.30 | \n", "G | \n", "VS1 | \n", "GIA | \n", "1260 | \n", "
5 | \n", "0.31 | \n", "D | \n", "VS1 | \n", "GIA | \n", "1641 | \n", "