A-Alaa / khiva

An open-source library of algorithms to analyse time series in GPU and CPU.

Home Page:https://khiva.readthedocs.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Khiva

License: MPL 2.0
Gitter chat

Build Documentation Build Linux and Mac OS Build Windows Code Coverage
Documentation Status Build Status Build status Coverage Status

Khiva is an open-source library of efficient algorithms to analyse time series in GPU and CPU. It can be used to extract insights from one or a group of time series. The large number of available methods allow us to understand the nature of each time series. Based on the results of this analysis, users can reduce dimensionality, find out recurrent motifs or discords, understand the seasonality or trend from a given time series, forecasting and detect anomalies.

Khiva provides a mean for time series analytics at scale. These analytics can be exploited in a wide range of use cases across several industries, like energy, finance, e-health, IoT, music industry, etc.

License

This project is licensed under MPL-v2.

Windows users

Installation

Prerequisites

  • Install Python-64bits and add the path to the environment variable path, 32-bits version won't work.
  • Install ArrayFire 3.5.1 and add the path to the environment variable path.
  • Install Vcpkg and add the path to the environment variable path.
  • Install chocolatey to manage windows dependencies and add the path to the environment variable path.

Once we have installed all Khiva dependencies, we are ready to install Khiva from source code or by using the installers.

Build from source code

First, go to the source directory.

  • Run choco install cmake.install -NoNewWindow -Wait Note: Add the installation path to the environment variable path and before than chocolately environment variable path.
  • Run choco install doxygen.install -NoNewWindow -Wait.
  • Run choco install graphviz -NoNewWindow -Wait.
  • Run python -m pip install --upgrade pip.
  • Run pip3 install sphinx breathe sphinx_rtd_theme.
  • Run vcpkg install --triplet x64-windows gtest eigen3 benchmark boost.
  • Create a build folder in the root path of the project.
  • Browse inside the build folder.
  • Run cmake .. -DCMAKE_TOOLCHAIN_FILE="<PATH_TO_VPKG>/scripts/buildsystems/vcpkg.cmake" -DKHIVA_USE_CONAN=OFF -G "Visual Studio 15 2017 Win64" (Note: Replace <PATH_TO_VPKG> with your vcpkg installation path and do not forget to clean the build directory everytime before running this command).
  • Run cmake --build . --config Release -- /m to compile.

Install Khiva library from source code

Once the build process is finished you can install the library in your system folder:

  • Run cmake -DBUILD_TYPE=Release -P cmake_install.cmake.

Generating the Khiva installer

We use Cpack and NSIS to generate the installer.

Notes: Before generating the installer, the project has to be built by following the previous Build from source code section. The generated package is stored in the build folder.

  • Run choco install nsis -NoNewWindow -Wait.
  • The installer can be generated running the command cpack -G NSIS.

Note: We use the cpack command from cmake, be aware chocolatey has another cpack command. If you cannot run the proper command, check out the path from cmake is placed before the path from chocolatey in the environment variable path.

Generating documentation

  • Run pip install sphinx to install Sphinx.
  • Browse to the root path of the project.
  • Run sphinx-build.exe -b html doc/sphinx/source/ build/doc/html/.

Linux users

Installation

Prerequisites

  • Install Python-64bits or run apt-get install python3 python3-pip, 32-bits version won't work.
  • Download ArrayFire 3.5.1 no-gl.
  • Install ArrayFire sudo mkdir -p /opt/arrayfire
  • Run sudo bash arrayfire/ArrayFire-v3.5.1_Linux_x86_64.sh --prefix=/opt/arrayfire --skip-license

Once we have installed all Khiva dependencies, we are ready to install Khiva from source code or by using the installers.

Build from source code

  • Install conan, c++ package manager, preferably running pip install conan. For more information and alternative installation options, please refer to conan manual page.
  • Run conan remote add conan-mpusz https://api.bintray.com/conan/mpusz/conan-mpusz.
  • Create build folder and, after moving into the new folder, run conan install .. --build missing.
  • Run cmake ...
  • Run make -j8.

Install Khiva library from source code

  • Run make install.

Generating the Khiva installer

The CPack utility from cmake is used to generate the installer.

Notes: Before generating the installer, the project has to be built by following the Build from source code section above. The generated package is stored in the build folder.

For linux, either a deb or a rpm installer package can be generated. This is done by running the command cpack -G DEB or cpack -G RPM respectively inside the build folder.

Generating documentation

We use sphinx + doxygen to generate our documentation. You will need to install the following packages:

  • Sphinx: brew install sphinx.
  • Doxygen: brew install doxygen.
  • Read the Docs Theme: pip install sphinx_rtd_theme.
  • Breathe: pip install breathe.

To generate the khiva documentation run the following command:

  • Run make documentation.

Mac OS users

Installation

Prerequisites

Once we have installed all Khiva dependencies, we are ready to install Khiva from source code or by using the installers.

Build from source code

  • Install conan, c++ package manager, preferably running pip install conan. For more information and alternative installation options, please refer to conan manual page.
  • Run conan remote add conan-mpusz https://api.bintray.com/conan/mpusz/conan-mpusz.
  • Create build folder and, after moving into the new folder, run conan install .. --build missing.
  • Run cmake ...
  • Run make -j8.

Install Khiva library from source code

To install the library in the default system folders, run the following command:

  • Run make install.

Generating the Khiva installer

For Mac OS, the installer can be generated by running the command cpack -G productbuild inside the build folder.

Generating documentation

We use sphinx + doxygen to generate our documentation. You will need to install the following packages:

  • Sphinx: brew install sphinx.
  • Doxygen: brew install doxygen.
  • Read the Docs Theme: pip install sphinx_rtd_theme.
  • Breathe: pip install breathe.

To generate the khiva documentation run the following command.

  • make documentation.

Contributing

The rules to contribute to this project are described here.

Builds

We have a first approach to generate a build and execute the set of tests on every pull request to the master branch. This process uses travis and appveyor. The status badges of the builds are contained at the beginning of this file.

About

An open-source library of algorithms to analyse time series in GPU and CPU.

https://khiva.readthedocs.io/

License:Mozilla Public License 2.0


Languages

Language:C++ 74.1%Language:C 20.0%Language:CMake 4.3%Language:Python 0.7%Language:Shell 0.6%Language:XSLT 0.2%Language:Objective-C 0.0%