Replace float('inf') with large value 1e100 since inf now causes an error

main
Aurélien Geron 2023-11-14 11:55:40 +13:00
parent 8fce779633
commit e31ce8a44c
1 changed files with 3 additions and 3 deletions

View File

@ -170,7 +170,7 @@
"y = y[setosa_or_versicolor]\n",
"\n",
"# SVM Classifier model\n",
"svm_clf = SVC(kernel=\"linear\", C=float(\"inf\"))\n",
"svm_clf = SVC(kernel=\"linear\", C=1e100)\n",
"svm_clf.fit(X, y)\n",
"\n",
"# Bad models\n",
@ -2580,7 +2580,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
@ -2594,7 +2594,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.6"
"version": "3.10.13"
},
"nav_menu": {},
"toc": {