Skip to content

Commit

Permalink
chore: refresh DecisionTreeRegressor notebook
Browse files Browse the repository at this point in the history
  • Loading branch information
RomanBredehoft authored and github-actions[bot] committed Apr 26, 2024
1 parent 3306a4d commit 3ca1830
Showing 1 changed file with 74 additions and 17 deletions.
91 changes: 74 additions & 17 deletions docs/advanced_examples/DecisionTreeRegressor.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@
"output_type": "stream",
"text": [
"Using ConcreteML version 1.5.0\n",
"With Python version 3.10.11 (v3.10.11:7d4cc5aa85, Apr 4 2023, 19:05:19) [Clang 13.0.0 (clang-1300.0.29.30)]\n"
"With Python version 3.8.18 (default, Aug 28 2023, 08:26:46) \n",
"[GCC 9.4.0]\n"
]
}
],
Expand Down Expand Up @@ -248,7 +249,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Training on 5100 samples in 12.5982 seconds\n"
"Training on 5100 samples in 21.4460 seconds\n"
]
}
],
Expand Down Expand Up @@ -304,8 +305,8 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Best hyper parameters: {'criterion': 'absolute_error', 'max_depth': None, 'max_features': 5, 'min_samples_leaf': 2, 'min_samples_split': 2, 'n_bits': 7, 'random_state': 42}\n",
"Min lost: 44158.68$\n"
"Best hyper parameters: {'criterion': 'absolute_error', 'max_depth': 10, 'max_features': 5, 'min_samples_leaf': 2, 'min_samples_split': 2, 'n_bits': 7, 'random_state': 42}\n",
"Min lost: 43828.16$\n"
]
}
],
Expand Down Expand Up @@ -365,8 +366,8 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Error for n_bits=6 is 46599.48$\n",
"Error for n_bits=7 is 44158.68$\n"
"Error for n_bits=6 is 45585.76$\n",
"Error for n_bits=7 is 43828.16$\n"
]
}
],
Expand Down Expand Up @@ -438,8 +439,8 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Sklearn Mean Error: 41418.11$,-33.96% of baseline\n",
"Concrete Mean Error: 40695.02$,-35.12% of baseline\n"
"Sklearn Mean Error: 45960.28$,-26.72% of baseline\n",
"Concrete Mean Error: 46691.16$,-25.56% of baseline\n"
]
}
],
Expand Down Expand Up @@ -509,7 +510,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Compiled with 500 samples in 6.3428 seconds\n"
"Compiled with 500 samples in 1.2870 seconds\n"
]
}
],
Expand All @@ -531,8 +532,14 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Generating a key for an 8-bit circuit\n",
"Key generation time: 0.64 seconds\n"
"Generating a key for an 8-bit circuit\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"Key generation time: 0.48 seconds\n"
]
}
],
Expand Down Expand Up @@ -577,7 +584,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Execution time: 39.86 seconds per sample\n"
"Execution time: 1.55 seconds per sample\n"
]
}
],
Expand Down Expand Up @@ -610,11 +617,11 @@
"output_type": "stream",
"text": [
"Cipher estimates:\n",
"293651.38$, 166667.00$, 126984.38$\n",
"293651.38$, 277778.33$, 126984.38$\n",
"Plain estimates:\n",
"290800.00$, 214600.00$, 102800.00$\n",
"Differences:\n",
"2851.38$, -47933.00$, 24184.38$\n"
"2851.38$, 63178.33$, 24184.38$\n"
]
}
],
Expand Down Expand Up @@ -650,9 +657,59 @@
"output_type": "stream",
"text": [
"N_BITS = 6\n",
"----------\n",
"Sklearn Mean Error: 41418.11$,-33.96% of baseline\n",
"Concrete Mean Error: 40695.02$,-35.12% of baseline\n"
"----------\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"Sklearn Mean Error: 45960.28$,-26.72% of baseline\n",
"Concrete Mean Error: 46691.16$,-25.56% of baseline\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"Circuit compiled with 500 samples in 1.2834 seconds\n",
"Generating a key for an 8-bit circuit\n",
"Key generation time: 0.46 seconds\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"Execution time: 1.58 seconds per sample\n",
"\n",
"N_BITS = 7\n",
"----------\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"Sklearn Mean Error: 45960.28$,-26.72% of baseline\n",
"Concrete Mean Error: 43046.38$,-31.37% of baseline\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"Circuit compiled with 500 samples in 1.2975 seconds\n",
"Generating a key for an 9-bit circuit\n",
"Key generation time: 0.35 seconds\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"Execution time: 1.41 seconds per sample\n",
"\n"
]
}
],
Expand Down

0 comments on commit 3ca1830

Please sign in to comment.