question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

No parameter named "n_neighbors", but the parameter is actually there

See original GitHub issue

I have a simple file foo.py:

from sklearn.neighbors import KNeighborsClassifier

model = KNeighborsClassifier(n_neighbors=1)

. It runs without any error, but while I’m editing, pyright complains

No parameter named "n_neighbors"
[Pyright: reportGeneralTypeIssues]

. Screenshot 2021-03-07 at 10 17 27

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

4reactions
fannheywardcommented, Mar 8, 2021

You can run :CocCommand pyright.createtypestub sklearn to create stub.

1reaction
yaegassycommented, Mar 8, 2021

@danielfalbo If you cannot find a stub package for sklearn, you can create one yourself.

Try to run this command in the “project root”.

pyright --createstub sklearn

I think the “stub” will be created with a folder structure like typings/sklearn/....

coc-pyright-issue371-2
Read more comments on GitHub >

github_iconTop Results From Across the Web

hnswlib/ALGO_PARAMS.md at master - GitHub
Header-only C++/python library for fast approximate nearest neighbors - hnswlib/ALGO_PARAMS.md at master · nmslib/hnswlib.
Read more >
Why effective number of parameters in K nearest neighbor is ...
Show activity on this post. effective number of parameters in K nearest neighbor is inversely proportional to K. To get an idea why,...
Read more >
A Simple Introduction to K-Nearest Neighbors Algorithm
'k' in KNN is a parameter that refers to the number of nearest neighbours to include in the majority of the voting process....
Read more >
The Reliable Repadmin for Managing AD Replication
Run repadmin with no parameters to get a feel for what you're up against. Repadmin returns a full help text with all supported...
Read more >
K-Nearest Neighbors - Neo4j Graph Data Science
This behavior is controlled by the configuration parameter perturbationRate . The output of the algorithm are new relationships between nodes and their k- ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found