Git Product home page Git Product logo

sklearn-bayes's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sklearn-bayes's Issues

ARD and RVM regressions: Convergence

Hi,
thank you for the code, it was very easy to use and seems to work fine!

I just have a small question: I am using the regression tools, and it seems that in your first example (sinc) the algorithm stops way before the actual convergence, because the default number of iterations is 300. By forcing more iterations I obtain:
RVR(coef0=1, copy_X=True, degree=3, fit_intercept=True, gamma=1, kernel='rbf',
kernel_params=None, n_iter=10000, tol=0.001, verbose=True)
gives : Iteration: 1537, number of features in the model: 9
Algorithm converged !

Is it to be expect to have that much number of iterations? If so, do you think the approximation at 100 or 300 iterations is valid?

Thank you!!

Question on RVM implementation details

Hi, Amazasp Shumik,

The fast rvm implementation is fantastic, and I learn a lot from your codes. Umm, I have a few question on the implementation details:
1.
Q
2.
t-hat-before
t-hat-after

So, the calculation of Qm and t hat seems different from the original paper, is it some kind of approximation, and how to deduce them? thx.

Cannot install on OS X 10.15

I get the following errors when trying to install

(venv) simone ~/PycharmProjects/project $ pip install Cython
Collecting Cython
  Downloading Cython-0.29.21-cp37-cp37m-macosx_10_9_x86_64.whl (1.9 MB)
     |████████████████████████████████| 1.9 MB 1.3 MB/s 
Installing collected packages: Cython
Successfully installed Cython-0.29.21
WARNING: You are using pip version 20.2.4; however, version 20.3.3 is available.
You should consider upgrading via the '/Users/simone/PycharmProjects/project/venv/bin/python -m pip install --upgrade pip' command.
(venv) simone ~/PycharmProjects/project $ pip install https://github.com/AmazaspShumik/sklearn_bayes/archive/master.zip
Collecting https://github.com/AmazaspShumik/sklearn_bayes/archive/master.zip
  Downloading https://github.com/AmazaspShumik/sklearn_bayes/archive/master.zip
     \ 4.3 MB 255 kB/s
