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 3, 2023
1 parent 4a4e4bb commit a4da62f
Show file tree
Hide file tree
Showing 16 changed files with 161 additions and 161 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 3 00:12 client.zip\r\n",
"-rw-r--r-- 1 root root 9.1K Oct 3 00:12 server.zip\r\n",
"-rw-r--r-- 1 root root 76 Oct 3 00:12 versions.json\r\n"
"-rw-r--r-- 1 root root 59K Oct 3 01:59 client.zip\r\n",
"-rw-r--r-- 1 root root 9.1K Oct 3 01:59 server.zip\r\n",
"-rw-r--r-- 1 root root 76 Oct 3 01:59 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 3 00:12 server.zip\r\n"
"-rw-r--r-- 1 root root 9.1K Oct 3 01:59 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 3 00:12 client.zip\r\n"
"-rw-r--r-- 1 root root 59K Oct 3 01:59 client.zip\r\n"
]
}
],
Expand All @@ -223,7 +223,7 @@
"name": "stderr",
"output_type": "stream",
"text": [
"KeySetCache: miss, regenerating /tmp/tmp0t1atpdd/8948905552040656205/0_0\n"
"KeySetCache: miss, regenerating /tmp/tmp4jtcaivb/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.50 seconds per sample.\n"
"The average execution time is 0.52 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.96it/s]\n"
"Training: 100%|██████████| 150/150 [00:50<00:00, 2.95it/s]\n"
]
},
{
Expand Down Expand Up @@ -381,7 +381,7 @@
"name": "stderr",
"output_type": "stream",
"text": [
"100%|██████████| 450/450 [00:01<00:00, 235.18it/s]"
"100%|██████████| 450/450 [00:01<00:00, 236.58it/s]"
]
},
{
Expand Down Expand Up @@ -433,7 +433,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Keygen time: 3.87s\n"
"Keygen time: 4.04s\n"
]
}
],
Expand Down Expand Up @@ -462,14 +462,14 @@
"name": "stderr",
"output_type": "stream",
"text": [
"100%|██████████| 100/100 [04:49<00:00, 2.89s/it]"
"100%|██████████| 100/100 [04:48<00:00, 2.88s/it]"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"Time per inference in FHE: 2.89 with 100.00% accuracy\n"
"Time per inference in FHE: 2.88 with 99.00% accuracy\n"
]
},
{
Expand Down
6 changes: 3 additions & 3 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.9295221972431504\n"
"Best score: 0.9295310748966703\n"
]
}
],
Expand Down Expand Up @@ -247,7 +247,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Key generation time: 7.14 seconds\n"
"Key generation time: 7.25 seconds\n"
]
}
],
Expand Down Expand Up @@ -279,7 +279,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Execution time: 1.18 seconds per sample\n"
"Execution time: 1.25 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 24.7637 seconds\n"
"Training on 5100 samples in 24.7275 seconds\n"
]
}
],
Expand Down Expand Up @@ -512,7 +512,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Compiled with 5100 samples in 48.0270 seconds\n"
"Compiled with 5100 samples in 43.0347 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.40 seconds\n"
"Key generation time: 8.35 seconds\n"
]
}
],
Expand Down Expand Up @@ -578,7 +578,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Execution time: 14.11 seconds per sample\n"
"Execution time: 14.09 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 44.8090 seconds\n",
"Circuit compiled with 5100 samples in 47.9811 seconds\n",
"Generating a key for an 7-bit circuit\n",
"Key generation time: 55.00 seconds\n",
"Execution time: 69.34 seconds per sample\n",
"Key generation time: 55.34 seconds\n",
"Execution time: 81.45 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 46.9276 seconds\n",
"Circuit compiled with 5100 samples in 43.6799 seconds\n",
"Generating a key for an 8-bit circuit\n",
"Key generation time: 97.77 seconds\n",
"Execution time: 148.21 seconds per sample\n",
"Key generation time: 98.43 seconds\n",
"Execution time: 155.54 seconds per sample\n",
"\n"
]
}
Expand Down
88 changes: 44 additions & 44 deletions docs/advanced_examples/ExperimentPrivacyTreePaper.ipynb

Large diffs are not rendered by default.

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

Large diffs are not rendered by default.

