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
Course about deep learning for computer vision and graphics co-developed by YSDA and Skoltech.

Deep Vision and Graphics This repo supplements course "Deep Vision and Graphics" taught at YSDA @fall'21. The course is the successor of "Deep Learnin

Yandex School of Data Analysis 160 Jan 02, 2023
Code accompanying the paper "ProxyFL: Decentralized Federated Learning through Proxy Model Sharing"

ProxyFL Code accompanying the paper "ProxyFL: Decentralized Federated Learning through Proxy Model Sharing" Authors: Shivam Kalra*, Junfeng Wen*, Jess

Layer6 Labs 14 Dec 06, 2022
Manipulation OpenAI Gym environments to simulate robots at the STARS lab

Manipulator Learning This repository contains a set of manipulation environments that are compatible with OpenAI Gym and simulated in pybullet. In par

STARS Laboratory 5 Dec 08, 2022
The source codes for TME-BNA: Temporal Motif-Preserving Network Embedding with Bicomponent Neighbor Aggregation.

TME The source codes for TME-BNA: Temporal Motif-Preserving Network Embedding with Bicomponent Neighbor Aggregation. Our implementation is based on TG

2 Feb 10, 2022
Image-to-Image Translation with Conditional Adversarial Networks (Pix2pix) implementation in keras

pix2pix-keras Pix2pix implementation in keras. Original paper: Image-to-Image Translation with Conditional Adversarial Networks (pix2pix) Paper Author

William Falcon 141 Dec 30, 2022
Genshin-assets - 👧 Public documentation & static assets for Genshin Impact data.

genshin-assets This repo provides easy access to the Genshin Impact assets, primarily for use on static sites. Sources Genshin Optimizer - An Artifact

Zerite Development 5 Nov 22, 2022
Official implementation of "Not only Look, but also Listen: Learning Multimodal Violence Detection under Weak Supervision" ECCV2020

XDVioDet Official implementation of "Not only Look, but also Listen: Learning Multimodal Violence Detection under Weak Supervision" ECCV2020. The proj

peng 64 Dec 12, 2022
Official PyTorch code of DeepPanoContext: Panoramic 3D Scene Understanding with Holistic Scene Context Graph and Relation-based Optimization (ICCV 2021 Oral).

DeepPanoContext (DPC) [Project Page (with interactive results)][Paper] DeepPanoContext: Panoramic 3D Scene Understanding with Holistic Scene Context G

Cheng Zhang 66 Nov 16, 2022
Differentiable rasterization applied to 3D model simplification tasks

nvdiffmodeling Differentiable rasterization applied to 3D model simplification tasks, as described in the paper: Appearance-Driven Automatic 3D Model

NVIDIA Research Projects 336 Dec 30, 2022
Image-to-Image Translation in PyTorch

CycleGAN and pix2pix in PyTorch New: Please check out contrastive-unpaired-translation (CUT), our new unpaired image-to-image translation model that e

Jun-Yan Zhu 19k Jan 07, 2023
High-quality implementations of standard and SOTA methods on a variety of tasks.

Uncertainty Baselines The goal of Uncertainty Baselines is to provide a template for researchers to build on. The baselines can be a starting point fo

Google 1.1k Dec 30, 2022
Combining Diverse Feature Priors

Combining Diverse Feature Priors This repository contains code for reproducing the results of our paper. Paper: https://arxiv.org/abs/2110.08220 Blog

Madry Lab 5 Nov 12, 2022
The Official Implementation of the ICCV-2021 Paper: Semantically Coherent Out-of-Distribution Detection.

SCOOD-UDG (ICCV 2021) This repository is the official implementation of the paper: Semantically Coherent Out-of-Distribution Detection Jingkang Yang,

Jake YANG 62 Nov 21, 2022
The fastai book, published as Jupyter Notebooks

English / Spanish / Korean / Chinese / Bengali / Indonesian The fastai book These notebooks cover an introduction to deep learning, fastai, and PyTorc

fast.ai 17k Jan 07, 2023
Official implementation of FCL-taco2: Fast, Controllable and Lightweight version of Tacotron2 @ ICASSP 2021

FCL-Taco2: Towards Fast, Controllable and Lightweight Text-to-Speech synthesis (ICASSP 2021) Paper | Demo Block diagram of FCL-taco2, where the decode

Disong Wang 39 Sep 28, 2022
Deep learning PyTorch library for time series forecasting, classification, and anomaly detection

Deep learning for time series forecasting Flow forecast is an open-source deep learning for time series forecasting framework. It provides all the lat

AIStream 1.2k Jan 04, 2023
Place holder for HOPE: a human-centric and task-oriented MT evaluation framework using professional post-editing

HOPE: A Task-Oriented and Human-Centric Evaluation Framework Using Professional Post-Editing Towards More Effective MT Evaluation Place holder for dat

Lifeng Han 1 Apr 25, 2022
Airborne Optical Sectioning (AOS) is a wide synthetic-aperture imaging technique

AOS: Airborne Optical Sectioning Airborne Optical Sectioning (AOS) is a wide synthetic-aperture imaging technique that employs manned or unmanned airc

JKU Linz, Institute of Computer Graphics 39 Dec 09, 2022
Flaxformer: transformer architectures in JAX/Flax

Flaxformer is a transformer library for primarily NLP and multimodal research at Google.

Google 116 Jan 05, 2023
Github for the conference paper GLOD-Gaussian Likelihood OOD detector

FOOD - Fast OOD Detector Pytorch implamentation of the confernce peper FOOD arxiv link. Abstract Deep neural networks (DNNs) perform well at classifyi

17 Jun 19, 2022