Giter Site home page Giter Site logo

ibcnservices / gendis Goto Github PK

View Code? Open in Web Editor NEW
102.0 12.0 24.0 161.65 MB

Contains an implementation (sklearn API) of the algorithm proposed in "GENDIS: GEnetic DIscovery of Shapelets" and code to reproduce all experiments.

License: Other

Python 25.06% Jupyter Notebook 74.73% Makefile 0.09% Batchfile 0.12%
data-mining timeseries-analysis evolutionary-algorithms shapelets time-series-analysis

gendis's People

Contributors

gillesvandewiele avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gendis's Issues

TypeError: __init__() got an unexpected keyword argument 'add_noise_prob'

Hi, I am getting this error when running this code:

from gendis.genetic import GeneticExtractor
genetic_extractor = GeneticExtractor(population_size=50, iterations=25, verbose=False,
                                     normed=False, add_noise_prob=0.3, add_shapelet_prob=0.3,
                                     wait=10, plot='notebook', remove_shapelet_prob=0.3,
                                     crossover_prob=0.66, n_jobs=4, max_len=len(X_train_pyts) // 2)

Traceback (most recent call last):
File "C:\Users\john\AppData\Roaming\Python\Python37\site-packages\IPython\core\interactiveshell.py", line 3418, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "", line 5, in
crossover_prob=0.66, n_jobs=4, max_len=len(X_train_pyts) // 2)
TypeError: init() got an unexpected keyword argument 'add_noise_prob'

I installed by clone method. Thanks for the help

Support for custom fitness function

allow user to write his own custom loss function, interface should be smth like:

def fitness(D, y):
  """Calculate the fitness of a candidate solution.
  
  Parameters
  ---------------
  D: 2D array-like. 
    array of distances
  y: 1D array-like
    array with ground truth

  Returns
  -----------
  x: float
    the score the genetic algorithm tries to maximize
  """
  return x

GENDIS import problem

Hi,

I have problems with importing modules from gendis, when I run this code I get the following error:

from gendis.genetic import GeneticExtractor
genetic_extractor = GeneticExtractor(population_size=50, iterations=25, verbose=False, 
                                     normed=False, add_noise_prob=0.3, add_shapelet_prob=0.3, 
                                     wait=10, plot='notebook', remove_shapelet_prob=0.3, 
                                     crossover_prob=0.66, n_jobs=4)

ERROR:

Traceback (most recent call last):
  File "/Users/maria/PycharmProjects/gendis_new/main.py", line 1, in <module>
    from gendis.genetic import GeneticExtractor
  File "/Users/maria/PycharmProjects/gendis_new/gendis/genetic.py", line 35, in <module>
    from gendis.pairwise_dist import _pdist
ImportError: No module named 'gendis.pairwise_dist'

Process finished with exit code 1

I’ve installed gendis sucessfully with Python 3.5.
OS: Mojave 10.14.3

save functionality

Create a save function, which writes the extracted shapelets away to disk.

from gendis.genetic import GeneticExtractor and from genetic import GeneticExtractor don't work

Hi There,

thanks for creating this great package, i am just installed and try to explore it. However when i try to follow the tutorial, i got below error:

from gendis.genetic import GeneticExtractor
Traceback (most recent call last):
File "C:\Anaconda\envs\te\gendis\genetic.py", line 33, in
from fitness import logloss_fitness
ModuleNotFoundError: No module named 'fitness'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Anaconda\envs\te\gendis\fitness.py", line 6, in
from gendis.pairwise_dist import _pdist
ModuleNotFoundError: No module named 'gendis.pairwise_dist'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "", line 1, in
File "C:\Anaconda\envs\te\gendis\genetic.py", line 35, in
from gendis.fitness import logloss_fitness
File "C:\Anaconda\envs\te\gendis\fitness.py", line 8, in
from pairwise_dist import _pdist
ModuleNotFoundError: No module named 'pairwise_dist'

from genetic import GeneticExtractor
Traceback (most recent call last):
File "", line 1, in
ModuleNotFoundError: No module named 'genetic'

but i am able to import gendis using below and see the private members only of this class, could you please kindly help?

import gendis
gendis.
gendis.cached gendis.format( gendis.loader gendis.reduce_ex(
gendis.class( gendis.ge( gendis.lt( gendis.repr(
gendis.delattr( gendis.getattribute( gendis.name gendis.setattr(
gendis.dict gendis.gt( gendis.ne( gendis.sizeof(
gendis.dir( gendis.hash( gendis.new( gendis.spec
gendis.doc gendis.init( gendis.package gendis.str(
gendis.eq( gendis.init_subclass( gendis.path gendis.subclasshook(
gendis.file gendis.le( gendis.reduce(

best pandaa

Error: No module named 'gendis'

The following error is reported when I run the first shell in example.ipynb.
The runing window is shown below. I will appreciate if you can give me some guidance.
image
image
image

Unlabeled data

Hi,

I wanted to know if we can extract shapelets with unlabelled time-series data?

Thank you.

Multi-processing

Hi, your package is great! One thing is I can't get multiprocessing to work. I have n_jobs > 1 but it doesn't appear to start more jobs. I have 50+ cores and just uses one. Any help is much appreciated. Thanks:

cpus = 30
st = GeneticExtractor(verbose=True, population_size=30, iterations=10, plot=None, n_jobs=cpus)

Matrix profiling for initialization

Keogh et al recently published a paper that shows how shapelets can heuristically (but fast) be determined through the matrix profile.

Implement this init operator in GENDIS.

GENDIS Install problem

I am trying to install gendis. But I can't install it. I used 'pip install gendis' in my command prompt.
But It's failed. I am using python 3.6.5

At the end there is this error

" ----------------------------------------
Command ""c:\users\humaun rashid\anaconda3\python.exe" -u -c "import setuptools, tokenize;file='C:\Users\HUMAUN1\AppData\Local\Temp\pip-install-m90pf7zc\tslearn\setup.py';f=getattr(tokeni
ze, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record C:\Users\HUMAUN
1\AppData\Local\Temp\pip-record-zwcfs0k2\install-recor
d.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\HUMAUN~1\AppData\Local\Temp\pip-install-m90pf7zc\tslearn"

Data inputs for univariate time series

Hi, I have a univariate time series with time stamps as a starting point and a target variable array. Not sure how you are processing the data input in the example provided, what are you expecting as Data input into GENDIS. Thanks !!

Extension to multivariate time series

Hi, thanks for your work!Acturally, I would like to extract a set of shapelets from a bunch of multivariate time series. Does the current version of the code provide the above functionality? Or do I need to extract shapelets for each variable individually?

Installation Problem

Hello Gilles, I am a graduate student currently trying to use GENDIS for a machine learning project. However, when I used command "!pip install gendis", it returns the "ResolutionImpossible" error since GENDIS requires matplotlib version 2.1.2, but now I have matplotlib version 3.5.2. I tried "!pipx install matplotlib==2.1.2" to install the earlier version, and also attempted the clone repository alternative, but both also failed. Any idea on how to get over this problem?

Import problem

Seems to be something wrong with the imports. Bug discovered on Windows (Issue #1), but probably present on every OS.

Installation problems with up-to-date libraries

Is this package still supported? It seems that the requirements in the installation procedure are outdated and interfere with an up-to-date environment, making the installation difficult and inconvenient in a regular situation.

Run "genetic_extractor.fit(X_train, y_train)"failed

When I run "example.ipynb", it couldn't work successfully but without any error message,just stay busy. It seem to happened in this code:"genetic_extractor.fit(X_train, y_train)". How can I fix it?
wrong

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.