Skip to content

Commit e30ae9f

Browse files
committed
Pushing the docs to dev/ for branch: main, commit aee7f594f5d82ba75bcb8d720066ce18c727d0d1
1 parent a472215 commit e30ae9f

File tree

1,361 files changed

+4732
-4786
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,361 files changed

+4732
-4786
lines changed
Binary file not shown.

Diff for: dev/_downloads/4825fc8223d1af0f3b61080c3dea3a62/plot_faces_decomposition.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ def plot_gallery(title, images, n_col=n_col, n_row=n_row, cmap=plt.cm.gray):
153153

154154
# %%
155155
batch_pca_estimator = decomposition.MiniBatchSparsePCA(
156-
n_components=n_components, alpha=0.1, n_iter=100, batch_size=3, random_state=rng
156+
n_components=n_components, alpha=0.1, max_iter=100, batch_size=3, random_state=rng
157157
)
158158
batch_pca_estimator.fit(faces_centered)
159159
plot_gallery(
@@ -171,7 +171,7 @@ def plot_gallery(title, images, n_col=n_col, n_row=n_row, cmap=plt.cm.gray):
171171

172172
# %%
173173
batch_dict_estimator = decomposition.MiniBatchDictionaryLearning(
174-
n_components=n_components, alpha=0.1, n_iter=50, batch_size=3, random_state=rng
174+
n_components=n_components, alpha=0.1, max_iter=50, batch_size=3, random_state=rng
175175
)
176176
batch_dict_estimator.fit(faces_centered)
177177
plot_gallery("Dictionary learning", batch_dict_estimator.components_[:n_components])
@@ -272,7 +272,7 @@ def plot_gallery(title, images, n_col=n_col, n_row=n_row, cmap=plt.cm.gray):
272272
dict_pos_dict_estimator = decomposition.MiniBatchDictionaryLearning(
273273
n_components=n_components,
274274
alpha=0.1,
275-
n_iter=50,
275+
max_iter=50,
276276
batch_size=3,
277277
random_state=rng,
278278
positive_dict=True,
@@ -294,7 +294,7 @@ def plot_gallery(title, images, n_col=n_col, n_row=n_row, cmap=plt.cm.gray):
294294
dict_pos_code_estimator = decomposition.MiniBatchDictionaryLearning(
295295
n_components=n_components,
296296
alpha=0.1,
297-
n_iter=50,
297+
max_iter=50,
298298
batch_size=3,
299299
fit_algorithm="cd",
300300
random_state=rng,
@@ -318,7 +318,7 @@ def plot_gallery(title, images, n_col=n_col, n_row=n_row, cmap=plt.cm.gray):
318318
dict_pos_estimator = decomposition.MiniBatchDictionaryLearning(
319319
n_components=n_components,
320320
alpha=0.1,
321-
n_iter=50,
321+
max_iter=50,
322322
batch_size=3,
323323
fit_algorithm="cd",
324324
random_state=rng,
Binary file not shown.

Diff for: dev/_downloads/fcae36814d8e700024ca855a1eb87ca9/plot_faces_decomposition.ipynb

+5-5
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@
148148
},
149149
"outputs": [],
150150
"source": [
151-
"batch_pca_estimator = decomposition.MiniBatchSparsePCA(\n n_components=n_components, alpha=0.1, n_iter=100, batch_size=3, random_state=rng\n)\nbatch_pca_estimator.fit(faces_centered)\nplot_gallery(\n \"Sparse components - MiniBatchSparsePCA\",\n batch_pca_estimator.components_[:n_components],\n)"
151+
"batch_pca_estimator = decomposition.MiniBatchSparsePCA(\n n_components=n_components, alpha=0.1, max_iter=100, batch_size=3, random_state=rng\n)\nbatch_pca_estimator.fit(faces_centered)\nplot_gallery(\n \"Sparse components - MiniBatchSparsePCA\",\n batch_pca_estimator.components_[:n_components],\n)"
152152
]
153153
},
154154
{
@@ -166,7 +166,7 @@
166166
},
167167
"outputs": [],
168168
"source": [
169-
"batch_dict_estimator = decomposition.MiniBatchDictionaryLearning(\n n_components=n_components, alpha=0.1, n_iter=50, batch_size=3, random_state=rng\n)\nbatch_dict_estimator.fit(faces_centered)\nplot_gallery(\"Dictionary learning\", batch_dict_estimator.components_[:n_components])"
169+
"batch_dict_estimator = decomposition.MiniBatchDictionaryLearning(\n n_components=n_components, alpha=0.1, max_iter=50, batch_size=3, random_state=rng\n)\nbatch_dict_estimator.fit(faces_centered)\nplot_gallery(\"Dictionary learning\", batch_dict_estimator.components_[:n_components])"
170170
]
171171
},
172172
{
@@ -252,7 +252,7 @@
252252
},
253253
"outputs": [],
254254
"source": [
255-
"dict_pos_dict_estimator = decomposition.MiniBatchDictionaryLearning(\n n_components=n_components,\n alpha=0.1,\n n_iter=50,\n batch_size=3,\n random_state=rng,\n positive_dict=True,\n)\ndict_pos_dict_estimator.fit(faces_centered)\nplot_gallery(\n \"Dictionary learning - positive dictionary\",\n dict_pos_dict_estimator.components_[:n_components],\n cmap=plt.cm.RdBu,\n)"
255+
"dict_pos_dict_estimator = decomposition.MiniBatchDictionaryLearning(\n n_components=n_components,\n alpha=0.1,\n max_iter=50,\n batch_size=3,\n random_state=rng,\n positive_dict=True,\n)\ndict_pos_dict_estimator.fit(faces_centered)\nplot_gallery(\n \"Dictionary learning - positive dictionary\",\n dict_pos_dict_estimator.components_[:n_components],\n cmap=plt.cm.RdBu,\n)"
256256
]
257257
},
258258
{
@@ -270,7 +270,7 @@
270270
},
271271
"outputs": [],
272272
"source": [
273-
"dict_pos_code_estimator = decomposition.MiniBatchDictionaryLearning(\n n_components=n_components,\n alpha=0.1,\n n_iter=50,\n batch_size=3,\n fit_algorithm=\"cd\",\n random_state=rng,\n positive_code=True,\n)\ndict_pos_code_estimator.fit(faces_centered)\nplot_gallery(\n \"Dictionary learning - positive code\",\n dict_pos_code_estimator.components_[:n_components],\n cmap=plt.cm.RdBu,\n)"
273+
"dict_pos_code_estimator = decomposition.MiniBatchDictionaryLearning(\n n_components=n_components,\n alpha=0.1,\n max_iter=50,\n batch_size=3,\n fit_algorithm=\"cd\",\n random_state=rng,\n positive_code=True,\n)\ndict_pos_code_estimator.fit(faces_centered)\nplot_gallery(\n \"Dictionary learning - positive code\",\n dict_pos_code_estimator.components_[:n_components],\n cmap=plt.cm.RdBu,\n)"
274274
]
275275
},
276276
{
@@ -288,7 +288,7 @@
288288
},
289289
"outputs": [],
290290
"source": [
291-
"dict_pos_estimator = decomposition.MiniBatchDictionaryLearning(\n n_components=n_components,\n alpha=0.1,\n n_iter=50,\n batch_size=3,\n fit_algorithm=\"cd\",\n random_state=rng,\n positive_dict=True,\n positive_code=True,\n)\ndict_pos_estimator.fit(faces_centered)\nplot_gallery(\n \"Dictionary learning - positive dictionary & code\",\n dict_pos_estimator.components_[:n_components],\n cmap=plt.cm.RdBu,\n)"
291+
"dict_pos_estimator = decomposition.MiniBatchDictionaryLearning(\n n_components=n_components,\n alpha=0.1,\n max_iter=50,\n batch_size=3,\n fit_algorithm=\"cd\",\n random_state=rng,\n positive_dict=True,\n positive_code=True,\n)\ndict_pos_estimator.fit(faces_centered)\nplot_gallery(\n \"Dictionary learning - positive dictionary & code\",\n dict_pos_estimator.components_[:n_components],\n cmap=plt.cm.RdBu,\n)"
292292
]
293293
}
294294
],

0 commit comments

Comments
 (0)