Skip to content

Commit ff7d2e4

Browse files
committed
Pushing the docs to dev/ for branch: main, commit 3c8e0a2034194b9ad7124efdfe4c75a806a9adca
1 parent 11a4595 commit ff7d2e4

File tree

1,365 files changed

+4709
-4799
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,365 files changed

+4709
-4799
lines changed
Binary file not shown.

dev/_downloads/113d936063a64e05f36c8cd5e870300a/plot_ols_3d.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@
8080
},
8181
"outputs": [],
8282
"source": [
83-
"import matplotlib.pyplot as plt\n\n\ndef plot_figs(fig_num, elev, azim, X_train, clf):\n fig = plt.figure(fig_num, figsize=(4, 3))\n plt.clf()\n ax = fig.add_subplot(111, projection=\"3d\", elev=elev, azim=azim)\n\n ax.scatter(X_train[:, 0], X_train[:, 1], y_train, c=\"k\", marker=\"+\")\n ax.plot_surface(\n np.array([[-0.1, -0.1], [0.15, 0.15]]),\n np.array([[-0.1, 0.15], [-0.1, 0.15]]),\n clf.predict(\n np.array([[-0.1, -0.1, 0.15, 0.15], [-0.1, 0.15, -0.1, 0.15]]).T\n ).reshape((2, 2)),\n alpha=0.5,\n )\n ax.set_xlabel(\"X_1\")\n ax.set_ylabel(\"X_2\")\n ax.set_zlabel(\"Y\")\n ax.w_xaxis.set_ticklabels([])\n ax.w_yaxis.set_ticklabels([])\n ax.w_zaxis.set_ticklabels([])\n\n\n# Generate the three different figures from different views\nelev = 43.5\nazim = -110\nplot_figs(1, elev, azim, X_train, ols)\n\nelev = -0.5\nazim = 0\nplot_figs(2, elev, azim, X_train, ols)\n\nelev = -0.5\nazim = 90\nplot_figs(3, elev, azim, X_train, ols)\n\nplt.show()"
83+
"import matplotlib.pyplot as plt\n\n# unused but required import for doing 3d projections with matplotlib < 3.2\nimport mpl_toolkits.mplot3d # noqa: F401\n\n\ndef plot_figs(fig_num, elev, azim, X_train, clf):\n fig = plt.figure(fig_num, figsize=(4, 3))\n plt.clf()\n ax = fig.add_subplot(111, projection=\"3d\", elev=elev, azim=azim)\n\n ax.scatter(X_train[:, 0], X_train[:, 1], y_train, c=\"k\", marker=\"+\")\n ax.plot_surface(\n np.array([[-0.1, -0.1], [0.15, 0.15]]),\n np.array([[-0.1, 0.15], [-0.1, 0.15]]),\n clf.predict(\n np.array([[-0.1, -0.1, 0.15, 0.15], [-0.1, 0.15, -0.1, 0.15]]).T\n ).reshape((2, 2)),\n alpha=0.5,\n )\n ax.set_xlabel(\"X_1\")\n ax.set_ylabel(\"X_2\")\n ax.set_zlabel(\"Y\")\n ax.xaxis.set_ticklabels([])\n ax.yaxis.set_ticklabels([])\n ax.zaxis.set_ticklabels([])\n\n\n# Generate the three different figures from different views\nelev = 43.5\nazim = -110\nplot_figs(1, elev, azim, X_train, ols)\n\nelev = -0.5\nazim = 0\nplot_figs(2, elev, azim, X_train, ols)\n\nelev = -0.5\nazim = 90\nplot_figs(3, elev, azim, X_train, ols)\n\nplt.show()"
8484
]
8585
}
8686
],

dev/_downloads/2a401e4f9bbae968abdf35a831408f10/plot_ols_3d.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@
4242

4343
import matplotlib.pyplot as plt
4444

45+
# unused but required import for doing 3d projections with matplotlib < 3.2
46+
import mpl_toolkits.mplot3d # noqa: F401
47+
4548

4649
def plot_figs(fig_num, elev, azim, X_train, clf):
4750
fig = plt.figure(fig_num, figsize=(4, 3))
@@ -60,9 +63,9 @@ def plot_figs(fig_num, elev, azim, X_train, clf):
6063
ax.set_xlabel("X_1")
6164
ax.set_ylabel("X_2")
6265
ax.set_zlabel("Y")
63-
ax.w_xaxis.set_ticklabels([])
64-
ax.w_yaxis.set_ticklabels([])
65-
ax.w_zaxis.set_ticklabels([])
66+
ax.xaxis.set_ticklabels([])
67+
ax.yaxis.set_ticklabels([])
68+
ax.zaxis.set_ticklabels([])
6669

6770

6871
# Generate the three different figures from different views

dev/_downloads/2d0762e90c243d288bfdebfc1ddb009e/plot_gmm_sin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def plot_results(X, Y, means, covariances, index, title):
6767
# Plot an ellipse to show the Gaussian component
6868
angle = np.arctan(u[1] / u[0])
6969
angle = 180.0 * angle / np.pi # convert to degrees
70-
ell = mpl.patches.Ellipse(mean, v[0], v[1], 180.0 + angle, color=color)
70+
ell = mpl.patches.Ellipse(mean, v[0], v[1], angle=180.0 + angle, color=color)
7171
ell.set_clip_box(splot.bbox)
7272
ell.set_alpha(0.5)
7373
splot.add_artist(ell)

0 commit comments

Comments
 (0)