Skip to content

Commit a94534b

Browse files
committed
Pushing the docs to dev/ for branch: main, commit 8798dfebd5767d4bcd6ef5f113c48df199204cfa
1 parent 369feb6 commit a94534b

File tree

1,266 files changed

+6066
-6090
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,266 files changed

+6066
-6090
lines changed
Binary file not shown.
Binary file not shown.

dev/_downloads/97ec5b2cda9af9d409cf94ba3ae5e270/plot_sgd_iris.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
},
1616
"outputs": [],
1717
"source": [
18-
"import matplotlib.pyplot as plt\nimport numpy as np\n\nfrom sklearn import datasets\nfrom sklearn.inspection import DecisionBoundaryDisplay\nfrom sklearn.linear_model import SGDClassifier\n\n# import some data to play with\niris = datasets.load_iris()\n\n# we only take the first two features. We could\n# avoid this ugly slicing by using a two-dim dataset\nX = iris.data[:, :2]\ny = iris.target\ncolors = \"bry\"\n\n# shuffle\nidx = np.arange(X.shape[0])\nnp.random.seed(13)\nnp.random.shuffle(idx)\nX = X[idx]\ny = y[idx]\n\n# standardize\nmean = X.mean(axis=0)\nstd = X.std(axis=0)\nX = (X - mean) / std\n\nclf = SGDClassifier(alpha=0.001, max_iter=100).fit(X, y)\nax = plt.gca()\nDecisionBoundaryDisplay.from_estimator(\n clf,\n X,\n cmap=plt.cm.Paired,\n ax=ax,\n response_method=\"predict\",\n xlabel=iris.feature_names[0],\n ylabel=iris.feature_names[1],\n)\nplt.axis(\"tight\")\n\n# Plot also the training points\nfor i, color in zip(clf.classes_, colors):\n idx = np.where(y == i)\n plt.scatter(\n X[idx, 0],\n X[idx, 1],\n c=color,\n label=iris.target_names[i],\n cmap=plt.cm.Paired,\n edgecolor=\"black\",\n s=20,\n )\nplt.title(\"Decision surface of multi-class SGD\")\nplt.axis(\"tight\")\n\n# Plot the three one-against-all classifiers\nxmin, xmax = plt.xlim()\nymin, ymax = plt.ylim()\ncoef = clf.coef_\nintercept = clf.intercept_\n\n\ndef plot_hyperplane(c, color):\n def line(x0):\n return (-(x0 * coef[c, 0]) - intercept[c]) / coef[c, 1]\n\n plt.plot([xmin, xmax], [line(xmin), line(xmax)], ls=\"--\", color=color)\n\n\nfor i, color in zip(clf.classes_, colors):\n plot_hyperplane(i, color)\nplt.legend()\nplt.show()"
18+
"import matplotlib.pyplot as plt\nimport numpy as np\n\nfrom sklearn import datasets\nfrom sklearn.inspection import DecisionBoundaryDisplay\nfrom sklearn.linear_model import SGDClassifier\n\n# import some data to play with\niris = datasets.load_iris()\n\n# we only take the first two features. We could\n# avoid this ugly slicing by using a two-dim dataset\nX = iris.data[:, :2]\ny = iris.target\ncolors = \"bry\"\n\n# shuffle\nidx = np.arange(X.shape[0])\nnp.random.seed(13)\nnp.random.shuffle(idx)\nX = X[idx]\ny = y[idx]\n\n# standardize\nmean = X.mean(axis=0)\nstd = X.std(axis=0)\nX = (X - mean) / std\n\nclf = SGDClassifier(alpha=0.001, max_iter=100).fit(X, y)\nax = plt.gca()\nDecisionBoundaryDisplay.from_estimator(\n clf,\n X,\n cmap=plt.cm.Paired,\n ax=ax,\n response_method=\"predict\",\n xlabel=iris.feature_names[0],\n ylabel=iris.feature_names[1],\n)\nplt.axis(\"tight\")\n\n# Plot also the training points\nfor i, color in zip(clf.classes_, colors):\n idx = np.where(y == i)\n plt.scatter(\n X[idx, 0],\n X[idx, 1],\n c=color,\n label=iris.target_names[i],\n edgecolor=\"black\",\n s=20,\n )\nplt.title(\"Decision surface of multi-class SGD\")\nplt.axis(\"tight\")\n\n# Plot the three one-against-all classifiers\nxmin, xmax = plt.xlim()\nymin, ymax = plt.ylim()\ncoef = clf.coef_\nintercept = clf.intercept_\n\n\ndef plot_hyperplane(c, color):\n def line(x0):\n return (-(x0 * coef[c, 0]) - intercept[c]) / coef[c, 1]\n\n plt.plot([xmin, xmax], [line(xmin), line(xmax)], ls=\"--\", color=color)\n\n\nfor i, color in zip(clf.classes_, colors):\n plot_hyperplane(i, color)\nplt.legend()\nplt.show()"
1919
]
2020
}
2121
],

dev/_downloads/de80e18b1c5bc8b447bbce5b9750c567/plot_sgd_iris.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@
5858
X[idx, 1],
5959
c=color,
6060
label=iris.target_names[i],
61-
cmap=plt.cm.Paired,
6261
edgecolor="black",
6362
s=20,
6463
)

dev/_downloads/scikit-learn-docs.zip

-4.4 KB
Binary file not shown.
-342 Bytes
-499 Bytes
116 Bytes
-34 Bytes
-3 Bytes
921 Bytes
-40 Bytes
-1 Bytes
-110 Bytes
-99 Bytes
-3.94 KB
-8 Bytes
-28 Bytes
-73 Bytes
-163 Bytes
80 Bytes
-148 Bytes
18 Bytes
-62 Bytes
76 Bytes
70 Bytes
-117 Bytes
-19 Bytes
133 Bytes
122 Bytes
-43 Bytes
-226 Bytes
-230 Bytes
-152 Bytes
-108 Bytes
11 Bytes
13 Bytes
85 Bytes
1 Byte

dev/_sources/auto_examples/applications/plot_cyclical_feature_engineering.rst.txt

Lines changed: 1 addition & 1 deletion

dev/_sources/auto_examples/applications/plot_digits_denoising.rst.txt

Lines changed: 1 addition & 1 deletion

dev/_sources/auto_examples/applications/plot_face_recognition.rst.txt

Lines changed: 5 additions & 5 deletions

dev/_sources/auto_examples/applications/plot_model_complexity_influence.rst.txt

Lines changed: 15 additions & 15 deletions

dev/_sources/auto_examples/applications/plot_out_of_core_classification.rst.txt

Lines changed: 29 additions & 29 deletions

dev/_sources/auto_examples/applications/plot_outlier_detection_wine.rst.txt

Lines changed: 1 addition & 1 deletion

dev/_sources/auto_examples/applications/plot_prediction_latency.rst.txt

Lines changed: 1 addition & 1 deletion

dev/_sources/auto_examples/applications/plot_species_distribution_modeling.rst.txt

Lines changed: 2 additions & 2 deletions

dev/_sources/auto_examples/applications/plot_stock_market.rst.txt

Lines changed: 1 addition & 1 deletion

0 commit comments

Comments
 (0)