Thit python package implements the Linear Law Transformation algorithm (LLT) for time series type data. This new technique automatically generates features from time series-type data samples which can be used for machine learning tasks for example classification.
The mathematical description and the explanation of this method can be found in the publications below:
- Solving mechanical differential equations using LLT and Extreme Learning Machine
- Categorizing human movement type using LLT transformed multi dimensional sensor data
- Detecting anomalies in bitcoin prices using LLT
- Detailed mathematical background
- Slides which explains how the method works and present the ECG signal classification task as a case study
The package contains two sub packages
- preprocessing: conatins commonly used function duging evaluation and data formatting for the transformation.
- linear_law : the implementation of the LLT technique and can generate linear law features from the dataset.
It is recommended to use a virtual environment for ensuring maximal compatibility.
- pyhton >=v3.9
- scipy v1.10.1
- numpy v1.24.2
note: the correct versions of these packages are automatically installed using the requirements.txt files. If you have newer versions they won't be downgraded but compatibility is not guaranteed.
-
OFFLINE: Download the dist/LLT-1.0.0-py3-none-any.whl file from the release folder and install it using pip:
python -m pip install LLT-1.0.0-py3-none-any.whl
-
ONLINE
python -m pip install git+https://github.com/saturfy/LLT
After installation it can be used as normal pyhton package. The usual way to import it is:
from LLT import preprocessing as pp
from LLT import linear_law as ll
There is an example ipython notebook in the archive under demo\LLT_QRS_peak_classifier.ipynb which demonstrates how to use the package. The notebook shows an example of ECG signal classification using the LLT technique. To run this demo you need to install additional packages which are listed in the demo\demo_requirements.txt file. Use the following command to install the exact versions of these packages with the help of the file:
python pip install -r demo_requirements.txt
You also have to download the sample ECG data (ecg_test.mat and ecg_train.mat) from here. Put these files in the same directory as the ipyython notebook.
Note: you have to make sure that your virtual environment is avalibale for jupyter and you can select is as kernel for the notbeook. The simplest way to do this if you are using venv
python -m pip install ipykernel
python -m ipykernel install --name=<name of your virtual environment>
The package contains an API like html documentation in \docs\LLT\index.html