Skip to content

Commit 55466ff

Browse files
committed
Adapted to new API
1 parent 815a29e commit 55466ff

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

ch05/classify.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
from sklearn import neighbors
1717

1818
from data import chosen, chosen_meta
19-
from utils import plot_roc, plot_pr
19+
from utils import plot_pr
2020
from utils import plot_feat_importance
2121
from utils import load_meta
2222
from utils import fetch_posts
@@ -210,11 +210,8 @@ def k_complexity_analysis(clf_class, parameters):
210210

211211
for k in [5]: # [5, 10, 40, 90]:
212212
bias_variance_analysis(neighbors.KNeighborsClassifier, {
213-
'n_neighbors': k, 'warn_on_equidistant': False}, "%iNN" % k)
214-
k_complexity_analysis(neighbors.KNeighborsClassifier, {'n_neighbors': k,
215-
'warn_on_equidistant': False})
216-
# measure(neighbors.KNeighborsClassifier, {'n_neighbors': k, 'p': 2,
217-
#'warn_on_equidistant': False}, "%iNN" % k)
213+
'n_neighbors': k}, "%iNN" % k)
214+
k_complexity_analysis(neighbors.KNeighborsClassifier, {'n_neighbors': k})
218215

219216
from sklearn.linear_model import LogisticRegression
220217
for C in [0.1]: # [0.01, 0.1, 1.0, 10.0]:

0 commit comments

Comments
 (0)