简体   繁体   English

sklearn.externals模块说明

[英]sklearn.externals module description

I could not find any description about the sklearn.externals module in scikit-learn. 我在scikit-learn中找不到有关sklearn.externals模块的任何描述。 Does anybody knows what is this module for? 有人知道这个模块是做什么用的吗?

And what is sklearn.externals.six.moves doing exactly? sklearn.externals.six.moves到底在做什么?

You can see a readme on that module's Github page . 您可以在该模块的Github页面上看到自述文件。 It says: 它说:

This directory contains bundled external dependencies that are updated every once in a while. 此目录包含捆绑的外部依赖关系,该依赖关系每隔一段时间更新一次。

In other words, the code in there is not really part of scikit, it's just other libraries that scikit uses, but it stores its own copies of them inside itself to avoid dependency problems if the user has different versions installed. 换句话说,其中的代码实际上并不是scikit的一部分,只是scikit使用的其他库,但是它在内部存储了它们自己的副本,以避免在用户安装了不同版本的情况下出现依赖关系的问题。

And what is sklearn.externals.six.moves doing exactly? sklearn.externals.six.moves到底在做什么?

Nothing . 没事 It is created in six.py and populated via the add_move() method, which is never called . 它是在six.py中创建的,并通过add_move()方法填充,该方法从未调用过 To check via command-line: 要通过命令行检查:

>>> from sklearn import externals
>>> externals.six.moves
<module 'sklearn.externals.six.moves' (built-in)>
>>> help(externals.six.moves)
# gives nothing, let's see its attributes and methods
>>> externals.six.moves.__dict__
{'__name__': 'sklearn.externals.six.moves', '__doc__': None}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 sklearn.externals joblib 抛出 ImportError - 服务器上没有名为 joblib.numpy_pickle 的模块 - sklearn.externals joblib throws ImportError - no module named joblib.numpy_pickle on a server 我在 spyder ImportError: cannot import name 'six' from 'sklearn.externals' 尽管我已经安装了六个模块 - i got this error on spyder ImportError: cannot import name 'six' from 'sklearn.externals' despite i have installed the six module 从 sklearn.externals 导入 joblib 时收到导入错误 - Recieved import error while importing joblib from sklearn.externals Python 导入错误:无法从“sklearn.externals”导入名称“六” - Python import error: cannot import name 'six' from 'sklearn.externals' 亵渎检查错误无法从“sklearn.externals”导入名称“joblib” - profanity check error cannot import name 'joblib' from 'sklearn.externals' 没有名为“sklearn.externals.six”的模块 - No module named 'sklearn.externals.six' 没有名为“sklearn.externals.joblib”的模块错误 - No module named 'sklearn.externals.joblib' ERROR ModuleNotFoundError:没有名为“sklearn.externals.six”的模块 - ModuleNotFoundError: No module named 'sklearn.externals.six' Google Colab ModuleNotFoundError:没有名为“sklearn.externals.joblib”的模块 - Google Colab ModuleNotFoundError: No module named 'sklearn.externals.joblib' Scipy矩阵的描述 - Sklearn - Description of Scipy matrix - Sklearn
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM