Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions Course/02_numpy.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -881,14 +881,16 @@
"execution_count": null,
"metadata": {
"editable": true,
"remove_code": "non-comments",
"remove_code": "after:# Load non-number columns from file (1,2,3)",
"slideshow": {
"slide_type": ""
},
"tags": []
},
"outputs": [],
"source": [
"data_path2 = '../Data/presentation/molecule1.xyz'\n",
"\n",
"# Load non-number columns from file (1,2,3)\n"
]
},
Expand Down Expand Up @@ -999,7 +1001,7 @@
"execution_count": null,
"metadata": {
"editable": true,
"remove_code": "non-comments",
"remove_code": "after:# Output matrix multiplication vs elementwise multiplication",
"slideshow": {
"slide_type": ""
},
Expand All @@ -1008,6 +1010,10 @@
"outputs": [],
"source": [
"# We define two arrays: A - a 3x3 matrix and B - a 3x1 vector\n",
"mat_A = np.array([[1, 0, 3], [-1, 2, 1], [-2, -2, 1]])\n",
"print(mat_A)\n",
"vec_A = np.array([[1], [0], [-1]])\n",
"print(vec_A)\n",
"\n",
"# Output matrix multiplication vs elementwise multiplication\n"
]
Expand Down
10 changes: 5 additions & 5 deletions Course/02b_numpy_exercise.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -179,9 +179,9 @@
" - $h$ : Integer, Miller index\n",
" - $k$ : Integer, Miller index\n",
" - $l$ : Integer, Miller index\n",
" - $F^2_\\text{calc,i}$ : Calculated scaled intensity from the model\n",
" - $F^2_\\text{obs,i}$ : Observed scaled intensity from the model\n",
" - $\\sigma_i$ : Estimated standard deviation of the scaled observed intensity\n",
" - $F^2_\\text{calc,i}$ : Float, Calculated scaled intensity from the model\n",
" - $F^2_\\text{obs,i}$ : Float, Observed scaled intensity from the model\n",
" - $\\sigma_i$ : Float, Estimated standard deviation of the scaled observed intensity\n",
"\n",
"Note: Make sure that you take into account that the data file already contains the squared values.\n"
]
Expand Down Expand Up @@ -320,7 +320,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "teaching_data_analysis",
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
Expand All @@ -334,7 +334,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.13.2"
"version": "3.12.3"
}
},
"nbformat": 4,
Expand Down
20 changes: 1 addition & 19 deletions Course/04b_pandas_exercise.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@
"source": [
"\n",
"### Task 8: Statistical Testing\n",
"- **Conduct a t-test**: To confirm the authors' hypothesis that arguing against one\u2019s own side increases the desire for cleansing products\u2014and to check if the 'Harvard' data points influence this result.\n",
"- **Conduct a t-test excluding the suspect rows**: Re-run the same test as Task 3, but filter out the rows flagged as suspect in Task 5. Compare the t-statistic and p-value to your Task 3 result. Does removing the suspect data weaken the effect?\n",
"- **Commands to use**: Implement `scipy.stats.ttest_ind()` to perform the independent t-tests between groups.\n"
]
},
Expand Down Expand Up @@ -258,24 +258,6 @@
},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"remove_code": "non-comments"
},
"outputs": [],
"source": [
"# Perform the independent t-tests between groups\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand Down
4 changes: 2 additions & 2 deletions Filled_Course/02_numpy.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1003,7 +1003,7 @@
"execution_count": null,
"metadata": {
"editable": true,
"remove_code": "non-comments",
"remove_code": "after:# Load non-number columns from file (1,2,3)",
"slideshow": {
"slide_type": ""
},
Expand Down Expand Up @@ -1147,7 +1147,7 @@
"execution_count": null,
"metadata": {
"editable": true,
"remove_code": "non-comments",
"remove_code": "after:# Output matrix multiplication vs elementwise multiplication",
"slideshow": {
"slide_type": ""
},
Expand Down
12 changes: 6 additions & 6 deletions Filled_Course/02b_numpy_exercise.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@
"outputs": [],
"source": [
"# reshape elements\n",
"elements2d = np.reshape(elements, (6, 2))\n",
"elements2d = np.reshape(elements, (2, 6))\n",
"print(elements2d)\n",
"\n",
"# reshape coords to (2, 6, 3)\n",
Expand All @@ -193,9 +193,9 @@
" - $h$ : Integer, Miller index\n",
" - $k$ : Integer, Miller index\n",
" - $l$ : Integer, Miller index\n",
" - $F^2_\\text{calc,i}$ : Calculated scaled intensity from the model\n",
" - $F^2_\\text{obs,i}$ : Observed scaled intensity from the model\n",
" - $\\sigma_i$ : Estimated standard deviation of the scaled observed intensity\n",
" - $F^2_\\text{calc,i}$ : Float, Calculated scaled intensity from the model\n",
" - $F^2_\\text{obs,i}$ : Float, Observed scaled intensity from the model\n",
" - $\\sigma_i$ : Float, Estimated standard deviation of the scaled observed intensity\n",
"\n",
"Note: Make sure that you take into account that the data file already contains the squared values.\n"
]
Expand Down Expand Up @@ -344,7 +344,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "teaching_data_analysis",
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
Expand All @@ -358,7 +358,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.13.2"
"version": "3.12.3"
}
},
"nbformat": 4,
Expand Down
2 changes: 1 addition & 1 deletion Filled_Course/03b_matplotlib_exercise.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@
"fig2, ax2 = plt.subplots(1, 1, figsize=(8, 1))\n",
"\n",
"# Create scatter plots for every regression line\n",
"for i, ax in enumerate(axs.flat):\n",
"for i, ax in enumerate(axs.reshape(4)):\n",
" data = data_dict[f'dataset{i+1}']\n",
" x = np.array(data['x'])\n",
" y = np.array(data['y'])\n",
Expand Down
Loading
Loading