This documentation is for Machine Learner 1.0.0. View documentation for the latest release.
||
Skip to end of metadata
Go to start of metadata

Overview

DescriptionMake prediction using a CSV/TSV file.
Resource Path

/api/models/predictionStreams

HTTP MethodPOST
Request Formatmultipart/form-data
Response Formatapplication/octet-stream

Sample cURL command

curl -X POST -b cookies  https://localhost:9443/api/models/predictionStreams -H "Authorization: Basic YWRtaW46YWRtaW4=" -H "Content-Type: multipart/form-data" -F modelId='1' -F dataFormat='csv' -F columnHeader= true -F file=@'test-file.csv' -k

test-file.csv
NumPregnancies,PG2,DBP,TSFT,SI2,BMI,DPF,Age
2,197,70,45,543,30.5,0.158,53
10,125,70,26,115,31.1,0.205,41
7,159,64,0,0,27.4,0.294,40
5,99,74,27,0,29.0,0.203,32
2,92,62,28,0,31.6,0.130,24
1,126,60,0,0,30.1,0.349,47
1,93,70,31,0,30.4,0.315,23

Example

POST https://localhost:9443/api/models/predictionStreams

Sample output

NumPregnancies,PG2,DBP,TSFT,SI2,BMI,DPF,Age,Class
2,197,70,45,543,30.5,0.158,53,0
10,125,70,26,115,31.1,0.205,41,0
7,159,64,0,0,27.4,0.294,40,0
5,99,74,27,0,29.0,0.203,32,0
2,92,62,28,0,31.6,0.130,24,0
1,126,60,0,0,30.1,0.349,47,0
1,93,70,31,0,30.4,0.315,23,0
<html>
<head><title>301 Moved Permanently</title></head>
<body bgcolor="white">
<center><h1>301 Moved Permanently</h1></center>
<hr><center>nginx</center>
</body>
</html>

REST API response

HTTP status code

200, 404 or 500

For descriptions of the HTTP status codes, see HTTP Status Codes.

  • No labels