Requirement already satisfied: numpy>=1.9.2 in ./venv/lib/python3.7/site-packages (from skbayes==0.1.0a1) (1.18.5)
Requirement already satisfied: scipy>=0.15.1 in ./venv/lib/python3.7/site-packages (from skbayes==0.1.0a1) (1.5.4)
Requirement already satisfied: scikit-learn>=0.17 in ./venv/lib/python3.7/site-packages (from skbayes==0.1.0a1) (0.23.2)
Requirement already satisfied: cython>=0.24 in ./venv/lib/python3.7/site-packages (from skbayes==0.1.0a1) (0.29.21)
Requirement already satisfied: threadpoolctl>=2.0.0 in ./venv/lib/python3.7/site-packages (from scikit-learn>=0.17->skbayes==0.1.0a1) (2.1.0)
Requirement already satisfied: joblib>=0.11 in ./venv/lib/python3.7/site-packages (from scikit-learn>=0.17->skbayes==0.1.0a1) (0.17.0)
Building wheels for collected packages: skbayes
  Building wheel for skbayes (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /Users/simone/PycharmProjects/project/venv/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/dj/krrkt8p95qndhg46m2n774d80000gn/T/pip-req-build-97u7n087/setup.py'"'"'; __file__='"'"'/private/var/folders/dj/krrkt8p95qndhg46m2n774d80000gn/T/pip-req-build-97u7n087/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /private/var/folders/dj/krrkt8p95qndhg46m2n774d80000gn/T/pip-wheel-94r0n98w
       cwd: /private/var/folders/dj/krrkt8p95qndhg46m2n774d80000gn/T/pip-req-build-97u7n087/
  Complete output (275 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.macosx-10.15-x86_64-3.7
  creating build/lib.macosx-10.15-x86_64-3.7/skbayes
  copying skbayes/__init__.py -> build/lib.macosx-10.15-x86_64-3.7/skbayes
  creating build/lib.macosx-10.15-x86_64-3.7/skbayes/decomposition_models
  copying skbayes/decomposition_models/__init__.py -> build/lib.macosx-10.15-x86_64-3.7/skbayes/decomposition_models
  copying skbayes/decomposition_models/rbm.py -> build/lib.macosx-10.15-x86_64-3.7/skbayes/decomposition_models
  creating build/lib.macosx-10.15-x86_64-3.7/skbayes/mixture_models
  copying skbayes/mixture_models/dpmixture.py -> build/lib.macosx-10.15-x86_64-3.7/skbayes/mixture_models
  copying skbayes/mixture_models/mixture.py -> build/lib.macosx-10.15-x86_64-3.7/skbayes/mixture_models
  copying skbayes/mixture_models/__init__.py -> build/lib.macosx-10.15-x86_64-3.7/skbayes/mixture_models
  creating build/lib.macosx-10.15-x86_64-3.7/skbayes/hidden_markov_models
  copying skbayes/hidden_markov_models/__init__.py -> build/lib.macosx-10.15-x86_64-3.7/skbayes/hidden_markov_models
  creating build/lib.macosx-10.15-x86_64-3.7/skbayes/rvm_ard_models
  copying skbayes/rvm_ard_models/fast_rvm.py -> build/lib.macosx-10.15-x86_64-3.7/skbayes/rvm_ard_models
  copying skbayes/rvm_ard_models/__init__.py -> build/lib.macosx-10.15-x86_64-3.7/skbayes/rvm_ard_models
  copying skbayes/rvm_ard_models/vrvm.py -> build/lib.macosx-10.15-x86_64-3.7/skbayes/rvm_ard_models
  creating build/lib.macosx-10.15-x86_64-3.7/skbayes/linear_models
  copying skbayes/linear_models/bayes_logistic.py -> build/lib.macosx-10.15-x86_64-3.7/skbayes/linear_models
  copying skbayes/linear_models/__init__.py -> build/lib.macosx-10.15-x86_64-3.7/skbayes/linear_models
  copying skbayes/linear_models/bayes_linear.py -> build/lib.macosx-10.15-x86_64-3.7/skbayes/linear_models
  running build_ext
  building 'skbayes.decomposition_models.gibbs_lda_cython' extension
  Warning: Can't read registry to find the necessary compiler setting
  Make sure that Python modules winreg, win32api or win32con are installed.
  C compiler: clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include
  
  creating build/temp.macosx-10.15-x86_64-3.7
  creating build/temp.macosx-10.15-x86_64-3.7/skbayes
  creating build/temp.macosx-10.15-x86_64-3.7/skbayes/decomposition_models
  compile options: '-I/Users/simone/PycharmProjects/project/venv/lib/python3.7/site-packages/numpy/core/include -I/Users/simone/PycharmProjects/project/venv/include -I/Users/simone/.pyenv/versions/3.7.3/include/python3.7m -c'
  extra options: '-O3'
  clang: skbayes/decomposition_models/gibbs_lda_cython.c
  In file included from skbayes/decomposition_models/gibbs_lda_cython.c:280:
  In file included from /Users/simone/PycharmProjects/project/venv/lib/python3.7/site-packages/numpy/core/include/numpy/arrayobject.h:4:
  In file included from /Users/simone/PycharmProjects/project/venv/lib/python3.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:12:
  In file included from /Users/simone/PycharmProjects/project/venv/lib/python3.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1832:
  /Users/simone/PycharmProjects/project/venv/lib/python3.7/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: "Using deprecated NumPy API, disable it with "          "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-W#warnings]
  #warning "Using deprecated NumPy API, disable it with " \
   ^
  In file included from skbayes/decomposition_models/gibbs_lda_cython.c:280:
  In file included from /Users/simone/PycharmProjects/project/venv/lib/python3.7/site-packages/numpy/core/include/numpy/arrayobject.h:4:
  In file included from /Users/simone/PycharmProjects/project/venv/lib/python3.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:21:
  /Users/simone/PycharmProjects/project/venv/lib/python3.7/site-packages/numpy/core/include/numpy/__multiarray_api.h:1463:1: warning: unused function '_import_array' [-Wunused-function]
  _import_array(void)
  ^
  skbayes/decomposition_models/gibbs_lda_cython.c:15698:28: warning: unused function '__Pyx_PyObject_AsString' [-Wunused-function]
  static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject* o) {
                             ^
  skbayes/decomposition_models/gibbs_lda_cython.c:15695:32: warning: unused function '__Pyx_PyUnicode_FromString' [-Wunused-function]
  static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
                                 ^
  skbayes/decomposition_models/gibbs_lda_cython.c:15810:33: warning: unused function '__Pyx_PyIndex_AsSsize_t' [-Wunused-function]
  static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
                                  ^
  skbayes/decomposition_models/gibbs_lda_cython.c:15872:33: warning: unused function '__Pyx_PyInt_FromSize_t' [-Wunused-function]
  static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
                                  ^
  skbayes/decomposition_models/gibbs_lda_cython.c:13196:32: warning: unused function '__Pyx_GetItemInt_List_Fast' [-Wunused-function]
  static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
                                 ^
  skbayes/decomposition_models/gibbs_lda_cython.c:13211:32: warning: unused function '__Pyx_GetItemInt_Tuple_Fast' [-Wunused-function]
  static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
                                 ^
  skbayes/decomposition_models/gibbs_lda_cython.c:14404:28: warning: unused function '__Pyx_CyFunction_InitDefaults' [-Wunused-function]
  static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *func, size_t size, int pyobjects) {
                             ^
  skbayes/decomposition_models/gibbs_lda_cython.c:14418:27: warning: unused function '__Pyx_CyFunction_SetDefaultsKwDict' [-Wunused-function]
  static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) {
                            ^
  skbayes/decomposition_models/gibbs_lda_cython.c:14423:27: warning: unused function '__Pyx_CyFunction_SetAnnotationsDict' [-Wunused-function]
  static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) {
                            ^
  skbayes/decomposition_models/gibbs_lda_cython.c:14899:48: warning: unused function '__pyx_t_float_complex_from_parts' [-Wunused-function]
      static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
                                                 ^
  skbayes/decomposition_models/gibbs_lda_cython.c:14910:30: warning: unused function '__Pyx_c_eqf' [-Wunused-function]
      static CYTHON_INLINE int __Pyx_c_eqf(__pyx_t_float_complex a, __pyx_t_float_complex b) {
                               ^
  skbayes/decomposition_models/gibbs_lda_cython.c:14913:48: warning: unused function '__Pyx_c_sumf' [-Wunused-function]
      static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sumf(__pyx_t_float_complex a, __pyx_t_float_complex b) {
                                                 ^
  skbayes/decomposition_models/gibbs_lda_cython.c:14919:48: warning: unused function '__Pyx_c_difff' [-Wunused-function]
      static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_difff(__pyx_t_float_complex a, __pyx_t_float_complex b) {
                                                 ^
  skbayes/decomposition_models/gibbs_lda_cython.c:14931:48: warning: unused function '__Pyx_c_quotf' [-Wunused-function]
      static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quotf(__pyx_t_float_complex a, __pyx_t_float_complex b) {
                                                 ^
  skbayes/decomposition_models/gibbs_lda_cython.c:14938:48: warning: unused function '__Pyx_c_negf' [-Wunused-function]
      static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_negf(__pyx_t_float_complex a) {
                                                 ^
  skbayes/decomposition_models/gibbs_lda_cython.c:14944:30: warning: unused function '__Pyx_c_is_zerof' [-Wunused-function]
      static CYTHON_INLINE int __Pyx_c_is_zerof(__pyx_t_float_complex a) {
                               ^
  skbayes/decomposition_models/gibbs_lda_cython.c:14947:48: warning: unused function '__Pyx_c_conjf' [-Wunused-function]
      static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conjf(__pyx_t_float_complex a) {
                                                 ^
  skbayes/decomposition_models/gibbs_lda_cython.c:14961:52: warning: unused function '__Pyx_c_powf' [-Wunused-function]
          static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_powf(__pyx_t_float_complex a, __pyx_t_float_complex b) {
                                                     ^
  skbayes/decomposition_models/gibbs_lda_cython.c:15021:49: warning: unused function '__pyx_t_double_complex_from_parts' [-Wunused-function]
      static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
                                                  ^
  skbayes/decomposition_models/gibbs_lda_cython.c:15032:30: warning: unused function '__Pyx_c_eq' [-Wunused-function]
      static CYTHON_INLINE int __Pyx_c_eq(__pyx_t_double_complex a, __pyx_t_double_complex b) {
                               ^
  skbayes/decomposition_models/gibbs_lda_cython.c:15035:49: warning: unused function '__Pyx_c_sum' [-Wunused-function]
      static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum(__pyx_t_double_complex a, __pyx_t_double_complex b) {
                                                  ^
  skbayes/decomposition_models/gibbs_lda_cython.c:15041:49: warning: unused function '__Pyx_c_diff' [-Wunused-function]
      static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff(__pyx_t_double_complex a, __pyx_t_double_complex b) {
                                                  ^
  skbayes/decomposition_models/gibbs_lda_cython.c:15053:49: warning: unused function '__Pyx_c_quot' [-Wunused-function]
      static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot(__pyx_t_double_complex a, __pyx_t_double_complex b) {
                                                  ^
  skbayes/decomposition_models/gibbs_lda_cython.c:15060:49: warning: unused function '__Pyx_c_neg' [-Wunused-function]
      static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg(__pyx_t_double_complex a) {
                                                  ^
  skbayes/decomposition_models/gibbs_lda_cython.c:15066:30: warning: unused function '__Pyx_c_is_zero' [-Wunused-function]
      static CYTHON_INLINE int __Pyx_c_is_zero(__pyx_t_double_complex a) {
                               ^
  skbayes/decomposition_models/gibbs_lda_cython.c:15069:49: warning: unused function '__Pyx_c_conj' [-Wunused-function]
      static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj(__pyx_t_double_complex a) {
                                                  ^
  skbayes/decomposition_models/gibbs_lda_cython.c:15083:53: warning: unused function '__Pyx_c_pow' [-Wunused-function]
          static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow(__pyx_t_double_complex a, __pyx_t_double_complex b) {
                                                      ^
  skbayes/decomposition_models/gibbs_lda_cython.c:9832:32: warning: unused function '__pyx_f_5numpy_PyArray_MultiIterNew1' [-Wunused-function]
  static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__pyx_v_a) {
                                 ^
  skbayes/decomposition_models/gibbs_lda_cython.c:9879:32: warning: unused function '__pyx_f_5numpy_PyArray_MultiIterNew2' [-Wunused-function]
  static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__pyx_v_a, PyObject *__pyx_v_b) {
                                 ^
  skbayes/decomposition_models/gibbs_lda_cython.c:9926:32: warning: unused function '__pyx_f_5numpy_PyArray_MultiIterNew3' [-Wunused-function]
  static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c) {
                                 ^
  skbayes/decomposition_models/gibbs_lda_cython.c:9973:32: warning: unused function '__pyx_f_5numpy_PyArray_MultiIterNew4' [-Wunused-function]
  static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d) {
                                 ^
  skbayes/decomposition_models/gibbs_lda_cython.c:10020:32: warning: unused function '__pyx_f_5numpy_PyArray_MultiIterNew5' [-Wunused-function]
  static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d, PyObject *__pyx_v_e) {
                                 ^
  skbayes/decomposition_models/gibbs_lda_cython.c:10822:27: warning: unused function '__pyx_f_5numpy_set_array_base' [-Wunused-function]
  static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_base) {
                            ^
  skbayes/decomposition_models/gibbs_lda_cython.c:10918:32: warning: unused function '__pyx_f_5numpy_get_array_base' [-Wunused-function]
  static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__pyx_v_arr) {
                                 ^
  36 warnings generated.
  clang -bundle -undefined dynamic_lookup -L/usr/local/opt/readline/lib -L/usr/local/opt/readline/lib -L/Users/simone/.pyenv/versions/3.7.3/lib -L/usr/local/opt/readline/lib -L/usr/local/opt/readline/lib -L/Users/simone/.pyenv/versions/3.7.3/lib build/temp.macosx-10.15-x86_64-3.7/skbayes/decomposition_models/gibbs_lda_cython.o -L/Users/simone/PycharmProjects/project/venv/lib/python3.7/site-packages/numpy/core/lib -lnpymath -o build/lib.macosx-10.15-x86_64-3.7/skbayes/decomposition_models/gibbs_lda_cython.cpython-37m-darwin.so
  building 'skbayes.hidden_markov_models.hmm' extension
  C compiler: clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include
  
  creating build/temp.macosx-10.15-x86_64-3.7/skbayes/hidden_markov_models
  compile options: '-I/Users/simone/PycharmProjects/project/venv/lib/python3.7/site-packages/numpy/core/include -I/Users/simone/PycharmProjects/project/venv/include -I/Users/simone/.pyenv/versions/3.7.3/include/python3.7m -c'
  extra options: '-O3'
  clang: skbayes/hidden_markov_models/hmm.c
  In file included from skbayes/hidden_markov_models/hmm.c:280:
  In file included from /Users/simone/PycharmProjects/project/venv/lib/python3.7/site-packages/numpy/core/include/numpy/arrayobject.h:4:
  In file included from /Users/simone/PycharmProjects/project/venv/lib/python3.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:12:
  In file included from /Users/simone/PycharmProjects/project/venv/lib/python3.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1832:
  /Users/simone/PycharmProjects/project/venv/lib/python3.7/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: "Using deprecated NumPy API, disable it with "          "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-W#warnings]
  #warning "Using deprecated NumPy API, disable it with " \
   ^
  skbayes/hidden_markov_models/hmm.c:28348:21: error: no member named 'exc_type' in 'struct _ts'
      *type = tstate->exc_type;
              ~~~~~~  ^
  skbayes/hidden_markov_models/hmm.c:28349:22: error: no member named 'exc_value' in 'struct _ts'; did you mean 'curexc_value'?
      *value = tstate->exc_value;
                       ^~~~~~~~~
                       curexc_value
  /Users/simone/.pyenv/versions/3.7.3/include/python3.7m/pystate.h:240:15: note: 'curexc_value' declared here
      PyObject *curexc_value;
                ^
  skbayes/hidden_markov_models/hmm.c:28350:19: error: no member named 'exc_traceback' in 'struct _ts'; did you mean 'curexc_traceback'?
      *tb = tstate->exc_traceback;
                    ^~~~~~~~~~~~~
                    curexc_traceback
  /Users/simone/.pyenv/versions/3.7.3/include/python3.7m/pystate.h:241:15: note: 'curexc_traceback' declared here
      PyObject *curexc_traceback;
                ^
  skbayes/hidden_markov_models/hmm.c:28357:24: error: no member named 'exc_type' in 'struct _ts'
      tmp_type = tstate->exc_type;
                 ~~~~~~  ^
  skbayes/hidden_markov_models/hmm.c:28358:25: error: no member named 'exc_value' in 'struct _ts'; did you mean 'curexc_value'?
      tmp_value = tstate->exc_value;
                          ^~~~~~~~~
                          curexc_value
  /Users/simone/.pyenv/versions/3.7.3/include/python3.7m/pystate.h:240:15: note: 'curexc_value' declared here
      PyObject *curexc_value;
                ^
  skbayes/hidden_markov_models/hmm.c:28359:22: error: no member named 'exc_traceback' in 'struct _ts'; did you mean 'curexc_traceback'?
      tmp_tb = tstate->exc_traceback;
                       ^~~~~~~~~~~~~
                       curexc_traceback
  /Users/simone/.pyenv/versions/3.7.3/include/python3.7m/pystate.h:241:15: note: 'curexc_traceback' declared here
      PyObject *curexc_traceback;
                ^
  skbayes/hidden_markov_models/hmm.c:28360:13: error: no member named 'exc_type' in 'struct _ts'
      tstate->exc_type = type;
      ~~~~~~  ^
  skbayes/hidden_markov_models/hmm.c:28361:13: error: no member named 'exc_value' in 'struct _ts'; did you mean 'curexc_value'?
      tstate->exc_value = value;
              ^~~~~~~~~
              curexc_value
  /Users/simone/.pyenv/versions/3.7.3/include/python3.7m/pystate.h:240:15: note: 'curexc_value' declared here
      PyObject *curexc_value;
                ^
  skbayes/hidden_markov_models/hmm.c:28362:13: error: no member named 'exc_traceback' in 'struct _ts'; did you mean 'curexc_traceback'?
      tstate->exc_traceback = tb;
              ^~~~~~~~~~~~~
              curexc_traceback
  /Users/simone/.pyenv/versions/3.7.3/include/python3.7m/pystate.h:241:15: note: 'curexc_traceback' declared here
      PyObject *curexc_traceback;
                ^
  skbayes/hidden_markov_models/hmm.c:28407:24: error: no member named 'exc_type' in 'struct _ts'
      tmp_type = tstate->exc_type;
                 ~~~~~~  ^
  skbayes/hidden_markov_models/hmm.c:28408:25: error: no member named 'exc_value' in 'struct _ts'; did you mean 'curexc_value'?
      tmp_value = tstate->exc_value;
                          ^~~~~~~~~
                          curexc_value
  /Users/simone/.pyenv/versions/3.7.3/include/python3.7m/pystate.h:240:15: note: 'curexc_value' declared here
      PyObject *curexc_value;
                ^
  skbayes/hidden_markov_models/hmm.c:28409:22: error: no member named 'exc_traceback' in 'struct _ts'; did you mean 'curexc_traceback'?
      tmp_tb = tstate->exc_traceback;
                       ^~~~~~~~~~~~~
                       curexc_traceback
  /Users/simone/.pyenv/versions/3.7.3/include/python3.7m/pystate.h:241:15: note: 'curexc_traceback' declared here
      PyObject *curexc_traceback;
                ^
  skbayes/hidden_markov_models/hmm.c:28410:13: error: no member named 'exc_type' in 'struct _ts'
      tstate->exc_type = local_type;
      ~~~~~~  ^
  skbayes/hidden_markov_models/hmm.c:28411:13: error: no member named 'exc_value' in 'struct _ts'; did you mean 'curexc_value'?
      tstate->exc_value = local_value;
              ^~~~~~~~~
              curexc_value
  /Users/simone/.pyenv/versions/3.7.3/include/python3.7m/pystate.h:240:15: note: 'curexc_value' declared here
      PyObject *curexc_value;
                ^
  skbayes/hidden_markov_models/hmm.c:28412:13: error: no member named 'exc_traceback' in 'struct _ts'; did you mean 'curexc_traceback'?
      tstate->exc_traceback = local_tb;
              ^~~~~~~~~~~~~
              curexc_traceback
  /Users/simone/.pyenv/versions/3.7.3/include/python3.7m/pystate.h:241:15: note: 'curexc_traceback' declared here
      PyObject *curexc_traceback;
                ^
  skbayes/hidden_markov_models/hmm.c:30306:24: error: no member named 'exc_type' in 'struct _ts'
      tmp_type = tstate->exc_type;
                 ~~~~~~  ^
  skbayes/hidden_markov_models/hmm.c:30307:25: error: no member named 'exc_value' in 'struct _ts'; did you mean 'curexc_value'?
      tmp_value = tstate->exc_value;
                          ^~~~~~~~~
                          curexc_value
  /Users/simone/.pyenv/versions/3.7.3/include/python3.7m/pystate.h:240:15: note: 'curexc_value' declared here
      PyObject *curexc_value;
                ^
  skbayes/hidden_markov_models/hmm.c:30308:22: error: no member named 'exc_traceback' in 'struct _ts'; did you mean 'curexc_traceback'?
      tmp_tb = tstate->exc_traceback;
                       ^~~~~~~~~~~~~
                       curexc_traceback
  /Users/simone/.pyenv/versions/3.7.3/include/python3.7m/pystate.h:241:15: note: 'curexc_traceback' declared here
      PyObject *curexc_traceback;
                ^
  skbayes/hidden_markov_models/hmm.c:30309:13: error: no member named 'exc_type' in 'struct _ts'
      tstate->exc_type = *type;
      ~~~~~~  ^
  fatal error: too many errors emitted, stopping now [-ferror-limit=]
  1 warning and 20 errors generated.
  error: Command "clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/Users/simone/PycharmProjects/project/venv/lib/python3.7/site-packages/numpy/core/include -I/Users/simone/PycharmProjects/project/venv/include -I/Users/simone/.pyenv/versions/3.7.3/include/python3.7m -c skbayes/hidden_markov_models/hmm.c -o build/temp.macosx-10.15-x86_64-3.7/skbayes/hidden_markov_models/hmm.o -O3" failed with exit status 1
  ----------------------------------------
  ERROR: Failed building wheel for skbayes
  Running setup.py clean for skbayes
Failed to build skbayes
Installing collected packages: skbayes
    Running setup.py install for skbayes ... error
    ERROR: Command errored out with exit status 1:
     command: /Users/simone/PycharmProjects/project/venv/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/dj/krrkt8p95qndhg46m2n774d80000gn/T/pip-req-build-97u7n087/setup.py'"'"'; __file__='"'"'/private/var/folders/dj/krrkt8p95qndhg46m2n774d80000gn/T/pip-req-build-97u7n087/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/dj/krrkt8p95qndhg46m2n774d80000gn/T/pip-record-5k3krs1g/install-record.txt --single-version-externally-managed --compile --install-headers /Users/simone/PycharmProjects/project/venv/include/site/python3.7/skbayes
         cwd: /private/var/folders/dj/krrkt8p95qndhg46m2n774d80000gn/T/pip-req-build-97u7n087/
    Complete output (275 lines):
    running install
    running build
    running build_py
    creating build
    creating build/lib.macosx-10.15-x86_64-3.7
    creating build/lib.macosx-10.15-x86_64-3.7/skbayes
    copying skbayes/__init__.py -> build/lib.macosx-10.15-x86_64-3.7/skbayes
    creating build/lib.macosx-10.15-x86_64-3.7/skbayes/decomposition_models
    copying skbayes/decomposition_models/__init__.py -> build/lib.macosx-10.15-x86_64-3.7/skbayes/decomposition_models
    copying skbayes/decomposition_models/rbm.py -> build/lib.macosx-10.15-x86_64-3.7/skbayes/decomposition_models
    creating build/lib.macosx-10.15-x86_64-3.7/skbayes/mixture_models
    copying skbayes/mixture_models/dpmixture.py -> build/lib.macosx-10.15-x86_64-3.7/skbayes/mixture_models
    copying skbayes/mixture_models/mixture.py -> build/lib.macosx-10.15-x86_64-3.7/skbayes/mixture_models
    copying skbayes/mixture_models/__init__.py -> build/lib.macosx-10.15-x86_64-3.7/skbayes/mixture_models
    creating build/lib.macosx-10.15-x86_64-3.7/skbayes/hidden_markov_models
    copying skbayes/hidden_markov_models/__init__.py -> build/lib.macosx-10.15-x86_64-3.7/skbayes/hidden_markov_models
    creating build/lib.macosx-10.15-x86_64-3.7/skbayes/rvm_ard_models
    copying skbayes/rvm_ard_models/fast_rvm.py -> build/lib.macosx-10.15-x86_64-3.7/skbayes/rvm_ard_models
    copying skbayes/rvm_ard_models/__init__.py -> build/lib.macosx-10.15-x86_64-3.7/skbayes/rvm_ard_models
    copying skbayes/rvm_ard_models/vrvm.py -> build/lib.macosx-10.15-x86_64-3.7/skbayes/rvm_ard_models
    creating build/lib.macosx-10.15-x86_64-3.7/skbayes/linear_models
    copying skbayes/linear_models/bayes_logistic.py -> build/lib.macosx-10.15-x86_64-3.7/skbayes/linear_models
    copying skbayes/linear_models/__init__.py -> build/lib.macosx-10.15-x86_64-3.7/skbayes/linear_models
    copying skbayes/linear_models/bayes_linear.py -> build/lib.macosx-10.15-x86_64-3.7/skbayes/linear_models
    running build_ext
    building 'skbayes.decomposition_models.gibbs_lda_cython' extension
    Warning: Can't read registry to find the necessary compiler setting
    Make sure that Python modules winreg, win32api or win32con are installed.
    C compiler: clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include
    
    creating build/temp.macosx-10.15-x86_64-3.7
    creating build/temp.macosx-10.15-x86_64-3.7/skbayes
    creating build/temp.macosx-10.15-x86_64-3.7/skbayes/decomposition_models
    compile options: '-I/Users/simone/PycharmProjects/project/venv/lib/python3.7/site-packages/numpy/core/include -I/Users/simone/PycharmProjects/project/venv/include -I/Users/simone/.pyenv/versions/3.7.3/include/python3.7m -c'
    extra options: '-O3'
    clang: skbayes/decomposition_models/gibbs_lda_cython.c
    In file included from skbayes/decomposition_models/gibbs_lda_cython.c:280:
    In file included from /Users/simone/PycharmProjects/project/venv/lib/python3.7/site-packages/numpy/core/include/numpy/arrayobject.h:4:
    In file included from /Users/simone/PycharmProjects/project/venv/lib/python3.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:12:
    In file included from /Users/simone/PycharmProjects/project/venv/lib/python3.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1832:
    /Users/simone/PycharmProjects/project/venv/lib/python3.7/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: "Using deprecated NumPy API, disable it with "          "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-W#warnings]
    #warning "Using deprecated NumPy API, disable it with " \
     ^
    In file included from skbayes/decomposition_models/gibbs_lda_cython.c:280:
    In file included from /Users/simone/PycharmProjects/project/venv/lib/python3.7/site-packages/numpy/core/include/numpy/arrayobject.h:4:
    In file included from /Users/simone/PycharmProjects/project/venv/lib/python3.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:21:
    /Users/simone/PycharmProjects/project/venv/lib/python3.7/site-packages/numpy/core/include/numpy/__multiarray_api.h:1463:1: warning: unused function '_import_array' [-Wunused-function]
    _import_array(void)
    ^
    skbayes/decomposition_models/gibbs_lda_cython.c:15698:28: warning: unused function '__Pyx_PyObject_AsString' [-Wunused-function]
    static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject* o) {
                               ^
    skbayes/decomposition_models/gibbs_lda_cython.c:15695:32: warning: unused function '__Pyx_PyUnicode_FromString' [-Wunused-function]
    static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
                                   ^
    skbayes/decomposition_models/gibbs_lda_cython.c:15810:33: warning: unused function '__Pyx_PyIndex_AsSsize_t' [-Wunused-function]
    static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
                                    ^
    skbayes/decomposition_models/gibbs_lda_cython.c:15872:33: warning: unused function '__Pyx_PyInt_FromSize_t' [-Wunused-function]
    static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
                                    ^
    skbayes/decomposition_models/gibbs_lda_cython.c:13196:32: warning: unused function '__Pyx_GetItemInt_List_Fast' [-Wunused-function]
    static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
                                   ^
    skbayes/decomposition_models/gibbs_lda_cython.c:13211:32: warning: unused function '__Pyx_GetItemInt_Tuple_Fast' [-Wunused-function]
    static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
                                   ^
    skbayes/decomposition_models/gibbs_lda_cython.c:14404:28: warning: unused function '__Pyx_CyFunction_InitDefaults' [-Wunused-function]
    static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *func, size_t size, int pyobjects) {
                               ^
    skbayes/decomposition_models/gibbs_lda_cython.c:14418:27: warning: unused function '__Pyx_CyFunction_SetDefaultsKwDict' [-Wunused-function]
    static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) {
                              ^
    skbayes/decomposition_models/gibbs_lda_cython.c:14423:27: warning: unused function '__Pyx_CyFunction_SetAnnotationsDict' [-Wunused-function]
    static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) {
                              ^
    skbayes/decomposition_models/gibbs_lda_cython.c:14899:48: warning: unused function '__pyx_t_float_complex_from_parts' [-Wunused-function]
        static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
                                                   ^
    skbayes/decomposition_models/gibbs_lda_cython.c:14910:30: warning: unused function '__Pyx_c_eqf' [-Wunused-function]
        static CYTHON_INLINE int __Pyx_c_eqf(__pyx_t_float_complex a, __pyx_t_float_complex b) {
                                 ^
    skbayes/decomposition_models/gibbs_lda_cython.c:14913:48: warning: unused function '__Pyx_c_sumf' [-Wunused-function]
        static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sumf(__pyx_t_float_complex a, __pyx_t_float_complex b) {
                                                   ^
    skbayes/decomposition_models/gibbs_lda_cython.c:14919:48: warning: unused function '__Pyx_c_difff' [-Wunused-function]
        static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_difff(__pyx_t_float_complex a, __pyx_t_float_complex b) {
                                                   ^
    skbayes/decomposition_models/gibbs_lda_cython.c:14931:48: warning: unused function '__Pyx_c_quotf' [-Wunused-function]
        static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quotf(__pyx_t_float_complex a, __pyx_t_float_complex b) {
                                                   ^
    skbayes/decomposition_models/gibbs_lda_cython.c:14938:48: warning: unused function '__Pyx_c_negf' [-Wunused-function]
        static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_negf(__pyx_t_float_complex a) {
                                                   ^
    skbayes/decomposition_models/gibbs_lda_cython.c:14944:30: warning: unused function '__Pyx_c_is_zerof' [-Wunused-function]
        static CYTHON_INLINE int __Pyx_c_is_zerof(__pyx_t_float_complex a) {
                                 ^
    skbayes/decomposition_models/gibbs_lda_cython.c:14947:48: warning: unused function '__Pyx_c_conjf' [-Wunused-function]
        static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conjf(__pyx_t_float_complex a) {
                                                   ^
    skbayes/decomposition_models/gibbs_lda_cython.c:14961:52: warning: unused function '__Pyx_c_powf' [-Wunused-function]
            static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_powf(__pyx_t_float_complex a, __pyx_t_float_complex b) {
                                                       ^
    skbayes/decomposition_models/gibbs_lda_cython.c:15021:49: warning: unused function '__pyx_t_double_complex_from_parts' [-Wunused-function]
        static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
                                                    ^
    skbayes/decomposition_models/gibbs_lda_cython.c:15032:30: warning: unused function '__Pyx_c_eq' [-Wunused-function]
        static CYTHON_INLINE int __Pyx_c_eq(__pyx_t_double_complex a, __pyx_t_double_complex b) {
                                 ^
    skbayes/decomposition_models/gibbs_lda_cython.c:15035:49: warning: unused function '__Pyx_c_sum' [-Wunused-function]
        static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum(__pyx_t_double_complex a, __pyx_t_double_complex b) {
                                                    ^
    skbayes/decomposition_models/gibbs_lda_cython.c:15041:49: warning: unused function '__Pyx_c_diff' [-Wunused-function]
        static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff(__pyx_t_double_complex a, __pyx_t_double_complex b) {
                                                    ^
    skbayes/decomposition_models/gibbs_lda_cython.c:15053:49: warning: unused function '__Pyx_c_quot' [-Wunused-function]
        static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot(__pyx_t_double_complex a, __pyx_t_double_complex b) {
                                                    ^
    skbayes/decomposition_models/gibbs_lda_cython.c:15060:49: warning: unused function '__Pyx_c_neg' [-Wunused-function]
        static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg(__pyx_t_double_complex a) {
                                                    ^
    skbayes/decomposition_models/gibbs_lda_cython.c:15066:30: warning: unused function '__Pyx_c_is_zero' [-Wunused-function]
        static CYTHON_INLINE int __Pyx_c_is_zero(__pyx_t_double_complex a) {
                                 ^
    skbayes/decomposition_models/gibbs_lda_cython.c:15069:49: warning: unused function '__Pyx_c_conj' [-Wunused-function]
        static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj(__pyx_t_double_complex a) {
                                                    ^
    skbayes/decomposition_models/gibbs_lda_cython.c:15083:53: warning: unused function '__Pyx_c_pow' [-Wunused-function]
            static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow(__pyx_t_double_complex a, __pyx_t_double_complex b) {
                                                        ^
    skbayes/decomposition_models/gibbs_lda_cython.c:9832:32: warning: unused function '__pyx_f_5numpy_PyArray_MultiIterNew1' [-Wunused-function]
    static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__pyx_v_a) {
                                   ^
    skbayes/decomposition_models/gibbs_lda_cython.c:9879:32: warning: unused function '__pyx_f_5numpy_PyArray_MultiIterNew2' [-Wunused-function]
    static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__pyx_v_a, PyObject *__pyx_v_b) {
                                   ^
    skbayes/decomposition_models/gibbs_lda_cython.c:9926:32: warning: unused function '__pyx_f_5numpy_PyArray_MultiIterNew3' [-Wunused-function]
    static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c) {
                                   ^
    skbayes/decomposition_models/gibbs_lda_cython.c:9973:32: warning: unused function '__pyx_f_5numpy_PyArray_MultiIterNew4' [-Wunused-function]
    static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d) {
                                   ^
    skbayes/decomposition_models/gibbs_lda_cython.c:10020:32: warning: unused function '__pyx_f_5numpy_PyArray_MultiIterNew5' [-Wunused-function]
    static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d, PyObject *__pyx_v_e) {
                                   ^
    skbayes/decomposition_models/gibbs_lda_cython.c:10822:27: warning: unused function '__pyx_f_5numpy_set_array_base' [-Wunused-function]
    static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_base) {
                              ^
    skbayes/decomposition_models/gibbs_lda_cython.c:10918:32: warning: unused function '__pyx_f_5numpy_get_array_base' [-Wunused-function]
    static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__pyx_v_arr) {
                                   ^
    36 warnings generated.
    clang -bundle -undefined dynamic_lookup -L/usr/local/opt/readline/lib -L/usr/local/opt/readline/lib -L/Users/simone/.pyenv/versions/3.7.3/lib -L/usr/local/opt/readline/lib -L/usr/local/opt/readline/lib -L/Users/simone/.pyenv/versions/3.7.3/lib build/temp.macosx-10.15-x86_64-3.7/skbayes/decomposition_models/gibbs_lda_cython.o -L/Users/simone/PycharmProjects/project/venv/lib/python3.7/site-packages/numpy/core/lib -lnpymath -o build/lib.macosx-10.15-x86_64-3.7/skbayes/decomposition_models/gibbs_lda_cython.cpython-37m-darwin.so
    building 'skbayes.hidden_markov_models.hmm' extension
    C compiler: clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include
    
    creating build/temp.macosx-10.15-x86_64-3.7/skbayes/hidden_markov_models
    compile options: '-I/Users/simone/PycharmProjects/project/venv/lib/python3.7/site-packages/numpy/core/include -I/Users/simone/PycharmProjects/project/venv/include -I/Users/simone/.pyenv/versions/3.7.3/include/python3.7m -c'
    extra options: '-O3'
    clang: skbayes/hidden_markov_models/hmm.c
    In file included from skbayes/hidden_markov_models/hmm.c:280:
    In file included from /Users/simone/PycharmProjects/project/venv/lib/python3.7/site-packages/numpy/core/include/numpy/arrayobject.h:4:
    In file included from /Users/simone/PycharmProjects/project/venv/lib/python3.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:12:
    In file included from /Users/simone/PycharmProjects/project/venv/lib/python3.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1832:
    /Users/simone/PycharmProjects/project/venv/lib/python3.7/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: "Using deprecated NumPy API, disable it with "          "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-W#warnings]
    #warning "Using deprecated NumPy API, disable it with " \
     ^
    skbayes/hidden_markov_models/hmm.c:28348:21: error: no member named 'exc_type' in 'struct _ts'
        *type = tstate->exc_type;
                ~~~~~~  ^
    skbayes/hidden_markov_models/hmm.c:28349:22: error: no member named 'exc_value' in 'struct _ts'; did you mean 'curexc_value'?
        *value = tstate->exc_value;
                         ^~~~~~~~~
                         curexc_value
    /Users/simone/.pyenv/versions/3.7.3/include/python3.7m/pystate.h:240:15: note: 'curexc_value' declared here
        PyObject *curexc_value;
                  ^
    skbayes/hidden_markov_models/hmm.c:28350:19: error: no member named 'exc_traceback' in 'struct _ts'; did you mean 'curexc_traceback'?
        *tb = tstate->exc_traceback;
                      ^~~~~~~~~~~~~
                      curexc_traceback
    /Users/simone/.pyenv/versions/3.7.3/include/python3.7m/pystate.h:241:15: note: 'curexc_traceback' declared here
        PyObject *curexc_traceback;
                  ^
    skbayes/hidden_markov_models/hmm.c:28357:24: error: no member named 'exc_type' in 'struct _ts'
        tmp_type = tstate->exc_type;
                   ~~~~~~  ^
    skbayes/hidden_markov_models/hmm.c:28358:25: error: no member named 'exc_value' in 'struct _ts'; did you mean 'curexc_value'?
        tmp_value = tstate->exc_value;
                            ^~~~~~~~~
                            curexc_value
    /Users/simone/.pyenv/versions/3.7.3/include/python3.7m/pystate.h:240:15: note: 'curexc_value' declared here
        PyObject *curexc_value;
                  ^
    skbayes/hidden_markov_models/hmm.c:28359:22: error: no member named 'exc_traceback' in 'struct _ts'; did you mean 'curexc_traceback'?
        tmp_tb = tstate->exc_traceback;
                         ^~~~~~~~~~~~~
                         curexc_traceback
    /Users/simone/.pyenv/versions/3.7.3/include/python3.7m/pystate.h:241:15: note: 'curexc_traceback' declared here
        PyObject *curexc_traceback;
                  ^
    skbayes/hidden_markov_models/hmm.c:28360:13: error: no member named 'exc_type' in 'struct _ts'
        tstate->exc_type = type;
        ~~~~~~  ^
    skbayes/hidden_markov_models/hmm.c:28361:13: error: no member named 'exc_value' in 'struct _ts'; did you mean 'curexc_value'?
        tstate->exc_value = value;
                ^~~~~~~~~
                curexc_value
    /Users/simone/.pyenv/versions/3.7.3/include/python3.7m/pystate.h:240:15: note: 'curexc_value' declared here
        PyObject *curexc_value;
                  ^
    skbayes/hidden_markov_models/hmm.c:28362:13: error: no member named 'exc_traceback' in 'struct _ts'; did you mean 'curexc_traceback'?
        tstate->exc_traceback = tb;
                ^~~~~~~~~~~~~
                curexc_traceback
    /Users/simone/.pyenv/versions/3.7.3/include/python3.7m/pystate.h:241:15: note: 'curexc_traceback' declared here
        PyObject *curexc_traceback;
                  ^
    skbayes/hidden_markov_models/hmm.c:28407:24: error: no member named 'exc_type' in 'struct _ts'
        tmp_type = tstate->exc_type;
                   ~~~~~~  ^
    skbayes/hidden_markov_models/hmm.c:28408:25: error: no member named 'exc_value' in 'struct _ts'; did you mean 'curexc_value'?
        tmp_value = tstate->exc_value;
                            ^~~~~~~~~
                            curexc_value
    /Users/simone/.pyenv/versions/3.7.3/include/python3.7m/pystate.h:240:15: note: 'curexc_value' declared here
        PyObject *curexc_value;
                  ^
    skbayes/hidden_markov_models/hmm.c:28409:22: error: no member named 'exc_traceback' in 'struct _ts'; did you mean 'curexc_traceback'?
        tmp_tb = tstate->exc_traceback;
                         ^~~~~~~~~~~~~
                         curexc_traceback
    /Users/simone/.pyenv/versions/3.7.3/include/python3.7m/pystate.h:241:15: note: 'curexc_traceback' declared here
        PyObject *curexc_traceback;
                  ^
    skbayes/hidden_markov_models/hmm.c:28410:13: error: no member named 'exc_type' in 'struct _ts'
        tstate->exc_type = local_type;
        ~~~~~~  ^
    skbayes/hidden_markov_models/hmm.c:28411:13: error: no member named 'exc_value' in 'struct _ts'; did you mean 'curexc_value'?
        tstate->exc_value = local_value;
                ^~~~~~~~~
                curexc_value
    /Users/simone/.pyenv/versions/3.7.3/include/python3.7m/pystate.h:240:15: note: 'curexc_value' declared here
        PyObject *curexc_value;
                  ^
    skbayes/hidden_markov_models/hmm.c:28412:13: error: no member named 'exc_traceback' in 'struct _ts'; did you mean 'curexc_traceback'?
        tstate->exc_traceback = local_tb;
                ^~~~~~~~~~~~~
                curexc_traceback
    /Users/simone/.pyenv/versions/3.7.3/include/python3.7m/pystate.h:241:15: note: 'curexc_traceback' declared here
        PyObject *curexc_traceback;
                  ^
    skbayes/hidden_markov_models/hmm.c:30306:24: error: no member named 'exc_type' in 'struct _ts'
        tmp_type = tstate->exc_type;
                   ~~~~~~  ^
    skbayes/hidden_markov_models/hmm.c:30307:25: error: no member named 'exc_value' in 'struct _ts'; did you mean 'curexc_value'?
        tmp_value = tstate->exc_value;
                            ^~~~~~~~~
                            curexc_value
    /Users/simone/.pyenv/versions/3.7.3/include/python3.7m/pystate.h:240:15: note: 'curexc_value' declared here
        PyObject *curexc_value;
                  ^
    skbayes/hidden_markov_models/hmm.c:30308:22: error: no member named 'exc_traceback' in 'struct _ts'; did you mean 'curexc_traceback'?
        tmp_tb = tstate->exc_traceback;
                         ^~~~~~~~~~~~~
                         curexc_traceback
    /Users/simone/.pyenv/versions/3.7.3/include/python3.7m/pystate.h:241:15: note: 'curexc_traceback' declared here
        PyObject *curexc_traceback;
                  ^
    skbayes/hidden_markov_models/hmm.c:30309:13: error: no member named 'exc_type' in 'struct _ts'
        tstate->exc_type = *type;
        ~~~~~~  ^
    fatal error: too many errors emitted, stopping now [-ferror-limit=]
    1 warning and 20 errors generated.
    error: Command "clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/Users/simone/PycharmProjects/project/venv/lib/python3.7/site-packages/numpy/core/include -I/Users/simone/PycharmProjects/project/venv/include -I/Users/simone/.pyenv/versions/3.7.3/include/python3.7m -c skbayes/hidden_markov_models/hmm.c -o build/temp.macosx-10.15-x86_64-3.7/skbayes/hidden_markov_models/hmm.o -O3" failed with exit status 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /Users/simone/PycharmProjects/project/venv/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/dj/krrkt8p95qndhg46m2n774d80000gn/T/pip-req-build-97u7n087/setup.py'"'"'; __file__='"'"'/private/var/folders/dj/krrkt8p95qndhg46m2n774d80000gn/T/pip-req-build-97u7n087/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/dj/krrkt8p95qndhg46m2n774d80000gn/T/pip-record-5k3krs1g/install-record.txt --single-version-externally-managed --compile --install-headers /Users/simone/PycharmProjects/project/venv/include/site/python3.7/skbayes Check the logs for full command output.

My env

OS X 10.15.6
Python 3.7.3
numpy==1.18.5
Apple clang version 12.0.0 (clang-1200.0.32.21)

Installation Fails on OSX 10.12.5 using Anaconda py2.7

Tried installing both from pip and using setup.py, got the following error message:

clang: error: linker command failed with exit code 1 (use -v to see invocation)
error: Command "/usr/bin/clang -bundle -undefined dynamic_lookup -arch i386 -arch x86_64 -g build/temp.macosx-10.6-intel-2.7/skbayes/decomposition_models/gibbs_lda_cython.o -L/usr/local/lib/python2.7/site-packages/numpy/core/lib -lnpymath -o build/lib.macosx-10.6-intel-2.7/skbayes/decomposition_models/gibbs_lda_cython.so" failed with exit status 1

'EBLinearRegression' object has no attribute '_center_data'

Hello,

I'm trying to use skbayes with the latest scikit-learn (0.18.x). It looks like self._center_data is no longer being used in sklearn:

from skbayes.linear_models import EBLinearRegression
EB = EBLinearRegression()

EB.fit(X,y)
Traceback (most recent call last):

  File "<ipython-input-30-cd5ea38985d5>", line 1, in <module>
    EB.fit(X,y)

  File "C:\Anaconda2\lib\site-packages\skbayes\linear_models\bayesian_regression.py", line 102, in fit
    X, y, X_mean, y_mean, X_std = self._center_data(X, y, self.fit_intercept,

AttributeError: 'EBLinearRegression' object has no attribute '_center_data'

Add Gaussian Mixture Emissions for VBHMM

Since there's already a Bayesian Mixture model implementation, it would be great if someone could extend the HMM implementation to include mixture emissions.

On a side note, is the n_hidden parameter in the HMM model deterministic or a maximum ala truncated HDP-HMM models? If the former, automatic state discovery would be nice but probably a lot more work.

Comparison of GMM with sklearn

I saw you implemented bayesian GMMs that are also in scikit-learn. Have you checked out the new versions? How do they compare to yours?

Variational Logistic Regression is too slow!

I was comparing Variational Logistic Regression and Relevance Vector Classifier, and though RVC seems to be more complicated model it is much faster to fit than Variational Bayesian Logistic Regression? Is there any implementation problems?

installation in windows 10 fails

great code thanks but
installation in windows 10 fails
Microsoft Windows [Version 10.0.17134.1130]

(c) 2018 Microsoft Corporation. All rights reserved.

D:\code\abcd\pip install https://github.com/AmazaspShumik/sklearn_bayes/archive/master.zip

Collecting https://github.com/AmazaspShumik/sklearn_bayes/archive/master.zip

Downloading https://github.com/AmazaspShumik/sklearn_bayes/archive/master.zip

    - 5.8MB 2.2MB/s

Requirement already satisfied: numpy>=1.9.2 in c:\users\ABCDFG\appdata\local\continuum\anaconda3\lib\site-packages (from skbayes==0.1.0a1) (1.17.3)

Requirement already satisfied: scipy>=0.15.1 in c:\users\ABCDFG\appdata\local\continuum\anaconda3\lib\site-packages (from skbayes==0.1.0a1) (1.1.0)

Requirement already satisfied: scikit-learn>=0.17 in c:\users\ABCDFG\appdata\local\continuum\anaconda3\lib\site-packages (from skbayes==0.1.0a1) (0.21.3)

Requirement already satisfied: cython>=0.24 in c:\users\ABCDFG\appdata\local\continuum\anaconda3\lib\site-packages (from skbayes==0.1.0a1) (0.28.2)

Requirement already satisfied: joblib>=0.11 in c:\users\ABCDFG\appdata\local\continuum\anaconda3\lib\site-packages (from scikit-learn>=0.17->skbayes==0.1.0a1) (0.13.2)

Building wheels for collected packages: skbayes

Building wheel for skbayes (setup.py) ... error

ERROR: Complete output from command 'C:\Users\ABCDFG\AppData\Local\Continuum\anaconda3\python.exe' -u -c 'import setuptools, tokenize;__file__='"'"'C:\\Users\\ABCDFG\\AppData\\Local\\Temp\\pip-req-build-l568up61\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\ABCDFG\AppData\Local\Temp\pip-wheel-bl0aft0m' --python-tag cp36:

ERROR: running bdist_wheel

running build

running build_py

creating build

creating build\lib.win-amd64-3.6

creating build\lib.win-amd64-3.6\skbayes

copying skbayes\__init__.py -> build\lib.win-amd64-3.6\skbayes

creating build\lib.win-amd64-3.6\skbayes\decomposition_models

copying skbayes\decomposition_models\rbm.py -> build\lib.win-amd64-3.6\skbayes\decomposition_models

copying skbayes\decomposition_models\__init__.py -> build\lib.win-amd64-3.6\skbayes\decomposition_models

creating build\lib.win-amd64-3.6\skbayes\hidden_markov_models

copying skbayes\hidden_markov_models\__init__.py -> build\lib.win-amd64-3.6\skbayes\hidden_markov_models

creating build\lib.win-amd64-3.6\skbayes\linear_models

copying skbayes\linear_models\bayes_linear.py -> build\lib.win-amd64-3.6\skbayes\linear_models

copying skbayes\linear_models\bayes_logistic.py -> build\lib.win-amd64-3.6\skbayes\linear_models

copying skbayes\linear_models\__init__.py -> build\lib.win-amd64-3.6\skbayes\linear_models

creating build\lib.win-amd64-3.6\skbayes\mixture_models

copying skbayes\mixture_models\dpmixture.py -> build\lib.win-amd64-3.6\skbayes\mixture_models

copying skbayes\mixture_models\mixture.py -> build\lib.win-amd64-3.6\skbayes\mixture_models

copying skbayes\mixture_models\__init__.py -> build\lib.win-amd64-3.6\skbayes\mixture_models

creating build\lib.win-amd64-3.6\skbayes\rvm_ard_models

copying skbayes\rvm_ard_models\fast_rvm.py -> build\lib.win-amd64-3.6\skbayes\rvm_ard_models

copying skbayes\rvm_ard_models\vrvm.py -> build\lib.win-amd64-3.6\skbayes\rvm_ard_models

copying skbayes\rvm_ard_models\__init__.py -> build\lib.win-amd64-3.6\skbayes\rvm_ard_models

running build_ext

No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils

building 'skbayes.decomposition_models.gibbs_lda_cython' extension

creating build\temp.win-amd64-3.6

creating build\temp.win-amd64-3.6\Release

creating build\temp.win-amd64-3.6\Release\skbayes

creating build\temp.win-amd64-3.6\Release\skbayes\decomposition_models

cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\\Users\\ABCDFG\\AppData\\Local\\Continuum\\anaconda3\\lib\\site-packages\\numpy\\core\\include -IC:\Users\ABCDFG\AppData\Local\Continuum\anaconda3\include -IC:\Users\ABCDFG\AppData\Local\Continuum\anaconda3\include /Tcskbayes/decomposition_models/gibbs_lda_cython.c /Fobuild\temp.win-amd64-3.6\Release\skbayes/decomposition_models/gibbs_lda_cython.obj -O3

error: Command "cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\\Users\\ABCDFG\\AppData\\Local\\Continuum\\anaconda3\\lib\\site-packages\\numpy\\core\\include -IC:\Users\ABCDFG\AppData\Local\Continuum\anaconda3\include -IC:\Users\ABCDFG\AppData\Local\Continuum\anaconda3\include /Tcskbayes/decomposition_models/gibbs_lda_cython.c /Fobuild\temp.win-amd64-3.6\Release\skbayes/decomposition_models/gibbs_lda_cython.obj -O3" failed with exit status 127

----------------------------------------

ERROR: Failed building wheel for skbayes

Running setup.py clean for skbayes

Failed to build skbayes

Installing collected packages: skbayes

Running setup.py install for skbayes ... error

    ERROR: Complete output from command 'C:\Users\ABCDFG\AppData\Local\Continuum\anaconda3\python.exe' -u -c 'import setuptools, tokenize;__file__='"'"'C:\\Users\\ABCDFG\\AppData\\Local\\Temp\\pip-req-build-l568up61\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\ABCDFG\AppData\Local\Temp\pip-record-v7us44gt\install-record.txt' --single-version-externally-managed --compile:

    ERROR: running install

    running build

    running build_py

    creating build

    creating build\lib.win-amd64-3.6

    creating build\lib.win-amd64-3.6\skbayes

    copying skbayes\__init__.py -> build\lib.win-amd64-3.6\skbayes

    creating build\lib.win-amd64-3.6\skbayes\decomposition_models

    copying skbayes\decomposition_models\rbm.py -> build\lib.win-amd64-3.6\skbayes\decomposition_models

    copying skbayes\decomposition_models\__init__.py -> build\lib.win-amd64-3.6\skbayes\decomposition_models

    creating build\lib.win-amd64-3.6\skbayes\hidden_markov_models

    copying skbayes\hidden_markov_models\__init__.py -> build\lib.win-amd64-3.6\skbayes\hidden_markov_models

    creating build\lib.win-amd64-3.6\skbayes\linear_models

    copying skbayes\linear_models\bayes_linear.py -> build\lib.win-amd64-3.6\skbayes\linear_models

    copying skbayes\linear_models\bayes_logistic.py -> build\lib.win-amd64-3.6\skbayes\linear_models

    copying skbayes\linear_models\__init__.py -> build\lib.win-amd64-3.6\skbayes\linear_models

    creating build\lib.win-amd64-3.6\skbayes\mixture_models

    copying skbayes\mixture_models\dpmixture.py -> build\lib.win-amd64-3.6\skbayes\mixture_models

    copying skbayes\mixture_models\mixture.py -> build\lib.win-amd64-3.6\skbayes\mixture_models

    copying skbayes\mixture_models\__init__.py -> build\lib.win-amd64-3.6\skbayes\mixture_models

    creating build\lib.win-amd64-3.6\skbayes\rvm_ard_models

    copying skbayes\rvm_ard_models\fast_rvm.py -> build\lib.win-amd64-3.6\skbayes\rvm_ard_models

    copying skbayes\rvm_ard_models\vrvm.py -> build\lib.win-amd64-3.6\skbayes\rvm_ard_models

    copying skbayes\rvm_ard_models\__init__.py -> build\lib.win-amd64-3.6\skbayes\rvm_ard_models

    running build_ext

    No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils

    building 'skbayes.decomposition_models.gibbs_lda_cython' extension

    creating build\temp.win-amd64-3.6

    creating build\temp.win-amd64-3.6\Release

    creating build\temp.win-amd64-3.6\Release\skbayes

    creating build\temp.win-amd64-3.6\Release\skbayes\decomposition_models

    cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\\Users\\ABCDFG\\AppData\\Local\\Continuum\\anaconda3\\lib\\site-packages\\numpy\\core\\include -IC:\Users\ABCDFG\AppData\Local\Continuum\anaconda3\include -IC:\Users\ABCDFG\AppData\Local\Continuum\anaconda3\include /Tcskbayes/decomposition_models/gibbs_lda_cython.c /Fobuild\temp.win-amd64-3.6\Release\skbayes/decomposition_models/gibbs_lda_cython.obj -O3

    error: Command "cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\\Users\\ABCDFG\\AppData\\Local\\Continuum\\anaconda3\\lib\\site-packages\\numpy\\core\\include -IC:\Users\ABCDFG\AppData\Local\Continuum\anaconda3\include -IC:\Users\ABCDFG\AppData\Local\Continuum\anaconda3\include /Tcskbayes/decomposition_models/gibbs_lda_cython.c /Fobuild\temp.win-amd64-3.6\Release\skbayes/decomposition_models/gibbs_lda_cython.obj -O3" failed with exit status 127

    ----------------------------------------

ERROR: Command "'C:\Users\ABCDFG\AppData\Local\Continuum\anaconda3\python.exe' -u -c 'import setuptools, tokenize;file='"'"'C:\Users\ABCDFG\AppData\Local\Temp\pip-req-build-l568up61\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record 'C:\Users\ABCDFG\AppData\Local\Temp\pip-record-v7us44gt\install-record.txt' --single-version-externally-managed --compile" failed with error code 1 in C:\Users\ABCDFG\AppData\Local\Temp\pip-req-build-l568up61\

D:\code\abcd

Add warm start option

Some of the scikit-learn bayesian models include a warm_start parameter, where results of previous fit() calls are used as priors for the next fit. This would speed up any repeated or online inference without needing to resort to full SVI.

For example, in the mixture module it is implemented by skipping new initializations as follows:

do_init = not(self.warm_start and hasattr(self, 'converged_'))  
(code from the mixture base class)

ARD and RVR: variance of predicitve distribution, take inverse?

Hello,
it seems that in the predict_dist functions, the variance output is calculated using this formula that seems true to me:
var=sigma^2+(K^T Sigma K)

In the code, sigma^2 (identified as alpha_) is directly the precision beta (in the fit method, self.alpha_ = beta). But the precision is usually the inverse of the variance (and seems to be calculated as the inverse of the variance, even in your initialization).

I think the code is good, just the predict_dist should be :
var_hat = 1./self.alpha_ ( and not var_hat = self._alpha)
var_hat += ...

If my thoughts are false, please do correct me!
Thank you again, I know looking back to your code must be time consuming...

Is the kernel produced for RVR correct?

I have an X training vector passed in that is of shape (2,2219), but the RVR fit() function calls RegressionARD's fit() using a kernel K that is of shape (7,7). This results in my coefficients (coef_) being of size 7, which doesn't seem correct since my n_features is 2219.

is there an error in the get_kernel function?

Thanks for the great package!

Not really an "issue", but just wanted to thank you for posting such a nicely done package. I am working on implementing MICE for Python and these models are very helpful.

verbose

I am not sure, but verbose works wrong:

from skbayes.rvm_ard_models import RVR

rvm = RVR(kernel = 'rbf', verbose=True, n_iter=300)
rvm.fit(X, y)

output:
Iteration: 0, number of features in the model: 2
Iteration: 1, number of features in the model: 3
Iteration: 2, number of features in the model: 4
Iteration: 3, number of features in the model: 5
Iteration: 4, number of features in the model: 6
Iteration: 5, number of features in the model: 7
Iteration: 6, number of features in the model: 8
Iteration: 7, number of features in the model: 9
Iteration: 8, number of features in the model: 10
Iteration: 9, number of features in the model: 11
Iteration: 10, number of features in the model: 12
Iteration: 11, number of features in the model: 13
Iteration: 12, number of features in the model: 14
Iteration: 13, number of features in the model: 15
Iteration: 14, number of features in the model: 16
Iteration: 15, number of features in the model: 17
Iteration: 16, number of features in the model: 18
Iteration: 17, number of features in the model: 19
Iteration: 18, number of features in the model: 20
Iteration: 19, number of features in the model: 21
Iteration: 20, number of features in the model: 22
Iteration: 21, number of features in the model: 23
Iteration: 22, number of features in the model: 24
Iteration: 23, number of features in the model: 25
Iteration: 24, number of features in the model: 26
Iteration: 25, number of features in the model: 27
Iteration: 26, number of features in the model: 28
Iteration: 27, number of features in the model: 29
Iteration: 28, number of features in the model: 30
Iteration: 29, number of features in the model: 31
Iteration: 30, number of features in the model: 32
Iteration: 31, number of features in the model: 33
Iteration: 32, number of features in the model: 34
Iteration: 33, number of features in the model: 35
Iteration: 34, number of features in the model: 36
Iteration: 35, number of features in the model: 37
Iteration: 36, number of features in the model: 38
Iteration: 37, number of features in the model: 39
Iteration: 38, number of features in the model: 40
Iteration: 39, number of features in the model: 41
Iteration: 40, number of features in the model: 42
Iteration: 41, number of features in the model: 43
Iteration: 42, number of features in the model: 44
Iteration: 43, number of features in the model: 45
Iteration: 44, number of features in the model: 46
Iteration: 45, number of features in the model: 47
Iteration: 46, number of features in the model: 48
Iteration: 47, number of features in the model: 49
Iteration: 48, number of features in the model: 50
Iteration: 49, number of features in the model: 51
Iteration: 50, number of features in the model: 52
Iteration: 51, number of features in the model: 53
Iteration: 52, number of features in the model: 54
Iteration: 53, number of features in the model: 55
Iteration: 54, number of features in the model: 56
Iteration: 55, number of features in the model: 57
Iteration: 56, number of features in the model: 58
Iteration: 57, number of features in the model: 59
Iteration: 58, number of features in the model: 60
Iteration: 59, number of features in the model: 61
Iteration: 60, number of features in the model: 62
Iteration: 61, number of features in the model: 63
Iteration: 62, number of features in the model: 64
Iteration: 63, number of features in the model: 65
Iteration: 64, number of features in the model: 66
Iteration: 65, number of features in the model: 67
Iteration: 66, number of features in the model: 68
Iteration: 67, number of features in the model: 69
Iteration: 68, number of features in the model: 70
Iteration: 69, number of features in the model: 71
Iteration: 70, number of features in the model: 72
Iteration: 71, number of features in the model: 73
Iteration: 72, number of features in the model: 74
Iteration: 73, number of features in the model: 75
Iteration: 74, number of features in the model: 76
Iteration: 75, number of features in the model: 77
Iteration: 76, number of features in the model: 78
Iteration: 77, number of features in the model: 79
Iteration: 78, number of features in the model: 80
Iteration: 79, number of features in the model: 81
Iteration: 80, number of features in the model: 82
Iteration: 81, number of features in the model: 83
Iteration: 82, number of features in the model: 84
Iteration: 83, number of features in the model: 85
Iteration: 84, number of features in the model: 86
Iteration: 85, number of features in the model: 87
Iteration: 86, number of features in the model: 88
Iteration: 87, number of features in the model: 89
Iteration: 88, number of features in the model: 90
Iteration: 89, number of features in the model: 91
Iteration: 90, number of features in the model: 92
Iteration: 91, number of features in the model: 93
Iteration: 92, number of features in the model: 94
Iteration: 93, number of features in the model: 95
Iteration: 94, number of features in the model: 96
Iteration: 95, number of features in the model: 97
Iteration: 96, number of features in the model: 98
Iteration: 97, number of features in the model: 99
Iteration: 98, number of features in the model: 100
Iteration: 99, number of features in the model: 101
Iteration: 100, number of features in the model: 102
Iteration: 101, number of features in the model: 103
Iteration: 102, number of features in the model: 104
Iteration: 103, number of features in the model: 105
Iteration: 104, number of features in the model: 106
Iteration: 105, number of features in the model: 107
Iteration: 106, number of features in the model: 108
Iteration: 107, number of features in the model: 109
Iteration: 108, number of features in the model: 110
Iteration: 109, number of features in the model: 111
Iteration: 110, number of features in the model: 112
Iteration: 111, number of features in the model: 113
Iteration: 112, number of features in the model: 114
Iteration: 113, number of features in the model: 115
Iteration: 114, number of features in the model: 116
Iteration: 115, number of features in the model: 117
Iteration: 116, number of features in the model: 118
Iteration: 117, number of features in the model: 119
Iteration: 118, number of features in the model: 120
Iteration: 119, number of features in the model: 121
Iteration: 120, number of features in the model: 122
Iteration: 121, number of features in the model: 123
Iteration: 122, number of features in the model: 124
Iteration: 123, number of features in the model: 125
Iteration: 124, number of features in the model: 126
Iteration: 125, number of features in the model: 127
Iteration: 126, number of features in the model: 128
Iteration: 127, number of features in the model: 129
Iteration: 128, number of features in the model: 130
Iteration: 129, number of features in the model: 131
Iteration: 130, number of features in the model: 132
Iteration: 131, number of features in the model: 133
Iteration: 132, number of features in the model: 134
Iteration: 133, number of features in the model: 135
Iteration: 134, number of features in the model: 136
Iteration: 135, number of features in the model: 137
Iteration: 136, number of features in the model: 138
Iteration: 137, number of features in the model: 139
Iteration: 138, number of features in the model: 140
Iteration: 139, number of features in the model: 141
Iteration: 140, number of features in the model: 142
Iteration: 141, number of features in the model: 143
Iteration: 142, number of features in the model: 144
Iteration: 143, number of features in the model: 145
Iteration: 144, number of features in the model: 146
Iteration: 145, number of features in the model: 147
Iteration: 146, number of features in the model: 148
Iteration: 147, number of features in the model: 149
Iteration: 148, number of features in the model: 150
Iteration: 149, number of features in the model: 151
Iteration: 150, number of features in the model: 152
Iteration: 151, number of features in the model: 153
Iteration: 152, number of features in the model: 154
Iteration: 153, number of features in the model: 155
Iteration: 154, number of features in the model: 156
Iteration: 155, number of features in the model: 157
Iteration: 156, number of features in the model: 158
Iteration: 157, number of features in the model: 159
Iteration: 158, number of features in the model: 160
Iteration: 159, number of features in the model: 161
Iteration: 160, number of features in the model: 162
Iteration: 161, number of features in the model: 163
Iteration: 162, number of features in the model: 164
Iteration: 163, number of features in the model: 165
Iteration: 164, number of features in the model: 166
Iteration: 165, number of features in the model: 167
Iteration: 166, number of features in the model: 168
Iteration: 167, number of features in the model: 169
Iteration: 168, number of features in the model: 170
Iteration: 169, number of features in the model: 171
Iteration: 170, number of features in the model: 172
Iteration: 171, number of features in the model: 173
Iteration: 172, number of features in the model: 174
Iteration: 173, number of features in the model: 175
Iteration: 174, number of features in the model: 176
Iteration: 175, number of features in the model: 177
Iteration: 176, number of features in the model: 178
Iteration: 177, number of features in the model: 179
Iteration: 178, number of features in the model: 180
Iteration: 179, number of features in the model: 181
Iteration: 180, number of features in the model: 182
Iteration: 181, number of features in the model: 183
Iteration: 182, number of features in the model: 184
Iteration: 183, number of features in the model: 185
Iteration: 184, number of features in the model: 186
Iteration: 185, number of features in the model: 187
Iteration: 186, number of features in the model: 188
Iteration: 187, number of features in the model: 189
Iteration: 188, number of features in the model: 190
Iteration: 189, number of features in the model: 191
Iteration: 190, number of features in the model: 192
Iteration: 191, number of features in the model: 193
Iteration: 192, number of features in the model: 194
Iteration: 193, number of features in the model: 195
Iteration: 194, number of features in the model: 196
Iteration: 195, number of features in the model: 197
Iteration: 196, number of features in the model: 198
Iteration: 197, number of features in the model: 199
Iteration: 198, number of features in the model: 200
Iteration: 199, number of features in the model: 201
Iteration: 200, number of features in the model: 202
Iteration: 201, number of features in the model: 203
Iteration: 202, number of features in the model: 204
Iteration: 203, number of features in the model: 205
Iteration: 204, number of features in the model: 206
Iteration: 205, number of features in the model: 207
Iteration: 206, number of features in the model: 208
Iteration: 207, number of features in the model: 209
Iteration: 208, number of features in the model: 210
Iteration: 209, number of features in the model: 211
Iteration: 210, number of features in the model: 212
Iteration: 211, number of features in the model: 213
Iteration: 212, number of features in the model: 214
Iteration: 213, number of features in the model: 215
Iteration: 214, number of features in the model: 216
Iteration: 215, number of features in the model: 217
Iteration: 216, number of features in the model: 218
Iteration: 217, number of features in the model: 219
Iteration: 218, number of features in the model: 220
Iteration: 219, number of features in the model: 221
Iteration: 220, number of features in the model: 222
Iteration: 221, number of features in the model: 223
Iteration: 222, number of features in the model: 224
Iteration: 223, number of features in the model: 225
Iteration: 224, number of features in the model: 226
Iteration: 225, number of features in the model: 227
Iteration: 226, number of features in the model: 228
Iteration: 227, number of features in the model: 229
Iteration: 228, number of features in the model: 230
Iteration: 229, number of features in the model: 231
Iteration: 230, number of features in the model: 232
Iteration: 231, number of features in the model: 233
Iteration: 232, number of features in the model: 234
Iteration: 233, number of features in the model: 235
Iteration: 234, number of features in the model: 236
Iteration: 235, number of features in the model: 237
Iteration: 236, number of features in the model: 238
Iteration: 237, number of features in the model: 239
Iteration: 238, number of features in the model: 240
Iteration: 239, number of features in the model: 241
Iteration: 240, number of features in the model: 242
Iteration: 241, number of features in the model: 243
Iteration: 242, number of features in the model: 244
Iteration: 243, number of features in the model: 245
Iteration: 244, number of features in the model: 246
Iteration: 245, number of features in the model: 247
Iteration: 246, number of features in the model: 248
Iteration: 247, number of features in the model: 249
Iteration: 248, number of features in the model: 250
Iteration: 249, number of features in the model: 251
Iteration: 250, number of features in the model: 252
Iteration: 251, number of features in the model: 253
Iteration: 252, number of features in the model: 254
Iteration: 253, number of features in the model: 255
Iteration: 254, number of features in the model: 256
Iteration: 255, number of features in the model: 257
Iteration: 256, number of features in the model: 258
Iteration: 257, number of features in the model: 259
Iteration: 258, number of features in the model: 260
Iteration: 259, number of features in the model: 261
Iteration: 260, number of features in the model: 262
Iteration: 261, number of features in the model: 263
Iteration: 262, number of features in the model: 264
Iteration: 263, number of features in the model: 265
Iteration: 264, number of features in the model: 266
Iteration: 265, number of features in the model: 267
Iteration: 266, number of features in the model: 268
Iteration: 267, number of features in the model: 269
Iteration: 268, number of features in the model: 270
Iteration: 269, number of features in the model: 271
Iteration: 270, number of features in the model: 272
Iteration: 271, number of features in the model: 273
Iteration: 272, number of features in the model: 274
Iteration: 273, number of features in the model: 275
Iteration: 274, number of features in the model: 276
Iteration: 275, number of features in the model: 277
Iteration: 276, number of features in the model: 278
Iteration: 277, number of features in the model: 279
Iteration: 278, number of features in the model: 280
Iteration: 279, number of features in the model: 281
Iteration: 280, number of features in the model: 282
Iteration: 281, number of features in the model: 283
Iteration: 282, number of features in the model: 284
Iteration: 283, number of features in the model: 285
Iteration: 284, number of features in the model: 286
Iteration: 285, number of features in the model: 287
Iteration: 286, number of features in the model: 288
Iteration: 287, number of features in the model: 289
Iteration: 288, number of features in the model: 290
Iteration: 289, number of features in the model: 291
Iteration: 290, number of features in the model: 292
Iteration: 291, number of features in the model: 293
Iteration: 292, number of features in the model: 294
Iteration: 293, number of features in the model: 295
Iteration: 294, number of features in the model: 296
Iteration: 295, number of features in the model: 297
Iteration: 296, number of features in the model: 298
Iteration: 297, number of features in the model: 299
Iteration: 298, number of features in the model: 300
Iteration: 299, number of features in the model: 301

Typo in VBLogisticRegression model

Hi there,

thank you for sharing your implementations! In the update of the variational distribution q(alpha) for the variational Bayesian logistic regression model, I believe there is a small mistake.

According to Eq. 10.179 in Bishop's book, we use the expectation of w^T w, and that is mu_N^T mu_N + trace(Sigma_N).
Therefore

(np.sum(w ** 2) + np.sum(Ri ** 2))

should be changed to

(np.sum(w ** 2) + np.trace(Ri ** 2))

and analogously in the line above.

Hope this helps!

RuntimeWarning: divide by zero encountered in divide

Hi

I met the following warning when I was tuning parameters for RVR.

fast_rvm.py:48: RuntimeWarning: divide by zero encountered in divide
deltaL[recompute] = Qrec
2 / (Srec + 1. / delta_alpha) - np.log(1 + Srec*delta_alpha)**

What is the potential reason for this warning?

Sampling from weights posterior for linear models

I was wondering if there is a clean way to sample from the posterior of weights for linear models. Specifically, I think EBLogisticRegression does not return the posterior covariance. Is that correct? I was wondering if there is a reason for that.

Installation with python3.8 returns error: PyThreadState

I am executing `` but I am getting the following errors. Thus, I have tried python setup.py build_ext -i from this link but I am still getting the same errors.

skbayes/hidden_markov_models/hmm.c:28348:21: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
28348 |     *type = tstate->exc_type;
      |                     ^~~~~~~~
      |                     curexc_type
skbayes/hidden_markov_models/hmm.c:28349:22: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
28349 |     *value = tstate->exc_value;
      |                      ^~~~~~~~~
      |                      curexc_value
skbayes/hidden_markov_models/hmm.c:28350:19: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
28350 |     *tb = tstate->exc_traceback;
      |                   ^~~~~~~~~~~~~
      |                   curexc_traceback
skbayes/hidden_markov_models/hmm.c: In function ‘__Pyx__ExceptionReset’:
skbayes/hidden_markov_models/hmm.c:28357:24: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
28357 |     tmp_type = tstate->exc_type;
      |                        ^~~~~~~~
      |                        curexc_type
skbayes/hidden_markov_models/hmm.c:28358:25: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
28358 |     tmp_value = tstate->exc_value;
      |                         ^~~~~~~~~
      |                         curexc_value
skbayes/hidden_markov_models/hmm.c:28359:22: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
28359 |     tmp_tb = tstate->exc_traceback;
      |                      ^~~~~~~~~~~~~
      |                      curexc_traceback
skbayes/hidden_markov_models/hmm.c:28360:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
28360 |     tstate->exc_type = type;
      |             ^~~~~~~~
      |             curexc_type
skbayes/hidden_markov_models/hmm.c:28361:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
28361 |     tstate->exc_value = value;
      |             ^~~~~~~~~
      |             curexc_value
skbayes/hidden_markov_models/hmm.c:28362:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
28362 |     tstate->exc_traceback = tb;
      |             ^~~~~~~~~~~~~
      |             curexc_traceback
skbayes/hidden_markov_models/hmm.c: In function ‘__Pyx__GetException’:
skbayes/hidden_markov_models/hmm.c:28407:24: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
28407 |     tmp_type = tstate->exc_type;
      |                        ^~~~~~~~
      |                        curexc_type
skbayes/hidden_markov_models/hmm.c:28408:25: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
28408 |     tmp_value = tstate->exc_value;
      |                         ^~~~~~~~~
      |                         curexc_value
skbayes/hidden_markov_models/hmm.c:28409:22: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
28409 |     tmp_tb = tstate->exc_traceback;
      |                      ^~~~~~~~~~~~~
      |                      curexc_traceback
skbayes/hidden_markov_models/hmm.c:28410:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
28410 |     tstate->exc_type = local_type;
      |             ^~~~~~~~
      |             curexc_type
skbayes/hidden_markov_models/hmm.c:28411:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
28411 |     tstate->exc_value = local_value;
      |             ^~~~~~~~~
      |             curexc_value
skbayes/hidden_markov_models/hmm.c:28412:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
28412 |     tstate->exc_traceback = local_tb;
      |             ^~~~~~~~~~~~~
      |             curexc_traceback
skbayes/hidden_markov_models/hmm.c: In function ‘__Pyx__ExceptionSwap’:
skbayes/hidden_markov_models/hmm.c:30306:24: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
30306 |     tmp_type = tstate->exc_type;
      |                        ^~~~~~~~
      |                        curexc_type
skbayes/hidden_markov_models/hmm.c:30307:25: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
30307 |     tmp_value = tstate->exc_value;
      |                         ^~~~~~~~~
      |                         curexc_value
skbayes/hidden_markov_models/hmm.c:30308:22: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
30308 |     tmp_tb = tstate->exc_traceback;
      |                      ^~~~~~~~~~~~~
      |                      curexc_traceback
skbayes/hidden_markov_models/hmm.c:30309:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
30309 |     tstate->exc_type = *type;
      |             ^~~~~~~~
      |             curexc_type
skbayes/hidden_markov_models/hmm.c:30310:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
30310 |     tstate->exc_value = *value;
      |             ^~~~~~~~~
      |             curexc_value
skbayes/hidden_markov_models/hmm.c:30311:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
30311 |     tstate->exc_traceback = *tb;
      |             ^~~~~~~~~~~~~
      |             curexc_traceback

Bug in RVC

So I've been experimenting with you code for a project I am working with. Great work on the implementation. It is much appreciated that you have taken the time to make this.

I might be using it wrong, but I think I found a bug in your code. Take a look at the following simple example:

>>> import skbayes.rvm_ard_models
>>> import numpy as np
>>> import matplotlib.pyplot as plt
>>> 
>>> rvm = skbayes.rvm_ard_models.RVC()
>>> rvm.fit([[-1], [1]], [0, 1])
RVC(coef0=1, degree=2, fit_intercept=True, gamma=None, kernel='rbf',
  kernel_params=None, n_iter=300, n_iter_solver=30, solver='lbfgs_b',
  tol=0.0001, tol_solver=1e-05, verbose=False)
>>>
>>> x = np.linspace(-5, 5, 200).reshape(200, 1)
>>> y = rvm.predict_proba(x)[:,0]
>>> plt.plot(y)
>>> plt.savefig("out.pdf")

The figure produced:
out.pdf

It looks like the aposteriori estimate only includes the [1] and not the [-1].

shape of coef_ attribute

I've been using the RVC model for binary classification and the shape of the coef_ and the active_ attribute after fitting is (1,n_samples) and not (n_features) what I had expected. What does the coef_ attribute represent here?

error for installation on Windows computer with python 3 and anaconda

    copying skbayes\rvm_ard_models_init_.py -> build\lib.win-amd64-3.5\skbaye
s\rvm_ard_models
    running build_ext
    No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying f
rom distutils
    building 'skbayes.decomposition_models.gibbs_lda_cython' extension
    creating build\temp.win-amd64-3.5
    creating build\temp.win-amd64-3.5\Release
    creating build\temp.win-amd64-3.5\Release\skbayes
    creating build\temp.win-amd64-3.5\Release\skbayes\decomposition_models
    cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Ic:\anaconda3\lib\site-packag
es\numpy\core\include -Ic:\anaconda3\include -Ic:\anaconda3\include /Tcskbaye
s/decomposition_models/gibbs_lda_cython.c /Fobuild\temp.win-amd64-3.5\Release\sk
bayes/decomposition_models/gibbs_lda_cython.obj -O3
    Could not locate executable cl.exe
    Executable cl.exe does not exist
 
    error: Command "cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Ic:\anaconda3\
lib\site-packages\numpy\core\include -Ic:\anaconda3\include -Ic:\anaconda3\i
nclude /Tcskbayes/decomposition_models/gibbs_lda_cython.c /Fobuild\temp.win-amd6
4-3.5\Release\skbayes/decomposition_models/gibbs_lda_cython.obj -O3" failed with
exit status 1

Loading the package

Hi,

I've not really been able to use the package yet. I have tried installing it using the pip installer, which did not work.

Instead, I have cloned the package and tried to do python setup.py install, which worked, but the code examples don't seem to work.

I realised that I have to probably import sklearn_bayes, but when I dir it, it contains nothing beyond:
['all',
'builtins',
'doc',
'file',
'name',
'package',
'path',
'version']

Am I doing something wrong?

Issues with near-singular data - ridge as solution?

Hello,

When fitting BayesianRegression with this data:

X = np.array([[ 0.1,  -0.1,  -0.2,   0.02],
 [ 0.3,  -0.3,  -0.6,   0.06],
 [ 0.4,  -0.4,  -0.8,   0.08],
 [ 0.5,  -0.5,  -1.,    0.1 ]])

Y = np.array([ 0.2,  0.6,  0.8,  1. ])

The returned parameters are pretty crazy:

Out[16]: 
{'bias_term': 0.65000000000000002,
 'precision': array([[  8.15645225e+31,  -8.15645225e+31,  -1.63129045e+32,
           1.63129045e+31],
        [ -8.15645225e+31,   8.15645225e+31,   1.63129045e+32,
          -1.63129045e+31],
        [ -1.63129045e+32,   1.63129045e+32,   3.26258090e+32,
          -3.26258090e+31],
        [  1.63129045e+31,  -1.63129045e+31,  -3.26258090e+31,
           3.26258090e+30]]),
 'weights': array([ 0.18599761, -0.34392501, -0.68785002,  0.47188674])}

The issue is that X is nearly singular. Using ridge regression can help in such cases - would it make sense to add a scaled identity to the covariance/precision somewhere along the line to deal with cases like this?

'BayesianLogisticRegression' object has no attribute '_mask_val'

Hi,
Is this a known issue?
Cant even run fit ....
blr=BayesianLogisticRegression(n_iter=300, tol=1e-5, fit_intercept=False, verbose=True)

clf.fit(X_train, y_train)
File "/Library/Python/2.7/site-packages/skbayes/linear_models/bayes_logistic.py", line 87, in fit
y_bin[~mask] = self._mask_val
AttributeError: 'BayesianLogisticRegression' object has no attribute '_mask_val'

pip install failed: ValueError: Unknown MS Compiler version 1900

I have failed to install the package, and the error is as follows:
......
File "c:\program files\anaconda3\lib\distutils\cygwinccompiler.py", line 86, in get_msvcr
raise ValueError("Unknown MS Compiler version %s " % msc_ver)
ValueError: Unknown MS Compiler version 1900

----------------------------------------

Command ""c:\program files\anaconda3\python.exe" -u -c "import setuptools, tokenize;file='C:\Users\yzzha\AppData\Local\Temp\pip-y2f74zoi-build\setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record C:\Users\yzzha\AppData\Local\Temp\pip-sejc_xfs-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\yzzha\AppData\Local\Temp\pip-y2f74zoi-build\

Can anyone tell me how to fix it?
Thanks.

What's the license?

I'd like to ask Kaggle to include this in their Python Docker image, but I can't figure out what the license is...

Thanks, Chad

pinvh deprecated in scikit-learn 0.19 removed in 0.21

utils.extmath.pinvh was deprecated in scikit-learn version 0.19 and removed in version 0.21. The following error therefore occurs when using scikit-lean >= 0.21:

~\AppData\Local\Continuum\anaconda3\envs\chemo2\lib\site-packages\skbayes\rvm_ard_models\fast_rvm.py in <module>
      5 from sklearn.utils import check_X_y,check_array,as_float_array
      6 from sklearn.utils.multiclass import check_classification_targets
----> 7 from sklearn.utils.extmath import pinvh,log_logistic,safe_sparse_dot
      8 from sklearn.metrics.pairwise import pairwise_kernels
      9 from sklearn.utils.validation import check_is_fitted

ImportError: cannot import name 'pinvh'

Installation python3.7 fails

Building wheel for skbayes (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: 'c:\users\xxxxx\appdata\local\programs\python\python37\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\xxxx\AppData\Local\Temp\pip-req-build-tkvmaq7f\setup.py'"'"'; file='"'"'C:\Users\xxxx\AppData\Local\Temp\pip-req-build-tkvmaq7f\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\xxxx\AppData\Local\Temp\pip-wheel-a5gqn_p3'
cwd: C:\Users\xxxx\AppData\Local\Temp\pip-req-build-tkvmaq7f\

predict_proba generating predictions > number of classes

I'm training my classifier using
clf = RVC(kernel = 'rbf')
clf.fit(embeddings, labelsNum)
were the number of labels = 10

When I inspect the clf I get this:
with open('RVC.pkl', 'r') as rvc:
le_rvc, clf_rvc = pickle.load(rvc)

array(['Ariel_Sharon', 'Colin_Powell', 'Donald_Rumsfeld', 'George_W_Bush',
       'Gerhard_Schroeder', 'Hugo_Chavez', 'Jean_Chretien',
       'John_Ashcroft', 'Junichiro_Koizumi', 'Tony_Blair'], 
      dtype='|S17')

Which is correct, 10 classes.

However, when I try to predict my test set by running this

predictions = clf.predict_proba(rep).ravel()
                maxI = np.argmax(predictions)
                person = le.inverse_transform(maxI)
                confidence = predictions[maxI]

the length of predictions is 20

Meaning that when
le.inverse_transform(maxI)
is called it fails if maxl is >10

I must be doing something wrong on my side, but is there a reason why the clf is predicting more values than needed?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.