Skip to content

Commit d2e816f

Browse files
committed
updated notebooks (init versions)
1 parent d307ecd commit d2e816f

6 files changed

Lines changed: 6031 additions & 5844 deletions

Part 1 - PEPs and fundamental proof structures/PEPit_demo_extracting_a_proof_session2.ipynb

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@
163163
" x1 = x0 - gamma * f.gradient(x0)\n",
164164
"\n",
165165
" # Set the performance metric to the function values accuracy\n",
166-
" problem.set_performance_metric( (x1 - xs) ** 2 ) #TODO OPERAND\n",
166+
" problem.set_performance_metric( (x1 - xs) ** 2 )\n",
167167
"\n",
168168
" # Solve the PEP\n",
169169
" pepit_verbose = max(verbose, 0)\n",
@@ -442,7 +442,7 @@
442442
" x1 = x0 - gamma * f.gradient(x0)\n",
443443
"\n",
444444
" # Set the performance metric to the function values accuracy\n",
445-
" problem.set_performance_metric( f(x1) - fs ) #TODO OPERAND\n",
445+
" problem.set_performance_metric( f(x1) - fs )\n",
446446
"\n",
447447
" # Solve the PEP\n",
448448
" pepit_verbose = max(verbose, 0)\n",
@@ -1081,9 +1081,14 @@
10811081
" # Output prepared problem\n",
10821082
" pepit_verbose = max(verbose, 0)\n",
10831083
" problem._prepare_constraints(verbose=pepit_verbose)\n",
1084+
" \n",
1085+
" # Complete below: what constraints should be deactivated?\n",
1086+
" ################## TODO BLOCK\n",
10841087
" problem._list_of_prepared_constraints[4].deactivate()\n",
10851088
" problem._list_of_prepared_constraints[6].deactivate()\n",
10861089
" problem._list_of_prepared_constraints[7].deactivate()\n",
1090+
" ################## END TODO BLOCK\n",
1091+
"\n",
10871092
"\n",
10881093
" pepit_tau = problem.solve(verbose=pepit_verbose)\n",
10891094
"\n",
@@ -1353,7 +1358,9 @@
13531358
"\n",
13541359
"# This is the LMI:\n",
13551360
"LMI = sm.simplify(sm.hessian( -Lagrangian , (x0,g0))/2)\n",
1356-
"LMI"
1361+
"\n",
1362+
"\n",
1363+
"LMI # Should this matrix be PSD or NSD?"
13571364
]
13581365
},
13591366
{

Part 1 - PEPs and fundamental proof structures/PEPit_demo_extracting_a_proof_session2_init_student_version.ipynb

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"tags": []
99
},
1010
"source": [
11-
"[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/bgoujaud/PEPit/blob/master/ressources/demo/PEPit_demo_extracting_a_proof.ipynb)"
11+
"[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/bgoujaud/PEPit/blob/master/ressources/demo/PEPit_demo_extracting_a_proof_init_student_version.ipynb)"
1212
]
1313
},
1414
{
@@ -55,7 +55,7 @@
5555
{
5656
"cell_type": "code",
5757
"execution_count": null,
58-
"id": "2d37f524",
58+
"id": "02dc4a16",
5959
"metadata": {},
6060
"outputs": [],
6161
"source": [
@@ -163,7 +163,7 @@
163163
" x1 = x0 - gamma * f.gradient(x0)\n",
164164
"\n",
165165
" # Set the performance metric to the function values accuracy\n",
166-
" problem.set_performance_metric( (x1 - xs) ** 2 ) #TODO OPERAND\n",
166+
" problem.set_performance_metric( (x1 - xs) ** 2 )\n",
167167
"\n",
168168
" # Solve the PEP\n",
169169
" pepit_verbose = max(verbose, 0)\n",
@@ -442,7 +442,7 @@
442442
" x1 = x0 - gamma * f.gradient(x0)\n",
443443
"\n",
444444
" # Set the performance metric to the function values accuracy\n",
445-
" problem.set_performance_metric( f(x1) - fs ) #TODO OPERAND\n",
445+
" problem.set_performance_metric( f(x1) - fs )\n",
446446
"\n",
447447
" # Solve the PEP\n",
448448
" pepit_verbose = max(verbose, 0)\n",
@@ -1086,9 +1086,16 @@
10861086
" # Output prepared problem\n",
10871087
" pepit_verbose = max(verbose, 0)\n",
10881088
" problem._prepare_constraints(verbose=pepit_verbose)\n",
1089-
" problem._list_of_prepared_constraints[4].deactivate()\n",
1090-
" problem._list_of_prepared_constraints[6].deactivate()\n",
1091-
" problem._list_of_prepared_constraints[7].deactivate()\n",
1089+
" \n",
1090+
" # Complete below: what constraints should be deactivated?\n",
1091+
" \n",
1092+
" #\n",
1093+
" #\n",
1094+
" # YOUR CODE HERE\n",
1095+
" #\n",
1096+
" #\n",
1097+
" \n",
1098+
"\n",
10921099
"\n",
10931100
" pepit_tau = problem.solve(verbose=pepit_verbose)\n",
10941101
"\n",
@@ -1358,7 +1365,9 @@
13581365
"\n",
13591366
"# This is the LMI:\n",
13601367
"LMI = sm.simplify(sm.hessian( -Lagrangian , (x0,g0))/2)\n",
1361-
"LMI"
1368+
"\n",
1369+
"\n",
1370+
"LMI # Should this matrix be PSD or NSD?"
13621371
]
13631372
},
13641373
{

Part 2 - Structured algorithm certification/Compact algorithm certification.ipynb

Lines changed: 0 additions & 2982 deletions
This file was deleted.

Part 2 - Structured algorithm certification/Compact algorithm certification_init_version.ipynb

Lines changed: 0 additions & 2851 deletions
This file was deleted.

Part 2 - Structured algorithm certification/Compact_algorithm_certification.ipynb

Lines changed: 3002 additions & 0 deletions
Large diffs are not rendered by default.

Part 2 - Structured algorithm certification/Compact_algorithm_certification_init_student_version.ipynb

Lines changed: 3002 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)