在Storm B中使用外部库(Python)的限制

2024-10-03 17:26:41 发布

您现在位置:Python中文网/ 问答频道 /正文

我想实现一个Bolt(https://github.com/nathanmarz/storm),它使用scikit机器学习API(http://scikit-learn.org/)对元组进行一些繁重的处理

例如-

from sklearn import decomposition
from sklearn import datasets

trans_corpus = vectorizer.fit_transform(corpus)
tfidf = text.TfidfTransformer().fit_transform(trans_corpus)
...
...

这可能吗? 在集群中的每个节点上安装sklearn及其所有依赖项是否足够?在


Tags: fromhttpsimportgithubcom机器transtransform
1条回答
网友
1楼 · 发布于 2024-10-03 17:26:41

理论上讲,这应该是可能的,除非scikit有什么奇怪的东西我不知道。您只需要构建拓扑,这样就可以用Python编写bolt,我想您已经知道这是可能的,并且有很多示例。在

相关问题 更多 >