jstraub / bnp Goto Github PK
View Code? Open in Web Editor NEWC++ code and Python wrappers for Inference on Bayesian Non-Parametric Models
License: MIT License
C++ code and Python wrappers for Inference on Bayesian Non-Parametric Models
License: MIT License
This repository contains - C++ code for Inference in a Hierarchical Dirichlet Process Model - Python code in python/ folder (need to do $ make install before python scripts are usable) - Code for testing some of the functions Requirements: - Boost.Random (tested with version 1.46) http://www.boost.org/doc/libs/1_52_0/doc/html/boost_random.html - Armadillo (tested with version 3.4.4) http://arma.sourceforge.net/ Install: - edit the CMakeLists.txt to point cmake to the boost and armadillo libraries. - mkdir build; cd build - cmake ..; make install
ubgpu@ubgpu:/github/bnp$ export WORKSPACE_HOME=/home/ubgpu/github/bnp$
ubgpu@ubgpu:
ubgpu@ubgpu:/github/bnp$/github/bnp$ cd build/
ubgpu@ubgpu:
ubgpu@ubgpu:/github/bnp/build$ make/github/bnp/build$ cmake ..
ubgpu@ubgpu:
Found python library: /usr/lib/x86_64-linux-gnu/libpython3.4m.so
Found python include: /usr/include/python3.4m
--- using WORKSPACE_HOME found in /home/ubgpu
-- Configuring done
-- Generating done
-- Build files have been written to: /home/ubgpu/github/bnp/build
ubgpu@ubgpu:/github/bnp/build$ make install/github/bnp/build$
Scanning dependencies of target bnp
[ 12%] Building CXX object CMakeFiles/bnp.dir/src/hdp_py.cpp.o
:0:1: error: macro names must be identifiers
In file included from /usr/include/python3.4m/numpy/ndarraytypes.h:1761:0,
from /usr/include/python3.4m/numpy/ndarrayobject.h:17,
from /home/ubgpu/github/bnp/./include/numpyArma.hpp:16,
from /home/ubgpu/github/bnp/./include/baseMeasure_py.hpp:6,
from /home/ubgpu/github/bnp/src/hdp_py.cpp:5:
/usr/include/python3.4m/numpy/npy_1_7_deprecated_api.h:15:2: warning: #warning "Using deprecated NumPy API, disable it by " "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
#warning "Using deprecated NumPy API, disable it by "
^
In file included from /home/ubgpu/github/bnp/./include/baseMeasure_py.hpp:5:0,
from /home/ubgpu/github/bnp/src/hdp_py.cpp:5:
/home/ubgpu/github/bnp/./include/baseMeasure.hpp: In member function ‘virtual void NIW::posterior(const NIW&)’:
/home/ubgpu/github/bnp/./include/baseMeasure.hpp:517:14: error: expected primary-expression before ‘;’ token
mDelta +=;
^
In file included from /usr/include/signal.h:342:0,
from /usr/include/python3.4m/pyfpe.h:129,
from /usr/include/python3.4m/Python.h:131,
from /usr/include/boost/python/detail/wrap_python.hpp:142,
from /usr/include/boost/python/detail/prefix.hpp:13,
from /usr/include/boost/python/args.hpp:8,
from /usr/include/boost/python.hpp:11,
from /home/ubgpu/github/bnp/./include/numpyArma.hpp:14,
from /home/ubgpu/github/bnp/./include/baseMeasure_py.hpp:6,
from /home/ubgpu/github/bnp/src/hdp_py.cpp:5:
/home/ubgpu/github/bnp/src/hdp_py.cpp: In function ‘void init_module_libbnp()’:
/usr/include/python3.4m/numpy/__multiarray_api.h:1708:35: error: return-statement with a value, in function returning 'void' [-fpermissive]
#define NUMPY_IMPORT_ARRAY_RETVAL NULL
^
/usr/include/python3.4m/numpy/__multiarray_api.h:1713:151: note: in expansion of macro ‘NUMPY_IMPORT_ARRAY_RETVAL’
#define import_array() {if (_import_array() < 0) {PyErr_Print(); PyErr_SetString(PyExc_ImportError, "numpy.core.multiarray failed to import"); return NUMPY_IMPORT_ARRAY_RETVAL; } }
^
/home/ubgpu/github/bnp/src/hdp_py.cpp:35:2: note: in expansion of macro ‘import_array’
import_array();
^
make[2]: *** [CMakeFiles/bnp.dir/src/hdp_py.cpp.o] Error 1
make[1]: *** [CMakeFiles/bnp.dir/all] Error 2
make: *** [all] Error 2
ubgpu@ubgpu:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.