Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mooc-rr
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cb1e5ba91280d02583d0604166e71c1c
mooc-rr
Commits
0dc0420e
Commit
0dc0420e
authored
Apr 07, 2020
by
cb1e5ba91280d02583d0604166e71c1c
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no commit message
parent
e5d2f857
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
151 additions
and
487 deletions
+151
-487
exercice.ipynb
module3/exo3/exercice.ipynb
+151
-487
No files found.
module3/exo3/exercice.ipynb
View file @
0dc0420e
...
...
@@ -12,7 +12,7 @@
},
{
"cell_type": "code",
"execution_count":
1
,
"execution_count":
475
,
"metadata": {
"hideCode": true,
"hidePrompt": true
...
...
@@ -44,7 +44,7 @@
},
{
"cell_type": "code",
"execution_count":
2
,
"execution_count":
476
,
"metadata": {
"hideCode": true,
"hidePrompt": true
...
...
@@ -329,7 +329,7 @@
"[756 rows x 10 columns]"
]
},
"execution_count":
2
,
"execution_count":
476
,
"metadata": {},
"output_type": "execute_result"
}
...
...
@@ -364,7 +364,7 @@
},
{
"cell_type": "code",
"execution_count":
3
,
"execution_count":
477
,
"metadata": {
"hideCode": true,
"hidePrompt": true
...
...
@@ -651,7 +651,7 @@
"[756 rows x 10 columns]"
]
},
"execution_count":
3
,
"execution_count":
477
,
"metadata": {},
"output_type": "execute_result"
}
...
...
@@ -675,7 +675,7 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 4
78
,
"metadata": {
"hideCode": true,
"hidePrompt": true
...
...
@@ -725,7 +725,7 @@
},
{
"cell_type": "code",
"execution_count":
5
,
"execution_count":
479
,
"metadata": {
"hideCode": true,
"hidePrompt": true
...
...
@@ -747,7 +747,7 @@
"dtype: bool"
]
},
"execution_count":
5
,
"execution_count":
479
,
"metadata": {},
"output_type": "execute_result"
}
...
...
@@ -769,7 +769,7 @@
},
{
"cell_type": "code",
"execution_count":
6
,
"execution_count":
480
,
"metadata": {
"hideCode": true,
"hidePrompt": true,
...
...
@@ -917,7 +917,7 @@
"1958-07-01 315.22 315.86 315.19 "
]
},
"execution_count":
6
,
"execution_count":
480
,
"metadata": {},
"output_type": "execute_result"
}
...
...
@@ -944,7 +944,7 @@
},
{
"cell_type": "code",
"execution_count":
7
,
"execution_count":
481
,
"metadata": {
"hideCode": true,
"hidePrompt": true
...
...
@@ -981,7 +981,7 @@
},
{
"cell_type": "code",
"execution_count":
8
,
"execution_count":
482
,
"metadata": {
"hideCode": true,
"hidePrompt": true
...
...
@@ -1039,7 +1039,7 @@
},
{
"cell_type": "code",
"execution_count":
9
,
"execution_count":
483
,
"metadata": {
"hideCode": true,
"hidePrompt": true,
...
...
@@ -1114,7 +1114,7 @@
},
{
"cell_type": "code",
"execution_count":
11
,
"execution_count":
484
,
"metadata": {
"hideCode": true,
"hidePrompt": true
...
...
@@ -1171,7 +1171,7 @@
},
{
"cell_type": "code",
"execution_count":
12
,
"execution_count":
485
,
"metadata": {
"hideCode": true,
"hidePrompt": true
...
...
@@ -1197,7 +1197,7 @@
},
{
"cell_type": "code",
"execution_count":
13
,
"execution_count":
486
,
"metadata": {
"hideCode": true,
"hidePrompt": true,
...
...
@@ -1242,7 +1242,7 @@
},
{
"cell_type": "code",
"execution_count":
363
,
"execution_count":
487
,
"metadata": {
"hideCode": true,
"hidePrompt": true,
...
...
@@ -1278,7 +1278,7 @@
},
{
"cell_type": "code",
"execution_count":
371
,
"execution_count":
488
,
"metadata": {},
"outputs": [
{
...
...
@@ -1287,7 +1287,7 @@
"0.7829981215405544"
]
},
"execution_count":
371
,
"execution_count":
488
,
"metadata": {},
"output_type": "execute_result"
},
...
...
@@ -1322,7 +1322,7 @@
},
{
"cell_type": "code",
"execution_count":
347
,
"execution_count":
489
,
"metadata": {
"hideCode": true,
"hidePrompt": true
...
...
@@ -1335,314 +1335,6 @@
" Période lente 30.958333333333332\n",
" Période rapide 0.9986559139784947\n"
]
},
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>index</th>\n",
" <th>Yr</th>\n",
" <th>Mn</th>\n",
" <th>Date 1</th>\n",
" <th>Date 2</th>\n",
" <th>s1</th>\n",
" <th>s2</th>\n",
" <th>s3</th>\n",
" <th>s4</th>\n",
" <th>s5</th>\n",
" <th>s6</th>\n",
" </tr>\n",
" <tr>\n",
" <th>period</th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>1958-03-01</th>\n",
" <td>2</td>\n",
" <td>1958</td>\n",
" <td>3</td>\n",
" <td>21259</td>\n",
" <td>1958.2027</td>\n",
" <td>315.70</td>\n",
" <td>314.44</td>\n",
" <td>316.19</td>\n",
" <td>314.91</td>\n",
" <td>315.70</td>\n",
" <td>314.44</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1958-04-01</th>\n",
" <td>3</td>\n",
" <td>1958</td>\n",
" <td>4</td>\n",
" <td>21290</td>\n",
" <td>1958.2877</td>\n",
" <td>317.45</td>\n",
" <td>315.16</td>\n",
" <td>317.30</td>\n",
" <td>314.99</td>\n",
" <td>317.45</td>\n",
" <td>315.16</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1958-05-01</th>\n",
" <td>4</td>\n",
" <td>1958</td>\n",
" <td>5</td>\n",
" <td>21320</td>\n",
" <td>1958.3699</td>\n",
" <td>317.51</td>\n",
" <td>314.71</td>\n",
" <td>317.86</td>\n",
" <td>315.06</td>\n",
" <td>317.51</td>\n",
" <td>314.71</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1958-06-01</th>\n",
" <td>5</td>\n",
" <td>1958</td>\n",
" <td>6</td>\n",
" <td>21351</td>\n",
" <td>1958.4548</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>317.24</td>\n",
" <td>315.14</td>\n",
" <td>317.24</td>\n",
" <td>315.14</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1958-07-01</th>\n",
" <td>6</td>\n",
" <td>1958</td>\n",
" <td>7</td>\n",
" <td>21381</td>\n",
" <td>1958.5370</td>\n",
" <td>315.86</td>\n",
" <td>315.19</td>\n",
" <td>315.86</td>\n",
" <td>315.22</td>\n",
" <td>315.86</td>\n",
" <td>315.19</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1958-08-01</th>\n",
" <td>7</td>\n",
" <td>1958</td>\n",
" <td>8</td>\n",
" <td>21412</td>\n",
" <td>1958.6219</td>\n",
" <td>314.93</td>\n",
" <td>316.19</td>\n",
" <td>314.00</td>\n",
" <td>315.29</td>\n",
" <td>314.93</td>\n",
" <td>316.19</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1958-09-01</th>\n",
" <td>8</td>\n",
" <td>1958</td>\n",
" <td>9</td>\n",
" <td>21443</td>\n",
" <td>1958.7068</td>\n",
" <td>313.21</td>\n",
" <td>316.08</td>\n",
" <td>312.46</td>\n",
" <td>315.35</td>\n",
" <td>313.21</td>\n",
" <td>316.08</td>\n",
" </tr>\n",
" <tr>\n",
" <th>...</th>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2019-07-01</th>\n",
" <td>738</td>\n",
" <td>2019</td>\n",
" <td>7</td>\n",
" <td>43661</td>\n",
" <td>2019.5370</td>\n",
" <td>411.85</td>\n",
" <td>411.03</td>\n",
" <td>412.36</td>\n",
" <td>411.57</td>\n",
" <td>411.85</td>\n",
" <td>411.03</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2019-08-01</th>\n",
" <td>739</td>\n",
" <td>2019</td>\n",
" <td>8</td>\n",
" <td>43692</td>\n",
" <td>2019.6219</td>\n",
" <td>410.08</td>\n",
" <td>411.62</td>\n",
" <td>410.23</td>\n",
" <td>411.81</td>\n",
" <td>410.08</td>\n",
" <td>411.62</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2019-09-01</th>\n",
" <td>740</td>\n",
" <td>2019</td>\n",
" <td>9</td>\n",
" <td>43723</td>\n",
" <td>2019.7068</td>\n",
" <td>408.55</td>\n",
" <td>412.06</td>\n",
" <td>408.52</td>\n",
" <td>412.05</td>\n",
" <td>408.55</td>\n",
" <td>412.06</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2019-10-01</th>\n",
" <td>741</td>\n",
" <td>2019</td>\n",
" <td>10</td>\n",
" <td>43753</td>\n",
" <td>2019.7890</td>\n",
" <td>408.43</td>\n",
" <td>412.07</td>\n",
" <td>408.67</td>\n",
" <td>412.29</td>\n",
" <td>408.43</td>\n",
" <td>412.07</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2019-11-01</th>\n",
" <td>742</td>\n",
" <td>2019</td>\n",
" <td>11</td>\n",
" <td>43784</td>\n",
" <td>2019.8740</td>\n",
" <td>410.28</td>\n",
" <td>412.56</td>\n",
" <td>410.29</td>\n",
" <td>412.54</td>\n",
" <td>410.28</td>\n",
" <td>412.56</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2019-12-01</th>\n",
" <td>743</td>\n",
" <td>2019</td>\n",
" <td>12</td>\n",
" <td>43814</td>\n",
" <td>2019.9562</td>\n",
" <td>411.85</td>\n",
" <td>412.78</td>\n",
" <td>411.88</td>\n",
" <td>412.79</td>\n",
" <td>411.85</td>\n",
" <td>412.78</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2020-01-01</th>\n",
" <td>744</td>\n",
" <td>2020</td>\n",
" <td>1</td>\n",
" <td>43845</td>\n",
" <td>2020.0410</td>\n",
" <td>413.37</td>\n",
" <td>413.33</td>\n",
" <td>413.11</td>\n",
" <td>413.05</td>\n",
" <td>413.37</td>\n",
" <td>413.33</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"<p>743 rows × 11 columns</p>\n",
"</div>"
],
"text/plain": [
" index Yr Mn Date 1 Date 2 s1 s2 s3 \\\n",
"period \n",
"1958-03-01 2 1958 3 21259 1958.2027 315.70 314.44 316.19 \n",
"1958-04-01 3 1958 4 21290 1958.2877 317.45 315.16 317.30 \n",
"1958-05-01 4 1958 5 21320 1958.3699 317.51 314.71 317.86 \n",
"1958-06-01 5 1958 6 21351 1958.4548 NaN NaN 317.24 \n",
"1958-07-01 6 1958 7 21381 1958.5370 315.86 315.19 315.86 \n",
"1958-08-01 7 1958 8 21412 1958.6219 314.93 316.19 314.00 \n",
"1958-09-01 8 1958 9 21443 1958.7068 313.21 316.08 312.46 \n",
"... ... ... .. ... ... ... ... ... \n",
"2019-07-01 738 2019 7 43661 2019.5370 411.85 411.03 412.36 \n",
"2019-08-01 739 2019 8 43692 2019.6219 410.08 411.62 410.23 \n",
"2019-09-01 740 2019 9 43723 2019.7068 408.55 412.06 408.52 \n",
"2019-10-01 741 2019 10 43753 2019.7890 408.43 412.07 408.67 \n",
"2019-11-01 742 2019 11 43784 2019.8740 410.28 412.56 410.29 \n",
"2019-12-01 743 2019 12 43814 2019.9562 411.85 412.78 411.88 \n",
"2020-01-01 744 2020 1 43845 2020.0410 413.37 413.33 413.11 \n",
"\n",
" s4 s5 s6 \n",
"period \n",
"1958-03-01 314.91 315.70 314.44 \n",
"1958-04-01 314.99 317.45 315.16 \n",
"1958-05-01 315.06 317.51 314.71 \n",
"1958-06-01 315.14 317.24 315.14 \n",
"1958-07-01 315.22 315.86 315.19 \n",
"1958-08-01 315.29 314.93 316.19 \n",
"1958-09-01 315.35 313.21 316.08 \n",
"... ... ... ... \n",
"2019-07-01 411.57 411.85 411.03 \n",
"2019-08-01 411.81 410.08 411.62 \n",
"2019-09-01 412.05 408.55 412.06 \n",
"2019-10-01 412.29 408.43 412.07 \n",
"2019-11-01 412.54 410.28 412.56 \n",
"2019-12-01 412.79 411.85 412.78 \n",
"2020-01-01 413.05 413.37 413.33 \n",
"\n",
"[743 rows x 11 columns]"
]
},
"execution_count": 347,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
...
...
@@ -1662,7 +1354,7 @@
},
{
"cell_type": "code",
"execution_count":
35
0,
"execution_count":
49
0,
"metadata": {
"hideCode": true,
"hidePrompt": true
...
...
@@ -1989,7 +1681,7 @@
"[63 rows x 12 columns]"
]
},
"execution_count":
35
0,
"execution_count":
49
0,
"metadata": {},
"output_type": "execute_result"
}
...
...
@@ -2001,7 +1693,7 @@
},
{
"cell_type": "code",
"execution_count":
17
,
"execution_count":
491
,
"metadata": {
"hideCode": true,
"hidePrompt": true
...
...
@@ -2189,7 +1881,7 @@
"max 411.850000 410.080000 408.550000 408.430000 410.280000 411.850000 "
]
},
"execution_count":
17
,
"execution_count":
491
,
"metadata": {},
"output_type": "execute_result"
}
...
...
@@ -2200,7 +1892,7 @@
},
{
"cell_type": "code",
"execution_count":
3
2,
"execution_count":
49
2,
"metadata": {
"hideCode": true,
"hidePrompt": true,
...
...
@@ -2355,7 +2047,7 @@
"1962 0.7890 0.8740 0.9562 "
]
},
"execution_count":
3
2,
"execution_count":
49
2,
"metadata": {},
"output_type": "execute_result"
}
...
...
@@ -2389,40 +2081,11 @@
},
{
"cell_type": "code",
"execution_count":
329
,
"execution_count":
501
,
"metadata": {
"hideCode": true,
"hidePrompt": true
},
"outputs": [
{
"data": {
"text/plain": [
"array([2020])"
]
},
"execution_count": 329,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"#df_inter = df[['Yr','Mn','Date 2','s5']]\n",
"an_b = df2.loc[1960, : ]\n",
"an_n = df2.loc[1961, : ]\n",
"year, mois = df[-1:]['Yr'].values, df[-1:]['Mn'].values\n",
"#for val in per1: \n",
"# print(val.date()) "
]
},
{
"cell_type": "code",
"execution_count": 334,
"metadata": {
"hideCode": true,
"hidePrompt": true,
"scrolled": false
},
"outputs": [
{
"data": {
...
...
@@ -2445,133 +2108,96 @@
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>Data 2</th>\n",
" <th>Mn</th>\n",
" <th>index</th>\n",
" <th>Yr</th>\n",
" <th>Mn</th>\n",
" <th>Date 1</th>\n",
" <th>Date 2</th>\n",
" <th>s1</th>\n",
" <th>s2</th>\n",
" <th>s3</th>\n",
" <th>s4</th>\n",
" <th>s5</th>\n",
" <th>s6</th>\n",
" </tr>\n",
" <tr>\n",
" <th>period</th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>2020-01-01</th>\n",
" <td>2020.0410</td>\n",
" <td>1</td>\n",
" <td>2020</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2020-02-01</th>\n",
" <td>2020.1257</td>\n",
" <td>2</td>\n",
" <td>2020</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2020-03-01</th>\n",
" <td>2020.2049</td>\n",
" <td>3</td>\n",
" <td>2020</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2020-04-01</th>\n",
" <td>2020.2896</td>\n",
" <td>4</td>\n",
" <td>2020</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2020-05-01</th>\n",
" <td>2020.3716</td>\n",
" <td>5</td>\n",
" <td>2020</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2020-06-01</th>\n",
" <td>2020.4563</td>\n",
" <td>6</td>\n",
" <td>2020</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2020-07-01</th>\n",
" <td>2020.5383</td>\n",
" <td>7</td>\n",
" <td>744</td>\n",
" <td>2020</td>\n",
" </tr>\n",
" <tr>\n",
" <th>...</th>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2025-06-01</th>\n",
" <td>2025.4548</td>\n",
" <td>6</td>\n",
" <td>2025</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2025-07-01</th>\n",
" <td>2025.5370</td>\n",
" <td>7</td>\n",
" <td>2025</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2025-08-01</th>\n",
" <td>2025.6219</td>\n",
" <td>8</td>\n",
" <td>2025</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2025-09-01</th>\n",
" <td>2025.7068</td>\n",
" <td>9</td>\n",
" <td>2025</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2025-10-01</th>\n",
" <td>2025.7890</td>\n",
" <td>10</td>\n",
" <td>2025</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2025-11-01</th>\n",
" <td>2025.8740</td>\n",
" <td>11</td>\n",
" <td>2025</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2025-12-01</th>\n",
" <td>2025.9562</td>\n",
" <td>12</td>\n",
" <td>2025</td>\n",
" <td>1</td>\n",
" <td>43845</td>\n",
" <td>2020.041</td>\n",
" <td>413.37</td>\n",
" <td>413.33</td>\n",
" <td>413.11</td>\n",
" <td>413.05</td>\n",
" <td>413.37</td>\n",
" <td>413.33</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"<p>72 rows × 3 columns</p>\n",
"</div>"
],
"text/plain": [
" Data 2 Mn Yr\n",
"2020-01-01 2020.0410 1 2020\n",
"2020-02-01 2020.1257 2 2020\n",
"2020-03-01 2020.2049 3 2020\n",
"2020-04-01 2020.2896 4 2020\n",
"2020-05-01 2020.3716 5 2020\n",
"2020-06-01 2020.4563 6 2020\n",
"2020-07-01 2020.5383 7 2020\n",
"... ... .. ...\n",
"2025-06-01 2025.4548 6 2025\n",
"2025-07-01 2025.5370 7 2025\n",
"2025-08-01 2025.6219 8 2025\n",
"2025-09-01 2025.7068 9 2025\n",
"2025-10-01 2025.7890 10 2025\n",
"2025-11-01 2025.8740 11 2025\n",
"2025-12-01 2025.9562 12 2025\n",
" index Yr Mn Date 1 Date 2 s1 s2 s3 s4 \\\n",
"period \n",
"2020-01-01 744 2020 1 43845 2020.041 413.37 413.33 413.11 413.05 \n",
"\n",
"[72 rows x 3 columns]"
" s5 s6 \n",
"period \n",
"2020-01-01 413.37 413.33 "
]
},
"execution_count":
334
,
"execution_count":
501
,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"#df_inter = df[['Yr','Mn','Date 2','s5']]\n",
"an_b = df2.loc[1960, : ]\n",
"an_n = df2.loc[1961, : ]\n",
"year, mois = df[-1:]['Yr'].values, df[-1:]['Mn'].values\n",
"#for val in per1: \n",
"# print(val.date()) \n",
"df[-1:].index\n",
"df[-1:]"
]
},
{
"cell_type": "code",
"execution_count": 508,
"metadata": {
"hideCode": true,
"hidePrompt": true,
"scrolled": false
},
"outputs": [
{
"ename": "SyntaxError",
"evalue": "invalid syntax (<ipython-input-508-73a8dd18a141>, line 11)",
"output_type": "error",
"traceback": [
"\u001b[0;36m File \u001b[0;32m\"<ipython-input-508-73a8dd18a141>\"\u001b[0;36m, line \u001b[0;32m11\u001b[0m\n\u001b[0;31m iser ....\u001b[0m\n\u001b[0m ^\u001b[0m\n\u001b[0;31mSyntaxError\u001b[0m\u001b[0;31m:\u001b[0m invalid syntax\n"
]
}
],
"source": [
"# Année de fin d'extrapolation \n",
"year_f = 2025\n",
...
...
@@ -2582,29 +2208,39 @@
"Yr = pd.Series([q.year for q in per1],index = per1 )\n",
"Mn = pd.Series([q.month for q in per1],index = per1)\n",
" \n",
"s = [] # oblication d'initialiser ....\n",
"s = [] # oblication d'initial\n",
"iser ....\n",
"[s.extend(list(an_n)) if i%4!=0 else s.extend(list(an_b)) for i in np.arange(ymj_fin.year- year[0]+1)]\n",
"Data2 = pd.Series(s,index = per1)\n",
"df_inter = pd.DataFrame({'Yr' : Yr,'Mn' : Mn,'Data 2' : Data2 + Yr})\n",
"#dfa = pd.DataFrame({'Data2' : Data2})\n",
"\n",
"\n",
"df_inter.drop(index = df_inter[-1:].index[0], :)\n",
"\n",
"df_inter"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"scrolled": true
},
"metadata": {},
"outputs": [],
"source": [
"ylent_inter = my_sin(df_inter['Data 2'],popt_l[0],popt_l[1],popt_l[2],popt_l[3])\n",
"yrapide_inter = my_sin(df_inter['Data 2'],popt_r[0],popt_r[1],popt_r[2],popt_r[3]) \n",
"\n",
"mu, sigma = 0, bruit['std'] \n",
"# creating a noise\n",
"noise = np.random.normal(mu, sigma, len(df_inter['Data 2']))\n",
"evolution = fcube(df_inter['Data 2'])\n",
"\n",
"df_inter['evolution'] = evolution\n",
"df_inter['s5_lent'] = ylent_inter\n",
"df_inter['s5_rapide'] = ylent_rapide\n",
"df_inter\n",
"\n"
"df_inter['s5_rapide'] = yrapide_inter\n",
"df_inter['noise'] = noise\n",
"df_inter['s5_inter'] = df_inter.s5_lent + df_inter.s5_rapide + df_inter.noise+df_inter.evolution\n",
"df_inter"
]
},
{
...
...
@@ -2619,15 +2255,10 @@
"ax1.grid(linestyle='--', linewidth=1)\n",
"ax2.grid(linestyle='--', linewidth=1)\n",
"\n",
"mu, sigma = 0, bruit['std'] \n",
"# creating a noise\n",
"noise = np.random.normal(mu, sigma, len(df_inter['Data 2'])) \n",
"\n",
"ax1.set(title = 'Interpolation concentration CO2 lente',xlabel='Période',ylabel='Concentration (ppm)')\n",
"ax1.plot(df_inter['Data 2'],
ylent_inter
);\n",
"ax1.plot(df_inter['Data 2'],
df_inter.s5_lent
);\n",
"ax2.set(title = 'Interpolation concentration CO2 rapide',xlabel='Période',ylabel='Concentration (ppm)')\n",
"ax2.plot(df_inter['Data 2'],yrapide_inter + noise);\n",
"\n"
"ax2.plot(df_inter['Data 2'],df_inter.s5_rapide);"
]
},
{
...
...
@@ -2635,14 +2266,47 @@
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
"source": [
"fig = plt.figure(figsize=(18,5))\n",
"ax1 = fig.add_subplot(111)\n",
"ax1.grid(linestyle='--', linewidth=1)\n",
"\n",
"ax1.set(title = 'Interpolation concentration CO2 + bruit',xlabel='Période',ylabel='Concentration (ppm)')\n",
"ax1.plot(df_inter['Data 2'],df_inter.s5_lent + df_inter.s5_rapide + df_inter.noise);\n",
"#ax2.set(title = 'Interpolation concentration CO2 rapide',xlabel='Période',ylabel='Concentration (ppm)')\n",
"#ax2.plot(df_inter['Data 2'],df_inter.s5_rapide);"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
"source": [
"fig = plt.figure(figsize=(18,5))\n",
"ax1 = fig.add_subplot(111)\n",
"ax1.grid(linestyle='--', linewidth=1)\n",
"\n",
"ax1.set(title = 'Interpolation concentration CO2 + bruit',xlabel='Période',ylabel='Concentration (ppm)')\n",
"ax1.plot(df_inter['Data 2'],df_inter.s5_inter);"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"\n",
"\n",
"\n",
"fig = plt.figure(figsize=(18,5))\n",
"ax1 = fig.add_subplot(111)\n",
"ax1.grid(linestyle='--', linewidth=1)\n",
"\n",
"ax1.set(title = 'Interpolation concentration CO2 + bruit',xlabel='Période',ylabel='Concentration (ppm)')\n",
"ax1.plot(df_inter['Data 2'],df_inter.s5_lent + df_inter.s5_rapide + df_inter.noise+df_inter.evolution);"
]
}
],
"metadata": {
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment