2

hello I keep receiving this error need some help

from skmultilearn.adapt import MLkNN

classifier = MLkNN(k=20)

 classifier.fit(X_train, y_train)

predictions = classifier.predict(X_test)

 accuracy_score(y_test,predictions);

TypeError                                 Traceback (most recent call last)<ipython-input-207-3038330bae31> in <module>()45 # train----> 6 classifier.fit(X_train, y_train)78 # predict

1 frames/usr/local/lib/python3.7/dist-packages/skmultilearn/adapt/mlknn.py in compute_cond(self, X, y)163         """164--> 165         self.knn = NearestNeighbors(self.k).fit(X)166         c = sparse.lil_matrix((self._num_labels, self.k + 1), dtype='i8')167         cn = sparse.lil_matrix((self._num_labels, self.k + 1), dtype='i8')

TypeError: init() takes 1 positional argument but 2 were given

I looked on google but I didn't find an answer

najoukou
  • 27
  • 5

1 Answers1

0

This question has been answered here. And the answer is to make a modification in the mlknn.py file itself.

diviquery
  • 569
  • 5
  • 19