-
Notifications
You must be signed in to change notification settings - Fork 84
Quick Introduction to AMLSim
Here is a quick introduction on how you can run a series of processes in AMLSim. To understand each process in more details, you can check out pages for all the relevant components including transaction network generator,
Here is a minimum example to generate transaction CSV files from sample parameter files.
cd /path/to/AMLSim # Go to the AMLSim working directory
python3 scripts/transaction_graph_generator.py conf.json # Transaction network generator
sh scripts/run_AMLSim.sh conf.json # Transaction simulator
python3 scripts/convert_logs.py conf.json # Transaction log converter
- Python 3.7 (You can install the following packages with
pip3 install -r requirements.txt
)- NumPy
- networkx 1.11 (2.x is not supported because of performance issues)
- matplotlib
- powerlaw
- python-dateutil
python scripts/transaction_graph_generator.py conf.json
Please find the following files under paramFiles
directory
- accounts.csv
- Account parameter file
- alertPatterns.csv
- Alert (SAR) typology (transaction pattern) parameter file
- degree.csv
- Degree distribution parameter file
- transactionType.csv
- Transaction distribution parameter file
- schema.json
- Schema definition file for output CSV files
Configuration file (These above directory and file names are defined at the input
section in this JSON file)
- conf.json
Copy all jar files of the following libraries to just under jars
directory except paysim.jar
.
-
MASON version 18
- Download "mason18.zip" from the homepage and extract the jar file.
-
PaySim
- Please use
paysim.jar
underjars
directory which already exists.
- Please use
-
Commons-Math version 3.6.1
- Download "commons-math3-3.6.1-bin.tar.gz" and extract the following jar files.
- commons-math3-3.6.1.jar
- commons-math3-3.6.1-tests.jar
- commons-math3-3.6.1-tools.jar
- Download "commons-math3-3.6.1-bin.tar.gz" and extract the following jar files.
-
JSON in Java version 20180813
- The latest jar file is available from here
-
WebGraph version 3.6.1
- Please download "binary tarball" from the homepage and extract the jar file.
- It is convenient to download "dependencies tarball" for the following dependencies.
- DSI Utilities version 2.5.4
- fastutil version 8.2.3
- Sux for Java version 4.2.0
- JSAP version 2.1
- SLF4J version 1.7.25
- MySQL Connector for Java version 5.1
Please run the first script to compile Java files if you did not yet.
sh scripts/build_AMLSim.sh # Compile AMLSim Java files
sh scripts/run_AMLSim.sh conf.json # Launch an AMLSim Java application
It converts generated transaction files into input files of GPML.
python3 scripts/convert_logs.py conf.json
python3 scripts/visualize/plot_distributions.py [ConfJSON]
-
ConfJSON
: Configuration JSON file
- First, please copy transaction
tx.csv
and case account ID listcase_accts.csv
files from the sample data directory to theoutput
directory.cp /path/to/sample/1K/*.csv outputs/
- Launch JanusGraph server
cd /path/to/janusgraph-0.1.1-hadoop2/ ./bin/janusgraph.sh start
- Launch Groovy script to load transaction graph edge list and case account file list.
cd /path/to/AMLSim /path/to/janusgraph-0.1.1-hadoop2/bin/gremlin.sh scripts/janusgraph/load_transaction_janusgraph.groovy
- Then, run graph analytics on the JanusGraph.
cd /path/to/janusgraph/scripts /path/to/janusgraph-0.1.1-hadoop2/bin/gremlin.sh egonet/ego_test.groovy
With running the below script, all files in the output
directory except README.md
files will be deleted.
sh scripts/clean_logs.sh