Python binding for Khiva library.

Overview

Khiva-Python

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

README

This is the Khiva Python binding, it allows the usage of Khiva library from Python.

License

This project is licensed under MPL-v2.

Quick Summary

This Python binding called 'khiva' provides all the functionalities of the KHIVA library for time series analytics.

Set up

In order to use this binding, you need to install Khiva library.

Prerequisites

Note: By now, only 64-bit Python versions are supported.

Note Windows' users: Search your 64-bits version here

Install latest version

Install latest stable version of Khiva library. Follow the steps in the "Installation" section of the Khiva repository

To install the Khiva Python binding, we just need to execute the following command:

python setup.py install

Install any release

Install the prerequisites listed in the "Installation" section of the Khiva library repository. Download and install your selected Khiva release from Khiva repository.

Install the Khiva python binding compatible with the Khiva library installed previously. Follow the steps to install the Khiva python binding explained in pypi.

Executing the tests:

All tests can be executed separately, please find them in /tests/unit_tests.

Documentation

This Khiva Python binding follows the standard way of writing documentation of Python by using Sphinx.

In order to generate the documentation (in html format), run the following command under the /docs folder:

make html

Contributing

The rules to contribute to this project are described here

Powered by Shapelets

Comments
  • Access violation

    Access violation

    Describe the bug I get a access violation whenever I use khiva python lib

    To Reproduce Run a simple program like:

    from khiva.library import *
    set_backend(KHIVABackend.KHIVA_BACKEND_OPENCL)
    set_device(0)
    
    from khiva.array import *
    a = Array([1, 2, 3, 4, 5, 6, 7, 8])
    a.display()
    

    Expected behavior Application should run without exceptions

    Screenshots

    (base) C:\Progetti\Lab\Khiva\MyPythonSamples\HelloKhiva>python main.py
    array
    [8 1 1 1]
        1.0000
        2.0000
        3.0000
        4.0000
        5.0000
        6.0000
        7.0000
        8.0000
    
    Traceback (most recent call last):
      File "main.py", line 7, in <module>
        a.display()
      File "C:\Anaconda3\lib\site-packages\khiva\array.py", line 323, in display
        KhivaLibrary().c_khiva_library.display(ctypes.pointer(self.arr_reference))
    OSError: exception: access violation writing 0x00007FFE94CB180A
    

    Environment information:

    • OS: Windows 10
    • Version 0.3.0
    opened by maiorfi 6
  • V0.5.0

    V0.5.0

    Make sure you have checked all steps below.

    Description

    • [ ] Here are some details about my PR, including screenshots of any UI changes:

    Tests

    • [ ] My PR adds the following unit tests OR does not need testing for this extremely good reason:

    Commits

    • [ ] My commits have been squashed if they address the same issue. In addition, my commits follow the guidelines from "How to write a good git commit message":
      1. Subject is separated from body by a blank line
      2. Subject is limited to 50 characters
      3. Subject does not end with a period
      4. Subject uses the imperative mood ("add", not "adding")
      5. Body wraps at 72 characters
      6. Body explains "what" and "why", not "how"

    License

    Documentation

    • [ ] In case of new functionality, my PR adds documentation that describes how to use it.
    opened by raulbocanegra 1
  • V0.5.0

    V0.5.0

    Make sure you have checked all steps below.

    Description

    • [ ] Here are some details about my PR, including screenshots of any UI changes:

    Tests

    • [ ] My PR adds the following unit tests OR does not need testing for this extremely good reason:

    Commits

    • [ ] My commits have been squashed if they address the same issue. In addition, my commits follow the guidelines from "How to write a good git commit message":
      1. Subject is separated from body by a blank line
      2. Subject is limited to 50 characters
      3. Subject does not end with a period
      4. Subject uses the imperative mood ("add", not "adding")
      5. Body wraps at 72 characters
      6. Body explains "what" and "why", not "how"

    License

    Documentation

    • [ ] In case of new functionality, my PR adds documentation that describes how to use it.
    opened by raulbocanegra 1
  • Khiva Python Bindings not passing all unit tests

    Khiva Python Bindings not passing all unit tests

    Describe the bug Khiva Python Bindings not passing all unit tests. Problems include seg fault or is not able to find required library in khiva function call.

    To Reproduce Build khiva from source, install. Run install script to generate python bindings. Run unit tests from this repo.

    Expected behavior All tests should pass.

    Environment information: Ubuntu 18.04.4 LTS Python 3.6.9 Conan version 1.23.0 ArrayFire-v3.6.2

    Additional context I joined the Gitter, it may be easier to continue the conversation there. Saw no errors during installation of both khiva and the python bindings. Prerequisites were installed prior to installing khiva.

    opened by yuhongsun96 1
  • update setup.py

    update setup.py

    Make sure you have checked all steps below.

    Description

    • [ ] Here are some details about my PR, including screenshots of any UI changes:

    Tests

    • [ ] My PR adds the following unit tests OR does not need testing for this extremely good reason:

    Commits

    • [ ] My commits have been squashed if they address the same issue. In addition, my commits follow the guidelines from "How to write a good git commit message":
      1. Subject is separated from body by a blank line
      2. Subject is limited to 50 characters
      3. Subject does not end with a period
      4. Subject uses the imperative mood ("add", not "adding")
      5. Body wraps at 72 characters
      6. Body explains "what" and "why", not "how"

    License

    Documentation

    • [ ] In case of new functionality, my PR adds documentation that describes how to use it.
    opened by raulbocanegra 1
  • Feature/error handling

    Feature/error handling

    Make sure you have checked all steps below.

    Description

    • [ ] Here are some details about my PR, including screenshots of any UI changes:

    Tests

    • [ ] My PR adds the following unit tests OR does not need testing for this extremely good reason:

    Commits

    • [ ] My commits have been squashed if they address the same issue. In addition, my commits follow the guidelines from "How to write a good git commit message":
      1. Subject is separated from body by a blank line
      2. Subject is limited to 50 characters
      3. Subject does not end with a period
      4. Subject uses the imperative mood ("add", not "adding")
      5. Body wraps at 72 characters
      6. Body explains "what" and "why", not "how"

    License

    Documentation

    • [ ] In case of new functionality, my PR adds documentation that describes how to use it.
    opened by avilchess 1
  • Feature/scamp_getChains

    Feature/scamp_getChains

    • Add scamp algorithm
    • Add get_chains function

    Description

    • [ ] Here are some details about my PR, including screenshots of any UI changes:

    Tests

    • [ ] My PR adds the following unit tests OR does not need testing for this extremely good reason:

    Commits

    • [ ] My commits have been squashed if they address the same issue. In addition, my commits follow the guidelines from "How to write a good git commit message":
      1. Subject is separated from body by a blank line
      2. Subject is limited to 50 characters
      3. Subject does not end with a period
      4. Subject uses the imperative mood ("add", not "adding")
      5. Body wraps at 72 characters
      6. Body explains "what" and "why", not "how"

    License

    Documentation

    • [ ] In case of new functionality, my PR adds documentation that describes how to use it.
    opened by jrecuerda 1
  • Increase package version

    Increase package version

    Make sure you have checked all steps below.

    Description

    • [ ] Here are some details about my PR, including screenshots of any UI changes:

    Tests

    • [ ] My PR adds the following unit tests OR does not need testing for this extremely good reason:

    Commits

    • [ ] My commits have been squashed if they address the same issue. In addition, my commits follow the guidelines from "How to write a good git commit message":
      1. Subject is separated from body by a blank line
      2. Subject is limited to 50 characters
      3. Subject does not end with a period
      4. Subject uses the imperative mood ("add", not "adding")
      5. Body wraps at 72 characters
      6. Body explains "what" and "why", not "how"

    License

    Documentation

    • [ ] In case of new functionality, my PR adds documentation that describes how to use it.
    opened by jrecuerda 1
  • Add mass and findBestNOccurrences functions

    Add mass and findBestNOccurrences functions

    Make sure you have checked all steps below.

    Description

    • [ ] Here are some details about my PR, including screenshots of any UI changes:

    Tests

    • [ ] My PR adds the following unit tests OR does not need testing for this extremely good reason:

    Commits

    • [ ] My commits have been squashed if they address the same issue. In addition, my commits follow the guidelines from "How to write a good git commit message":
      1. Subject is separated from body by a blank line
      2. Subject is limited to 50 characters
      3. Subject does not end with a period
      4. Subject uses the imperative mood ("add", not "adding")
      5. Body wraps at 72 characters
      6. Body explains "what" and "why", not "how"

    License

    Documentation

    • [ ] In case of new functionality, my PR adds documentation that describes how to use it.
    opened by jrecuerda 1
  • Fix issue with numpy interop

    Fix issue with numpy interop

    Reading from an Array:

    • When an Array of real or complex numbers with more than two dimensions was benig converted to numpy this conversion didn't return an np.array with a proper shape.

    Creating an Array:

    • When an Array of real numbers with more than two dimensions was built. The shape in the device (arrayfire) was not correct.
    • For complex numbers it occurrs with more than one dimension.

    Make sure you have checked all steps below.

    Description

    • [ ] Here are some details about my PR, including screenshots of any UI changes:

    Tests

    • [ ] My PR adds the following unit tests OR does not need testing for this extremely good reason:

    Commits

    • [ ] My commits have been squashed if they address the same issue. In addition, my commits follow the guidelines from "How to write a good git commit message":
      1. Subject is separated from body by a blank line
      2. Subject is limited to 50 characters
      3. Subject does not end with a period
      4. Subject uses the imperative mood ("add", not "adding")
      5. Body wraps at 72 characters
      6. Body explains "what" and "why", not "how"

    License

    Documentation

    • [ ] In case of new functionality, my PR adds documentation that describes how to use it.
    opened by jrecuerda 1
  • Fix bug when doing get_data from an Array with one element.

    Fix bug when doing get_data from an Array with one element.

    This PR solves one issue when doing get_data().tolist() on a Khiva.Array with one element.

    Description

    • [ ] Here are some details about my PR, including screenshots of any UI changes:

    Tests

    • [ ] My PR adds the following unit tests OR does not need testing for this extremely good reason:

    Commits

    • [ ] My commits have been squashed if they address the same issue. In addition, my commits follow the guidelines from "How to write a good git commit message":
      1. Subject is separated from body by a blank line
      2. Subject is limited to 50 characters
      3. Subject does not end with a period
      4. Subject uses the imperative mood ("add", not "adding")
      5. Body wraps at 72 characters
      6. Body explains "what" and "why", not "how"

    License

    Documentation

    • [ ] In case of new functionality, my PR adds documentation that describes how to use it.
    opened by avilchess 1
  • Bump numpy from 1.18.1 to 1.22.0

    Bump numpy from 1.18.1 to 1.22.0

    Bumps numpy from 1.18.1 to 1.22.0.

    Release notes

    Sourced from numpy's releases.

    v1.22.0

    NumPy 1.22.0 Release Notes

    NumPy 1.22.0 is a big release featuring the work of 153 contributors spread over 609 pull requests. There have been many improvements, highlights are:

    • Annotations of the main namespace are essentially complete. Upstream is a moving target, so there will likely be further improvements, but the major work is done. This is probably the most user visible enhancement in this release.
    • A preliminary version of the proposed Array-API is provided. This is a step in creating a standard collection of functions that can be used across application such as CuPy and JAX.
    • NumPy now has a DLPack backend. DLPack provides a common interchange format for array (tensor) data.
    • New methods for quantile, percentile, and related functions. The new methods provide a complete set of the methods commonly found in the literature.
    • A new configurable allocator for use by downstream projects.

    These are in addition to the ongoing work to provide SIMD support for commonly used functions, improvements to F2PY, and better documentation.

    The Python versions supported in this release are 3.8-3.10, Python 3.7 has been dropped. Note that 32 bit wheels are only provided for Python 3.8 and 3.9 on Windows, all other wheels are 64 bits on account of Ubuntu, Fedora, and other Linux distributions dropping 32 bit support. All 64 bit wheels are also linked with 64 bit integer OpenBLAS, which should fix the occasional problems encountered by folks using truly huge arrays.

    Expired deprecations

    Deprecated numeric style dtype strings have been removed

    Using the strings "Bytes0", "Datetime64", "Str0", "Uint32", and "Uint64" as a dtype will now raise a TypeError.

    (gh-19539)

    Expired deprecations for loads, ndfromtxt, and mafromtxt in npyio

    numpy.loads was deprecated in v1.15, with the recommendation that users use pickle.loads instead. ndfromtxt and mafromtxt were both deprecated in v1.17 - users should use numpy.genfromtxt instead with the appropriate value for the usemask parameter.

    (gh-19615)

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 1
  • Improve packaging

    Improve packaging

    Use of Khiva Python requires a lot of previous installation of Arrayfire and other dependencies. We could try to bundle most of the dependencies (Arrayfire at least) in order to make life easier to our users.

    opened by raulbocanegra 0
