diff --git a/CONDUCT.html b/CONDUCT.html index 870eadbb..f1f89091 100644 --- a/CONDUCT.html +++ b/CONDUCT.html @@ -355,9 +355,14 @@
---2024-02-06 00:26:51-- https://example.com/index.html
+--2024-02-14 15:59:15-- https://example.com/index.html
Resolving example.com (example.com)... 93.184.216.34, 2606:2800:220:1:248:1893:25c8:1946
Connecting to example.com (example.com)|93.184.216.34|:443... connected.
HTTP request sent, awaiting response... 200 OK
@@ -755,7 +760,7 @@ Jupyter
index.html 100%[===================>] 1.23K –.-KB/s in 0s
-2024-02-06 00:26:51 (82.9 MB/s) - ‘index.html’ saved [1256/1256]
+2024-02-14 15:59:15 (75.1 MB/s) - ‘index.html’ saved [1256/1256]
</pre>
@@ -763,14 +768,14 @@ Jupyter
index.html 100%[===================>] 1.23K –.-KB/s in 0s
-2024-02-06 00:26:51 (82.9 MB/s) - ‘index.html’ saved [1256/1256]
+2024-02-14 15:59:15 (75.1 MB/s) - ‘index.html’ saved [1256/1256]
end{sphinxVerbatim}
index.html 0%[ ] 0 –.-KB/s
index.html 100%[===================>] 1.23K –.-KB/s in 0s
-2024-02-06 00:26:51 (82.9 MB/s) - ‘index.html’ saved [1256/1256]
+2024-02-14 15:59:15 (75.1 MB/s) - ‘index.html’ saved [1256/1256]
Time how long something takes for one line:
-CPU times: user 482 µs, sys: 112 µs, total: 594 µs
-Wall time: 598 µs
+CPU times: user 597 µs, sys: 0 ns, total: 597 µs
+Wall time: 602 µs
-CPU times: user 1.35 ms, sys: 0 ns, total: 1.35 ms
-Wall time: 1.35 ms
+CPU times: user 1.08 ms, sys: 223 µs, total: 1.3 ms
+Wall time: 1.31 ms
If something takes longer than you expect, you can profile it to find out where it spends it’s time:
diff --git a/advanced-python/10Basics.ipynb b/advanced-python/10Basics.ipynb
index b2b7e898..c534a0d4 100644
--- a/advanced-python/10Basics.ipynb
+++ b/advanced-python/10Basics.ipynb
@@ -54,10 +54,10 @@
"execution_count": 1,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-02-06T00:26:51.143586Z",
- "iopub.status.busy": "2024-02-06T00:26:51.143430Z",
- "iopub.status.idle": "2024-02-06T00:26:51.149515Z",
- "shell.execute_reply": "2024-02-06T00:26:51.149027Z"
+ "iopub.execute_input": "2024-02-14T15:59:15.579597Z",
+ "iopub.status.busy": "2024-02-14T15:59:15.579438Z",
+ "iopub.status.idle": "2024-02-14T15:59:15.585012Z",
+ "shell.execute_reply": "2024-02-14T15:59:15.584516Z"
}
},
"outputs": [
@@ -84,10 +84,10 @@
"execution_count": 2,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-02-06T00:26:51.176583Z",
- "iopub.status.busy": "2024-02-06T00:26:51.176259Z",
- "iopub.status.idle": "2024-02-06T00:26:51.179348Z",
- "shell.execute_reply": "2024-02-06T00:26:51.178897Z"
+ "iopub.execute_input": "2024-02-14T15:59:15.611268Z",
+ "iopub.status.busy": "2024-02-14T15:59:15.610943Z",
+ "iopub.status.idle": "2024-02-14T15:59:15.613814Z",
+ "shell.execute_reply": "2024-02-14T15:59:15.613322Z"
}
},
"outputs": [
@@ -114,10 +114,10 @@
"execution_count": 3,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-02-06T00:26:51.181221Z",
- "iopub.status.busy": "2024-02-06T00:26:51.180942Z",
- "iopub.status.idle": "2024-02-06T00:26:51.183895Z",
- "shell.execute_reply": "2024-02-06T00:26:51.183492Z"
+ "iopub.execute_input": "2024-02-14T15:59:15.615670Z",
+ "iopub.status.busy": "2024-02-14T15:59:15.615372Z",
+ "iopub.status.idle": "2024-02-14T15:59:15.618106Z",
+ "shell.execute_reply": "2024-02-14T15:59:15.617652Z"
}
},
"outputs": [
@@ -152,10 +152,10 @@
"execution_count": 4,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-02-06T00:26:51.185555Z",
- "iopub.status.busy": "2024-02-06T00:26:51.185392Z",
- "iopub.status.idle": "2024-02-06T00:26:51.188411Z",
- "shell.execute_reply": "2024-02-06T00:26:51.188015Z"
+ "iopub.execute_input": "2024-02-14T15:59:15.619877Z",
+ "iopub.status.busy": "2024-02-14T15:59:15.619582Z",
+ "iopub.status.idle": "2024-02-14T15:59:15.622577Z",
+ "shell.execute_reply": "2024-02-14T15:59:15.622180Z"
}
},
"outputs": [
@@ -188,10 +188,10 @@
"execution_count": 5,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-02-06T00:26:51.190034Z",
- "iopub.status.busy": "2024-02-06T00:26:51.189880Z",
- "iopub.status.idle": "2024-02-06T00:26:51.192516Z",
- "shell.execute_reply": "2024-02-06T00:26:51.192056Z"
+ "iopub.execute_input": "2024-02-14T15:59:15.624410Z",
+ "iopub.status.busy": "2024-02-14T15:59:15.624009Z",
+ "iopub.status.idle": "2024-02-14T15:59:15.626937Z",
+ "shell.execute_reply": "2024-02-14T15:59:15.626541Z"
}
},
"outputs": [
@@ -213,10 +213,10 @@
"execution_count": 6,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-02-06T00:26:51.194112Z",
- "iopub.status.busy": "2024-02-06T00:26:51.193960Z",
- "iopub.status.idle": "2024-02-06T00:26:51.196685Z",
- "shell.execute_reply": "2024-02-06T00:26:51.196297Z"
+ "iopub.execute_input": "2024-02-14T15:59:15.628543Z",
+ "iopub.status.busy": "2024-02-14T15:59:15.628385Z",
+ "iopub.status.idle": "2024-02-14T15:59:15.630993Z",
+ "shell.execute_reply": "2024-02-14T15:59:15.630549Z"
}
},
"outputs": [
@@ -297,10 +297,10 @@
"execution_count": 7,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-02-06T00:26:51.198544Z",
- "iopub.status.busy": "2024-02-06T00:26:51.198221Z",
- "iopub.status.idle": "2024-02-06T00:26:51.200882Z",
- "shell.execute_reply": "2024-02-06T00:26:51.200435Z"
+ "iopub.execute_input": "2024-02-14T15:59:15.632662Z",
+ "iopub.status.busy": "2024-02-14T15:59:15.632508Z",
+ "iopub.status.idle": "2024-02-14T15:59:15.635436Z",
+ "shell.execute_reply": "2024-02-14T15:59:15.635044Z"
}
},
"outputs": [
@@ -342,10 +342,10 @@
"execution_count": 8,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-02-06T00:26:51.202747Z",
- "iopub.status.busy": "2024-02-06T00:26:51.202321Z",
- "iopub.status.idle": "2024-02-06T00:26:51.207152Z",
- "shell.execute_reply": "2024-02-06T00:26:51.206681Z"
+ "iopub.execute_input": "2024-02-14T15:59:15.637024Z",
+ "iopub.status.busy": "2024-02-14T15:59:15.636865Z",
+ "iopub.status.idle": "2024-02-14T15:59:15.641430Z",
+ "shell.execute_reply": "2024-02-14T15:59:15.640999Z"
}
},
"outputs": [
@@ -369,10 +369,10 @@
"execution_count": 9,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-02-06T00:26:51.208891Z",
- "iopub.status.busy": "2024-02-06T00:26:51.208634Z",
- "iopub.status.idle": "2024-02-06T00:26:51.210925Z",
- "shell.execute_reply": "2024-02-06T00:26:51.210435Z"
+ "iopub.execute_input": "2024-02-14T15:59:15.643320Z",
+ "iopub.status.busy": "2024-02-14T15:59:15.642981Z",
+ "iopub.status.idle": "2024-02-14T15:59:15.645195Z",
+ "shell.execute_reply": "2024-02-14T15:59:15.644837Z"
}
},
"outputs": [],
@@ -392,10 +392,10 @@
"execution_count": 10,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-02-06T00:26:51.212703Z",
- "iopub.status.busy": "2024-02-06T00:26:51.212408Z",
- "iopub.status.idle": "2024-02-06T00:26:51.340577Z",
- "shell.execute_reply": "2024-02-06T00:26:51.339982Z"
+ "iopub.execute_input": "2024-02-14T15:59:15.646853Z",
+ "iopub.status.busy": "2024-02-14T15:59:15.646697Z",
+ "iopub.status.idle": "2024-02-14T15:59:15.774722Z",
+ "shell.execute_reply": "2024-02-14T15:59:15.774210Z"
}
},
"outputs": [
@@ -422,10 +422,10 @@
"execution_count": 11,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-02-06T00:26:51.343073Z",
- "iopub.status.busy": "2024-02-06T00:26:51.342620Z",
- "iopub.status.idle": "2024-02-06T00:26:51.507730Z",
- "shell.execute_reply": "2024-02-06T00:26:51.507202Z"
+ "iopub.execute_input": "2024-02-14T15:59:15.777048Z",
+ "iopub.status.busy": "2024-02-14T15:59:15.776701Z",
+ "iopub.status.idle": "2024-02-14T15:59:15.941462Z",
+ "shell.execute_reply": "2024-02-14T15:59:15.940839Z"
}
},
"outputs": [
@@ -433,7 +433,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
- "--2024-02-06 00:26:51-- https://example.com/index.html\r\n",
+ "--2024-02-14 15:59:15-- https://example.com/index.html\r\n",
"Resolving example.com (example.com)... 93.184.216.34, 2606:2800:220:1:248:1893:25c8:1946\r\n",
"Connecting to example.com (example.com)|93.184.216.34|:443... connected.\r\n",
"HTTP request sent, awaiting response... 200 OK\r\n",
@@ -444,7 +444,7 @@
"index.html 0%[ ] 0 --.-KB/s \r",
"index.html 100%[===================>] 1.23K --.-KB/s in 0s \r\n",
"\r\n",
- "2024-02-06 00:26:51 (82.9 MB/s) - ‘index.html’ saved [1256/1256]\r\n",
+ "2024-02-14 15:59:15 (75.1 MB/s) - ‘index.html’ saved [1256/1256]\r\n",
"\r\n"
]
}
@@ -465,10 +465,10 @@
"execution_count": 12,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-02-06T00:26:51.510265Z",
- "iopub.status.busy": "2024-02-06T00:26:51.509916Z",
- "iopub.status.idle": "2024-02-06T00:26:51.515266Z",
- "shell.execute_reply": "2024-02-06T00:26:51.514763Z"
+ "iopub.execute_input": "2024-02-14T15:59:15.944157Z",
+ "iopub.status.busy": "2024-02-14T15:59:15.943725Z",
+ "iopub.status.idle": "2024-02-14T15:59:15.948969Z",
+ "shell.execute_reply": "2024-02-14T15:59:15.948488Z"
}
},
"outputs": [
@@ -476,8 +476,8 @@
"name": "stdout",
"output_type": "stream",
"text": [
- "CPU times: user 482 µs, sys: 112 µs, total: 594 µs\n",
- "Wall time: 598 µs\n"
+ "CPU times: user 597 µs, sys: 0 ns, total: 597 µs\n",
+ "Wall time: 602 µs\n"
]
},
{
@@ -507,10 +507,10 @@
"execution_count": 13,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-02-06T00:26:51.516928Z",
- "iopub.status.busy": "2024-02-06T00:26:51.516791Z",
- "iopub.status.idle": "2024-02-06T00:26:51.521592Z",
- "shell.execute_reply": "2024-02-06T00:26:51.521200Z"
+ "iopub.execute_input": "2024-02-14T15:59:15.950835Z",
+ "iopub.status.busy": "2024-02-14T15:59:15.950520Z",
+ "iopub.status.idle": "2024-02-14T15:59:15.955403Z",
+ "shell.execute_reply": "2024-02-14T15:59:15.954999Z"
}
},
"outputs": [
@@ -518,8 +518,8 @@
"name": "stdout",
"output_type": "stream",
"text": [
- "CPU times: user 1.35 ms, sys: 0 ns, total: 1.35 ms\n",
- "Wall time: 1.35 ms\n"
+ "CPU times: user 1.08 ms, sys: 223 µs, total: 1.3 ms\n",
+ "Wall time: 1.31 ms\n"
]
}
],
@@ -562,10 +562,10 @@
"execution_count": 14,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-02-06T00:26:51.523419Z",
- "iopub.status.busy": "2024-02-06T00:26:51.523122Z",
- "iopub.status.idle": "2024-02-06T00:26:51.525482Z",
- "shell.execute_reply": "2024-02-06T00:26:51.525025Z"
+ "iopub.execute_input": "2024-02-14T15:59:15.957202Z",
+ "iopub.status.busy": "2024-02-14T15:59:15.957053Z",
+ "iopub.status.idle": "2024-02-14T15:59:15.959257Z",
+ "shell.execute_reply": "2024-02-14T15:59:15.958903Z"
}
},
"outputs": [],
@@ -579,10 +579,10 @@
"execution_count": 15,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-02-06T00:26:51.527128Z",
- "iopub.status.busy": "2024-02-06T00:26:51.526968Z",
- "iopub.status.idle": "2024-02-06T00:26:51.553013Z",
- "shell.execute_reply": "2024-02-06T00:26:51.552545Z"
+ "iopub.execute_input": "2024-02-14T15:59:15.960935Z",
+ "iopub.status.busy": "2024-02-14T15:59:15.960652Z",
+ "iopub.status.idle": "2024-02-14T15:59:15.988192Z",
+ "shell.execute_reply": "2024-02-14T15:59:15.987734Z"
}
},
"outputs": [],
@@ -602,10 +602,10 @@
"execution_count": 16,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-02-06T00:26:51.554947Z",
- "iopub.status.busy": "2024-02-06T00:26:51.554669Z",
- "iopub.status.idle": "2024-02-06T00:26:51.558397Z",
- "shell.execute_reply": "2024-02-06T00:26:51.557931Z"
+ "iopub.execute_input": "2024-02-14T15:59:15.990258Z",
+ "iopub.status.busy": "2024-02-14T15:59:15.989977Z",
+ "iopub.status.idle": "2024-02-14T15:59:15.993842Z",
+ "shell.execute_reply": "2024-02-14T15:59:15.993346Z"
}
},
"outputs": [],
@@ -618,10 +618,10 @@
"execution_count": 17,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-02-06T00:26:51.560053Z",
- "iopub.status.busy": "2024-02-06T00:26:51.559898Z",
- "iopub.status.idle": "2024-02-06T00:26:51.563698Z",
- "shell.execute_reply": "2024-02-06T00:26:51.563185Z"
+ "iopub.execute_input": "2024-02-14T15:59:15.995704Z",
+ "iopub.status.busy": "2024-02-14T15:59:15.995337Z",
+ "iopub.status.idle": "2024-02-14T15:59:15.999026Z",
+ "shell.execute_reply": "2024-02-14T15:59:15.998619Z"
}
},
"outputs": [],
@@ -641,10 +641,10 @@
"execution_count": 18,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-02-06T00:26:51.565319Z",
- "iopub.status.busy": "2024-02-06T00:26:51.565164Z",
- "iopub.status.idle": "2024-02-06T00:26:51.567928Z",
- "shell.execute_reply": "2024-02-06T00:26:51.567482Z"
+ "iopub.execute_input": "2024-02-14T15:59:16.000778Z",
+ "iopub.status.busy": "2024-02-14T15:59:16.000496Z",
+ "iopub.status.idle": "2024-02-14T15:59:16.003363Z",
+ "shell.execute_reply": "2024-02-14T15:59:16.002953Z"
}
},
"outputs": [
@@ -665,10 +665,10 @@
"execution_count": 19,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-02-06T00:26:51.569608Z",
- "iopub.status.busy": "2024-02-06T00:26:51.569454Z",
- "iopub.status.idle": "2024-02-06T00:26:51.572826Z",
- "shell.execute_reply": "2024-02-06T00:26:51.572442Z"
+ "iopub.execute_input": "2024-02-14T15:59:16.005190Z",
+ "iopub.status.busy": "2024-02-14T15:59:16.004830Z",
+ "iopub.status.idle": "2024-02-14T15:59:16.008339Z",
+ "shell.execute_reply": "2024-02-14T15:59:16.007952Z"
}
},
"outputs": [
@@ -692,10 +692,10 @@
"execution_count": 20,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-02-06T00:26:51.574582Z",
- "iopub.status.busy": "2024-02-06T00:26:51.574254Z",
- "iopub.status.idle": "2024-02-06T00:26:51.577541Z",
- "shell.execute_reply": "2024-02-06T00:26:51.577038Z"
+ "iopub.execute_input": "2024-02-14T15:59:16.010037Z",
+ "iopub.status.busy": "2024-02-14T15:59:16.009777Z",
+ "iopub.status.idle": "2024-02-14T15:59:16.013056Z",
+ "shell.execute_reply": "2024-02-14T15:59:16.012589Z"
}
},
"outputs": [],
@@ -725,10 +725,10 @@
"execution_count": 21,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-02-06T00:26:51.579405Z",
- "iopub.status.busy": "2024-02-06T00:26:51.579046Z",
- "iopub.status.idle": "2024-02-06T00:26:51.582165Z",
- "shell.execute_reply": "2024-02-06T00:26:51.581788Z"
+ "iopub.execute_input": "2024-02-14T15:59:16.014885Z",
+ "iopub.status.busy": "2024-02-14T15:59:16.014586Z",
+ "iopub.status.idle": "2024-02-14T15:59:16.017830Z",
+ "shell.execute_reply": "2024-02-14T15:59:16.017352Z"
}
},
"outputs": [
@@ -752,10 +752,10 @@
"execution_count": 22,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-02-06T00:26:51.584073Z",
- "iopub.status.busy": "2024-02-06T00:26:51.583704Z",
- "iopub.status.idle": "2024-02-06T00:26:51.821919Z",
- "shell.execute_reply": "2024-02-06T00:26:51.821481Z"
+ "iopub.execute_input": "2024-02-14T15:59:16.019702Z",
+ "iopub.status.busy": "2024-02-14T15:59:16.019402Z",
+ "iopub.status.idle": "2024-02-14T15:59:16.260062Z",
+ "shell.execute_reply": "2024-02-14T15:59:16.259622Z"
},
"tags": [
"raises-exception"
@@ -794,10 +794,10 @@
"execution_count": 23,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-02-06T00:26:51.823831Z",
- "iopub.status.busy": "2024-02-06T00:26:51.823665Z",
- "iopub.status.idle": "2024-02-06T00:26:51.827201Z",
- "shell.execute_reply": "2024-02-06T00:26:51.826812Z"
+ "iopub.execute_input": "2024-02-14T15:59:16.262108Z",
+ "iopub.status.busy": "2024-02-14T15:59:16.261846Z",
+ "iopub.status.idle": "2024-02-14T15:59:16.265334Z",
+ "shell.execute_reply": "2024-02-14T15:59:16.264878Z"
}
},
"outputs": [
@@ -843,10 +843,10 @@
"execution_count": 24,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-02-06T00:26:51.828789Z",
- "iopub.status.busy": "2024-02-06T00:26:51.828634Z",
- "iopub.status.idle": "2024-02-06T00:26:51.846729Z",
- "shell.execute_reply": "2024-02-06T00:26:51.846282Z"
+ "iopub.execute_input": "2024-02-14T15:59:16.267171Z",
+ "iopub.status.busy": "2024-02-14T15:59:16.266808Z",
+ "iopub.status.idle": "2024-02-14T15:59:16.285004Z",
+ "shell.execute_reply": "2024-02-14T15:59:16.284488Z"
},
"tags": [
"raises-exception"
diff --git a/advanced-python/11AdvancedPython.html b/advanced-python/11AdvancedPython.html
index 3750bea1..a7f11bc9 100644
--- a/advanced-python/11AdvancedPython.html
+++ b/advanced-python/11AdvancedPython.html
@@ -358,9 +358,14 @@
- Persistent screen or tmux session on lxplus
- More about the UNIX shell
@@ -957,7 +962,7 @@ Decorators and factories
()
{'y': 4, 'x': 5}
-time needed: 1.1920928955078125e-06
+time needed: 9.5367431640625e-07
-<matplotlib.legend.Legend at 0x7f4691a9d5d0>
+<matplotlib.legend.Legend at 0x7f43b2a6eb10>
-<matplotlib.legend.Legend at 0x7f469228f050>
+<matplotlib.legend.Legend at 0x7f43b2a80a90>
-<matplotlib.legend.Legend at 0x7f46923355d0>
+<matplotlib.legend.Legend at 0x7f43b327ab10>
-<matplotlib.legend.Legend at 0x7fd57e00c650>
+<matplotlib.legend.Legend at 0x7f2cbc267850>
-<matplotlib.legend.Legend at 0x7fd55bb1f490>
+<matplotlib.legend.Legend at 0x7f2c4df9e2d0>
-/tmp/ipykernel_4090/4020814425.py:3: RuntimeWarning: invalid value encountered in divide
+/tmp/ipykernel_4028/4020814425.py:3: RuntimeWarning: invalid value encountered in divide
metric = S/np.sqrt(S+B)
-<matplotlib.legend.Legend at 0x7fd55ba7eb90>
+<matplotlib.legend.Legend at 0x7f2c4e4cb710>
-/tmp/ipykernel_4090/4278176416.py:9: RuntimeWarning: invalid value encountered in divide
+/tmp/ipykernel_4028/4278176416.py:9: RuntimeWarning: invalid value encountered in divide
metric = S/np.sqrt(S+B)
-/tmp/ipykernel_4510/2193470804.py:21: RuntimeWarning: invalid value encountered in divide
+/tmp/ipykernel_4431/2193470804.py:21: RuntimeWarning: invalid value encountered in divide
metric = S / np.sqrt(S + B)
-/tmp/ipykernel_4510/2193470804.py:21: RuntimeWarning: invalid value encountered in divide
+/tmp/ipykernel_4431/2193470804.py:21: RuntimeWarning: invalid value encountered in divide
metric = S / np.sqrt(S + B)
-/tmp/ipykernel_4510/2193470804.py:21: RuntimeWarning: invalid value encountered in divide
+/tmp/ipykernel_4431/2193470804.py:21: RuntimeWarning: invalid value encountered in divide
metric = S / np.sqrt(S + B)
-/tmp/ipykernel_4510/2193470804.py:21: RuntimeWarning: invalid value encountered in divide
+/tmp/ipykernel_4431/2193470804.py:21: RuntimeWarning: invalid value encountered in divide
metric = S / np.sqrt(S + B)
-/tmp/ipykernel_4510/2193470804.py:21: RuntimeWarning: invalid value encountered in divide
+/tmp/ipykernel_4431/2193470804.py:21: RuntimeWarning: invalid value encountered in divide
metric = S / np.sqrt(S + B)
-/tmp/ipykernel_4510/2193470804.py:21: RuntimeWarning: invalid value encountered in divide
+/tmp/ipykernel_4431/2193470804.py:21: RuntimeWarning: invalid value encountered in divide
metric = S / np.sqrt(S + B)
-<matplotlib.legend.Legend at 0x7f48eb9e7790>
+<matplotlib.legend.Legend at 0x7fddb4fea5d0>
This is a technique to avoid losing some parts of your data by splitting it into test and training set. It is crucial e.g. in the scenario where a part of your training data needs predictions such as when a sideband is used as the background.
- +The red tiles are used as a training set in order to predict the blue ones. This is done k times, resulting in k prediction for the k tiles we split into. We end up having predictions for our whole dataset!
The validation is a holdout part of the data that we can use to estimate our actual performance. When we optimize our algorithm, we may overfit to the given dataset and overestimate our performance. By evaluating our “best” algorithm on a dataset that has not yet been seen at all, we get an unbiased estimate.
Let’s go search for scikit learn k-folding
.
-/tmp/ipykernel_4718/1411477585.py:8: DeprecationWarning:
+/tmp/ipykernel_4644/1411477585.py:8: DeprecationWarning:
Pyarrow will become a required dependency of pandas in the next major release of pandas (pandas 3.0),
(to allow more performant data types, such as the Arrow string type, and better interoperability with other libraries)
but was not found to be installed on your system.
@@ -649,31 +654,31 @@ Model tuning setup
-/tmp/ipykernel_4718/2007768199.py:11: SettingWithCopyWarning:
+/tmp/ipykernel_4644/2007768199.py:11: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame.
Try using .loc[row_indexer,col_indexer] = value instead
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
df.eval('Jpsi_eta = arctanh(Jpsi_PZ/Jpsi_P)', inplace=True)
-/tmp/ipykernel_4718/2007768199.py:12: SettingWithCopyWarning:
+/tmp/ipykernel_4644/2007768199.py:12: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame.
Try using .loc[row_indexer,col_indexer] = value instead
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
df.eval('mup_P = sqrt(mum_PX**2 + mum_PY**2 + mum_PZ**2)', inplace=True)
-/tmp/ipykernel_4718/2007768199.py:13: SettingWithCopyWarning:
+/tmp/ipykernel_4644/2007768199.py:13: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame.
Try using .loc[row_indexer,col_indexer] = value instead
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
df.eval('mum_P = sqrt(mum_PX**2 + mum_PY**2 + mum_PZ**2)', inplace=True)
-/tmp/ipykernel_4718/2007768199.py:15: SettingWithCopyWarning:
+/tmp/ipykernel_4644/2007768199.py:15: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame.
Try using .loc[row_indexer,col_indexer] = value instead
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
bkg_df['catagory'] = 0 # Use 0 for background
-/tmp/ipykernel_4718/2007768199.py:19: SettingWithCopyWarning:
+/tmp/ipykernel_4644/2007768199.py:19: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame.
Try using .loc[row_indexer,col_indexer] = value instead
@@ -707,7 +712,7 @@ Model tuning setup
-XGBoost --- 0.8556647300720215 seconds ---
+XGBoost --- 0.8518712520599365 seconds ---
-/tmp/ipykernel_4718/3009250180.py:13: SettingWithCopyWarning:
+/tmp/ipykernel_4644/3009250180.py:13: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame.
Try using .loc[row_indexer,col_indexer] = value instead
@@ -786,7 +791,7 @@ Cross-validation
/usr/share/miniconda/envs/analysis-essentials/lib/python3.11/site-packages/xgboost/sklearn.py:889: UserWarning: `eval_metric` in `fit` method is deprecated for better compatibility with scikit-learn, use `eval_metric` in constructor or`set_params` instead.
warnings.warn(
-/usr/share/miniconda/envs/analysis-essentials/lib/python3.11/site-packages/xgboost/core.py:160: UserWarning: [00:50:00] WARNING: /workspace/src/learner.cc:742:
+/usr/share/miniconda/envs/analysis-essentials/lib/python3.11/site-packages/xgboost/core.py:160: UserWarning: [16:14:30] WARNING: /workspace/src/learner.cc:742:
Parameters: { "n_threads" } are not used.
warnings.warn(smsg, UserWarning)
@@ -798,7 +803,7 @@ Cross-validation
-XGBoost cross-validation --- 2.0221338272094727 seconds ---
+XGBoost cross-validation --- 1.9497551918029785 seconds ---
-/tmp/ipykernel_4718/3553768138.py:13: SettingWithCopyWarning:
+/tmp/ipykernel_4644/3553768138.py:13: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame.
Try using .loc[row_indexer,col_indexer] = value instead
@@ -862,7 +867,7 @@ Cross-validation
-bdt_cv : S/sqrt(S+B) = 15.284216832108756 at x = 0.82674176
+bdt_cv : S/sqrt(S+B) = 15.364206707574938 at x = 0.8245125
-XGBoost k-folding --- 2.713792562484741 seconds ---
+XGBoost k-folding --- 2.6696691513061523 seconds ---
-XGBoost early-stop folding --- 16.265354871749878 seconds ---
+XGBoost early-stop folding --- 16.12229871749878 seconds ---
-XGBoost early-stop limit --- 6.2194907665252686 seconds ---
+XGBoost early-stop limit --- 5.9259254932403564 seconds ---
-/tmp/ipykernel_4718/41647419.py:18: SettingWithCopyWarning:
+/tmp/ipykernel_4644/41647419.py:18: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame.
Try using .loc[row_indexer,col_indexer] = value instead
@@ -1108,7 +1113,7 @@ \(k\)-folding & early
-bdt_cv : S/sqrt(S+B) = 15.284216832108756 at x = 0.82674176
+bdt_cv : S/sqrt(S+B) = 15.364206707574938 at x = 0.8245125
-XGBoost grid-scan --- 18.899073839187622 seconds ---
+XGBoost grid-scan --- 18.946533203125 seconds ---
-/tmp/ipykernel_4718/1018627576.py:13: SettingWithCopyWarning:
+/tmp/ipykernel_4644/1018627576.py:13: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame.
Try using .loc[row_indexer,col_indexer] = value instead
@@ -1382,7 +1387,7 @@ Hyperameter optimisation
-bdt_cv : S/sqrt(S+B) = 15.284216832108756 at x = 0.82674176
+bdt_cv : S/sqrt(S+B) = 15.364206707574938 at x = 0.8245125
-<matplotlib.legend.Legend at 0x7f6c17de7910>
+<matplotlib.legend.Legend at 0x7f55fddba410>
-<matplotlib.legend.Legend at 0x7f6c17d51e10>
+<matplotlib.legend.Legend at 0x7f55fdd64990>
-ColormeshArtists(pcolormesh=<matplotlib.collections.QuadMesh object at 0x7f3fd263bdd0>, cbar=<matplotlib.colorbar.Colorbar object at 0x7f3fd2649450>, text=[])
+ColormeshArtists(pcolormesh=<matplotlib.collections.QuadMesh object at 0x7fddd987d810>, cbar=<matplotlib.colorbar.Colorbar object at 0x7fddd96b6e10>, text=[])
-[StairsArtists(stairs=<matplotlib.patches.StepPatch object at 0x7f3fd254a010>, errorbar=<ErrorbarContainer object of 3 artists>, legend_artist=<ErrorbarContainer object of 3 artists>)]
+[StairsArtists(stairs=<matplotlib.patches.StepPatch object at 0x7fddd96d0710>, errorbar=<ErrorbarContainer object of 3 artists>, legend_artist=<ErrorbarContainer object of 3 artists>)]
-ColormeshArtists(pcolormesh=<matplotlib.collections.QuadMesh object at 0x7f3fa5352690>, cbar=<matplotlib.colorbar.Colorbar object at 0x7f3fa521e150>, text=[])
+ColormeshArtists(pcolormesh=<matplotlib.collections.QuadMesh object at 0x7fddabc31390>, cbar=<matplotlib.colorbar.Colorbar object at 0x7fddab7cf190>, text=[])
-[StairsArtists(stairs=<matplotlib.patches.StepPatch object at 0x7f3fa4101a10>, errorbar=None, legend_artist=None)]
+[StairsArtists(stairs=<matplotlib.patches.StepPatch object at 0x7fddab7fded0>, errorbar=None, legend_artist=None)]
-[StairsArtists(stairs=<matplotlib.patches.StepPatch object at 0x7f3fa525e390>, errorbar=None, legend_artist=None)]
+[StairsArtists(stairs=<matplotlib.patches.StepPatch object at 0x7fddab6ba890>, errorbar=None, legend_artist=None)]