Is it possible to make a POST scoring request against the Bluemix Predictive Analytics service with more than one input table? The examples are just using one table.
Using: https://palblyp.pmservice.ibmcloud.com/pm/v1/score/contextID?accesskey=key with the following payload:
{
"tablename": "music",
"header": ["userid", "category", "description", "likes", "name", "about"],
"data": []
}, {
"tablename": "likes",
"header": ["userid", "place_type", "location_zip", "location_longitude", "about", "location_country", "location_city", "location_state", "category", "description", "name", "likes", "location_street", "location_latitude"],
"data": []
}
I am getting an error telling me that the input table 'likes' is missing. When I wrap the payload in '[..]', I'm getting a HTTP 500 with:
javax.servlet.ServletException: org.codehaus.jackson.map.JsonMappingException: Can not deserialize instance of com.ibm.spss.blackbox.score.resource.InputData out of START_ARRAY token
at [Source: com.ibm.ws.webcontainer.srt.SRTInputStream@3bb8224c; line: 1, column: 1]<br>
The deployed stream is working with SPSS and the provided WebServices API. Is there a way to call a model which needs more than one input table? Is there more than just the slightly leaking documentation from: https://console.ng.bluemix.net/docs/services/PredictiveModeling/index-gentopic1.html#pm_service_api_batch_flow?
Thanks you very much!
jens
Answer by Rodney Vin (87) | Aug 30, 2016 at 08:03 PM
Sorry, @JensD. PA in Bluemix currently does not support multiple tables in Realtime Scoring "/score" interface. you can sametime or mail me "fengyl@cn.ibm.com". I'll bring the topic to management.
Any updates on this subject ? I am facing the same issue..
Answer by PaulHannan (91) | Aug 30, 2016 at 09:16 AM
Through Scoring within SPSS Collaboration and Deployment Services, multiple input tables can be specified via a REST call. Here is the syntax that I have used to submit a REST call for a Scoring Configuration built over an SPSS Modeler stream that contained 2 input tables:
{
"id":"Input",
"requestInputTable":[
{
"name":"Responses.txt",
"requestInputRow":[
{
"input":[
{"value":"001","name":"Customer"},
{"value":"60","name":"Age"},
{"value":"M","name":"Gender"},
{"value":"13000","name":"Income"},
{"value":"Y","name":"Married"},
{"value":"Y","name":"Children"},
{"value":"N","name":"Disney"},
{"value":"Y","name":"Timeshare"}
]
}
]
},
{
"name":"Customers.txt",
"requestInputRow":[
{
"input":[
{"value":"001","name":"Customer"},
{"value":"Smith","name":"Name"},
{"value":"IA","name":"State"}
]
}
]
}
],
"context":[]
}
Hopefully this example will answer your question.
Paul
Using this format with the 'plain' SPSS' is working fine. Unfortunately the Bluemix Predictive Analytics Service has its own REST interface which seems not to be compatible with the SPSS Rest interface :(
Formatting the payload as suggested, I am getting a HTTP 500:
javax.servlet.ServletException: org.codehaus.jackson.map.exc.UnrecognizedPropertyException: Unrecognized field "id" (Class com.ibm.spss.blackbox.score.resource.InputData), not marked as ignorable
at [Source: com.ibm.ws.webcontainer.srt.SRTInputStream@14d0519a; line: 1, column: 9] (through reference chain: com.ibm.spss.blackbox.score.resource.InputData["id"])<br>
Have you successfully executed your example against the Predictive Analytics Service? Hopefully I am wrong and just have a typo in my request :)
Jens
No, I haven't executed against Predictive Analytics Service.
Paul
where is catalog data(.csv), it is not present in predictive modeling bluemix example on github? 3 Answers
Fail to load stream to Bluemix Predictive Modeling services. 5 Answers
Bluemix Predictive Analytics service API with date 3 Answers
SPSS GA Plan 3 Answers
I need help setting up a Model in Modeler to run in BlueMix. 1 Answer