Skip to content

Commit

Permalink
chore: refresh notebooks
Browse files Browse the repository at this point in the history
  • Loading branch information
zama-bot authored Oct 2, 2023
1 parent a7759e8 commit 4f1f5c5
Show file tree
Hide file tree
Showing 15 changed files with 154 additions and 154 deletions.
14 changes: 7 additions & 7 deletions docs/advanced_examples/ClientServer.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,9 @@
"output_type": "stream",
"text": [
"total 76K\r\n",
"-rw-r--r-- 1 root root 59K Oct 2 20:27 client.zip\r\n",
"-rw-r--r-- 1 root root 9.1K Oct 2 20:27 server.zip\r\n",
"-rw-r--r-- 1 root root 76 Oct 2 20:27 versions.json\r\n"
"-rw-r--r-- 1 root root 59K Oct 2 22:17 client.zip\r\n",
"-rw-r--r-- 1 root root 9.1K Oct 2 22:17 server.zip\r\n",
"-rw-r--r-- 1 root root 76 Oct 2 22:17 versions.json\r\n"
]
}
],
Expand Down Expand Up @@ -177,7 +177,7 @@
"output_type": "stream",
"text": [
"total 12K\r\n",
"-rw-r--r-- 1 root root 9.1K Oct 2 20:27 server.zip\r\n"
"-rw-r--r-- 1 root root 9.1K Oct 2 22:17 server.zip\r\n"
]
}
],
Expand All @@ -197,7 +197,7 @@
"output_type": "stream",
"text": [
"total 60K\r\n",
"-rw-r--r-- 1 root root 59K Oct 2 20:27 client.zip\r\n"
"-rw-r--r-- 1 root root 59K Oct 2 22:17 client.zip\r\n"
]
}
],
Expand All @@ -223,7 +223,7 @@
"name": "stderr",
"output_type": "stream",
"text": [
"KeySetCache: miss, regenerating /tmp/tmpy8j7fhhw/8948905552040656205/0_0\n"
"KeySetCache: miss, regenerating /tmp/tmp57ydkl3u/8948905552040656205/0_0\n"
]
}
],
Expand Down Expand Up @@ -271,7 +271,7 @@
"output_type": "stream",
"text": [
"Encrypted data is 1537.17 times larger than the clear data\n",
"The average execution time is 0.51 seconds per sample.\n"
"The average execution time is 0.57 seconds per sample.\n"
]
}
],
Expand Down
10 changes: 5 additions & 5 deletions docs/advanced_examples/ConvolutionalNeuralNetwork.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@
"name": "stderr",
"output_type": "stream",
"text": [
"Training: 100%|██████████| 150/150 [00:50<00:00, 2.99it/s]\n"
"Training: 100%|██████████| 150/150 [00:50<00:00, 3.00it/s]\n"
]
},
{
Expand Down Expand Up @@ -381,7 +381,7 @@
"name": "stderr",
"output_type": "stream",
"text": [
"100%|██████████| 450/450 [00:01<00:00, 234.76it/s]"
"100%|██████████| 450/450 [00:01<00:00, 237.23it/s]"
]
},
{
Expand Down Expand Up @@ -433,7 +433,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Keygen time: 4.00s\n"
"Keygen time: 3.64s\n"
]
}
],
Expand Down Expand Up @@ -462,14 +462,14 @@
"name": "stderr",
"output_type": "stream",
"text": [
"100%|██████████| 100/100 [04:52<00:00, 2.93s/it]"
"100%|██████████| 100/100 [04:45<00:00, 2.86s/it]"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"Time per inference in FHE: 2.93 with 99.00% accuracy\n"
"Time per inference in FHE: 2.86 with 99.00% accuracy\n"
]
},
{
Expand Down
8 changes: 4 additions & 4 deletions docs/advanced_examples/DecisionTreeClassifier.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
"output_type": "stream",
"text": [
"Best hyper parameters: {'max_depth': None, 'max_features': None, 'min_samples_leaf': 10, 'min_samples_split': 100}\n",
"Best score: 0.929392653754244\n"
"Best score: 0.9295588018954174\n"
]
}
],
Expand Down Expand Up @@ -132,7 +132,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Sklearn average precision score: 0.94\n",
"Sklearn average precision score: 0.95\n",
"Concrete average precision score: 0.97\n"
]
}
Expand Down Expand Up @@ -247,7 +247,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Key generation time: 7.29 seconds\n"
"Key generation time: 7.17 seconds\n"
]
}
],
Expand Down Expand Up @@ -279,7 +279,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Execution time: 1.04 seconds per sample\n"
"Execution time: 1.82 seconds per sample\n"
]
}
],
Expand Down
20 changes: 10 additions & 10 deletions docs/advanced_examples/DecisionTreeRegressor.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Training on 5100 samples in 25.0030 seconds\n"
"Training on 5100 samples in 24.9563 seconds\n"
]
}
],
Expand Down Expand Up @@ -512,7 +512,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Compiled with 5100 samples in 41.7984 seconds\n"
"Compiled with 5100 samples in 46.3426 seconds\n"
]
}
],
Expand All @@ -533,7 +533,7 @@
"output_type": "stream",
"text": [
"Generating a key for an 6-bit circuit\n",
"Key generation time: 8.39 seconds\n"
"Key generation time: 8.47 seconds\n"
]
}
],
Expand Down Expand Up @@ -578,7 +578,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Execution time: 15.96 seconds per sample\n"
"Execution time: 15.82 seconds per sample\n"
]
}
],
Expand Down Expand Up @@ -654,19 +654,19 @@
"----------\n",
"Sklearn Mean Error: 41418.11$,-33.96% of baseline\n",
"Concrete Mean Error: 40483.27$,-35.45% of baseline\n",
"Circuit compiled with 5100 samples in 47.1037 seconds\n",
"Circuit compiled with 5100 samples in 47.6635 seconds\n",
"Generating a key for an 7-bit circuit\n",
"Key generation time: 55.42 seconds\n",
"Execution time: 73.43 seconds per sample\n",
"Key generation time: 55.05 seconds\n",
"Execution time: 66.36 seconds per sample\n",
"\n",
"N_BITS = 8\n",
"----------\n",
"Sklearn Mean Error: 41418.11$,-33.96% of baseline\n",
"Concrete Mean Error: 40725.84$,-35.07% of baseline\n",
"Circuit compiled with 5100 samples in 47.2755 seconds\n",
"Circuit compiled with 5100 samples in 48.2086 seconds\n",
"Generating a key for an 8-bit circuit\n",
"Key generation time: 98.91 seconds\n",
"Execution time: 154.95 seconds per sample\n",
"Key generation time: 97.76 seconds\n",
"Execution time: 150.93 seconds per sample\n",
"\n"
]
}
Expand Down
82 changes: 41 additions & 41 deletions docs/advanced_examples/ExperimentPrivacyTreePaper.ipynb

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions docs/advanced_examples/FullyConnectedNeuralNetwork.ipynb

