eonu / sequentia

Scikit-Learn compatible HMM and DTW based sequence machine learning algorithms in Python.

Home Page:https://pypi.org/project/sequentia/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Allow passing of extra arguments to hmmlearn and dtaidistance functions

eonu opened this issue · comments

Currently, the package makes some assumptions when it comes to initializing the hmmlearn.hmm.GMMHMM object (for the GMMHMM class), and calling the dtaidistance.dtw.distance function (for the KNNClassifier). It would be useful if key-word arguments could be accepted in the GMMHMM and KNNClassifier constructors, and passed to the corresponding class/function above.

Though this may require a lot of work, and changing the overall architecture of the classes.

A pragmatic approach to passing keyword arguments along to a specific subcomponent, is to have an argument like gmmhmm_kwargs={}, then expand that dictionary into keyword arguments when doing the underlying call. This is how it works in seaborn for example.

Eventually got to implementing it this way!

Thanks for the suggestion @jonnor 😁