Anomaly#

The anomaly view into the model. Expects that the model being served when accessing this route implements the anomaly() method in order to calculate the anomaly key(s) for the response.

gordo.server.blueprints.anomaly.post_anomaly_prediction()[source]#

Serve model predictions via POST method.

Gives back predictions looking something like this (depending on anomaly model being served):

   {
   'data': [
       {
      'end': ['2016-01-01T00:10:00+00:00'],
      'tag-anomaly-scaled': [0.913027075986948,
                             0.3474043585419292,
                             0.8986610906818544,
                             0.11825221990818557],
      'tag-anomaly-unscaled': [10.2335327305725986948,
                             4.234343958392+3293,
                             10.379394390232232,
                             3.32093438982743929],
      'model-output': [0.0005317790200933814,
                       -0.0001525811239844188,
                       0.0008310950361192226,
                       0.0015755111817270517],
      'original-input': [0.9135588550070414,
                         0.3472517774179448,
                         0.8994921857179736,
                         0.11982773108991263],
      'start': ['2016-01-01T00:00:00+00:00'],
      'total-anomaly-unscaled': [1.3326228173185086],
      'total-anomaly-scaled': [0.3020328328002392],
       },
       ...
   ],

'tags': [{'asset': None, 'name': 'tag-0'},
         {'asset': None, 'name': 'tag-1'},
         {'asset': None, 'name': 'tag-2'},
         {'asset': None, 'name': 'tag-3'}],
'time-seconds': '0.1937'}