Catalog PyPI
PACKAGE EXPLORERView in registry

ae-pvalues

PyPI

A tool to explain anomalies identified by an auto-encoder based on pvalues

Versions collected1
Direct dependencies5From release 1.0
Last observed20 Oct, 20:26 UTC

README

Version 1.0 documentation

AE-pvalues

This is the implementation of AE-pvalues proposed in the paper Towards Understanding Alerts raised by Unsupervised Network Intrusion Detection Systems, RAID2023 (https://doi.org/10.1145/3607199.3607247). The method allows you to obtain explanations of the anomalies identified by an auto-encoder (AE).

Authors

Installation

Pip Installation

You can install it through pip

  pip install ae-pvalues

Usage/Examples

from ae_pvalues import ae_pvalues

model = # Any autoencoder

x_train = np.load("./demo/example/x_train.npy") # Normal data
x_test = np.load("./demo/example/x_test.npy") # Data to explain

order, pvalues = ae_pvalues(model, normal_data=x_train, data_to_explain=x_test)

If you installed the module then you can use ae-pvalues directly from the command line :

ae-pvalues -v ./demo/example/x_train.npy ./demo/example/rec_x_train.npy ./demo/example/x_test.npy ./demo/example/rec_x_test.npy -o outputs

-v : verbose mode

-o : output folder

This produces two output files namely:

  • dimensions_abnormal_order.npy : order of dimension by abnormality
  • dimensions_abnormal_pvalues.npy : raw pvalue scores

Demo

A notebook is available in the demo folder to show an example of use. Please note that the notebook requires the following dependencies :

  • scikit-learn
  • tensorflow
  • seaborn
  • plotly

which can be installed with pip using the following comand line :

python3 -m pip install scikit-learn tensorflow seaborn plotly

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Versions 1

Collected releases
VersionPublishedDirect dependenciesOpen version
1.012 Oct 20235

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 20:26 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:134f003782e2df27ec12183f329b53c97a357e17f6ed68e4aa85818a649fff47