Skip to content

Commit 630dc5e

Browse files
committed
inclusion exclusion
1 parent aff4b4a commit 630dc5e

File tree

1 file changed

+47
-9
lines changed

1 file changed

+47
-9
lines changed

notebooks/Determinantal Point Process.ipynb

Lines changed: 47 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -515,27 +515,65 @@
515515
},
516516
{
517517
"cell_type": "code",
518-
"execution_count": 99,
518+
"execution_count": 133,
519519
"metadata": {},
520520
"outputs": [
521521
{
522522
"data": {
523523
"text/plain": [
524-
"5×5 Array{Int64,2}:\n",
525-
" 2 3 4 5 6\n",
526-
" 3 4 5 6 7\n",
527-
" 4 5 6 7 8\n",
528-
" 5 6 7 8 9\n",
529-
" 6 7 8 9 10"
524+
"16-element Array{Float64,1}:\n",
525+
" 9.99800009997195e-9 \n",
526+
" -3.154713209048903e-5 \n",
527+
" -4.1959963993950273e-5\n",
528+
" -9.673304874165397e-5 \n",
529+
" -2.9739851173984944e-5\n",
530+
" 0.004466845396684257 \n",
531+
" 0.3052207002111089 \n",
532+
" 0.005815309274792625 \n",
533+
" 0.39288415577467783 \n",
534+
" 0.022290584536740973 \n",
535+
" 0.2693223448055833 \n",
536+
" 7.026419854489945e-5 \n",
537+
" 3.2576007333799057e-6\n",
538+
" 5.8041641398580314e-5\n",
539+
" 6.845655600048237e-5 \n",
540+
" 1.0002000170600884e-8"
541+
]
542+
},
543+
"execution_count": 133,
544+
"metadata": {},
545+
"output_type": "execute_result"
546+
}
547+
],
548+
"source": [
549+
"# This shows what happens if you perturb just a bit\n",
550+
"KK = L + .0001I\n",
551+
"LL = KK / (I - KK)\n",
552+
"[det(LL[A,A])/det(LL+I) for A ∈ 𝒫 ]"
553+
]
554+
},
555+
{
556+
"cell_type": "code",
557+
"execution_count": 143,
558+
"metadata": {},
559+
"outputs": [
560+
{
561+
"data": {
562+
"text/plain": [
563+
"4×4 Array{Float64,2}:\n",
564+
" -3155.34 -3577.11 23.1725 2967.18\n",
565+
" -3577.11 -4196.84 -1144.17 3202.24\n",
566+
" 23.1725 -1144.17 -9675.24 -1357.26\n",
567+
" 2967.18 3202.24 -1357.26 -2974.58"
530568
]
531569
},
532-
"execution_count": 99,
570+
"execution_count": 143,
533571
"metadata": {},
534572
"output_type": "execute_result"
535573
}
536574
],
537575
"source": [
538-
"[i+j for i=1:5,j=1:5]"
576+
"LL"
539577
]
540578
},
541579
{

0 commit comments

Comments
 (0)