Skip to content

Commit d9d3bd1

Browse files
committed
Pushing the docs to 0.23/ for branch: 0.23.X, commit 0fb307bf39bbdacd6ed713c00724f8f871d60370
1 parent 21475c1 commit d9d3bd1

File tree

2,607 files changed

+13573
-12535
lines changed

Some content is hidden

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

2,607 files changed

+13573
-12535
lines changed

0.23/.buildinfo

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# Sphinx build info version 1
22
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
3-
config: 08776a34286b30b06d1e26673b1db986
3+
config: f1fed674d5ea8331cf07f53f8f179c6f
44
tags: 645f666f9bcd5a90fca523b33c5a78b7

0.23/_downloads/00701bf1048deb8daeb5ad086596d260/plot_lasso_lars.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
"name": "python",
4747
"nbconvert_exporter": "python",
4848
"pygments_lexer": "ipython3",
49-
"version": "3.8.2"
49+
"version": "3.8.5"
5050
}
5151
},
5252
"nbformat": 4,

0.23/_downloads/00727cbc15047062964b3f55fc4571b7/plot_label_propagation_digits_active_learning.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
"name": "python",
4747
"nbconvert_exporter": "python",
4848
"pygments_lexer": "ipython3",
49-
"version": "3.8.2"
49+
"version": "3.8.5"
5050
}
5151
},
5252
"nbformat": 4,

0.23/_downloads/021e92302b91d52cc0533a6d8c7016e7/plot_tree_regression.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
"name": "python",
4747
"nbconvert_exporter": "python",
4848
"pygments_lexer": "ipython3",
49-
"version": "3.8.2"
49+
"version": "3.8.5"
5050
}
5151
},
5252
"nbformat": 4,

