Skip to content

Latest commit

 

History

History
94 lines (66 loc) · 31.7 KB

README.md

File metadata and controls

94 lines (66 loc) · 31.7 KB

Tensorflow metaframe for training models and getting predictions

This is a functional versioned metaframe website with matching npm module.

Inputs:

Outputs:

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 }
}