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
Implementation of "Meta-rPPG: Remote Heart Rate Estimation Using a Transductive Meta-Learner"

Meta-rPPG: Remote Heart Rate Estimation Using a Transductive Meta-Learner This repository is the official implementation of Meta-rPPG: Remote Heart Ra

Eugene Lee 137 Dec 13, 2022
The implementation of the lifelong infinite mixture model

Lifelong infinite mixture model 📋 This is the implementation of the Lifelong infinite mixture model 📋 Accepted by ICCV 2021 Title : Lifelong Infinit

Fei Ye 5 Oct 20, 2022
DiffSinger: Singing Voice Synthesis via Shallow Diffusion Mechanism (SVS & TTS); AAAI 2022; Official code

DiffSinger: Singing Voice Synthesis via Shallow Diffusion Mechanism This repository is the official PyTorch implementation of our AAAI-2022 paper, in

Jinglin Liu 803 Dec 28, 2022
A benchmark dataset for mesh multi-label-classification based on cube engravings introduced in MeshCNN

Double Cube Engravings This script creates a dataset for multi-label mesh clasification, with an intentionally difficult setup for point cloud classif

Yotam Erel 1 Nov 30, 2021
CROSS-LINGUAL ABILITY OF MULTILINGUAL BERT: AN EMPIRICAL STUDY

M-BERT-Study CROSS-LINGUAL ABILITY OF MULTILINGUAL BERT: AN EMPIRICAL STUDY Motivation Multilingual BERT (M-BERT) has shown surprising cross lingual a

CogComp 1 Feb 28, 2022
YourTTS: Towards Zero-Shot Multi-Speaker TTS and Zero-Shot Voice Conversion for everyone

YourTTS: Towards Zero-Shot Multi-Speaker TTS and Zero-Shot Voice Conversion for everyone In our recent paper we propose the YourTTS model. YourTTS bri

Edresson Casanova 390 Dec 29, 2022
A smart Chat bot that can help to know about corona virus and Make prediction of corona using X-ray.

TRINIT_Hum_kuchh_nahi_karenge_ML01 Document Link https://github.com/Jatin-Goyal-552/TRINIT_Hum_kuchh_nahi_karenge_ML01/blob/main/hum_kuchh_nahi_kareng

JatinGoyal 1 Feb 03, 2022
Semi-Autoregressive Transformer for Image Captioning

Semi-Autoregressive Transformer for Image Captioning Requirements Python 3.6 Pytorch 1.6 Prepare data Please use git clone --recurse-submodules to clo

YE Zhou 23 Dec 09, 2022
Conflict-aware Inference of Python Compatible Runtime Environments with Domain Knowledge Graph, ICSE 2022

PyCRE Conflict-aware Inference of Python Compatible Runtime Environments with Domain Knowledge Graph, ICSE 2022 Dependencies This project is developed

<a href=[email protected]"> 7 May 06, 2022
A PyTorch Implementation of Neural IMage Assessment

NIMA: Neural IMage Assessment This is a PyTorch implementation of the paper NIMA: Neural IMage Assessment (accepted at IEEE Transactions on Image Proc

yunxiaos 418 Dec 29, 2022
Simple reference implementation of GraphSAGE.

Reference PyTorch GraphSAGE Implementation Author: William L. Hamilton Basic reference PyTorch implementation of GraphSAGE. This reference implementat

William L Hamilton 861 Jan 06, 2023
A Moonraker plug-in for real-time compensation of frame thermal expansion

Frame Expansion Compensation A Moonraker plug-in for real-time compensation of frame thermal expansion. Installation Credit to protoloft, from whom I

58 Jan 02, 2023
A memory-efficient implementation of DenseNets

efficient_densenet_pytorch A PyTorch =1.0 implementation of DenseNets, optimized to save GPU memory. Recent updates Now works on PyTorch 1.0! It uses

Geoff Pleiss 1.4k Dec 25, 2022
IDA file loader for UF2, created for the DEFCON 29 hardware badge

UF2 Loader for IDA The DEFCON 29 badge uses the UF2 bootloader, which conveniently allows you to dump and flash the firmware over USB as a mass storag

Kevin Colley 6 Feb 08, 2022
A Multi-attribute Controllable Generative Model for Histopathology Image Synthesis

A Multi-attribute Controllable Generative Model for Histopathology Image Synthesis This is the pytorch implementation for our MICCAI 2021 paper. A Mul

Jiarong Ye 7 Apr 04, 2022
A PyTorch implementation of the paper "Semantic Image Synthesis via Adversarial Learning" in ICCV 2017

Semantic Image Synthesis via Adversarial Learning This is a PyTorch implementation of the paper Semantic Image Synthesis via Adversarial Learning. Req

Seonghyeon Nam 146 Nov 25, 2022
This is the official implement of paper "ActionCLIP: A New Paradigm for Action Recognition"

This is an official pytorch implementation of ActionCLIP: A New Paradigm for Video Action Recognition [arXiv] Overview Content Prerequisites Data Prep

268 Jan 09, 2023
Logsig-RNN: a novel network for robust and efficient skeleton-based action recognition

GCN_LogsigRNN This repository holds the codebase for the paper: Logsig-RNN: a novel network for robust and efficient skeleton-based action recognition

7 Oct 14, 2022
DeepLab-ResNet rebuilt in TensorFlow

DeepLab-ResNet-TensorFlow This is an (re-)implementation of DeepLab-ResNet in TensorFlow for semantic image segmentation on the PASCAL VOC dataset. Fr

Vladimir 1.2k Nov 04, 2022
Code and hyperparameters for the paper "Generative Adversarial Networks"

Generative Adversarial Networks This repository contains the code and hyperparameters for the paper: "Generative Adversarial Networks." Ian J. Goodfel

Ian Goodfellow 3.5k Jan 08, 2023