Skip to content

Commit 22a9b64

Browse files
authored
Merge pull request #171 from neuromatch/staging
Update html for W2D4_Tutorial7
2 parents 002a965 + 0a593c0 commit 22a9b64

4 files changed

Lines changed: 41 additions & 30 deletions

File tree

tutorials/W2D4_AIandClimateChange/W2D4_Tutorial7.ipynb

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1325,7 +1325,7 @@
13251325
"Before feeding our climate data into a deep learning model, we need to ensure that all features are on a comparable scale. Different climate variables have different units and magnitudes (e.g., CO₂ in ppm vs. precipitation in mm/day), which can negatively impact model performance. \n",
13261326
"\n",
13271327
"In the next section, we'll explore **data normalization**, understand why it is essential, and implement a standardization technique to transform our dataset for optimal learning. \n",
1328-
"\n"
1328+
"</details>\n"
13291329
]
13301330
},
13311331
{
@@ -1896,8 +1896,8 @@
18961896
"- LSTM layers capture long-term dependencies over time.\n",
18971897
"- The model receives inputs in a way that aligns with its internal computations.\n",
18981898
"</details>\n",
1899-
"</details>\n",
1900-
"\n",
1899+
"<details>\n",
1900+
"<summary> <font color='lightGreen'>What Needs to Be Done?</font></summary>\n",
19011901
"What Needs to Be Done?\n",
19021902
"\n",
19031903
"To get our dataset ready for training, we must: \n",
@@ -2329,7 +2329,8 @@
23292329
"\n",
23302330
"✅ **Key Benefit**: This method allows CNNs to extract spatial features **without losing the sequence structure**, making it ready for LSTM processing. \n",
23312331
"\n",
2332-
"By combining **CNNs (for spatial feature extraction) and LSTMs (for temporal learning)**, we ensure that the model learns both **where** and **how** climate patterns change over time. \n"
2332+
"By combining **CNNs (for spatial feature extraction) and LSTMs (for temporal learning)**, we ensure that the model learns both **where** and **how** climate patterns change over time. \n",
2333+
"</details>"
23332334
]
23342335
},
23352336
{
@@ -2852,7 +2853,8 @@
28522853
"- \\( m_t \\) and \\( v_t \\) are moving averages of gradients and squared gradients.\n",
28532854
"- \\( \\beta_1 = 0.9 \\) and \\( \\beta_2 = 0.999 \\) control momentum.\n",
28542855
"- \\( \\eta \\) is the learning rate (set to **0.001**).\n",
2855-
"- **Advantages:** Adam adapts learning rates dynamically, making it robust for deep learning.\n"
2856+
"- **Advantages:** Adam adapts learning rates dynamically, making it robust for deep learning.\n",
2857+
"</details>"
28562858
]
28572859
},
28582860
{
@@ -3305,7 +3307,7 @@
33053307
},
33063308
"source": [
33073309
"<details>\n",
3308-
"<summary> <font color='lightGreen'>Explanation:</font></summary>\n",
3310+
"<summary> <font color='lightGreen'>Explanation</font></summary>\n",
33093311
"\n",
33103312
"**Explanation:**\n",
33113313
"\n",
@@ -3419,7 +3421,7 @@
34193421
},
34203422
"source": [
34213423
"<details>\n",
3422-
"<summary> <font color='lightGreen'>Explanation: </font></summary>\n",
3424+
"<summary> <font color='lightGreen'>Explanation</font></summary>\n",
34233425
"\n",
34243426
"**Explanation:**\n",
34253427
"\n",
@@ -3477,7 +3479,7 @@
34773479
"* **Plotting actual vs. predicted temperatures:** Create scatter plots or time series plots to compare the model's predictions to the actual temperature values.\n",
34783480
"* **Mapping the difference (error):** Plot the difference between the predicted and actual temperatures to visualize the model's errors.\n",
34793481
"* **Using Cartopy for Geographic Projections:** Use `cartopy` to project the data onto a map, providing a more realistic view of the climate patterns.\n",
3480-
"\n"
3482+
"</details>\n"
34813483
]
34823484
},
34833485
{
@@ -3725,7 +3727,7 @@
37253727
},
37263728
"outputs": [],
37273729
"source": [
3728-
"#to_remove explanation\n",
3730+
"# to_remove explanation\n",
37293731
"\"\"\"\n",
37303732
"Discussion: Visual similarity is intuitive, but quantitative metrics (e.g., RMSE, correlation) are needed to rigorously evaluate emulator quality.\n",
37313733
"Confidence also comes from generalization: does the emulator work on unseen scenarios?\n",
@@ -4153,7 +4155,7 @@
41534155
"name": "python",
41544156
"nbconvert_exporter": "python",
41554157
"pygments_lexer": "ipython3",
4156-
"version": "3.9.13"
4158+
"version": "3.13.2"
41574159
}
41584160
},
41594161
"nbformat": 4,

