|
5 | 5 | "metadata": {},
|
6 | 6 | "source": [
|
7 | 7 | "# Cost-constrained QR (CCQR)\n",
|
8 |
| - "Explore the `CCQR` optimizer for cost-constrained sparse sensor placement (for reconstruction).\n", |
| 8 | + "This notebook explores the `PySensors` cost-constrained QR `CCQR` optimizer for cost-constrained sparse sensor placement (for reconstruction).\n", |
| 9 | + "\n", |
| 10 | + "Suppose we are interested in reconstructing a field based on a limited set of measurements.\n", |
| 11 | + "Examples:\n", |
| 12 | + "* Fluid flows (estimating the drag on an airplane wing with pressure sensors on different parts of the wing)\n", |
| 13 | + "* Atmospheric dynamics (approximating the concentrations of different molecules based on measurements taken at only a few locations)\n", |
| 14 | + "* Sea-surface temperature (predicting the temperature at any point on the ocean based on the temperatures measured at various other points on the ocean)\n", |
| 15 | + "\n", |
| 16 | + "In other notebooks we have shown how one can use the `SensorSelector` class to pick optimal locations in which to place sensors to accomplish this task. But so far we have treated all sensor locations as being equally viable. What happens when some sensor locations are more expensive than others? For example, it might be ten times as costly to place and maintain a buoy measuring the sea-surface temperature in the middle of the Atlantic compared to one close to the coast.\n", |
| 17 | + "\n", |
| 18 | + "The cost-constrained QR algorithm was devised specifically to solve such problems. The `PySensors` object implementing this method is named `CCQR` and in this notebook we'll demonstrate its use on a toy problem.\n", |
9 | 19 | "\n",
|
10 | 20 | "See the following reference for more information ([link](https://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=8579238))\n",
|
11 | 21 | "\n",
|
|
36 | 46 | "cell_type": "markdown",
|
37 | 47 | "metadata": {},
|
38 | 48 | "source": [
|
39 |
| - "## Setup" |
| 49 | + "## Setup\n", |
| 50 | + "\n", |
| 51 | + "We'll consider the Olivetti faces dataset from AT&T. Our goal will be to reconstruct images of faces from a limited set of measurements.\n", |
| 52 | + "\n", |
| 53 | + "First we've got to load and preprocess the data." |
40 | 54 | ]
|
41 | 55 | },
|
42 | 56 | {
|
|
164 | 178 | "metadata": {},
|
165 | 179 | "source": [
|
166 | 180 | "## Sensor costs\n",
|
| 181 | + "In order for `CCQR` to decide which sensors are most important, it needs to know the costs associated with each of them. To this end, one must construct an array specifying these costs. Larger costs/values will make `CCQR` less likely to pick a given sensor, and smaller ones will have the opposite effect.\n", |
| 182 | + "\n", |
167 | 183 | "We'll consider three different sets of sensor costs:\n",
|
168 | 184 | "\n",
|
169 | 185 | "* Zero cost: all sensors have zero cost\n",
|
|
220 | 236 | "cell_type": "markdown",
|
221 | 237 | "metadata": {},
|
222 | 238 | "source": [
|
223 |
| - "Apply `CCQR` with each of the above cost functions, plotting learned sensor locations and a few examples of reconstructed faces from the test set." |
| 239 | + "Next we'll apply `CCQR` with each of the above cost functions, plotting learned sensor locations and a few examples of reconstructed faces from the test set.\n", |
| 240 | + "\n", |
| 241 | + "Note that the mean-square error (MSE) reported in the first row is the MSE across all images in the test set. For the later rows, we give the MSE for the particular image being shown." |
224 | 242 | ]
|
225 | 243 | },
|
226 | 244 | {
|
|
0 commit comments