Skip to content

Commit f260259

Browse files
committed
xrange -> range
1 parent 65bbe9e commit f260259

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

examples/ensemble/plot_adaboost_multiclass.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@
3535

3636
from sklearn.datasets import make_gaussian_quantiles
3737
from sklearn.ensemble import AdaBoostClassifier
38-
from sklearn.externals.six.moves import xrange
3938
from sklearn.metrics import accuracy_score
4039
from sklearn.tree import DecisionTreeClassifier
4140

@@ -84,9 +83,9 @@
8483
plt.figure(figsize=(15, 5))
8584

8685
plt.subplot(131)
87-
plt.plot(xrange(1, n_trees_discrete + 1),
86+
plt.plot(range(1, n_trees_discrete + 1),
8887
discrete_test_errors, c='black', label='SAMME')
89-
plt.plot(xrange(1, n_trees_real + 1),
88+
plt.plot(range(1, n_trees_real + 1),
9089
real_test_errors, c='black',
9190
linestyle='dashed', label='SAMME.R')
9291
plt.legend()
@@ -95,9 +94,9 @@
9594
plt.xlabel('Number of Trees')
9695

9796
plt.subplot(132)
98-
plt.plot(xrange(1, n_trees_discrete + 1), discrete_estimator_errors,
97+
plt.plot(range(1, n_trees_discrete + 1), discrete_estimator_errors,
9998
"b", label='SAMME', alpha=.5)
100-
plt.plot(xrange(1, n_trees_real + 1), real_estimator_errors,
99+
plt.plot(range(1, n_trees_real + 1), real_estimator_errors,
101100
"r", label='SAMME.R', alpha=.5)
102101
plt.legend()
103102
plt.ylabel('Error')
@@ -108,7 +107,7 @@
108107
plt.xlim((-20, len(bdt_discrete) + 20))
109108

110109
plt.subplot(133)
111-
plt.plot(xrange(1, n_trees_discrete + 1), discrete_estimator_weights,
110+
plt.plot(range(1, n_trees_discrete + 1), discrete_estimator_weights,
112111
"b", label='SAMME')
113112
plt.legend()
114113
plt.ylabel('Weight')

0 commit comments

Comments
 (0)