Exacaster Analytics API

SingleSeries

analysePost

Run analysis on your time series data

Exacaster Analytics API can perform multiple types of analysis on your time series data. ### Authorization token In order be be able to use Exacaster Analytics API you need to get an authorization token. To get this token please contact our sales team. ### Analytical pipelines Each different analysis type is called an analytics pipeline. Currently we support the following pipelines: + OriginalSeries - returns a copy of original time series data. + GlobalLabel - analyse the time series data and applies a global label to the whole time series. The returned result is a probability that the time series can be identified with one of the labels. Currently supported labels: + Increasing - time series is increasing. + Decreasing - time series is decreasing. + Flat - time series values are flat. + Periodic - time series values are periodic (the period is not defined here). + Step_up - time series has a step up in the middle of it. + Step_down - time series has a step down in the middle of it. + Hat - time series is a hat shaped function. + Cup - time series is a cup shaped function. + V_shape - time series has a V-shaped outlier in the middle of the series. + A_shape - time series has an A-shaped outlier in the middle of the series. + Flat_top - time series has a flat-top shape in the middle of the series. + Flat_bottom - time series has a flat-bottom shape in the middle of the series. + LocalLabels - applies a sliding window technique and returns a probability that a selected time series window displays one of the shapes. The labels that are returned are identical to those listed in GlobalLabel descriptions. + Outliers - analyse the time series and return the points of the time series that are probable outliers. + ChangePoints - analyse the time series and returns the change points of the time series. All outliers are removed from change point detection. + Forecast - returns the predicted future values of the time series. By default we extend the time series by 50% of its original length. + PeriodDetector - analyses the time series and finds the dominant periods in it. It returns as many periods as it detects. + Plot - Returns a HTML embeddable plot. When this pipeline is selected, all available analysis pipelines are used. The plot displays only relevant results. + All - Returns results of all available pipelines. ### Series collection Exacaster Analytics API can perform analysis on a single or multiple time series at once. Each time series should have a meaningful name and a value that holds the time series. ### Sample request: ~~~ { "auth_token": "Your authorization token here", "pipelines": [ "GlobalLabel", "Forecast", "PeriodDetector" ], "series_collection": [ { "name": "Number of daily car sales", "value": [ 0,1,2,3,2,1,0,1,2,3,2,1,0,1,2,3,2,1,0,1,2,3,2,1,0 ] } ] ~~~ ### Sample response ~~~ { "return_series": [ { "Forecast": { "details": "Extrapolation of the time series", "name": "Forecast", "value": [ 0.02141287922859192, 0.9964006543159485, 1.9824031591415405, 2.970313310623169, 1.9799827337265015, 1.0199782848358154, 0.02354455552995205, 0.9978963732719421, 1.9760215282440186, 2.9785380363464355, 1.983999490737915, 1.0185582637786865, 0.028834229335188866, 1.0069305896759033, 1.9748344421386719, 2.9794158935546875, 1.9936416149139404, 1.0148463249206543, 0.020647913217544556, 1.0086355209350586, 1.9821722507476807, 2.984210252761841, 2.000290870666504, 1.0028454065322876, 0.011485666036605835, 4.391489028930664, 2.303549289703369, 0.9491767883300781, 2.294665575027466, 2.823038101196289, 2.636005163192749, 2.3925552368164062, 2.586517572402954, 2.662517786026001, 1.6474252939224243, 1.9751571416854858, 1.5974255800247192 ], "version": "1.0" }, "GlobalLabel": { "details": "Labels assigned to the whole time series with coresponding scores", "name": "GlobalLabel", "value": [ { "label": "increasing", "score": 0.8869481086730957 }, { "label": "decreasing", "score": 4.2984098058695963e-7 }, { "label": "flat", "score": 0.46213409304618835 }, { "label": "periodic", "score": 0.9997783303260803 }, { "label": "step_up", "score": 0.000002912323907366954 }, { "label": "step_down", "score": 7.228231311273703e-7 }, { "label": "hat", "score": 7.540560318375356e-7 }, { "label": "cup", "score": 9.535824574413709e-7 }, { "label": "V_shape", "score": 0.0000023255472569871927 }, { "label": "A_shape", "score": 0.006110015325248241 }, { "label": "flat_top", "score": 0.0000016010251329134917 }, { "label": "flat_bottom", "score": 7.793148597556865e-7 } ], "version": "1.0" }, "PeriodDetector": { "details": "Periods detected in time series", "value": [ 6 ], "version": "1.0" }, "series_name": "periodic_series" } ] } ~~~


/analyse

Usage and SDK Samples

curl -X POST "https://192.168.42.137:8899/analyse"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.SingleSeriesApi;

import java.io.File;
import java.util.*;

public class SingleSeriesApiExample {

    public static void main(String[] args) {

        SingleSeriesApi apiInstance = new SingleSeriesApi();
        Request timeseries = ; // Request | Input object containing an authentification token, an array of time series with corresponding parameters and global metadata
        try {
            Response result = apiInstance.analysePost(timeseries);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SingleSeriesApi#analysePost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.SingleSeriesApi;

public class SingleSeriesApiExample {

    public static void main(String[] args) {
        SingleSeriesApi apiInstance = new SingleSeriesApi();
        Request timeseries = ; // Request | Input object containing an authentification token, an array of time series with corresponding parameters and global metadata
        try {
            Response result = apiInstance.analysePost(timeseries);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SingleSeriesApi#analysePost");
            e.printStackTrace();
        }
    }
}
Request *timeseries = ; // Input object containing an authentification token, an array of time series with corresponding parameters and global metadata

SingleSeriesApi *apiInstance = [[SingleSeriesApi alloc] init];

// Run analysis on your time series data
[apiInstance analysePostWith:timeseries
              completionHandler: ^(Response output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var ExacasterAnalyticsApi = require('exacaster_analytics_api');

var api = new ExacasterAnalyticsApi.SingleSeriesApi()

var timeseries = ; // {Request} Input object containing an authentification token, an array of time series with corresponding parameters and global metadata


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.analysePost(timeseries, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class analysePostExample
    {
        public void main()
        {

            var apiInstance = new SingleSeriesApi();
            var timeseries = new Request(); // Request | Input object containing an authentification token, an array of time series with corresponding parameters and global metadata

            try
            {
                // Run analysis on your time series data
                Response result = apiInstance.analysePost(timeseries);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SingleSeriesApi.analysePost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\SingleSeriesApi();
$timeseries = ; // Request | Input object containing an authentification token, an array of time series with corresponding parameters and global metadata

try {
    $result = $api_instance->analysePost($timeseries);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SingleSeriesApi->analysePost: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::SingleSeriesApi;

my $api_instance = WWW::SwaggerClient::SingleSeriesApi->new();
my $timeseries = WWW::SwaggerClient::Object::Request->new(); # Request | Input object containing an authentification token, an array of time series with corresponding parameters and global metadata

eval {
    my $result = $api_instance->analysePost(timeseries => $timeseries);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling SingleSeriesApi->analysePost: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.SingleSeriesApi()
timeseries =  # Request | Input object containing an authentification token, an array of time series with corresponding parameters and global metadata

try:
    # Run analysis on your time series data
    api_response = api_instance.analyse_post(timeseries)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SingleSeriesApi->analysePost: %s\n" % e)

Parameters

Body parameters
Name Description
timeseries *

Responses

Status: 200 - Returned JSON object containing the array of description, classification and prediction pipeline results for every time series posted

Status: 405 - Validation exception


Generated 2017-10-13T07:36:16.261Z