Giter Club home page Giter Club logo

bnp's Introduction

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

bnp's People

Contributors

jstraub avatar

Stargazers

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

Watchers

 avatar

Forkers

vsmolyakov eglrp

bnp's Issues

WORKSPACE_HOME is not defined. You must tell CMake where to find WORKSPACE_HOME

ubgpu@ubgpu:/github/bnp$ export WORKSPACE_HOME=/home/ubgpu
ubgpu@ubgpu:
/github/bnp$
ubgpu@ubgpu:/github/bnp$
ubgpu@ubgpu:
/github/bnp$ cd build/
ubgpu@ubgpu:/github/bnp/build$ make
ubgpu@ubgpu:
/github/bnp/build$ cmake ..
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
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:
/github/bnp/build$

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.