ddbourgin / numpy-ml

Machine learning, in numpy
https://numpy-ml.readthedocs.io/
GNU General Public License v3.0
15.26k stars 3.7k forks source link

Bugfix: pass through vocab/encoding params #60

Closed eihli closed 3 years ago

eihli commented 3 years ago

This appears to be a typo. I think the correct behavior is that GoodTuring should take into account a vocab and encoding if given.

Side note: How do you run the tests in this repo?

I tried evaluating tests/test_ngram.py in a REPL but got an error about attempted relative import with no known parent package. I tried running python -m unittest but got a ModuleNotFoundError: No module named 'librosa.core.time_frequency'. I resorted to python -c 'from numpy_ml.tests import test_ngram; test_ngram.some_test(). Noting that there's not a test for GoodTuring yet.