Tensorflow metaframe for training models and getting predictions
This is a functional versioned metaframe website with matching npm module.
Metaframe:
https://metapages.github.io/metaframe-tensorflow-1d/Versioned metaframe
e.g 0.3.0: https://metapages.github.io/metaframe-tensorflow-1d/v0.3.0/npm module
(matches browser version): https://www.npmjs.com/package/@metapages/metaframe-tensorflow-1d
Inputs:
Outputs:
error
: json- prediction
- model
Input a list of training data consisting of n-1-dimensional series (e.g. a bunch of time series) and this will train a model:
Format of training examples:
{
"examples": [
{
"label": "label1",
"data": {
"series": {
"series1": "base64-encoded-array-of-float32",
"series2": "base64-encoded-array-of-float32",
"seriesn": "base64-encoded-array-of-float32"
}
}
},
{
"label": "label2",
"data": {
"series": {
"series1": "base64-encoded-array-of-float32",
"series2": "base64-encoded-array-of-float32",
"seriesn": "base64-encoded-array-of-float32"
}
}
}
]
}
If there is an error (you also might see it in the metaframe itself):
The model will also be cached locally, so if the same training data is sent (compared via hashes) then the cached model will be returned, avoiding recomputing the model again.
A model can also be just passed in via the model
input (same format as the output).
Once a model is loaded or computed, you can pass a prediction in, and get a prediction result out:
Example prediction input:
{
"series": {
"series1": "base64-encoded-array-of-float32",
"series2": "base64-encoded-array-of-float32",
"seriesn": "base64-encoded-array-of-float32"
}
}
Example prediction output:
{
"prediction": "label2",
"predictions": { "label2": 0.94, "label1": 0.1, "labeln": 0.3 }
}