This is a manager system using rest to build create, train and predict models stored in a relational database.
First make sure you have poetry installed. Then:
$ poetry run python app/app.py
Or with docker do:
$ docker-compose up
POST /models
: Creates a model with the specified parameters in the body. Example body:
{
"model": "MLPClassifier",
"params": {
"alpha": 0.0001,
"hidden_layer_sizes": 20
},
"num_features": 4,
"num_classes": 2
}
GET /models/<uid>
: Retrieves a specific model.POST /models/<uid>/train
: Trains partially a model that has been already created. Example body:
{
"feature_vector": [
1.11,
2.22,
3.33,
-4.44
],
"label": 1
}
GET /models/<uid>/predict?input_vector=<base64-codified-vector>
: Predics the label for the input vector specified in query params.GET /models
: Get most trained scores per each type of model.