2011-02-02 18:36:10 +08:00
|
|
|
"""
|
2013-05-28 14:27:20 +08:00
|
|
|
Benchmark scikit-learn's Ward implement compared to SciPy's
|
2011-02-02 18:36:10 +08:00
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
import time
|
|
|
|
|
|
|
|
|
|
import numpy as np
|
|
|
|
|
from scipy.cluster import hierarchy
|
[MRG+1] Fix: Replace pylab with matplotlib.pyplot #6754 (#6762)
* Fix: Replace pylab with matplotlib.pyplot #6754
- one instance of 22 occurrences of pylab replaced with matplotlib.pyplot
- bench_glm.py now free of pylab references
- code executes properly
* Fix: Replace pylab with matplotlib.pyplot #6754
- one instance of 21 remaining occurrences of pylab replaced with
matplotlib.pyplot
- bench_glmnet.py now free of pylab references
- code does not execute for extraneous reason: ImportError: No module named
glmnet.elastic_net
* Fix: Replace pylab with matplotlib.pyplot #6754
- one instance of 19 occurrences of pylab replaced with matplotlib.pyplot
- bench_lasso.py now free of pylab references
- code executes properly
* Fix: Replace pylab with matplotlib.pyplot #6754
- one instance of 18 occurrences of pylab replaced with matplotlib.pyplot
- bench_plot_neighbors.py now free of pylab references
- code executes properly
* Fix: Replace pylab with matplotlib.pyplot #6754
- one instance of 17 occurrences of pylab replaced with matplotlib.pyplot
- bench_plot_omp_lars.py now free of pylab references
- code does not execute for extraneous reasons:
- File "bench_plot_omp_lars.py", line 111, in <module>
- ax = fig.add_subplot(1, 2, i)
- ValueError: num must be 1 <= num <= 2, not 0
- line 111 should probably be ax = fig.add_subplot(1, 2, i+1)
* Fix: Replace pylab with matplotlib.pyplot #6754
- bench_plot_parallel_pairwise.py now free of pylab references
- code executes properly
* Fix: Replace pylab with matplotlib.pyplot #6754
- bench_plot_ward.py now free of pylab references
- code executes properly
* Fix: Replace pylab with matplotlib.pyplot #6754
- bench_sgd_regression.py now free of pylab references
- code executes properly
* Fix: Replace pylab with matplotlib.pyplot #6754
- bench_tree.py now free of pylab references
- code executes properly
* refactor: Replace pl with plt
- replace instances of pl (as on import pylab as pl)
with plt (as in import matplotlib.pyplot as plt)
- bench_glm.py clean
* refactor: Replace pl with plt
- replace instances of pl (as on import pylab as pl)
with plt (as in import matplotlib.pyplot as plt)
- bench_glm.py clean of pl
- code does not execute for extraneous reasons
* refactor: Replace pl with plt
- replace instances of pl (as on import pylab as pl)
with plt (as in import matplotlib.pyplot as plt)
- bench_lasso.py clean of pl
- code executes properly
* refactor: Replace pl with plt
- replace instances of pl (as on import pylab as pl)
with plt (as in import matplotlib.pyplot as plt)
- bench_plot_neighbors.py clean of pl
- code executes properly
* refactor: Replace pl with plt
- replace instances of pl (as on import pylab as pl)
with plt (as in import matplotlib.pyplot as plt)
- bench_plot_omp_lars.py clean of pl
- code does not execute for extraneous reasons
* fix: Fix bug that prevented graphs from displaying
* refactor: Replace pl with plt
- replace instances of pl (as on import pylab as pl)
with plt (as in import matplotlib.pyplot as plt)
- bench_plot_parallel_pairwise.py clean of pl
- code executes properly
* refactor: Replace pl with plt
- replace instances of pl (as on import pylab as pl)
with plt (as in import matplotlib.pyplot as plt)
- bench_plot_ward.py clean of pl
- code executes properly
* refactor: Replace pl with plt
- replace instances of pl (as on import pylab as pl)
with plt (as in import matplotlib.pyplot as plt)
- bench_sgd_regression.py clean of pl
- code executes properly
* refactor: Replace pl with plt
- replace instances of pl (as on import pylab as pl)
with plt (as in import matplotlib.pyplot as plt)
- bench_tree.py clean of pl
- code executes properly
* docs: removed pylab references from comments
* docs: removed all pylab references
- replaced with matplotlib.pyplot
- pl --> plt
* docs: removed pylab references from comments
- replaced with matplotlib.pyplot
- pl --> plt
* docs: removed all pylab references
- replaced with matplotlib.pyplot
- pl --> plt
* refactor: Replace pl with plt
- replace instances of pl (as on import pylab as pl)
with plt (as in import matplotlib.pyplot as plt)
- mlcomp_sparse_document_classification.py clean of pl
* refactor: Replace pl with plt
- replace instances of pl (as on import pylab as pl)
with plt (as in import matplotlib.pyplot as plt)
- plot_gpr_noisy_targets.py clean of pl
- code does not execute for extraneous reasons
- File "examples/gaussian_process/plot_gpr_noisy_targets.py", line 31, in
<module>
- from sklearn.gaussian_process import GaussianProcessRegressor
- ImportError: cannot import name GaussianProcessRegressor
* refactor: Replace pl with plt
- replace instances of pl (as on import pylab as pl)
with plt (as in import matplotlib.pyplot as plt)
- plot_gpc_isoprobability.py clean of pl
- code does not execute for extraneous reasons
- File "examples/gaussian_process/plot_gpc_isoprobability.py", line 24, in
<module>
- from sklearn.gaussian_process import GaussianProcessClassifier
- ImportError: cannot import name GaussianProcessClassifier
* docs: removed all pylab references
- replaced with matplotlib.pyplot
- pl --> plt
* docs: removed all pylab references
- replaced with matplotlib.pyplot
* refactor: Replace pl with plt
- replace instances of pl (as on import pylab as pl)
with plt (as in import matplotlib.pyplot as plt)
- plot_sparse_coding.py clean of pl
- code executes properly
* docs: removed all pylab references
- replaced with matplotlib.pyplot
* docs: removed all pylab references
- replaced with matplotlib.pyplot
* style: Indent properly
* style: indent properly
* style: Indent properly
* docs: Add missing .pyplot
* docs: Fix typo
* style: Indent properly
2016-05-10 17:34:33 +08:00
|
|
|
import matplotlib.pyplot as plt
|
2011-02-02 18:36:10 +08:00
|
|
|
|
2014-02-07 16:25:08 +08:00
|
|
|
from sklearn.cluster import AgglomerativeClustering
|
2011-02-02 18:36:10 +08:00
|
|
|
|
2014-02-07 16:25:08 +08:00
|
|
|
ward = AgglomerativeClustering(n_clusters=3, linkage="ward")
|
2011-02-02 18:36:10 +08:00
|
|
|
|
2011-02-24 00:17:39 +08:00
|
|
|
n_samples = np.logspace(0.5, 3, 9)
|
2011-02-02 18:36:10 +08:00
|
|
|
n_features = np.logspace(1, 3.5, 7)
|
2011-04-02 00:27:16 +08:00
|
|
|
N_samples, N_features = np.meshgrid(n_samples, n_features)
|
2011-02-02 18:36:10 +08:00
|
|
|
scikits_time = np.zeros(N_samples.shape)
|
|
|
|
|
scipy_time = np.zeros(N_samples.shape)
|
|
|
|
|
|
|
|
|
|
for i, n in enumerate(n_samples):
|
|
|
|
|
for j, p in enumerate(n_features):
|
|
|
|
|
X = np.random.normal(size=(n, p))
|
|
|
|
|
t0 = time.time()
|
|
|
|
|
ward.fit(X)
|
|
|
|
|
scikits_time[j, i] = time.time() - t0
|
|
|
|
|
t0 = time.time()
|
2011-02-25 05:59:49 +08:00
|
|
|
hierarchy.ward(X)
|
2011-02-02 18:36:10 +08:00
|
|
|
scipy_time[j, i] = time.time() - t0
|
|
|
|
|
|
2011-12-17 03:18:40 +08:00
|
|
|
ratio = scikits_time / scipy_time
|
2011-02-02 18:36:10 +08:00
|
|
|
|
[MRG+1] Fix: Replace pylab with matplotlib.pyplot #6754 (#6762)
* Fix: Replace pylab with matplotlib.pyplot #6754
- one instance of 22 occurrences of pylab replaced with matplotlib.pyplot
- bench_glm.py now free of pylab references
- code executes properly
* Fix: Replace pylab with matplotlib.pyplot #6754
- one instance of 21 remaining occurrences of pylab replaced with
matplotlib.pyplot
- bench_glmnet.py now free of pylab references
- code does not execute for extraneous reason: ImportError: No module named
glmnet.elastic_net
* Fix: Replace pylab with matplotlib.pyplot #6754
- one instance of 19 occurrences of pylab replaced with matplotlib.pyplot
- bench_lasso.py now free of pylab references
- code executes properly
* Fix: Replace pylab with matplotlib.pyplot #6754
- one instance of 18 occurrences of pylab replaced with matplotlib.pyplot
- bench_plot_neighbors.py now free of pylab references
- code executes properly
* Fix: Replace pylab with matplotlib.pyplot #6754
- one instance of 17 occurrences of pylab replaced with matplotlib.pyplot
- bench_plot_omp_lars.py now free of pylab references
- code does not execute for extraneous reasons:
- File "bench_plot_omp_lars.py", line 111, in <module>
- ax = fig.add_subplot(1, 2, i)
- ValueError: num must be 1 <= num <= 2, not 0
- line 111 should probably be ax = fig.add_subplot(1, 2, i+1)
* Fix: Replace pylab with matplotlib.pyplot #6754
- bench_plot_parallel_pairwise.py now free of pylab references
- code executes properly
* Fix: Replace pylab with matplotlib.pyplot #6754
- bench_plot_ward.py now free of pylab references
- code executes properly
* Fix: Replace pylab with matplotlib.pyplot #6754
- bench_sgd_regression.py now free of pylab references
- code executes properly
* Fix: Replace pylab with matplotlib.pyplot #6754
- bench_tree.py now free of pylab references
- code executes properly
* refactor: Replace pl with plt
- replace instances of pl (as on import pylab as pl)
with plt (as in import matplotlib.pyplot as plt)
- bench_glm.py clean
* refactor: Replace pl with plt
- replace instances of pl (as on import pylab as pl)
with plt (as in import matplotlib.pyplot as plt)
- bench_glm.py clean of pl
- code does not execute for extraneous reasons
* refactor: Replace pl with plt
- replace instances of pl (as on import pylab as pl)
with plt (as in import matplotlib.pyplot as plt)
- bench_lasso.py clean of pl
- code executes properly
* refactor: Replace pl with plt
- replace instances of pl (as on import pylab as pl)
with plt (as in import matplotlib.pyplot as plt)
- bench_plot_neighbors.py clean of pl
- code executes properly
* refactor: Replace pl with plt
- replace instances of pl (as on import pylab as pl)
with plt (as in import matplotlib.pyplot as plt)
- bench_plot_omp_lars.py clean of pl
- code does not execute for extraneous reasons
* fix: Fix bug that prevented graphs from displaying
* refactor: Replace pl with plt
- replace instances of pl (as on import pylab as pl)
with plt (as in import matplotlib.pyplot as plt)
- bench_plot_parallel_pairwise.py clean of pl
- code executes properly
* refactor: Replace pl with plt
- replace instances of pl (as on import pylab as pl)
with plt (as in import matplotlib.pyplot as plt)
- bench_plot_ward.py clean of pl
- code executes properly
* refactor: Replace pl with plt
- replace instances of pl (as on import pylab as pl)
with plt (as in import matplotlib.pyplot as plt)
- bench_sgd_regression.py clean of pl
- code executes properly
* refactor: Replace pl with plt
- replace instances of pl (as on import pylab as pl)
with plt (as in import matplotlib.pyplot as plt)
- bench_tree.py clean of pl
- code executes properly
* docs: removed pylab references from comments
* docs: removed all pylab references
- replaced with matplotlib.pyplot
- pl --> plt
* docs: removed pylab references from comments
- replaced with matplotlib.pyplot
- pl --> plt
* docs: removed all pylab references
- replaced with matplotlib.pyplot
- pl --> plt
* refactor: Replace pl with plt
- replace instances of pl (as on import pylab as pl)
with plt (as in import matplotlib.pyplot as plt)
- mlcomp_sparse_document_classification.py clean of pl
* refactor: Replace pl with plt
- replace instances of pl (as on import pylab as pl)
with plt (as in import matplotlib.pyplot as plt)
- plot_gpr_noisy_targets.py clean of pl
- code does not execute for extraneous reasons
- File "examples/gaussian_process/plot_gpr_noisy_targets.py", line 31, in
<module>
- from sklearn.gaussian_process import GaussianProcessRegressor
- ImportError: cannot import name GaussianProcessRegressor
* refactor: Replace pl with plt
- replace instances of pl (as on import pylab as pl)
with plt (as in import matplotlib.pyplot as plt)
- plot_gpc_isoprobability.py clean of pl
- code does not execute for extraneous reasons
- File "examples/gaussian_process/plot_gpc_isoprobability.py", line 24, in
<module>
- from sklearn.gaussian_process import GaussianProcessClassifier
- ImportError: cannot import name GaussianProcessClassifier
* docs: removed all pylab references
- replaced with matplotlib.pyplot
- pl --> plt
* docs: removed all pylab references
- replaced with matplotlib.pyplot
* refactor: Replace pl with plt
- replace instances of pl (as on import pylab as pl)
with plt (as in import matplotlib.pyplot as plt)
- plot_sparse_coding.py clean of pl
- code executes properly
* docs: removed all pylab references
- replaced with matplotlib.pyplot
* docs: removed all pylab references
- replaced with matplotlib.pyplot
* style: Indent properly
* style: indent properly
* style: Indent properly
* docs: Add missing .pyplot
* docs: Fix typo
* style: Indent properly
2016-05-10 17:34:33 +08:00
|
|
|
plt.figure("scikit-learn Ward's method benchmark results")
|
|
|
|
|
plt.imshow(np.log(ratio), aspect="auto", origin="lower")
|
|
|
|
|
plt.colorbar()
|
|
|
|
|
plt.contour(
|
|
|
|
|
ratio,
|
|
|
|
|
levels=[
|
|
|
|
|
1,
|
|
|
|
|
],
|
|
|
|
|
colors="k",
|
|
|
|
|
)
|
2020-06-24 22:51:51 +08:00
|
|
|
plt.yticks(range(len(n_features)), n_features.astype(int))
|
[MRG+1] Fix: Replace pylab with matplotlib.pyplot #6754 (#6762)
* Fix: Replace pylab with matplotlib.pyplot #6754
- one instance of 22 occurrences of pylab replaced with matplotlib.pyplot
- bench_glm.py now free of pylab references
- code executes properly
* Fix: Replace pylab with matplotlib.pyplot #6754
- one instance of 21 remaining occurrences of pylab replaced with
matplotlib.pyplot
- bench_glmnet.py now free of pylab references
- code does not execute for extraneous reason: ImportError: No module named
glmnet.elastic_net
* Fix: Replace pylab with matplotlib.pyplot #6754
- one instance of 19 occurrences of pylab replaced with matplotlib.pyplot
- bench_lasso.py now free of pylab references
- code executes properly
* Fix: Replace pylab with matplotlib.pyplot #6754
- one instance of 18 occurrences of pylab replaced with matplotlib.pyplot
- bench_plot_neighbors.py now free of pylab references
- code executes properly
* Fix: Replace pylab with matplotlib.pyplot #6754
- one instance of 17 occurrences of pylab replaced with matplotlib.pyplot
- bench_plot_omp_lars.py now free of pylab references
- code does not execute for extraneous reasons:
- File "bench_plot_omp_lars.py", line 111, in <module>
- ax = fig.add_subplot(1, 2, i)
- ValueError: num must be 1 <= num <= 2, not 0
- line 111 should probably be ax = fig.add_subplot(1, 2, i+1)
* Fix: Replace pylab with matplotlib.pyplot #6754
- bench_plot_parallel_pairwise.py now free of pylab references
- code executes properly
* Fix: Replace pylab with matplotlib.pyplot #6754
- bench_plot_ward.py now free of pylab references
- code executes properly
* Fix: Replace pylab with matplotlib.pyplot #6754
- bench_sgd_regression.py now free of pylab references
- code executes properly
* Fix: Replace pylab with matplotlib.pyplot #6754
- bench_tree.py now free of pylab references
- code executes properly
* refactor: Replace pl with plt
- replace instances of pl (as on import pylab as pl)
with plt (as in import matplotlib.pyplot as plt)
- bench_glm.py clean
* refactor: Replace pl with plt
- replace instances of pl (as on import pylab as pl)
with plt (as in import matplotlib.pyplot as plt)
- bench_glm.py clean of pl
- code does not execute for extraneous reasons
* refactor: Replace pl with plt
- replace instances of pl (as on import pylab as pl)
with plt (as in import matplotlib.pyplot as plt)
- bench_lasso.py clean of pl
- code executes properly
* refactor: Replace pl with plt
- replace instances of pl (as on import pylab as pl)
with plt (as in import matplotlib.pyplot as plt)
- bench_plot_neighbors.py clean of pl
- code executes properly
* refactor: Replace pl with plt
- replace instances of pl (as on import pylab as pl)
with plt (as in import matplotlib.pyplot as plt)
- bench_plot_omp_lars.py clean of pl
- code does not execute for extraneous reasons
* fix: Fix bug that prevented graphs from displaying
* refactor: Replace pl with plt
- replace instances of pl (as on import pylab as pl)
with plt (as in import matplotlib.pyplot as plt)
- bench_plot_parallel_pairwise.py clean of pl
- code executes properly
* refactor: Replace pl with plt
- replace instances of pl (as on import pylab as pl)
with plt (as in import matplotlib.pyplot as plt)
- bench_plot_ward.py clean of pl
- code executes properly
* refactor: Replace pl with plt
- replace instances of pl (as on import pylab as pl)
with plt (as in import matplotlib.pyplot as plt)
- bench_sgd_regression.py clean of pl
- code executes properly
* refactor: Replace pl with plt
- replace instances of pl (as on import pylab as pl)
with plt (as in import matplotlib.pyplot as plt)
- bench_tree.py clean of pl
- code executes properly
* docs: removed pylab references from comments
* docs: removed all pylab references
- replaced with matplotlib.pyplot
- pl --> plt
* docs: removed pylab references from comments
- replaced with matplotlib.pyplot
- pl --> plt
* docs: removed all pylab references
- replaced with matplotlib.pyplot
- pl --> plt
* refactor: Replace pl with plt
- replace instances of pl (as on import pylab as pl)
with plt (as in import matplotlib.pyplot as plt)
- mlcomp_sparse_document_classification.py clean of pl
* refactor: Replace pl with plt
- replace instances of pl (as on import pylab as pl)
with plt (as in import matplotlib.pyplot as plt)
- plot_gpr_noisy_targets.py clean of pl
- code does not execute for extraneous reasons
- File "examples/gaussian_process/plot_gpr_noisy_targets.py", line 31, in
<module>
- from sklearn.gaussian_process import GaussianProcessRegressor
- ImportError: cannot import name GaussianProcessRegressor
* refactor: Replace pl with plt
- replace instances of pl (as on import pylab as pl)
with plt (as in import matplotlib.pyplot as plt)
- plot_gpc_isoprobability.py clean of pl
- code does not execute for extraneous reasons
- File "examples/gaussian_process/plot_gpc_isoprobability.py", line 24, in
<module>
- from sklearn.gaussian_process import GaussianProcessClassifier
- ImportError: cannot import name GaussianProcessClassifier
* docs: removed all pylab references
- replaced with matplotlib.pyplot
- pl --> plt
* docs: removed all pylab references
- replaced with matplotlib.pyplot
* refactor: Replace pl with plt
- replace instances of pl (as on import pylab as pl)
with plt (as in import matplotlib.pyplot as plt)
- plot_sparse_coding.py clean of pl
- code executes properly
* docs: removed all pylab references
- replaced with matplotlib.pyplot
* docs: removed all pylab references
- replaced with matplotlib.pyplot
* style: Indent properly
* style: indent properly
* style: Indent properly
* docs: Add missing .pyplot
* docs: Fix typo
* style: Indent properly
2016-05-10 17:34:33 +08:00
|
|
|
plt.ylabel("N features")
|
2020-06-24 22:51:51 +08:00
|
|
|
plt.xticks(range(len(n_samples)), n_samples.astype(int))
|
[MRG+1] Fix: Replace pylab with matplotlib.pyplot #6754 (#6762)
* Fix: Replace pylab with matplotlib.pyplot #6754
- one instance of 22 occurrences of pylab replaced with matplotlib.pyplot
- bench_glm.py now free of pylab references
- code executes properly
* Fix: Replace pylab with matplotlib.pyplot #6754
- one instance of 21 remaining occurrences of pylab replaced with
matplotlib.pyplot
- bench_glmnet.py now free of pylab references
- code does not execute for extraneous reason: ImportError: No module named
glmnet.elastic_net
* Fix: Replace pylab with matplotlib.pyplot #6754
- one instance of 19 occurrences of pylab replaced with matplotlib.pyplot
- bench_lasso.py now free of pylab references
- code executes properly
* Fix: Replace pylab with matplotlib.pyplot #6754
- one instance of 18 occurrences of pylab replaced with matplotlib.pyplot
- bench_plot_neighbors.py now free of pylab references
- code executes properly
* Fix: Replace pylab with matplotlib.pyplot #6754
- one instance of 17 occurrences of pylab replaced with matplotlib.pyplot
- bench_plot_omp_lars.py now free of pylab references
- code does not execute for extraneous reasons:
- File "bench_plot_omp_lars.py", line 111, in <module>
- ax = fig.add_subplot(1, 2, i)
- ValueError: num must be 1 <= num <= 2, not 0
- line 111 should probably be ax = fig.add_subplot(1, 2, i+1)
* Fix: Replace pylab with matplotlib.pyplot #6754
- bench_plot_parallel_pairwise.py now free of pylab references
- code executes properly
* Fix: Replace pylab with matplotlib.pyplot #6754
- bench_plot_ward.py now free of pylab references
- code executes properly
* Fix: Replace pylab with matplotlib.pyplot #6754
- bench_sgd_regression.py now free of pylab references
- code executes properly
* Fix: Replace pylab with matplotlib.pyplot #6754
- bench_tree.py now free of pylab references
- code executes properly
* refactor: Replace pl with plt
- replace instances of pl (as on import pylab as pl)
with plt (as in import matplotlib.pyplot as plt)
- bench_glm.py clean
* refactor: Replace pl with plt
- replace instances of pl (as on import pylab as pl)
with plt (as in import matplotlib.pyplot as plt)
- bench_glm.py clean of pl
- code does not execute for extraneous reasons
* refactor: Replace pl with plt
- replace instances of pl (as on import pylab as pl)
with plt (as in import matplotlib.pyplot as plt)
- bench_lasso.py clean of pl
- code executes properly
* refactor: Replace pl with plt
- replace instances of pl (as on import pylab as pl)
with plt (as in import matplotlib.pyplot as plt)
- bench_plot_neighbors.py clean of pl
- code executes properly
* refactor: Replace pl with plt
- replace instances of pl (as on import pylab as pl)
with plt (as in import matplotlib.pyplot as plt)
- bench_plot_omp_lars.py clean of pl
- code does not execute for extraneous reasons
* fix: Fix bug that prevented graphs from displaying
* refactor: Replace pl with plt
- replace instances of pl (as on import pylab as pl)
with plt (as in import matplotlib.pyplot as plt)
- bench_plot_parallel_pairwise.py clean of pl
- code executes properly
* refactor: Replace pl with plt
- replace instances of pl (as on import pylab as pl)
with plt (as in import matplotlib.pyplot as plt)
- bench_plot_ward.py clean of pl
- code executes properly
* refactor: Replace pl with plt
- replace instances of pl (as on import pylab as pl)
with plt (as in import matplotlib.pyplot as plt)
- bench_sgd_regression.py clean of pl
- code executes properly
* refactor: Replace pl with plt
- replace instances of pl (as on import pylab as pl)
with plt (as in import matplotlib.pyplot as plt)
- bench_tree.py clean of pl
- code executes properly
* docs: removed pylab references from comments
* docs: removed all pylab references
- replaced with matplotlib.pyplot
- pl --> plt
* docs: removed pylab references from comments
- replaced with matplotlib.pyplot
- pl --> plt
* docs: removed all pylab references
- replaced with matplotlib.pyplot
- pl --> plt
* refactor: Replace pl with plt
- replace instances of pl (as on import pylab as pl)
with plt (as in import matplotlib.pyplot as plt)
- mlcomp_sparse_document_classification.py clean of pl
* refactor: Replace pl with plt
- replace instances of pl (as on import pylab as pl)
with plt (as in import matplotlib.pyplot as plt)
- plot_gpr_noisy_targets.py clean of pl
- code does not execute for extraneous reasons
- File "examples/gaussian_process/plot_gpr_noisy_targets.py", line 31, in
<module>
- from sklearn.gaussian_process import GaussianProcessRegressor
- ImportError: cannot import name GaussianProcessRegressor
* refactor: Replace pl with plt
- replace instances of pl (as on import pylab as pl)
with plt (as in import matplotlib.pyplot as plt)
- plot_gpc_isoprobability.py clean of pl
- code does not execute for extraneous reasons
- File "examples/gaussian_process/plot_gpc_isoprobability.py", line 24, in
<module>
- from sklearn.gaussian_process import GaussianProcessClassifier
- ImportError: cannot import name GaussianProcessClassifier
* docs: removed all pylab references
- replaced with matplotlib.pyplot
- pl --> plt
* docs: removed all pylab references
- replaced with matplotlib.pyplot
* refactor: Replace pl with plt
- replace instances of pl (as on import pylab as pl)
with plt (as in import matplotlib.pyplot as plt)
- plot_sparse_coding.py clean of pl
- code executes properly
* docs: removed all pylab references
- replaced with matplotlib.pyplot
* docs: removed all pylab references
- replaced with matplotlib.pyplot
* style: Indent properly
* style: indent properly
* style: Indent properly
* docs: Add missing .pyplot
* docs: Fix typo
* style: Indent properly
2016-05-10 17:34:33 +08:00
|
|
|
plt.xlabel("N samples")
|
|
|
|
|
plt.title("Scikit's time, in units of scipy time (log)")
|
|
|
|
|
plt.show()
|