diff --git a/docs/advanced_examples/XGBClassifier.ipynb b/docs/advanced_examples/XGBClassifier.ipynb index 1e12406af..6e0a6467a 100644 --- a/docs/advanced_examples/XGBClassifier.ipynb +++ b/docs/advanced_examples/XGBClassifier.ipynb @@ -26,7 +26,7 @@ "from matplotlib.colors import ListedColormap\n", "from sklearn.datasets import fetch_openml, make_circles\n", "from sklearn.ensemble import RandomForestClassifier as SklearnRandomForestClassifier\n", - "from sklearn.metrics import make_scorer, matthews_corrcoef\n", + "from sklearn.metrics import accuracy_score, make_scorer, matthews_corrcoef\n", "from sklearn.model_selection import GridSearchCV, train_test_split\n", "from xgboost.sklearn import XGBClassifier as SklearnXGBClassifier\n", "\n", @@ -611,20 +611,19 @@ "name": "stdout", "output_type": "stream", "text": [ - "Clear FP32 sklearn model MCC: 0.5\n", - "Clear quantized model MCC: 0.6\n", - "FHE model MCC: 0.6\n" + "Accuracy scores:\n", + "- Scikit-Learn (clear floating points): 0.5\n", + "- Concrete ML (clear quantized): 0.6\n", + "- Concrete ML (FHE): 0.6\n" ] } ], "source": [ - "# Print all matthews correlation coefficients with a string to explain\n", - "from sklearn.metrics import accuracy_score\n", - "\n", + "print(\"Accuracy scores:\")\n", "print(\n", - " f\"Clear FP32 sklearn model MCC: {accuracy_score(y_test_fhe, y_preds_sklearn)}\\n\"\n", - " f\"Clear quantized model MCC: {accuracy_score(y_test_fhe, y_preds_clear)}\\n\"\n", - " f\"FHE model MCC: {accuracy_score(y_test_fhe, y_preds_fhe)}\"\n", + " f\"- Scikit-Learn (clear floating points): {accuracy_score(y_test_fhe, y_preds_sklearn)}\\n\"\n", + " f\"- Concrete ML (clear quantized): {accuracy_score(y_test_fhe, y_preds_clear)}\\n\"\n", + " f\"- Concrete ML (FHE): {accuracy_score(y_test_fhe, y_preds_fhe)}\"\n", ")" ] }