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
Code for Deterministic Neural Networks with Appropriate Inductive Biases Capture Epistemic and Aleatoric Uncertainty

Deep Deterministic Uncertainty This repository contains the code for Deterministic Neural Networks with Appropriate Inductive Biases Capture Epistemic

Jishnu Mukhoti 69 Nov 28, 2022
Credo AI Lens is a comprehensive assessment framework for AI systems. Lens standardizes model and data assessment, and acts as a central gateway to assessments created in the open source community.

Lens by Credo AI - Responsible AI Assessment Framework Lens is a comprehensive assessment framework for AI systems. Lens standardizes model and data a

Credo AI 27 Dec 14, 2022
Toontown: Galaxy, a new Toontown game based on Disney's Toontown Online

Toontown: Galaxy The official archive repo for Toontown: Galaxy, a new Toontown

1 Feb 15, 2022
A PaddlePaddle implementation of Time Interval Aware Self-Attentive Sequential Recommendation.

TiSASRec.paddle A PaddlePaddle implementation of Time Interval Aware Self-Attentive Sequential Recommendation. Introduction 论文:Time Interval Aware Sel

Paddorch 2 Nov 28, 2021
TorchDistiller - a collection of the open source pytorch code for knowledge distillation, especially for the perception tasks, including semantic segmentation, depth estimation, object detection and instance segmentation.

This project is a collection of the open source pytorch code for knowledge distillation, especially for the perception tasks, including semantic segmentation, depth estimation, object detection and i

yifan liu 147 Dec 03, 2022
High performance distributed framework for training deep learning recommendation models based on PyTorch.

PERSIA (Parallel rEcommendation tRaining System with hybrId Acceleration) is developed by AI 340 Dec 30, 2022

Fuzzing the Kernel Using Unicornafl and AFL++

Unicorefuzz Fuzzing the Kernel using UnicornAFL and AFL++. For details, skim through the WOOT paper or watch this talk at CCCamp19. Is it any good? ye

Security in Telecommunications 283 Dec 26, 2022
DeepFaceEditing: Deep Face Generation and Editing with Disentangled Geometry and Appearance Control

DeepFaceEditing: Deep Face Generation and Editing with Disentangled Geometry and Appearance Control One version of our system is implemented using the

260 Nov 28, 2022
Code base for the paper "Scalable One-Pass Optimisation of High-Dimensional Weight-Update Hyperparameters by Implicit Differentiation"

This repository contains code for the paper Scalable One-Pass Optimisation of High-Dimensional Weight-Update Hyperparameters by Implicit Differentiati

8 Aug 28, 2022
Official MegEngine implementation of CREStereo(CVPR 2022 Oral).

[CVPR 2022] Practical Stereo Matching via Cascaded Recurrent Network with Adaptive Correlation This repository contains MegEngine implementation of ou

MEGVII Research 309 Dec 30, 2022
PyTorch Lightning + Hydra. A feature-rich template for rapid, scalable and reproducible ML experimentation with best practices. ⚡🔥⚡

Lightning-Hydra-Template A clean and scalable template to kickstart your deep learning project 🚀 ⚡ 🔥 Click on Use this template to initialize new re

Łukasz Zalewski 2.1k Jan 09, 2023
Py4fi2nd - Jupyter Notebooks and code for Python for Finance (2nd ed., O'Reilly) by Yves Hilpisch.

Python for Finance (2nd ed., O'Reilly) This repository provides all Python codes and Jupyter Notebooks of the book Python for Finance -- Mastering Dat

Yves Hilpisch 1k Jan 05, 2023
Quantum-enhanced transformer neural network

Example of a Quantum-enhanced transformer neural network Get the code: git clone https://github.com/rdisipio/qtransformer.git cd qtransformer Create

Riccardo Di Sipio 61 Nov 08, 2022
Recall Loss for Semantic Segmentation (This repo implements the paper: Recall Loss for Semantic Segmentation)

Recall Loss for Semantic Segmentation (This repo implements the paper: Recall Loss for Semantic Segmentation) Download Synthia dataset The model uses

32 Sep 21, 2022
Dialect classification

Dialect-Classification This repository presents the data that was used in a talk at ICKL-5 (5th International Conference on Kurdish Linguistics) at th

Kurdish-BLARK 0 Nov 12, 2021
Proof of concept GnuCash Webinterface

Proof of Concept GnuCash Webinterface This may one day be a something truly great. Milestones [ ] Browse accounts and view transactions [ ] Record sim

Josh 14 Dec 28, 2022
[2021 MultiMedia] CONQUER: Contextual Query-aware Ranking for Video Corpus Moment Retrieval

CONQUER: Contexutal Query-aware Ranking for Video Corpus Moment Retreival PyTorch implementation of CONQUER: Contexutal Query-aware Ranking for Video

Hou zhijian 23 Dec 26, 2022
Minimal implementation and experiments of "No-Transaction Band Network: A Neural Network Architecture for Efficient Deep Hedging".

No-Transaction Band Network: A Neural Network Architecture for Efficient Deep Hedging Minimal implementation and experiments of "No-Transaction Band N

19 Jan 03, 2023
deep_image_prior_extension

Code for "Is Deep Image Prior in Need of a Good Education?" Project page: https://jleuschn.github.io/docs.educated_deep_image_prior/. Supplementary Ma

riccardo barbano 7 Jan 09, 2022
MAUS: A Dataset for Mental Workload Assessment Using Wearable Sensor - Baseline system

MAUS: A Dataset for Mental Workload Assessment Using Wearable Sensor - Baseline system Getting started To start working on this assignment, you should

2 Aug 06, 2022