Skip to content

Commit 38f3388

Browse files
committed
Pushing the docs to dev/ for branch: master, commit cee48cdf8f67bca9408855d2cd5a20fabec60155
1 parent 344df37 commit 38f3388

File tree

878 files changed

+2562
-2550
lines changed

Some content is hidden

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

878 files changed

+2562
-2550
lines changed
-6 Bytes
Binary file not shown.
-6 Bytes
Binary file not shown.

dev/_downloads/plot_lasso_model_selection.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@
7878
"execution_count": null,
7979
"cell_type": "code",
8080
"source": [
81-
"# Compute paths\nprint(\"Computing regularization path using the Lars lasso...\")\nt1 = time.time()\nmodel = LassoLarsCV(cv=20).fit(X, y)\nt_lasso_lars_cv = time.time() - t1\n\n# Display results\nm_log_alphas = -np.log10(model.cv_alphas_)\n\nplt.figure()\nplt.plot(m_log_alphas, model.cv_mse_path_, ':')\nplt.plot(m_log_alphas, model.cv_mse_path_.mean(axis=-1), 'k',\n label='Average across the folds', linewidth=2)\nplt.axvline(-np.log10(model.alpha_), linestyle='--', color='k',\n label='alpha CV')\nplt.legend()\n\nplt.xlabel('-log(alpha)')\nplt.ylabel('Mean square error')\nplt.title('Mean square error on each fold: Lars (train time: %.2fs)'\n % t_lasso_lars_cv)\nplt.axis('tight')\nplt.ylim(ymin, ymax)\n\nplt.show()"
81+
"# Compute paths\nprint(\"Computing regularization path using the Lars lasso...\")\nt1 = time.time()\nmodel = LassoLarsCV(cv=20).fit(X, y)\nt_lasso_lars_cv = time.time() - t1\n\n# Display results\nm_log_alphas = -np.log10(model.cv_alphas_)\n\nplt.figure()\nplt.plot(m_log_alphas, model.mse_path_, ':')\nplt.plot(m_log_alphas, model.mse_path_.mean(axis=-1), 'k',\n label='Average across the folds', linewidth=2)\nplt.axvline(-np.log10(model.alpha_), linestyle='--', color='k',\n label='alpha CV')\nplt.legend()\n\nplt.xlabel('-log(alpha)')\nplt.ylabel('Mean square error')\nplt.title('Mean square error on each fold: Lars (train time: %.2fs)'\n % t_lasso_lars_cv)\nplt.axis('tight')\nplt.ylim(ymin, ymax)\n\nplt.show()"
8282
],
8383
"outputs": [],
8484
"metadata": {

dev/_downloads/plot_lasso_model_selection.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,8 @@ def plot_ic_criterion(model, name, color):
138138
m_log_alphas = -np.log10(model.cv_alphas_)
139139

140140
plt.figure()
141-
plt.plot(m_log_alphas, model.cv_mse_path_, ':')
142-
plt.plot(m_log_alphas, model.cv_mse_path_.mean(axis=-1), 'k',
141+
plt.plot(m_log_alphas, model.mse_path_, ':')
142+
plt.plot(m_log_alphas, model.mse_path_.mean(axis=-1), 'k',
143143
label='Average across the folds', linewidth=2)
144144
plt.axvline(-np.log10(model.alpha_), linestyle='--', color='k',
145145
label='alpha CV')
54 Bytes
54 Bytes
-51 Bytes
-51 Bytes
309 Bytes
309 Bytes

0 commit comments

Comments
 (0)