Skip to content

Commit ab28d3d

Browse files
committed
CLN: update example notebook formatting, add custom basis to basis comparison
1 parent be23b40 commit ab28d3d

File tree

6 files changed

+209
-266
lines changed

6 files changed

+209
-266
lines changed

examples/OPTI-TWIST_constrained_sensing.ipynb

Lines changed: 69 additions & 100 deletions
Large diffs are not rendered by default.

examples/Olivetti_constrained_sensing.ipynb

Lines changed: 79 additions & 124 deletions
Large diffs are not rendered by default.

examples/basis_comparison.ipynb

Lines changed: 43 additions & 25 deletions
Large diffs are not rendered by default.

examples/pysensors_overview.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -919,7 +919,7 @@
919919
"2. Change the `l1_penalty` parameter. This affects the strength of the regularization applied when finding sensor locations. If `n_sensors` is not passed to the `SSPOC` constructor, then the value of `l1_penalty` can affect the number of sensors that are selected. You can also tune the `threshold` parameter to further affect the sensor count.\n",
920920
"3. Update `n_sensors` after fitting. Use the `update_sensors` function to do so. It is recommended that you also pass in the training and test data so that the classifier can be refit using the new sensors.\n",
921921
"\n",
922-
"See the [classification notebook](http://localhost:8888/notebooks/examples/classification.ipynb) for more information."
922+
"See the [classification notebook](https://python-sensors.readthedocs.io/en/latest/examples/classification.html) for more information."
923923
]
924924
},
925925
{

examples/spatial_constrained_qr.ipynb

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@
164164
"cell_type": "markdown",
165165
"metadata": {},
166166
"source": [
167-
"## Unconstrained optimization of sensor placement:\n",
167+
"## Unconstrained sensor placement:\n",
168168
"\n",
169169
"Consider the case where we treat all sensor locations as being equally viable."
170170
]
@@ -469,7 +469,7 @@
469469
"cell_type": "markdown",
470470
"metadata": {},
471471
"source": [
472-
"## The exact_n case: "
472+
"## The exact_n case"
473473
]
474474
},
475475
{
@@ -913,7 +913,7 @@
913913
"cell_type": "markdown",
914914
"metadata": {},
915915
"source": [
916-
"## Reconstruct image from test set using sensors placed via constrained (exact_n) optimizer"
916+
"### Reconstruct image from test set using sensors placed via constrained (exact_n) optimizer"
917917
]
918918
},
919919
{
@@ -1186,7 +1186,7 @@
11861186
"cell_type": "markdown",
11871187
"metadata": {},
11881188
"source": [
1189-
"## The max_n case: \n",
1189+
"## The max_n case\n",
11901190
"\n",
11911191
"#### Max_n employs the same strategy as exact_n when: (results are identical)\n",
11921192
"- The QR optimizer (unconstrained) places more than (n_const_sensors) in the constrained region, which violates the desired constraint.\n",
@@ -1340,7 +1340,7 @@
13401340
"cell_type": "markdown",
13411341
"metadata": {},
13421342
"source": [
1343-
"## The predetermined case: \n",
1343+
"## The predetermined case\n",
13441344
"\n",
13451345
"- This occurs when (n_pre_sensors) locations are already specified and we want the best locations to place the remaining sensors. \n",
13461346
"\n",
@@ -1877,7 +1877,7 @@
18771877
"cell_type": "markdown",
18781878
"metadata": {},
18791879
"source": [
1880-
"## Reconstruct image from test set using sensors placed via predetermined optimizer"
1880+
"### Reconstruct image from test set using sensors placed via predetermined optimizer"
18811881
]
18821882
},
18831883
{
@@ -1986,7 +1986,7 @@
19861986
"cell_type": "markdown",
19871987
"metadata": {},
19881988
"source": [
1989-
"## The distance constrained case:\n",
1989+
"## The distance constrained case\n",
19901990
"- This occurs when we want to place sensors a certain distance (radius (r)) away from each other.\n",
19911991
"\n",
19921992
"#### Suppose we want to places sensors 7 units away from each other to reconstruct the Olivetti Faces Dataset."

examples/two_point_greedy.ipynb

Lines changed: 10 additions & 9 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)