【问题标题】:What should be the input to the pmml file while using jpmml openscoring REST api使用 jpmml openscoring REST api 时 pmml 文件的输入应该是什么
【发布时间】:2014-10-31 16:10:50
【问题描述】:

我目前正在使用 jpmml openscoring REST API...https://github.com/jpmml/openscoring

我已成功安装 openscoring REST api 并将我的 rules.pmml 文件托管在本地 Tomcat 服务器中。

我的 pmml 文件与此处给出的示例 pmml 文件非常相似: http://www.dmg.org/v4-1/AssociationRules.html

现在要获得输出,我必须提供一个 .json 对象或一个 .csv 文件作为输入。但是 .json 对象应该是什么样子。谁能为我提供上面链接中给出的 pmml 模型的示例输入 json 对象。 我尝试将 .csv 文件作为输入,但我收到 500 错误和警告,提示评估请求 xxx 未指定组字段事务。

【问题讨论】:

    标签: rest pmml


    【解决方案1】:

    Openscoring 服务附带两个示例:

    • 鸢尾花数据集的决策树模型:openscoring-service/src/test/resources/pmml/DecisionTreeIris.pmml
    • 购物数据集的关联规则模型:openscoring-service/src/test/resources/pmml/AssociationRulesShopping.pmml

    如果您想使用 CSV 评估端点,那么您的 CSV 文件应该正好包含两列:

    • 分组列(又名“交易 ID”列,又名“篮子 ID”列)
    • 活动列(又名“产品 ID”列)

    有关真实示例,请参阅openscoring-service/src/test/resources/csv/Shopping.csv

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-01-05
      • 1970-01-01
      • 2010-09-09
      • 2017-06-23
      • 1970-01-01
      • 2017-03-20
      • 2019-06-12
      • 2018-10-28
      相关资源
      最近更新 更多