Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commite000b68

Browse files
committed
Pushing the docs to dev/ for branch: main, commit 5c87a5f3cdef11eeafbc3a1085cdaf85d1d2baca
1 parentc040996 commite000b68

File tree

1,234 files changed

+4276
-4282
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,234 files changed

+4276
-4282
lines changed
Binary file not shown.

‎dev/_downloads/4ee88a807e060ca374ab95e0d8d819ed/plot_ica_vs_pca.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
},
6363
"outputs": [],
6464
"source": [
65-
"import matplotlib.pyplot as plt\n\n\ndef plot_samples(S, axis_list=None):\n plt.scatter(\n S[:, 0], S[:, 1], s=2, marker=\"o\", zorder=10, color=\"steelblue\", alpha=0.5\n )\n if axis_list is not None:\n colors = [\"orange\", \"red\"]\n for color, axis in zip(colors, axis_list):\n axis /= axis.std()\n x_axis, y_axis = axis\n # Trick to get legend to work\n plt.plot(0.1 * x_axis, 0.1 * y_axis, linewidth=2, color=color)\n plt.quiver(\n (0, 0),\n (0, 0),\n x_axis,\n y_axis,\n zorder=11,\n width=0.01,\n scale=6,\n color=color,\n )\n\n plt.hlines(0, -3, 3)\n plt.vlines(0, -3, 3)\n plt.xlim(-3, 3)\n plt.ylim(-3, 3)\n plt.xlabel(\"x\")\n plt.ylabel(\"y\")\n\n\nplt.figure()\nplt.subplot(2, 2, 1)\nplot_samples(S / S.std())\nplt.title(\"True Independent Sources\")\n\naxis_list = [pca.components_.T, ica.mixing_]\nplt.subplot(2, 2, 2)\nplot_samples(X / np.std(X), axis_list=axis_list)\nlegend = plt.legend([\"PCA\", \"ICA\"], loc=\"upper right\")\nlegend.set_zorder(100)\n\nplt.title(\"Observations\")\n\nplt.subplot(2, 2, 3)\nplot_samples(S_pca_ / np.std(S_pca_, axis=0))\nplt.title(\"PCA recovered signals\")\n\nplt.subplot(2, 2, 4)\nplot_samples(S_ica_ / np.std(S_ica_))\nplt.title(\"ICA recovered signals\")\n\nplt.subplots_adjust(0.09, 0.04, 0.94, 0.94, 0.26, 0.36)\nplt.show()"
65+
"import matplotlib.pyplot as plt\n\n\ndef plot_samples(S, axis_list=None):\n plt.scatter(\n S[:, 0], S[:, 1], s=2, marker=\"o\", zorder=10, color=\"steelblue\", alpha=0.5\n )\n if axis_list is not None:\n for axis, color, label in axis_list:\n axis /= axis.std()\n x_axis, y_axis = axis\n plt.quiver(\n (0, 0),\n (0, 0),\n x_axis,\n y_axis,\n zorder=11,\n width=0.01,\n scale=6,\n color=color,\n label=label,\n )\n\n plt.hlines(0, -3, 3)\n plt.vlines(0, -3, 3)\n plt.xlim(-3, 3)\n plt.ylim(-3, 3)\n plt.xlabel(\"x\")\n plt.ylabel(\"y\")\n\n\nplt.figure()\nplt.subplot(2, 2, 1)\nplot_samples(S / S.std())\nplt.title(\"True Independent Sources\")\n\naxis_list = [(pca.components_.T, \"orange\", \"PCA\"), (ica.mixing_, \"red\", \"ICA\")]\nplt.subplot(2, 2, 2)\nplot_samples(X / np.std(X), axis_list=axis_list)\nlegend = plt.legend(loc=\"lower right\")\nlegend.set_zorder(100)\n\nplt.title(\"Observations\")\n\nplt.subplot(2, 2, 3)\nplot_samples(S_pca_ / np.std(S_pca_, axis=0))\nplt.title(\"PCA recovered signals\")\n\nplt.subplot(2, 2, 4)\nplot_samples(S_ica_ / np.std(S_ica_))\nplt.title(\"ICA recovered signals\")\n\nplt.subplots_adjust(0.09, 0.04, 0.94, 0.94, 0.26, 0.36)\nplt.show()"
6666
]
6767
}
6868
],
Binary file not shown.

‎dev/_downloads/dc313f6a0617a04ceea6108f4cde71b6/plot_ica_vs_pca.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -68,12 +68,9 @@ def plot_samples(S, axis_list=None):
6868
S[:,0],S[:,1],s=2,marker="o",zorder=10,color="steelblue",alpha=0.5
6969
)
7070
ifaxis_listisnotNone:
71-
colors= ["orange","red"]
72-
forcolor,axisinzip(colors,axis_list):
71+
foraxis,color,labelinaxis_list:
7372
axis/=axis.std()
7473
x_axis,y_axis=axis
75-
# Trick to get legend to work
76-
plt.plot(0.1*x_axis,0.1*y_axis,linewidth=2,color=color)
7774
plt.quiver(
7875
(0,0),
7976
(0,0),
@@ -83,6 +80,7 @@ def plot_samples(S, axis_list=None):
8380
width=0.01,
8481
scale=6,
8582
color=color,
83+
label=label,
8684
)
8785

8886
plt.hlines(0,-3,3)
@@ -98,10 +96,10 @@ def plot_samples(S, axis_list=None):
9896
plot_samples(S/S.std())
9997
plt.title("True Independent Sources")
10098

101-
axis_list= [pca.components_.T,ica.mixing_]
99+
axis_list= [(pca.components_.T,"orange","PCA"), (ica.mixing_,"red","ICA")]
102100
plt.subplot(2,2,2)
103101
plot_samples(X/np.std(X),axis_list=axis_list)
104-
legend=plt.legend(["PCA","ICA"],loc="upper right")
102+
legend=plt.legend(loc="lower right")
105103
legend.set_zorder(100)
106104

107105
plt.title("Observations")

‎dev/_downloads/scikit-learn-docs.zip

-7.66 KB
Binary file not shown.
-341 Bytes
128 Bytes
100 Bytes
-94 Bytes
-9 Bytes
-16 Bytes
-60 Bytes
-5 Bytes
-207 Bytes
93 Bytes
-15 Bytes
49 Bytes
81 Bytes
-3.71 KB
-879 Bytes
-202 Bytes
-66 Bytes
26 Bytes
34 Bytes
-22 Bytes
-96 Bytes
-71 Bytes
-50 Bytes
-88 Bytes
106 Bytes
36 Bytes
-77 Bytes
-70 Bytes
11 Bytes
-703 Bytes
-136 Bytes
-230 Bytes
-195 Bytes
-22 Bytes
-24 Bytes
0 Bytes

‎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: 4 additions & 4 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

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp