gpt4 book ai didi

python - 在 Python 中使用 PMML 模型

转载 作者:行者123 更新时间:2023-12-04 02:57:16 24 4
gpt4 key购买 nike

我在 Internet 上找到了很多与此相关的主题,但我找不到解决方案。

假设我想从 this examples list 下载任何 PMML 模型,并在 Python 中运行它们(最好是 Python 3)。有什么办法吗?

我正在寻找一种方法来导入在 Python 外部部署的 PMML,并将其导入以使用这种语言。

最佳答案

你可以使用 PyPMML在 Python 中应用 PMML,例如:

from pypmml import Model

model = Model.fromFile('DecisionTreeIris.pmml')
result = model.predict({
"Sepal_Length" : 5.1,
"Sepal_Width" : 3.5,
"Petal_Length" : 1.4,
"Petal_Width" : 0.2
})

有关其他 PMML 库的更多信息,请免费查看: https://github.com/autodeployai

关于python - 在 Python 中使用 PMML 模型,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52393301/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com