私はPomegranate libraryをHMMの実装に使用しています。私は、ドキュメントがlabels
パラメータの一つであるべきと言うfrom_samples
機能を使用するための言うことを次のようだ:ザクロHMMラベル:複数の要素を持つ配列の真理値はあいまいです。
An array of state labels for each sequence. This is only used in ‘labeled’ training. If used this must be comprised of n lists where n is the number of sequences to train on, and each of those lists must have one label per observation. Default is None.
私のコードは次のとおりです。
model = HiddenMarkovModel('Gestures').from_samples(
NormalDistribution, 3, training, labels=[0, 1, 2], algorithm='labeled')
私はエラーを取得する:
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
私は配列を入力しているので理解できませんが、私はブール値を入力すると思いますか?