{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"(sec:modeling_summary)=\n",
"# Summary\n",
"\n",
"We've introduced the constant model: a model that\n",
"summarizes all of the data by a single value. To fit the constant model, we chose\n",
"a loss function that measured how well a given constant fits a data value, and\n",
"we computed the average loss over all of the data values. We saw that depending\n",
"on the choice of loss function, we get a different minimizing value:\n",
"we found that the mean minimizes the average squared error (MSE), and the median\n",
"minimizes the average absolute error (MAE). We also discussed how we can\n",
"incorporate context and knowledge of our problem to pick a loss function.\n",
"\n",
"The idea of fitting models through loss minimization ties simple summary\n",
"statistics---like the mean, median, and mode---to more complex modeling\n",
"situations. The steps we took to model our data apply to many modeling\n",
"scenarios:\n",
"\n",
"1. Select the form of a model (such as the constant model)\n",
"2. Select a loss function (such as absolute error)\n",
"3. Fit the model by minimizing the loss over all the data (such as average loss)\n",
"\n",
"For the rest of this book, our modeling techniques expand upon one or\n",
"more of these steps. We introduce new models (1), new loss functions (2), and\n",
"new techniques for minimizing loss (3)."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"The next chapter revisits the study of a bus arriving late at its stop. This time, we present the problem as a case study and visit all stages of the data science lifecycle. By going through these stages, we make some unusual discoveries; when we augment our analysis by considering data scope and using an urn to simulate a rider arriving at the bus stop, we find that modeling bus lateness is not the same as modeling the rider's experience waiting for a bus."
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.4"
}
},
"nbformat": 4,
"nbformat_minor": 4
}