Skip to content

Custom `anomalies.csv source file for load_anomalies` #585

@sarahmish

Description

@sarahmish

As in the discussion of #583, we need to allow dynamic loading of the source file to grab the respected anomaly. To do this, we can introduce an argument path to help localize the source file.

default behavior

In the event when no path is defined, the function should retrieve the source file anomalies.csv hosted on s3 bucket which contains the ground truth of the public datasets we have in Orion.

expected behavior

If path is specified, then use that file as the source to load the anomalies from. The source file should be a csv file with the following format:

 	signal 	events
0 	P-1 	[[1331272800, 1335592800], [1382832000, 1389482000]]
1 	S-1 	[[1398168000, 1407823200]]
2 	E-1 	[[1393027200, 1393675200], [1406203200, 1464436800]]
3 	E-2 	[[1405944000, 1436119200]]

where:

  • signal column represents the name of the signal such that the function will fetch the anomalies of that particular signal.
  • events column that contains a list of tuples with two elements. the tuple contains the start and end timestamps of the anomaly.

after using load_anomalies(signal, path) the resulting dataframe is

 	start 	    end
0 	1331272800, 1335592800
1 	1382832000, 1389482000

where each entry is an anomaly pertaining to the selected signal

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementImprovements on the current features

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions