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 source code of paper 'IterMVS: Iterative Probability Estimation for Efficient Multi-View Stereo'

IterMVS official source code of paper 'IterMVS: Iterative Probability Estimation for Efficient Multi-View Stereo' Introduction IterMVS is a novel lear

Fangjinhua Wang 127 Jan 04, 2023
Repository for XLM-T, a framework for evaluating multilingual language models on Twitter data

This is the XLM-T repository, which includes data, code and pre-trained multilingual language models for Twitter. XLM-T - A Multilingual Language Mode

Cardiff NLP 112 Dec 27, 2022
Code accompanying our paper Feature Learning in Infinite-Width Neural Networks

Empirical Experiments in "Feature Learning in Infinite-width Neural Networks" This repo contains code to replicate our experiments (Word2Vec, MAML) in

Edward Hu 37 Dec 14, 2022
An Implementation of Fully Convolutional Networks in Tensorflow.

Update An example on how to integrate this code into your own semantic segmentation pipeline can be found in my KittiSeg project repository. tensorflo

Marvin Teichmann 1.1k Dec 12, 2022
Deep GPs built on top of TensorFlow/Keras and GPflow

GPflux Documentation | Tutorials | API reference | Slack What does GPflux do? GPflux is a toolbox dedicated to Deep Gaussian processes (DGP), the hier

Secondmind Labs 107 Nov 02, 2022
Code I use to automatically update my videos' metadata on YouTube

mCodingYouTube This repository contains the code I use to automatically update my videos' metadata on YouTube, including: titles, descriptions, tags,

James Murphy 19 Oct 07, 2022
Implicit Deep Adaptive Design (iDAD)

Implicit Deep Adaptive Design (iDAD) This code supports the NeurIPS paper 'Implicit Deep Adaptive Design: Policy-Based Experimental Design without Lik

Desi 12 Aug 14, 2022
This repo is to present various code demos on how to use our Graph4NLP library.

Deep Learning on Graphs for Natural Language Processing Demo The repository contains code examples for DLG4NLP tutorials at NAACL 2021, SIGIR 2021, KD

Graph4AI 143 Dec 23, 2022
Library to enable Bayesian active learning in your research or labeling work.

Bayesian Active Learning (BaaL) BaaL is an active learning library developed at ElementAI. This repository contains techniques and reusable components

ElementAI 687 Dec 25, 2022
Codes for AAAI22 paper "Learning to Solve Travelling Salesman Problem with Hardness-Adaptive Curriculum"

Paper For more details, please see our paper Learning to Solve Travelling Salesman Problem with Hardness-Adaptive Curriculum which has been accepted a

14 Sep 30, 2022
Dynamic Neural Representational Decoders for High-Resolution Semantic Segmentation

Dynamic Neural Representational Decoders for High-Resolution Semantic Segmentation Requirements This repository needs mmsegmentation Training To train

Adelaide Intelligent Machines (AIM) Group 7 Sep 12, 2022
Project Tugas Besar pertama Pengenalan Komputasi Institut Teknologi Bandung

Vending_Machine_(Mesin_Penjual_Minuman) Project Tugas Besar pertama Pengenalan Komputasi Institut Teknologi Bandung Raw Sketch untuk Essay Ringkasan P

QueenLy 1 Nov 08, 2021
A user-friendly research and development tool built to standardize RL competency assessment for custom agents and environments.

Built with ❤️ by Sam Showalter Contents Overview Installation Dependencies Usage Scripts Standard Execution Environment Development Environment Benchm

SRI-AIC 1 Nov 18, 2021
Pytorch ImageNet1k Loader with Bounding Boxes.

ImageNet 1K Bounding Boxes For some experiments, you might wanna pass only the background of imagenet images vs passing only the foreground. Here, I'v

Amin Ghiasi 11 Oct 15, 2022
BridgeGAN - Tensorflow implementation of Bridging the Gap between Label- and Reference-based Synthesis in Multi-attribute Image-to-Image Translation.

Bridging the Gap between Label- and Reference based Synthesis(ICCV 2021) Tensorflow implementation of Bridging the Gap between Label- and Reference-ba

huangqiusheng 8 Jul 13, 2022
Code for the paper "On the Power of Edge Independent Graph Models"

Edge Independent Graph Models Code for the paper: "On the Power of Edge Independent Graph Models" Sudhanshu Chanpuriya, Cameron Musco, Konstantinos So

Konstantinos Sotiropoulos 0 Oct 26, 2021
Face-Recognition-Attendence-System - This face recognition Attendence system using Python

Face-Recognition-Attendence-System I have developed this face recognition Attend

Riya Gupta 4 May 10, 2022
Python library for tracking human heads with FLAME (a 3D morphable head model)

Video Head Tracker 3D tracking library for human heads based on FLAME (a 3D morphable head model). The tracking algorithm is inspired by face2face. It

61 Dec 25, 2022
A Simple Example for Imitation Learning with Dataset Aggregation (DAGGER) on Torcs Env

Imitation Learning with Dataset Aggregation (DAGGER) on Torcs Env This repository implements a simple algorithm for imitation learning: DAGGER. In thi

Hao 66 Nov 23, 2022
Official implementation for Multi-Modal Interaction Graph Convolutional Network for Temporal Language Localization in Videos

Multi-modal Interaction Graph Convolutioal Network for Temporal Language Localization in Videos Official implementation for Multi-Modal Interaction Gr

Zongmeng Zhang 15 Oct 18, 2022