...
The prediction service represents a web interface which allows to request, insert and modify prediction data from the database. Operations are performed by sending URL requests, whereas each operation is well defined as a so called route. The property prediction service comes along with a graphical user interface at http://localhost:8004/ui/ which provides visual access to all available routes. Hereby, all routes involving the request of data are enlisted under the View section.
...
For this tutorial we are using only two routes. One to verify wherever an algorithm configuration exists and one to request all available predictions within from our database.
- /algoconfig/list
- /prediction/list
...
For the following example we assume, as the two functions 'train_model' and 'test_model' are already defined within the python script. Otherwise, we refer to the following Howto: Ingest prediction data in database (REST API).
Given the two above two functions we could define our algorithm's workflow as follows:
...
For a more detailed implementation with dummy data you can download the python following demo script (recommended).
request_prediction_data_demo.py
...