2024-10-01 00:20:12 发布
网友
在Python(H2O版本3.20.0.9)中,哪个函数等效于R中的h2o.transform?你知道吗
h2o.transform
h2o.transform(modelo_w2v, words_h, aggregate_method = 'AVERAGE')
正如我在评论中所说的一样:
h2o.transform(word2vec, words, aggregate_method)
文档:http://docs.h2o.ai/h2o/latest-stable/h2o-docs/data-science/word2vec.html
源代码:https://github.com/h2oai/h2o-3/blob/master/h2o-py/h2o/model/word_embedding.py#L28
根据文档here,它在Python和R中是相同的:
A transform function is available for use with Word2vec. This function transforms words to vectors using an existing Word2Vec model and has the following usage (in both R and Python)
文档中的代码:
正如我在评论中所说的一样:
文档:http://docs.h2o.ai/h2o/latest-stable/h2o-docs/data-science/word2vec.html
源代码:https://github.com/h2oai/h2o-3/blob/master/h2o-py/h2o/model/word_embedding.py#L28
根据文档here,它在Python和R中是相同的:
文档中的代码:
相关问题 更多 >
编程相关推荐