API description for the ALAMEDA Predictor Variable Timeseries Classification Toolkit. This description presents the RESTful interface by which the suite of algorithms developed for the classification of the patient disease status based on month-long data collected from wearables and PROs.
Each algorithm receives as input a CSV file containing timestamped results of PROs collected from a patient, as well as information aggregated at day level determined from wearables (e.g. sum of steps, percentages of time per day in each type of activity intensity level, detected activties or exercises, objectively measured stiffness, brady / dyskenisia, detected fall).
Algorithms are selectable by a model and are applicable per disease (PD, MS, Stroke).
The algorithms can be run in evaluation or prediction mode.
In evaluation mode, the input CSV must contain both predictor and target variables, while the result CSV will report on the performance metrics for each target variable.
In prediction mode, the input CSV contains only predictor variables, while the result CSV contains one or more target variables together with the probability distribution for each target variable value.
Prepare the execution of an ALAMEDA variable timeseries classification algorithm by uploading the required CSV input file. The call will return an ID of the file for use in the algorithm invocation. The algorithm to be executed is identified through *model* and *disease* parameters. The validity of the CSV input file is checked against these.
post https://varcls.alamedaproject.eu/v1 /prepare_algorithm Try out 200
Successful file upload and validation
400
Invalid input CSV for selected model and disease.
{
"code": "",
"type": "",
"message": ""
}
- code Integer
- type String
- message String
curl --request POST \
--url https://varcls.alamedaproject.eu/v1/prepare_algorithm \
--header 'Content-Type: application/x-www-form-urlencoded' \
--form 'body='
fetch('https://varcls.alamedaproject.eu/v1/prepare_algorithm', {
method: 'POST',
headers: {
"Content-Type": "application/x-www-form-urlencoded"
},
body: 'body=',
})
.then(e => e.json())
.then((data) => {
console.log('Request succeeded with JSON response', data);
})
.catch((error) => {
console.log('Request failed', error);
});
const request = require('request');
const options = {
method: 'POST',
url: 'https://varcls.alamedaproject.eu/v1/prepare_algorithm',
qs: {"body": ""},
headers: {"Content-Type": "application/x-www-form-urlencoded"},
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
import requests
url = "https://varcls.alamedaproject.eu/v1/prepare_algorithm"
headers = {
"Content-Type": "application/x-www-form-urlencoded"
}
body = {
"body": ""
}
response = requests.POST(url, headers=headers)
This is the main call which launches a classification algorithm into execution. The type of the algorithm is determined by the _model_, _disease_ and *fileID* parameters. The algorithm can be launched in *classification* or *evaluation* mode. The former returns probability distributions over the possible values of each target variable known to the algorithm. The latter returns performance metrics for all the target variables included in the uploaded CSV file.
post https://varcls.alamedaproject.eu/v1 /apply_algorithm Try out body
body required
Config of the call specifying a structure containing model name, disease name and uploaded input file ID{
"model": "",
"disease": "",
"mode": "",
"fileID": ""
}
- model String Enum:
- disease String Enum:
- mode String Enum:
- fileID String Description: ID of the CSV input file that has been uploaded prior to algorithm invocation
201
Algorithm succesfully launched
{
"id": "",
"name": "",
"status": "",
"start_time": "",
"results_uri": ""
}
- id Integer
- name String
- status String Enum:
- start_time String
- results_uri String
400
Inexistent or invalid CSV file for given fileID and algorithm invocation mode.
{
"code": "",
"type": "",
"message": ""
}
- code Integer
- type String
- message String
404
No algorithm found for submitted model name.
curl --request POST \
--url https://varcls.alamedaproject.eu/v1/apply_algorithm \
--body '{"model":"","disease":"","mode":"","fileID":""}'
fetch('https://varcls.alamedaproject.eu/v1/apply_algorithm', {
method: 'POST',
body: {
"model": "",
"disease": "",
"mode": "",
"fileID": ""
},
})
.then(e => e.json())
.then((data) => {
console.log('Request succeeded with JSON response', data);
})
.catch((error) => {
console.log('Request failed', error);
});
const request = require('request');
const options = {
method: 'POST',
url: 'https://varcls.alamedaproject.eu/v1/apply_algorithm',
body: {
"model": "",
"disease": "",
"mode": "",
"fileID": ""
},
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
import requests
url = "https://varcls.alamedaproject.eu/v1/apply_algorithm"
headers = {
}
body = {
"model": "",
"disease": "",
"mode": "",
"fileID": ""
}
response = requests.POST(url, headers=headers, body=body)
get https://varcls.alamedaproject.eu/v1 /apply_algorithm/{algID} Try out path
algID required
integerID of algorithm instance to return 200
404
No algorithm with the given algID is currently running or has finished executing.
curl --request GET \
--url https://varcls.alamedaproject.eu/v1/apply_algorithm/{algID}
fetch('https://varcls.alamedaproject.eu/v1/apply_algorithm/{algID}', {
method: 'GET',
})
.then(e => e.json())
.then((data) => {
console.log('Request succeeded with JSON response', data);
})
.catch((error) => {
console.log('Request failed', error);
});
const request = require('request');
const options = {
method: 'GET',
url: 'https://varcls.alamedaproject.eu/v1/apply_algorithm/{algID}',
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
import requests
url = "https://varcls.alamedaproject.eu/v1/apply_algorithm/{algID}"
headers = {
}
response = requests.GET(url, headers=headers)
delete https://varcls.alamedaproject.eu/v1 /apply_algorithm/{algID} Try out path
algID required
integerID of algorithm instance to return 204
404
No algorithm with the given algID is currently running or has finished executing.
curl --request DELETE \
--url https://varcls.alamedaproject.eu/v1/apply_algorithm/{algID}
fetch('https://varcls.alamedaproject.eu/v1/apply_algorithm/{algID}', {
method: 'DELETE',
})
.then(e => e.json())
.then((data) => {
console.log('Request succeeded with JSON response', data);
})
.catch((error) => {
console.log('Request failed', error);
});
const request = require('request');
const options = {
method: 'DELETE',
url: 'https://varcls.alamedaproject.eu/v1/apply_algorithm/{algID}',
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
import requests
url = "https://varcls.alamedaproject.eu/v1/apply_algorithm/{algID}"
headers = {
}
response = requests.DELETE(url, headers=headers)