0.23/_downloads/0285d04f43da1e9f71cd93c44a262e4a/plot_sparse_coding.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
},
2727
"outputs": [],
2828
"source": [
29-
"print(__doc__)\n\nfrom distutils.version import LooseVersion\n\nimport numpy as np\nimport matplotlib.pyplot as plt\n\nfrom sklearn.decomposition import SparseCoder\n\n\ndef ricker_function(resolution, center, width):\n \"\"\"Discrete sub-sampled Ricker (Mexican hat) wavelet\"\"\"\n x = np.linspace(0, resolution - 1, resolution)\n x = ((2 / (np.sqrt(3 * width) * np.pi ** .25))\n * (1 - (x - center) ** 2 / width ** 2)\n * np.exp(-(x - center) ** 2 / (2 * width ** 2)))\n return x\n\n\ndef ricker_matrix(width, resolution, n_components):\n \"\"\"Dictionary of Ricker (Mexican hat) wavelets\"\"\"\n centers = np.linspace(0, resolution - 1, n_components)\n D = np.empty((n_components, resolution))\n for i, center in enumerate(centers):\n D[i] = ricker_function(resolution, center, width)\n D /= np.sqrt(np.sum(D ** 2, axis=1))[:, np.newaxis]\n return D\n\n\nresolution = 1024\nsubsampling = 3 # subsampling factor\nwidth = 100\nn_components = resolution // subsampling\n\n# Compute a wavelet dictionary\nD_fixed = ricker_matrix(width=width, resolution=resolution,\n n_components=n_components)\nD_multi = np.r_[tuple(ricker_matrix(width=w, resolution=resolution,\n n_components=n_components // 5)\n for w in (10, 50, 100, 500, 1000))]\n\n# Generate a signal\ny = np.linspace(0, resolution - 1, resolution)\nfirst_quarter = y < resolution / 4\ny[first_quarter] = 3.\ny[np.logical_not(first_quarter)] = -1.\n\n# List the different sparse coding methods in the following format:\n# (title, transform_algorithm, transform_alpha,\n# transform_n_nozero_coefs, color)\nestimators = [('OMP', 'omp', None, 15, 'navy'),\n ('Lasso', 'lasso_lars', 2, None, 'turquoise'), ]\nlw = 2\n# Avoid FutureWarning about default value change when numpy >= 1.14\nlstsq_rcond = None if LooseVersion(np.__version__) >= '1.14' else -1\n\nplt.figure(figsize=(13, 6))\nfor subplot, (D, title) in enumerate(zip((D_fixed, D_multi),\n ('fixed width', 'multiple widths'))):\n plt.subplot(1, 2, subplot + 1)\n plt.title('Sparse coding against %s dictionary' % title)\n plt.plot(y, lw=lw, linestyle='--', label='Original signal')\n # Do a wavelet approximation\n for title, algo, alpha, n_nonzero, color in estimators:\n coder = SparseCoder(dictionary=D, transform_n_nonzero_coefs=n_nonzero,\n transform_alpha=alpha, transform_algorithm=algo)\n x = coder.transform(y.reshape(1, -1))\n density = len(np.flatnonzero(x))\n x = np.ravel(np.dot(x, D))\n squared_error = np.sum((y - x) ** 2)\n plt.plot(x, color=color, lw=lw,\n label='%s: %s nonzero coefs,\\n%.2f error'\n % (title, density, squared_error))\n\n # Soft thresholding debiasing\n coder = SparseCoder(dictionary=D, transform_algorithm='threshold',\n transform_alpha=20)\n x = coder.transform(y.reshape(1, -1))\n _, idx = np.where(x != 0)\n x[0, idx], _, _, _ = np.linalg.lstsq(D[idx, :].T, y, rcond=lstsq_rcond)\n x = np.ravel(np.dot(x, D))\n squared_error = np.sum((y - x) ** 2)\n plt.plot(x, color='darkorange', lw=lw,\n label='Thresholding w/ debiasing:\\n%d nonzero coefs, %.2f error'\n % (len(idx), squared_error))\n plt.axis('tight')\n plt.legend(shadow=False, loc='best')\nplt.subplots_adjust(.04, .07, .97, .90, .09, .2)\nplt.show()"
29+
"print(__doc__)\n\nimport numpy as np\nimport matplotlib.pyplot as plt\n\nfrom sklearn.decomposition import SparseCoder\nfrom sklearn.utils.fixes import np_version, parse_version\n\n\ndef ricker_function(resolution, center, width):\n \"\"\"Discrete sub-sampled Ricker (Mexican hat) wavelet\"\"\"\n x = np.linspace(0, resolution - 1, resolution)\n x = ((2 / (np.sqrt(3 * width) * np.pi ** .25))\n * (1 - (x - center) ** 2 / width ** 2)\n * np.exp(-(x - center) ** 2 / (2 * width ** 2)))\n return x\n\n\ndef ricker_matrix(width, resolution, n_components):\n \"\"\"Dictionary of Ricker (Mexican hat) wavelets\"\"\"\n centers = np.linspace(0, resolution - 1, n_components)\n D = np.empty((n_components, resolution))\n for i, center in enumerate(centers):\n D[i] = ricker_function(resolution, center, width)\n D /= np.sqrt(np.sum(D ** 2, axis=1))[:, np.newaxis]\n return D\n\n\nresolution = 1024\nsubsampling = 3 # subsampling factor\nwidth = 100\nn_components = resolution // subsampling\n\n# Compute a wavelet dictionary\nD_fixed = ricker_matrix(width=width, resolution=resolution,\n n_components=n_components)\nD_multi = np.r_[tuple(ricker_matrix(width=w, resolution=resolution,\n n_components=n_components // 5)\n for w in (10, 50, 100, 500, 1000))]\n\n# Generate a signal\ny = np.linspace(0, resolution - 1, resolution)\nfirst_quarter = y < resolution / 4\ny[first_quarter] = 3.\ny[np.logical_not(first_quarter)] = -1.\n\n# List the different sparse coding methods in the following format:\n# (title, transform_algorithm, transform_alpha,\n# transform_n_nozero_coefs, color)\nestimators = [('OMP', 'omp', None, 15, 'navy'),\n ('Lasso', 'lasso_lars', 2, None, 'turquoise'), ]\nlw = 2\n# Avoid FutureWarning about default value change when numpy >= 1.14\nlstsq_rcond = None if np_version >= parse_version('1.14') else -1\n\nplt.figure(figsize=(13, 6))\nfor subplot, (D, title) in enumerate(zip((D_fixed, D_multi),\n ('fixed width', 'multiple widths'))):\n plt.subplot(1, 2, subplot + 1)\n plt.title('Sparse coding against %s dictionary' % title)\n plt.plot(y, lw=lw, linestyle='--', label='Original signal')\n # Do a wavelet approximation\n for title, algo, alpha, n_nonzero, color in estimators:\n coder = SparseCoder(dictionary=D, transform_n_nonzero_coefs=n_nonzero,\n transform_alpha=alpha, transform_algorithm=algo)\n x = coder.transform(y.reshape(1, -1))\n density = len(np.flatnonzero(x))\n x = np.ravel(np.dot(x, D))\n squared_error = np.sum((y - x) ** 2)\n plt.plot(x, color=color, lw=lw,\n label='%s: %s nonzero coefs,\\n%.2f error'\n % (title, density, squared_error))\n\n # Soft thresholding debiasing\n coder = SparseCoder(dictionary=D, transform_algorithm='threshold',\n transform_alpha=20)\n x = coder.transform(y.reshape(1, -1))\n _, idx = np.where(x != 0)\n x[0, idx], _, _, _ = np.linalg.lstsq(D[idx, :].T, y, rcond=lstsq_rcond)\n x = np.ravel(np.dot(x, D))\n squared_error = np.sum((y - x) ** 2)\n plt.plot(x, color='darkorange', lw=lw,\n label='Thresholding w/ debiasing:\\n%d nonzero coefs, %.2f error'\n % (len(idx), squared_error))\n plt.axis('tight')\n plt.legend(shadow=False, loc='best')\nplt.subplots_adjust(.04, .07, .97, .90, .09, .2)\nplt.show()"
3030
]
3131
}
3232
],
@@ -46,7 +46,7 @@
4646
"name": "python",
4747
"nbconvert_exporter": "python",
4848
"pygments_lexer": "ipython3",
49-
"version": "3.8.2"
49+
"version": "3.8.5"
5050
}
5151
},
5252
"nbformat": 4,