Large diffs are not rendered by default.

20 changes: 10 additions & 10 deletions docs/advanced_examples/FullyConnectedNeuralNetworkOnMNIST.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
"________________________________________________________________________________\n",
"[Memory] Calling sklearn.datasets._openml.fetch_openml...\n",
"fetch_openml('mnist_784')\n",
"____________________________________________________fetch_openml - 88.1s, 1.5min\n"
"____________________________________________________fetch_openml - 87.8s, 1.5min\n"
]
}
],
Expand Down Expand Up @@ -217,13 +217,13 @@
"text": [
" epoch train_loss valid_acc valid_loss dur\n",
"------- ------------ ----------- ------------ ------\n",
" 1 \u001b[36m0.3962\u001b[0m \u001b[32m0.9218\u001b[0m \u001b[35m0.2525\u001b[0m 6.1729\n",
" 2 \u001b[36m0.2119\u001b[0m \u001b[32m0.9453\u001b[0m \u001b[35m0.2085\u001b[0m 4.9677\n",
" 3 \u001b[36m0.1867\u001b[0m 0.9383 0.2252 4.9785\n",
" 4 0.1972 0.9378 0.2135 5.3473\n",
" 5 \u001b[36m0.1778\u001b[0m 0.9403 0.2465 5.3205\n",
" 6 \u001b[36m0.1752\u001b[0m \u001b[32m0.9474\u001b[0m \u001b[35m0.1849\u001b[0m 5.5625\n",
" 7 \u001b[36m0.1672\u001b[0m 0.9455 0.1861 5.3572\n"
" 1 \u001b[36m0.3858\u001b[0m \u001b[32m0.9435\u001b[0m \u001b[35m0.1836\u001b[0m 5.8779\n",
" 2 \u001b[36m0.2098\u001b[0m \u001b[32m0.9474\u001b[0m \u001b[35m0.1802\u001b[0m 5.2772\n",
" 3 \u001b[36m0.1790\u001b[0m 0.9321 0.2391 5.1524\n",
" 4 0.2028 0.9385 0.2119 4.9674\n",
" 5 0.1831 0.9348 0.2336 4.7900\n",
" 6 \u001b[36m0.1675\u001b[0m 0.9448 0.1942 5.1873\n",
" 7 \u001b[36m0.1507\u001b[0m 0.9453 0.1958 5.2515\n"
]
}
],
Expand Down Expand Up @@ -354,7 +354,7 @@
"output_type": "stream",
"text": [
"FHE circuit of 13-bits\n",
"Key generation time: 97.05 seconds\n"
"Key generation time: 401.57 seconds\n"
]
}
],
Expand All @@ -376,7 +376,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Execution time in FHE: 27.82 seconds per sample\n",
"Execution time in FHE: 63.39 seconds per sample\n",
"\n",
"Expected values: [0, 4, 1]\n",
"Simulated prediction values: [0 4 1]\n",
Expand Down
2 changes: 1 addition & 1 deletion docs/advanced_examples/GLMComparison.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,7 @@
"Key generation time: 0.0001 seconds\n",
"Mean Gamma deviance (scikit-learn): 0.3319\n",
"Mean Gamma deviance (Concrete ML, quantized): 0.3319\n",
"Mean Gamma deviance (Concrete ML in FHE, with 0.0017 seconds per inference): 0.3319\n",
"Mean Gamma deviance (Concrete ML in FHE, with 0.0016 seconds per inference): 0.3319\n",
"Relative difference between scikit-learn (clear) and Concrete-ml (FHE) scores: 0.00%\n",
"\n",
"Generating a key for an 22-bit circuit\n",
Expand Down
24 changes: 12 additions & 12 deletions docs/advanced_examples/LinearSVR.ipynb

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/advanced_examples/PoissonRegression.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1075,7 +1075,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Key generation time: 0.0005 seconds\n"
"Key generation time: 0.0004 seconds\n"
]
}
],
Expand Down
46 changes: 23 additions & 23 deletions docs/advanced_examples/QuantizationAwareTraining.ipynb

