Skip to content

althausLuca/anomaly-injection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 

Repository files navigation

Anomaly injection for Time Series

Support multiple injections of amplitude shift, distortion , growth change and extreme values of a single data column containing numerical values.

Prerequisites

  • The given bash script works for ubuntu 18 or 20
  • Clone this repository.

Build

$ sh install.sh

##E xecution

$ python3 inject.py [arguments]

Arguments

-data -type
stock10k.data 2 amplitude_shift
SAGandStock 2 distortion
growth_change
extreme

Remarks

  • Data:
    The data has to be in csv style format. To specify a different separator use: -sep "separator"

The file will be saved into the Data/generated folder. The data argument expects the data to be in the Data folder and the second argument is the column starting at 0.

  • Parameters:
    The Parameter file specifies the default anomaly parameters. For your own parameters modify the file or use: -typex anomalies your_parameter_file.

  • Arguments:
    All the arguments try to match if only the beginning is given e.g., a insteaf of amplitude_shift. One can use multiple anomalies at once e.g., -type a,a,d,d

  • Plot and Save commands
    -withoutlegend
    -save filename
    -anomalydetails
    -plotoff

Examples:

$ python3 inject.py -data stock10k.data 2 -type  amplitude_shift,distortion -anomalydetails

$ python3 inject.py -data stock10k.data 2 -type a,d 

$ python3 inject.py -data stock10k.data 2 -type a -save output 

$ python3 inject.py -data SAGandStock  2  -save "2shifts" -typex a,a Parameters -plotoff

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published