我正在尝试在 jpmml 中创建逻辑回归模型,然后将 PMML 写入文件。我遇到的问题是我找不到任何方法来创建自定义标签,例如以下示例中的“shortForm”和“longForm”:
<MapValues outputColumn="longForm">
<FieldColumnPair field="gender" column="shortForm"/>
<InlineTable>
<row><shortForm>m</shortForm><longForm>male</longForm>
</row>
<row><shortForm>f</shortForm><longForm>female</longForm>
</row>
</InlineTable>
</MapValues>
这是我到目前为止所拥有的:
MapValues mv = new MapValues("output")
.withFieldColumnPairs(
new FieldColumnPair( new FieldName("gender"), "shortForm" )
).withInlineTable(
new InlineTable().withRows(
new Row().with???( new ??? )
)))
简而言之,我要求一个 API 调用,我可以用它来实例化示例中的“shortForm”元素,并将其附加到“row”对象。我已经浏览了 API、示例和 Google/SO,但找不到任何东西。
谢谢你的帮助!