mirror of
https://github.com/ArthurDanjou/handson-ml3.git
synced 2026-01-14 12:14:36 +01:00
Replace float('inf') with large value 1e100 since inf now causes an error
This commit is contained in:
@@ -170,7 +170,7 @@
|
|||||||
"y = y[setosa_or_versicolor]\n",
|
"y = y[setosa_or_versicolor]\n",
|
||||||
"\n",
|
"\n",
|
||||||
"# SVM Classifier model\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",
|
"svm_clf.fit(X, y)\n",
|
||||||
"\n",
|
"\n",
|
||||||
"# Bad models\n",
|
"# Bad models\n",
|
||||||
@@ -2580,7 +2580,7 @@
|
|||||||
],
|
],
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"kernelspec": {
|
"kernelspec": {
|
||||||
"display_name": "Python 3",
|
"display_name": "Python 3 (ipykernel)",
|
||||||
"language": "python",
|
"language": "python",
|
||||||
"name": "python3"
|
"name": "python3"
|
||||||
},
|
},
|
||||||
@@ -2594,7 +2594,7 @@
|
|||||||
"name": "python",
|
"name": "python",
|
||||||
"nbconvert_exporter": "python",
|
"nbconvert_exporter": "python",
|
||||||
"pygments_lexer": "ipython3",
|
"pygments_lexer": "ipython3",
|
||||||
"version": "3.10.6"
|
"version": "3.10.13"
|
||||||
},
|
},
|
||||||
"nav_menu": {},
|
"nav_menu": {},
|
||||||
"toc": {
|
"toc": {
|
||||||
|
|||||||
Reference in New Issue
Block a user