Skip to content

Commit

Permalink
docs: remove outdated todo
Browse files Browse the repository at this point in the history
  • Loading branch information
robinstraub committed Mar 21, 2023
1 parent 592e90c commit 5c9ec5c
Showing 1 changed file with 14 additions and 12 deletions.
26 changes: 14 additions & 12 deletions concrete-ml/svm.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,20 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 5,
"id": "88e9b7fc",
"metadata": {},
"outputs": [],
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Scikit-learn Accuracy: 0.9833\n",
"Concrete-ML Quantized Accuracy: 0.6833\n",
"Concrete-ML FHE Accuracy: 0.6833\n"
]
}
],
"source": [
"# Train a model with scikit-learn LinearSVC, perform prediction and compute the accuracy\n",
"svm_sklearn = SklearnLinearSVC()\n",
Expand Down Expand Up @@ -158,7 +168,7 @@
"svm_concrete = ConcreteLinearSVC()\n",
"svm_concrete.fit(X_train, y_train)\n",
"y_pred_concrete_clear = svm_concrete.predict(X_test)\n",
"accuracy_concrete_clear = accuracy_score(y_test, y_pred_sklearn)\n",
"accuracy_concrete_clear = accuracy_score(y_test, y_pred_concrete_clear)\n",
"```\n",
"\n",
"One thing to note here is not only the model is trained using clear data, but the prediction are also performed in a *plain environment*, there is no encryption at this stage.\n",
Expand All @@ -173,7 +183,7 @@
"circuit.client.keygen(force=False)\n",
"# Now that a circuit is compiled, the svm_concrete can predict value with FHE\n",
"y_pred_concrete_fhe = svm_concrete.predict(X_test, execute_in_fhe=True)\n",
"accuracy_concrete_fhe = accuracy_score(y_test, y_pred_sklearn)\n",
"accuracy_concrete_fhe = accuracy_score(y_test, y_pred_concrete_fhe)\n",
"```\n",
"\n",
"Now that the model is compiled, computing predictions in with FHE is just a matter of passing a execution_in_fhe parameter set to True.\n",
Expand Down Expand Up @@ -398,14 +408,6 @@
"accuracy = accuracy_score(y_test, y_pred)"
]
},
{
"cell_type": "markdown",
"id": "86cc8bee",
"metadata": {},
"source": [
"**[todo]: l'accuracy reste-t-elle la même?**"
]
},
{
"cell_type": "markdown",
"id": "00a2461e",
Expand Down

0 comments on commit 5c9ec5c

Please sign in to comment.