This topic describes how to construct request data for a Predictive Model Markup Language (PMML) service that is deployed using a universal processor.
Input data
A model service deployed using the universal processor requires that the request data is a string that represents a serialized list. The service supports concurrent processing of requests using multiple threads. Each object in the list must match the data format defined in the DataDictionary tag of the PMML model file.
For example, if a PMML model has three features, sex, cp, and fbs, and its label field is ifhealth, the request data must be in the following format: [{"sex":0,"cp":1,"fbs":1},{"sex":1,"cp":0,"fbs":1},{"sex":0,"cp":0,"fbs":0}].
<PMML version="4.3">
<Header/>
<DataDictionary numberOfFields="4">
<DataField name="sex" optype="continuous" dataType="double"/>
<DataField name="cp" optype="continuous" dataType="double"/>
<DataField name="fbs" optype="continuous" dataType="double"/>
<DataField name="ifhealth" optype="categorical" dataType="double">
<Value value="1"/>
<Value value="0"/>
</DataField>
</DataDictionary>
... a model ...
</PMML>该文章对您有帮助吗?