tutorials/W2D4_AIandClimateChange/instructor/W2D4_Tutorial7.ipynb

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1325,7 +1325,7 @@
13251325
"Before feeding our climate data into a deep learning model, we need to ensure that all features are on a comparable scale. Different climate variables have different units and magnitudes (e.g., CO₂ in ppm vs. precipitation in mm/day), which can negatively impact model performance. \n",
13261326
"\n",
13271327
"In the next section, we'll explore **data normalization**, understand why it is essential, and implement a standardization technique to transform our dataset for optimal learning. \n",
1328-
"\n"
1328+
"</details>\n"
13291329
]
13301330
},
13311331
{
@@ -1896,8 +1896,8 @@
18961896
"- LSTM layers capture long-term dependencies over time.\n",
18971897
"- The model receives inputs in a way that aligns with its internal computations.\n",
18981898
"</details>\n",
1899-
"</details>\n",
1900-
"\n",
1899+
"<details>\n",
1900+
"<summary> <font color='lightGreen'>What Needs to Be Done?</font></summary>\n",
19011901
"What Needs to Be Done?\n",
19021902
"\n",
19031903
"To get our dataset ready for training, we must: \n",
@@ -2329,7 +2329,8 @@
23292329
"\n",
23302330
"✅ **Key Benefit**: This method allows CNNs to extract spatial features **without losing the sequence structure**, making it ready for LSTM processing. \n",
23312331
"\n",
2332-
"By combining **CNNs (for spatial feature extraction) and LSTMs (for temporal learning)**, we ensure that the model learns both **where** and **how** climate patterns change over time. \n"
2332+
"By combining **CNNs (for spatial feature extraction) and LSTMs (for temporal learning)**, we ensure that the model learns both **where** and **how** climate patterns change over time. \n",
2333+
"</details>"
23332334
]
23342335
},
23352336
{
@@ -2854,7 +2855,8 @@
28542855
"- \\( m_t \\) and \\( v_t \\) are moving averages of gradients and squared gradients.\n",
28552856
"- \\( \\beta_1 = 0.9 \\) and \\( \\beta_2 = 0.999 \\) control momentum.\n",
28562857
"- \\( \\eta \\) is the learning rate (set to **0.001**).\n",
2857-
"- **Advantages:** Adam adapts learning rates dynamically, making it robust for deep learning.\n"
2858+
"- **Advantages:** Adam adapts learning rates dynamically, making it robust for deep learning.\n",
2859+
"</details>"
28582860
]
28592861
},
28602862
{
@@ -3309,7 +3311,7 @@
33093311
},
33103312
"source": [
33113313
"<details>\n",
3312-
"<summary> <font color='lightGreen'>Explanation:</font></summary>\n",
3314+
"<summary> <font color='lightGreen'>Explanation</font></summary>\n",
33133315
"\n",
33143316
"**Explanation:**\n",
33153317
"\n",
@@ -3423,7 +3425,7 @@
34233425
},
34243426
"source": [
34253427
"<details>\n",
3426-
"<summary> <font color='lightGreen'>Explanation: </font></summary>\n",
3428+
"<summary> <font color='lightGreen'>Explanation</font></summary>\n",
34273429
"\n",
34283430
"**Explanation:**\n",
34293431
"\n",
@@ -3481,7 +3483,7 @@
34813483
"* **Plotting actual vs. predicted temperatures:** Create scatter plots or time series plots to compare the model's predictions to the actual temperature values.\n",
34823484
"* **Mapping the difference (error):** Plot the difference between the predicted and actual temperatures to visualize the model's errors.\n",
34833485
"* **Using Cartopy for Geographic Projections:** Use `cartopy` to project the data onto a map, providing a more realistic view of the climate patterns.\n",
3484-
"\n"
3486+
"</details>\n"
34853487
]
34863488
},
34873489
{
@@ -3729,7 +3731,7 @@
37293731
},
37303732
"outputs": [],
37313733
"source": [
3732-
"#to_remove explanation\n",
3734+
"# to_remove explanation\n",
37333735
"\"\"\"\n",
37343736
"Discussion: Visual similarity is intuitive, but quantitative metrics (e.g., RMSE, correlation) are needed to rigorously evaluate emulator quality.\n",
37353737
"Confidence also comes from generalization: does the emulator work on unseen scenarios?\n",
@@ -4157,7 +4159,7 @@
41574159
"name": "python",
41584160
"nbconvert_exporter": "python",
41594161
"pygments_lexer": "ipython3",
4160-
"version": "3.9.13"
4162+
"version": "3.13.2"
41614163
}
41624164
},
41634165
"nbformat": 4,
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
"""
2+
Discussion: Visual similarity is intuitive, but quantitative metrics (e.g., RMSE, correlation) are needed to rigorously evaluate emulator quality.
3+
Confidence also comes from generalization: does the emulator work on unseen scenarios?
4+
Trust is built by balancing quantitative validation with domain understanding — knowing when small differences matter scientifically.
5+
"""