Releases(v0.3.0)
  • v0.3.0(Jun 11, 2019)

    Added

    • mass (Mueen's Algorithm for Similarity Search) function with a proper public interface.
    • findBestNOccurrences function.

    Improved

    • STOMP (self-join) performance has been improved by a ~54%.

    Fixed

    • STOMP (self-join) doesn't crash in batched mode for long time series.
    Source code(tar.gz)
    Source code(zip)
  • v0.2.2(May 7, 2019)

  • v0.2.1(Mar 5, 2019)

  • v0.2.0(Feb 27, 2019)

    Added

    • KMeans algorithm.
    • KShape Algorithm.
    • Added Ljung-Box test.
    • SBD distance function.

    Changed

    • Implementation improvement of stomp function and find motifs and discords functions.
    Source code(tar.gz)
    Source code(zip)
Owner
Shapelets
Accelerated Time Series Analytics
Shapelets
Official implementation of "Generating 3D Molecules for Target Protein Binding"

Generating 3D Molecules for Target Protein Binding This is the official implementation of the GraphBP method proposed in the following paper. Meng Liu

DIVE Lab, Texas A&M University 74 Dec 7, 2022
A python library for face detection and features extraction based on mediapipe library

FaceAnalyzer A python library for face detection and features extraction based on mediapipe library Introduction FaceAnalyzer is a library based on me

Saifeddine ALOUI 14 Dec 30, 2022
Python wrappers to the C++ library SymEngine, a fast C++ symbolic manipulation library.

SymEngine Python Wrappers Python wrappers to the C++ library SymEngine, a fast C++ symbolic manipulation library. Installation Pip See License section

null 136 Dec 28, 2022
Fast image augmentation library and easy to use wrapper around other libraries. Documentation: https://albumentations.ai/docs/ Paper about library: https://www.mdpi.com/2078-2489/11/2/125

Albumentations Albumentations is a Python library for image augmentation. Image augmentation is used in deep learning and computer vision tasks to inc

null 11.4k Jan 9, 2023
Bayesian optimisation library developped by Huawei Noah's Ark Library

Bayesian Optimisation Research This directory contains official implementations for Bayesian optimisation works developped by Huawei R&D, Noah's Ark L

HUAWEI Noah's Ark Lab 395 Dec 30, 2022
Technical Indicators implemented in Python only using Numpy-Pandas as Magic - Very Very Fast! Very tiny! Stock Market Financial Technical Analysis Python library . Quant Trading automation or cryptocoin exchange

MyTT Technical Indicators implemented in Python only using Numpy-Pandas as Magic - Very Very Fast! to Stock Market Financial Technical Analysis Python

dev 34 Dec 27, 2022
Theano is a Python library that allows you to define, optimize, and evaluate mathematical expressions involving multi-dimensional arrays efficiently. It can use GPUs and perform efficient symbolic differentiation.

============================================================================================================ `MILA will stop developing Theano <https:

null 9.6k Dec 31, 2022
Scalable, Portable and Distributed Gradient Boosting (GBDT, GBRT or GBM) Library, for Python, R, Java, Scala, C++ and more. Runs on single machine, Hadoop, Spark, Dask, Flink and DataFlow

eXtreme Gradient Boosting Community | Documentation | Resources | Contributors | Release Notes XGBoost is an optimized distributed gradient boosting l

Distributed (Deep) Machine Learning Community 23.6k Dec 31, 2022
A python library for self-supervised learning on images.

Lightly is a computer vision framework for self-supervised learning. We, at Lightly, are passionate engineers who want to make deep learning more effi

Lightly 2k Jan 8, 2023
💡 Learnergy is a Python library for energy-based machine learning models.

Learnergy: Energy-based Machine Learners Welcome to Learnergy. Did you ever reach a bottleneck in your computational experiments? Are you tired of imp

Gustavo Rosa 57 Nov 17, 2022
Lightweight, Python library for fast and reproducible experimentation :microscope:

Steppy What is Steppy? Steppy is a lightweight, open-source, Python 3 library for fast and reproducible experimentation. Steppy lets data scientist fo

minerva.ml 134 Jul 10, 2022
GPU-Accelerated Deep Learning Library in Python

Hebel GPU-Accelerated Deep Learning Library in Python Hebel is a library for deep learning with neural networks in Python using GPU acceleration with

Hannes Bretschneider 1.2k Dec 21, 2022
PyBrain - Another Python Machine Learning Library.

PyBrain -- the Python Machine Learning Library =============================================== INSTALLATION ------------ Quick answer: make sure you

null 2.8k Dec 31, 2022
A python library for implementing a recommender system

python-recsys A python library for implementing a recommender system. Installation Dependencies python-recsys is build on top of Divisi2, with csc-pys

Oscar Celma 1.5k Dec 17, 2022
Neurolab is a simple and powerful Neural Network Library for Python

Neurolab Neurolab is a simple and powerful Neural Network Library for Python. Contains based neural networks, train algorithms and flexible framework

null 152 Dec 6, 2022
Theano is a Python library that allows you to define, optimize, and evaluate mathematical expressions involving multi-dimensional arrays efficiently. It can use GPUs and perform efficient symbolic differentiation.

============================================================================================================ `MILA will stop developing Theano <https:

null 9.6k Jan 6, 2023
A library of extension and helper modules for Python's data analysis and machine learning libraries.

Mlxtend (machine learning extensions) is a Python library of useful tools for the day-to-day data science tasks. Sebastian Raschka 2014-2020 Links Doc

Sebastian Raschka 4.2k Jan 2, 2023
Python Library for learning (Structure and Parameter) and inference (Statistical and Causal) in Bayesian Networks.

pgmpy pgmpy is a python library for working with Probabilistic Graphical Models. Documentation and list of algorithms supported is at our official sit

pgmpy 2.2k Jan 3, 2023
A fast, scalable, high performance Gradient Boosting on Decision Trees library, used for ranking, classification, regression and other machine learning tasks for Python, R, Java, C++. Supports computation on CPU and GPU.

Website | Documentation | Tutorials | Installation | Release Notes CatBoost is a machine learning method based on gradient boosting over decision tree

CatBoost 6.9k Jan 4, 2023