To install this module from source, you will need to install a suitable C++ compiler and CMake. Any other external dependencies of this project are included as git submodules and they must be initialized when this repository is cloned:
git clone https://github.com/abst0603/LAAT.git
cd LAAT
git submodule update --initThe project can then be installed as a Python module from the main directory of the project using pip:
pip install .The module can now be imported and used in python:
import laat
pheromone = laat.LAAT(...)An example of the usage of the LAAT module can be found in the examples folder. After the LAAT module for Python has been installed, the example can be run with:
cd examples
python example.pyTo adapt this example to your data, fit the relevant functions into your data processing pipeline, or store your data in a csv file and load it into python as shown in the example. Tweak the hyper-parameters for both LAAT and MBMS to fit your dataset. Use the result of MBMS for further data processing, or write it straight to a csv file as shown in the example.
You can choose to build this module from source as a static C++ library for use in C++ projects. To do so, create a build directory and run CMake:
mkdir build
cd build
cmake ..
makeNow the build directory will create both the static C++ library file liblaatlib.a and the Python module binary file laat.cpython.
You don't need to install anything to use Matlab functions. The code written in Matlab is standalone, however, it is also much slower than python and C++ code. We don't recommend to use Matlab code for a dataset larger than 100,000 samples. You first need to run the "preprocessing" and then use that as an input for "LAAT".
pstruct = PreprocessLAAT(Data,'Radius',0.5,'Threshold',3)
pheromone = LAAT(pstruct,'Option','option.mat')To understand the role of each parameter, we highly suggest reading our paper as cited in the following. In summary, there are some rules of thumb and points one should consider when setting the parameters. We discuss each of them individually as follows.
Pheromone (
Evaporation rate (
Kappa (
Beta (
The other three parameters, namely number of ants, number of steps, and number of iterations are not independent, and we also discuss them combined. The higher the value for these parameters, the algorithm converges better on the structures. However, if the multiplication of these three numbers is higher than 10 to 100 times the total number of dataset points, the algorithm will converge. We suggest bounding the number of iterations to a smaller number (default = 100) and increasing the number of steps as much as possible. Increasing the number of ants gives more exploration power to the algorithm.
If you use LAAT in your research, please cite LAAT: Locally Aligned Ant Technique for discovering multiple faint low dimensional structures of varying density
@ARTICLE{9780217,
author={Taghribi, Abolfazl and Bunte, Kerstin and Smith, Rory and Shin, Jihye and Mastropietro, Michele and Peletier, Reynier F. and Tiňo, Peter},
journal={IEEE Transactions on Knowledge and Data Engineering},
title={LAAT: Locally Aligned Ant Technique for discovering multiple faint low dimensional structures of varying density},
year={2022},
volume={},
number={},
pages={1-1},
doi={10.1109/TKDE.2022.3177368}
}