tutorials/W2D4_AIandClimateChange/student/W2D4_Tutorial7.ipynb

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1325,7 +1325,7 @@
13251325
"Before feeding our climate data into a deep learning model, we need to ensure that all features are on a comparable scale. Different climate variables have different units and magnitudes (e.g., CO₂ in ppm vs. precipitation in mm/day), which can negatively impact model performance. \n",
13261326
"\n",
13271327
"In the next section, we'll explore **data normalization**, understand why it is essential, and implement a standardization technique to transform our dataset for optimal learning. \n",
1328-
"\n"
1328+
"</details>\n"
13291329
]
13301330
},
13311331
{
@@ -1896,8 +1896,8 @@
18961896
"- LSTM layers capture long-term dependencies over time.\n",
18971897
"- The model receives inputs in a way that aligns with its internal computations.\n",
18981898
"</details>\n",
1899-
"</details>\n",
1900-
"\n",
1899+
"<details>\n",
1900+
"<summary> <font color='lightGreen'>What Needs to Be Done?</font></summary>\n",
19011901
"What Needs to Be Done?\n",
19021902
"\n",
19031903
"To get our dataset ready for training, we must: \n",
@@ -2329,7 +2329,8 @@
23292329
"\n",
23302330
"✅ **Key Benefit**: This method allows CNNs to extract spatial features **without losing the sequence structure**, making it ready for LSTM processing. \n",
23312331
"\n",
2332-
"By combining **CNNs (for spatial feature extraction) and LSTMs (for temporal learning)**, we ensure that the model learns both **where** and **how** climate patterns change over time. \n"
2332+
"By combining **CNNs (for spatial feature extraction) and LSTMs (for temporal learning)**, we ensure that the model learns both **where** and **how** climate patterns change over time. \n",
2333+
"</details>"
23332334
]
23342335
},
23352336
{
@@ -2773,7 +2774,8 @@
27732774
"- \\( m_t \\) and \\( v_t \\) are moving averages of gradients and squared gradients.\n",
27742775
"- \\( \\beta_1 = 0.9 \\) and \\( \\beta_2 = 0.999 \\) control momentum.\n",
27752776
"- \\( \\eta \\) is the learning rate (set to **0.001**).\n",
2776-
"- **Advantages:** Adam adapts learning rates dynamically, making it robust for deep learning.\n"
2777+
"- **Advantages:** Adam adapts learning rates dynamically, making it robust for deep learning.\n",
2778+
"</details>"
27772779
]
27782780
},
27792781
{
@@ -3154,7 +3156,7 @@
31543156
},
31553157
"source": [
31563158
"<details>\n",
3157-
"<summary> <font color='lightGreen'>Explanation:</font></summary>\n",
3159+
"<summary> <font color='lightGreen'>Explanation</font></summary>\n",
31583160
"\n",
31593161
"**Explanation:**\n",
31603162
"\n",
@@ -3268,7 +3270,7 @@
32683270
},
32693271
"source": [
32703272
"<details>\n",
3271-
"<summary> <font color='lightGreen'>Explanation: </font></summary>\n",
3273+
"<summary> <font color='lightGreen'>Explanation</font></summary>\n",
32723274
"\n",
32733275
"**Explanation:**\n",
32743276
"\n",
@@ -3326,7 +3328,7 @@
33263328
"* **Plotting actual vs. predicted temperatures:** Create scatter plots or time series plots to compare the model's predictions to the actual temperature values.\n",
33273329
"* **Mapping the difference (error):** Plot the difference between the predicted and actual temperatures to visualize the model's errors.\n",
33283330
"* **Using Cartopy for Geographic Projections:** Use `cartopy` to project the data onto a map, providing a more realistic view of the climate patterns.\n",
3329-
"\n"
3331+
"</details>\n"
33303332
]
33313333
},
33323334
{
@@ -3573,7 +3575,7 @@
35733575
"execution": {}
35743576
},
35753577
"source": [
3576-
"[*Click for solution*](https://github.com/ClimateMatchAcademy/course-content/tree/main/tutorials/W2D4_AIandClimateChange/solutions/W2D4_Tutorial7_Solution_e576b924.py)\n",
3578+
"[*Click for solution*](https://github.com/ClimateMatchAcademy/course-content/tree/main/tutorials/W2D4_AIandClimateChange/solutions/W2D4_Tutorial7_Solution_51e6f553.py)\n",
35773579
"\n"
35783580
]
35793581
},
@@ -3997,7 +3999,7 @@
39973999
"name": "python",
39984000
"nbconvert_exporter": "python",
39994001
"pygments_lexer": "ipython3",
4000-
"version": "3.9.13"
4002+
"version": "3.13.2"
40014003
}
40024004
},
40034005
"nbformat": 4,

0 commit comments

Comments
 (0)