Skip to content

WillFantom/libnunc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NUNC

C library for the NUNC change detection algorithm.

Usage

...
#include <nunc.h>
...


int main()
{
  ...

  nunc nuncProcessor;
  if (nuncInit(&nuncProcessor, 350, 3))
  {
    return 1;
  }
  float threshold = nuncThreshold(&nuncProcessor, 0.3, 200);
  cost *maxCost = (cost *)malloc(sizeof(cost));

  nuncPush(&nuncProcessor, SOME_DATAPOINT, maxCost);

  if (maxCost->value > threshold)
  {
    printf("changepoint at index: %d (cost: %f)\n", maxCost->index, maxCost->value);
  }
  free(maxCost);
  nuncFree(&nuncProcessor);

  ...
}

Configuration

To create a NUNC processor, you must first decide on a window size and the number of quantiles to use in the cost calculation.

To get a calculated threshold value, you will need to the configuration options of a NUNC processor along with a probability and number of datapoints. The resulting value provides a suitiable threshold value will aim to produce only false alerts at the given probability per X datapoints.

About

NUNC Change Detection Library in C

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Languages