1 | import sklearn.neighbors as skl_neighbors |
||
0 ignored issues
–
show
|
|||
2 | from Orange.classification import SklLearner |
||
3 | |||
4 | __all__ = ["KNNLearner"] |
||
5 | |||
6 | |||
7 | class KNNLearner(SklLearner): |
||
8 | __wraps__ = skl_neighbors.KNeighborsClassifier |
||
9 | name = 'knn' |
||
10 | |||
11 | def __init__(self, n_neighbors=5, metric="euclidean", weights="uniform", |
||
0 ignored issues
–
show
|
|||
12 | algorithm='auto', |
||
0 ignored issues
–
show
|
|||
13 | preprocessors=None): |
||
14 | super().__init__(preprocessors=preprocessors) |
||
15 | self.params = vars() |
||
16 |
This can be caused by one of the following:
1. Missing Dependencies
This error could indicate a configuration issue of Pylint. Make sure that your libraries are available by adding the necessary commands.
2. Missing __init__.py files
This error could also result from missing
__init__.py
files in your module folders. Make sure that you place one file in each sub-folder.