28 changes: 14 additions & 14 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 - 89.7s, 1.5min\n"
"____________________________________________________fetch_openml - 88.1s, 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.4182\u001b[0m \u001b[32m0.9293\u001b[0m \u001b[35m0.2246\u001b[0m 5.6685\n",
" 2 \u001b[36m0.2176\u001b[0m \u001b[32m0.9406\u001b[0m \u001b[35m0.1980\u001b[0m 5.2550\n",
" 3 \u001b[36m0.1863\u001b[0m \u001b[32m0.9517\u001b[0m \u001b[35m0.1788\u001b[0m 5.3326\n",
" 4 0.1969 0.9367 0.2510 5.3057\n",
" 5 \u001b[36m0.1853\u001b[0m 0.9416 0.1974 5.2875\n",
" 6 \u001b[36m0.1673\u001b[0m 0.9449 0.2192 4.7013\n",
" 7 \u001b[36m0.1576\u001b[0m 0.9511 0.1918 5.2048\n"
" 1 \u001b[36m0.4125\u001b[0m \u001b[32m0.9256\u001b[0m \u001b[35m0.2504\u001b[0m 5.3564\n",
" 2 \u001b[36m0.2184\u001b[0m \u001b[32m0.9423\u001b[0m \u001b[35m0.1987\u001b[0m 4.9092\n",
" 3 \u001b[36m0.1823\u001b[0m \u001b[32m0.9465\u001b[0m \u001b[35m0.1960\u001b[0m 4.7911\n",
" 4 0.1835 0.9367 0.2118 4.4828\n",
" 5 0.1881 0.9316 0.2271 5.1825\n",
" 6 \u001b[36m0.1789\u001b[0m \u001b[32m0.9490\u001b[0m 0.2033 5.3001\n",
" 7 \u001b[36m0.1657\u001b[0m 0.9348 0.2225 4.7292\n"
]
}
],
Expand All @@ -249,7 +249,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"The test accuracy of the clear model is 0.95\n"
"The test accuracy of the clear model is 0.93\n"
]
}
],
Expand Down Expand Up @@ -285,7 +285,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Circuit of 12-bits (FHE simulation)\n"
"Circuit of 13-bits (FHE simulation)\n"
]
}
],
Expand Down Expand Up @@ -318,7 +318,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"The test accuracy (with FHE simulation) of the FHE model is 0.95\n"
"The test accuracy (with FHE simulation) of the FHE model is 0.93\n"
]
}
],
Expand Down Expand Up @@ -353,8 +353,8 @@
"name": "stdout",
"output_type": "stream",
"text": [
"FHE circuit of 12-bits\n",
"Key generation time: 19.41 seconds\n"
"FHE circuit of 13-bits\n",
"Key generation time: 408.05 seconds\n"
]
}
],
Expand All @@ -376,7 +376,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Execution time in FHE: 4.33 seconds per sample\n",
"Execution time in FHE: 47.19 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 @@ -540,7 +540,7 @@
"Key generation time: 0.0002 seconds\n",
"Mean Poisson deviance (scikit-learn): 1.2114\n",
"Mean Poisson deviance (Concrete ML, quantized): 1.2116\n",
"Mean Poisson deviance (Concrete ML in FHE, with 0.0009 seconds per inference): 1.2116\n",
"Mean Poisson deviance (Concrete ML in FHE, with 0.0010 seconds per inference): 1.2116\n",
"Relative difference between scikit-learn (clear) and Concrete-ml (FHE) scores: 0.01%\n",
"\n",
"Generating a key for an 27-bit circuit\n",
Expand Down
2 changes: 1 addition & 1 deletion docs/advanced_examples/LinearRegression.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Key generation time: 0.0004 seconds\n"
"Key generation time: 0.0005 seconds\n"
]
}
],
Expand Down
22 changes: 11 additions & 11 deletions docs/advanced_examples/LinearSVR.ipynb

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions 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 Expand Up @@ -1103,7 +1103,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"FHE execution time: 0.0036 seconds per sample\n",
"FHE execution time: 0.0037 seconds per sample\n",
"\n",
"scikit-learn (clear) deviance score: 1.5934\n",
"Concrete ML (FHE) deviance score: 1.5925\n",
Expand Down
48 changes: 24 additions & 24 deletions docs/advanced_examples/QuantizationAwareTraining.ipynb

Large diffs are not rendered by default.

52 changes: 26 additions & 26 deletions docs/advanced_examples/RegressorComparison.ipynb

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/advanced_examples/SVMClassifier.ipynb

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions docs/advanced_examples/XGBClassifier.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -356,8 +356,8 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Mean time fit sklearn: 0.41s, std time fit sklearn: 0.34s\n",
"Mean time fit concrete: 2.35s,std time fit concrete: 0.67s\n",
"Mean time fit sklearn: 0.44s, std time fit sklearn: 0.35s\n",
"Mean time fit concrete: 2.33s,std time fit concrete: 0.86s\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.77 seconds\n"
]
}
],
Expand All @@ -552,7 +552,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Execution time: 2.84 seconds per sample\n"
"Execution time: 2.14 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.209 sec\n"
"Key generation time: 3.197 sec\n"
]
}
],
Expand Down Expand Up @@ -1060,7 +1060,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Runtime per sample: 0.65 sec\n"
"Runtime per sample: 0.66 sec\n"
]
}
],
Expand Down

0 comments on commit a4da62f

Please sign in to comment.