0.23/_downloads/02c23dfdb2c05d59dbdb168b1fdcb3d8/plot_feature_agglomeration_vs_univariate_selection.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
"name": "python",
4747
"nbconvert_exporter": "python",
4848
"pygments_lexer": "ipython3",
49-
"version": "3.8.2"
49+
"version": "3.8.5"
5050
}
5151
},
5252
"nbformat": 4,

0.23/_downloads/0314576f362d54c36e37904494f4c7d9/plot_gpc_iris.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
"name": "python",
4747
"nbconvert_exporter": "python",
4848
"pygments_lexer": "ipython3",
49-
"version": "3.8.2"
49+
"version": "3.8.5"
5050
}
5151
},
5252
"nbformat": 4,

0.23/_downloads/039de292122a5274c38d249b744c9b55/plot_pca_vs_lda.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
"name": "python",
4747
"nbconvert_exporter": "python",
4848
"pygments_lexer": "ipython3",
49-
"version": "3.8.2"
49+
"version": "3.8.5"
5050
}
5151
},
5252
"nbformat": 4,

0.23/_downloads/03d92e4804175ff27d91620c6dcbe283/plot_random_dataset.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
"name": "python",
4747
"nbconvert_exporter": "python",
4848
"pygments_lexer": "ipython3",
49-
"version": "3.8.2"
49+
"version": "3.8.5"
5050
}
5151
},
5252
"nbformat": 4,

0.23/_downloads/03e6c2b02546b40c6e11668fb5f5928b/plot_kernel_approximation.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@
8989
"name": "python",
9090
"nbconvert_exporter": "python",
9191
"pygments_lexer": "ipython3",
92-
"version": "3.8.2"
92+
"version": "3.8.5"
9393
}
9494
},
9595
"nbformat": 4,

0 commit comments

Comments
 (0)