Don't treat single sequence input as singleton for HMMClassifier
eonu opened this issue · comments
Currently if a single sequence is provided to predict()
in HMMClassifier
, it is converted into a singleton list:
sequentia/lib/sequentia/classifiers/hmm/hmm_classifier.py
Lines 118 to 119 in b857c72
When returning the prediction, we assume that if X
has one element, the output should not be returned as a singleton.
sequentia/lib/sequentia/classifiers/hmm/hmm_classifier.py
Lines 133 to 136 in b857c72
This can be unintuitive as if the user actually provides a singleton sequence as input, they will receive a prediction value that is not returned as a singleton.
Fixed in #200.