Large diffs are not rendered by default.

48 changes: 24 additions & 24 deletions docs/advanced_examples/RegressorComparison.ipynb

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions docs/advanced_examples/SVMClassifier.ipynb

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/advanced_examples/XGBClassifier.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@
"output_type": "stream",
"text": [
"Mean time fit sklearn: 0.42s, std time fit sklearn: 0.34s\n",
"Mean time fit concrete: 2.40s,std time fit concrete: 0.85s\n",
"Mean time fit concrete: 2.42s,std time fit concrete: 0.89s\n",
"Best MCC score sklearn: 0.48\n",
"Best MCC score concrete: 0.52\n"
]
Expand Down Expand Up @@ -533,7 +533,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Key generation time: 5.46 seconds\n"
"Key generation time: 5.48 seconds\n"
]
}
],
Expand All @@ -552,7 +552,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Execution time: 2.54 seconds per sample\n"
"Execution time: 3.15 seconds per sample\n"
]
}
],
Expand Down
4 changes: 2 additions & 2 deletions docs/advanced_examples/XGBRegressor.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -693,7 +693,7 @@
"output_type": "stream",
"text": [
"Generating a key for an 5-bits circuit\n",
"Key generation time: 3.188 sec\n"
"Key generation time: 3.203 sec\n"
]
}
],
Expand Down Expand Up @@ -1060,7 +1060,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Runtime per sample: 0.64 sec\n"
"Runtime per sample: 0.62 sec\n"
]
}
],
Expand Down

0 comments on commit 4f1f5c5

Please sign in to comment.