scikit-learnterminologynomenclature

Python: Proper nomenclature


In order to use a classifier (e.g. KNeighborsClassifier) in Python, it is necessary to type

from sklearn.neighbors import KNeighborsClassifier

I am not sure if sklearn is a module, package or class? What is sklearn.neighbors called? And finally, how would we name KNeighborsClassifier?

I am looking for the right terminology to use when talking about these topics.


Solution

  • sklearn.neighbors is a module. KNeighborsClassifier is a class. sklearn is also a module, but in the case of sklearn.neighbors it's just part of the name and not referring to the sklearn module.