giotto-ai / stock-market-crashes

How to detect stock market crashes with topology.
Other
78 stars 44 forks source link

Homological derivative issues #6

Closed ghost closed 3 years ago

ghost commented 4 years ago

Hi. Thanks for all of this, it great!

Running into this error in the Homological Derivatives chunk. I checked the API documentation and it looks like the gta.utils was changed. I then tried to edit to reflect the changes, but gta.utils does not have validate_metric_params anymore either. Thanks for any help!:

ImportError Traceback (most recent call last)

in 7 from gtda.diagrams._metrics import _parallel_pairwise, landscapes, betti_curves 8 from gtda.diagrams._utils import _subdiagrams ----> 9 from gtda.utils.validation import ( 10 check_diagram, 11 validate_params, ImportError: cannot import name 'check_diagram' from 'gtda.utils.validation' (/Users/jmaccarty/opt/anaconda3/lib/python3.7/site-packages/gtda/utils/validation.py)
ghost commented 4 years ago

Ran into a similar issue. It looks like the Homological Derivative class doesn't actually use either validate_metric_params or validate_params, so you can just take those out. "check_diagram" should become "check_diagrams".

You'll also probably run into an issue with:

metric_params = {"p": 2, "n_layers": 10, "n_values": 1000} (at least, i did)

"n_values" should be "n_bins"

ulupo commented 3 years ago

This should have been fixed in #9 which refactors the codebase form compatibility with giotto-tda 0.4.0. Sorry this came so late.