DynamicsAndNeuralSystems / pycatch22

python implementation of catch22
https://time-series-features.gitbook.io/catch22/python
GNU General Public License v3.0
75 stars 15 forks source link

add option for short names #18

Closed anniegbryant closed 1 year ago

benfulcher commented 1 year ago

I wonder if you can put the features_short in the same object as features…? This will help see them side-by-side for clarity/cleanliness…E.g., a 22 x 2 object…? Or a dictionary with long and short fields? I'm not sure what the best python version is for this… But if it's a hassle, let me know—this works too!

anniegbryant commented 1 year ago

Currently, catch22.py returns a dictionary with two keys: names containing the list of features and values containing the list of feature values. The suggested change would also add a third key to the dictionary, short_names, containing the list of shorthand feature names -- if the user sets short_names=True. I thought it best to keep the output format as consistent as possible with (A) what users have been accustomed to thus far and (B) to keep output formats directly comparable whether a user includes the short_names=True flag.

I think the cleanest way to implement this would be to return the results as a pandas DataFrame object with either two or three columns, though this would require including numpy and pandas as installation requirements for the package as well. What do you think?

benfulcher commented 1 year ago

I'm not the most knowledgeable in python, but I would expect python users doing time-series analysis to have numpy and pandas… There is always a risk with adding and tracking dependencies, but the functionality here is so basic that I don't think it's an issue…? I'll merge the current version for now.