wangsix / vmo

Python Modules of Variable Markov Oracle
GNU General Public License v3.0
25 stars 10 forks source link

using improvise with VMO ? #21

Closed jcelerier closed 6 years ago

jcelerier commented 6 years ago

Given this code :

from vmo.VMO.oracle import build_oracle
import vmo.generate

SYMBOLIC_SEQ = [0, 0, 1, 0, 2, 0, 0, 1, 0, 1, 0, 2, 0, 0, 1]
p = build_oracle(SYMBOLIC_SEQ, 'a')
print(vmo.generate.improvise(p, 5))

I get (all the time)

vmo/VMO/oracle.py:567: RuntimeWarning: invalid value encountered in less
  I = np.where(dvec < self.params['threshold'])[0]
[1, 2, 3, 4, 5]

what should I do to get correct improvisation ? thanks!

jcelerier commented 6 years ago

got it, the sequence's alphabet should be [1, N], not [0, N-1]