diff --git a/examples/template_modelling.ipynb b/examples/template_modelling.ipynb index 1260ae3..88eebcf 100644 --- a/examples/template_modelling.ipynb +++ b/examples/template_modelling.ipynb @@ -21,16 +21,23 @@ }, { "cell_type": "code", - "execution_count": 28, + "execution_count": 10, "id": "initial_id", "metadata": { "collapsed": true, "ExecuteTime": { - "end_time": "2024-02-06T06:44:00.893241880Z", - "start_time": "2024-02-06T06:44:00.818511747Z" + "end_time": "2024-02-06T13:50:59.765225269Z", + "start_time": "2024-02-06T13:50:59.655666375Z" } }, "outputs": [ + { + "data": { + "text/html": " \n " + }, + "metadata": {}, + "output_type": "display_data" + }, { "data": { "application/vnd.plotly.v1+json": { @@ -75,8 +82,10 @@ null, -1.5, -0.5, + null, 0.5, 1.5, + null, 1.5, 1.65 ], @@ -86,8 +95,10 @@ null, 0.0, 0.5, + null, 0.5, 1.0, + null, 1, 1 ], @@ -976,7 +987,7 @@ "plotlyServerURL": "https://plot.ly" } }, - "text/html": "
" + "text/html": "
" }, "metadata": {}, "output_type": "display_data" @@ -984,6 +995,8 @@ ], "source": [ "import portion\n", + "import plotly\n", + "plotly.offline.init_notebook_mode()\n", "import random\n", "random.seed(69)\n", "import networkx as nx\n", @@ -1029,12 +1042,12 @@ "metadata": { "collapsed": false, "ExecuteTime": { - "end_time": "2024-02-06T06:44:01.013225321Z", - "start_time": "2024-02-06T06:44:00.896657339Z" + "end_time": "2024-02-06T13:50:59.765705771Z", + "start_time": "2024-02-06T13:50:59.763377651Z" } }, "id": "72fce84d45115fac", - "execution_count": 29 + "execution_count": 11 }, { "cell_type": "markdown", @@ -1055,7 +1068,7 @@ "output_type": "stream", "text": [ "╒════════════════════════╤════════════════════════╤═════╕\n", - "│ 139885311175264.latent │ 139885311288224.latent │ P │\n", + "│ 140269607350480.latent │ 140269610367920.latent │ P │\n", "├────────────────────────┼────────────────────────┼─────┤\n", "│ 0 │ 0 │ 0.0 │\n", "├────────────────────────┼────────────────────────┼─────┤\n", @@ -1083,12 +1096,12 @@ "metadata": { "collapsed": false, "ExecuteTime": { - "end_time": "2024-02-06T06:44:01.013807963Z", - "start_time": "2024-02-06T06:44:00.995367526Z" + "end_time": "2024-02-06T13:50:59.766153059Z", + "start_time": "2024-02-06T13:50:59.763801161Z" } }, "id": "3360f87d35e776de", - "execution_count": 30 + "execution_count": 12 }, { "cell_type": "markdown", @@ -1147,12 +1160,12 @@ "metadata": { "collapsed": false, "ExecuteTime": { - "end_time": "2024-02-06T06:44:01.154127672Z", - "start_time": "2024-02-06T06:44:01.018405511Z" + "end_time": "2024-02-06T13:50:59.766434778Z", + "start_time": "2024-02-06T13:50:59.763966257Z" } }, "id": "94a46929f1b3a3c8", - "execution_count": 31 + "execution_count": 13 }, { "cell_type": "markdown", @@ -2046,7 +2059,7 @@ "plotlyServerURL": "https://plot.ly" } }, - "text/html": "
" + "text/html": "
" }, "metadata": {}, "output_type": "display_data" @@ -2074,12 +2087,12 @@ "metadata": { "collapsed": false, "ExecuteTime": { - "end_time": "2024-02-06T06:44:01.155736329Z", - "start_time": "2024-02-06T06:44:01.021649835Z" + "end_time": "2024-02-06T13:50:59.863655443Z", + "start_time": "2024-02-06T13:50:59.765197320Z" } }, "id": "334f4625cced7095", - "execution_count": 32 + "execution_count": 14 }, { "cell_type": "markdown", @@ -2109,12 +2122,12 @@ "metadata": { "collapsed": false, "ExecuteTime": { - "end_time": "2024-02-06T06:44:01.335581684Z", - "start_time": "2024-02-06T06:44:01.166144917Z" + "end_time": "2024-02-06T13:50:59.877641544Z", + "start_time": "2024-02-06T13:50:59.807785136Z" } }, "id": "547e615da29f4ccd", - "execution_count": 33 + "execution_count": 15 }, { "cell_type": "markdown", @@ -3098,7 +3111,7 @@ "plotlyServerURL": "https://plot.ly" } }, - "text/html": "
" + "text/html": "
" }, "metadata": {}, "output_type": "display_data" @@ -3112,12 +3125,12 @@ "metadata": { "collapsed": false, "ExecuteTime": { - "end_time": "2024-02-06T06:44:01.336137235Z", - "start_time": "2024-02-06T06:44:01.295340080Z" + "end_time": "2024-02-06T13:50:59.944615959Z", + "start_time": "2024-02-06T13:50:59.884575421Z" } }, "id": "47b6c0255810eb18", - "execution_count": 34 + "execution_count": 16 }, { "cell_type": "code", @@ -3136,12 +3149,12 @@ "metadata": { "collapsed": false, "ExecuteTime": { - "end_time": "2024-02-06T06:44:01.336647739Z", - "start_time": "2024-02-06T06:44:01.295873733Z" + "end_time": "2024-02-06T13:50:59.945001200Z", + "start_time": "2024-02-06T13:50:59.927666915Z" } }, "id": "1dcc91d8a48af213", - "execution_count": 35 + "execution_count": 17 }, { "cell_type": "markdown", @@ -3164,9 +3177,9 @@ "--------------------------------------------------------------------------------\n", "Expectation: {Continuous(x0): 0.0, Continuous(x1): 0.0, Continuous(x10): 0.0, Continuous(x11): 0.0, Continuous(x12): 0.0, Continuous(x13): 0.0, Continuous(x14): 0.0, Continuous(x15): 0.0, Continuous(x16): 0.0, Continuous(x17): 0.0, Continuous(x18): 0.0, Continuous(x19): 0.0, Continuous(x2): 0.0, Continuous(x3): 0.0, Continuous(x4): 0.0, Continuous(x5): 0.0, Continuous(x6): 0.0, Continuous(x7): 0.0, Continuous(x8): 0.0, Continuous(x9): 0.0}\n", "--------------------------------------------------------------------------------\n", - "First possible Mode: {Continuous(x14): [0.5,1.5], Continuous(x16): [0.5,1.5], Continuous(x10): [0.5,1.5], Continuous(x1): [-1.5,-0.5], Continuous(x9): [-1.5,-0.5], Continuous(x6): [0.5,1.5], Continuous(x0): [0.5,1.5], Continuous(x4): [0.5,1.5], Continuous(x11): [-1.5,-0.5], Continuous(x15): [-1.5,-0.5], Continuous(x5): [-1.5,-0.5], Continuous(x8): [0.5,1.5], Continuous(x13): [-1.5,-0.5], Continuous(x18): [0.5,1.5], Continuous(x17): [-1.5,-0.5], Continuous(x19): [-1.5,-0.5], Continuous(x7): [-1.5,-0.5], Continuous(x12): [0.5,1.5], Continuous(x2): [0.5,1.5], Continuous(x3): [-1.5,-0.5]}\n", + "First possible Mode: {Continuous(x12): [0.5,1.5], Continuous(x9): [-1.5,-0.5], Continuous(x1): [-1.5,-0.5], Continuous(x10): [0.5,1.5], Continuous(x17): [-1.5,-0.5], Continuous(x2): [0.5,1.5], Continuous(x4): [0.5,1.5], Continuous(x7): [-1.5,-0.5], Continuous(x19): [-1.5,-0.5], Continuous(x15): [-1.5,-0.5], Continuous(x14): [0.5,1.5], Continuous(x6): [0.5,1.5], Continuous(x18): [0.5,1.5], Continuous(x11): [-1.5,-0.5], Continuous(x3): [-1.5,-0.5], Continuous(x13): [-1.5,-0.5], Continuous(x5): [-1.5,-0.5], Continuous(x8): [0.5,1.5], Continuous(x16): [0.5,1.5], Continuous(x0): [0.5,1.5]}\n", "--------------------------------------------------------------------------------\n", - "Second possible Mode: {Continuous(x14): [-1.5,-0.5], Continuous(x16): [-1.5,-0.5], Continuous(x10): [-1.5,-0.5], Continuous(x1): [0.5,1.5], Continuous(x9): [0.5,1.5], Continuous(x6): [-1.5,-0.5], Continuous(x0): [-1.5,-0.5], Continuous(x4): [-1.5,-0.5], Continuous(x11): [0.5,1.5], Continuous(x15): [0.5,1.5], Continuous(x5): [0.5,1.5], Continuous(x8): [-1.5,-0.5], Continuous(x13): [0.5,1.5], Continuous(x18): [-1.5,-0.5], Continuous(x17): [0.5,1.5], Continuous(x19): [0.5,1.5], Continuous(x7): [0.5,1.5], Continuous(x12): [-1.5,-0.5], Continuous(x2): [-1.5,-0.5], Continuous(x3): [0.5,1.5]}\n" + "Second possible Mode: {Continuous(x12): [-1.5,-0.5], Continuous(x9): [0.5,1.5], Continuous(x1): [0.5,1.5], Continuous(x10): [-1.5,-0.5], Continuous(x17): [0.5,1.5], Continuous(x2): [-1.5,-0.5], Continuous(x4): [-1.5,-0.5], Continuous(x7): [0.5,1.5], Continuous(x19): [0.5,1.5], Continuous(x15): [0.5,1.5], Continuous(x14): [-1.5,-0.5], Continuous(x6): [-1.5,-0.5], Continuous(x18): [-1.5,-0.5], Continuous(x11): [0.5,1.5], Continuous(x3): [0.5,1.5], Continuous(x13): [0.5,1.5], Continuous(x5): [0.5,1.5], Continuous(x8): [-1.5,-0.5], Continuous(x16): [-1.5,-0.5], Continuous(x0): [-1.5,-0.5]}\n" ] } ], @@ -3183,12 +3196,12 @@ "metadata": { "collapsed": false, "ExecuteTime": { - "end_time": "2024-02-06T06:44:01.381808435Z", - "start_time": "2024-02-06T06:44:01.305644485Z" + "end_time": "2024-02-06T13:50:59.945381716Z", + "start_time": "2024-02-06T13:50:59.927808022Z" } }, "id": "3ca976322054b8cb", - "execution_count": 36 + "execution_count": 18 }, { "cell_type": "markdown",