IBCNServices / GENDIS

Contains an implementation (sklearn API) of the algorithm proposed in "GENDIS: GEnetic DIscovery of Shapelets" and code to reproduce all experiments.
Other
102 stars 26 forks source link

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

Closed Lichat closed 5 years ago

Lichat commented 5 years ago

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

GillesVandewiele commented 5 years ago

Hmm, that's strange indeed. It should work quite fast on that dataset... Did you install through pip? Could you try lowering the population_size to e.g. 5 and see if it then works?

Lichat commented 5 years ago

Hmm, that's strange indeed. It should work quite fast on that dataset... Did you install through pip? Could you try lowering the population_size to e.g. 5 and see if it then works?

Thank you for your reply. But I got the same problem no matter how the parameters low. I pip install gendis==1.0.12 before, and it should be installed successfully because the code before this did not report an error.

GillesVandewiele commented 5 years ago

It seems to be hanging on something then, which is indeed really weird, I'll investigate it and report back to you (I wont have access to a PC today though)...

Just to narrow down my search: you're running the example notebook with the example dataset and low hyper-parameters? What are the specs of your computer? RAM and CPU?

Thanks, Gilles

GillesVandewiele commented 5 years ago

I may have another possible solution. Could you set n_jobs=1. The multi-processing thing sometimes fails for unknown reasons.

Lichat commented 5 years ago

Oh, I found something wrong at deap under debag just like :https://github.com/rsteca/sklearn-deap/issues/59. I try to fix it now, thanks for your patience.

GillesVandewiele commented 5 years ago

So it does seem somewhat related to the multi-processing thing of deap? So probably adding the n_jobs=1 to the constructor of GeneticExtractor will fix it, but will run a bit slower...

Are you working on a Windows computer?

Lichat commented 5 years ago

Yes, I am work on Windows now.

GillesVandewiele commented 5 years ago

Ok, so then there must be something going wrong with how I am using the multiprocessing of pathos or deap on Windows...

Could you try to see if:

genetic_extractor = GeneticExtractor(verbose=True, population_size=50, iterations=10, plot=None, n_jobs=1)

does the trick?

Lichat commented 5 years ago

It runs successfully with your method! Thanks, Gilles. I really appreciate it.

GillesVandewiele commented 5 years ago

Ok, great!