Giter VIP home page Giter VIP logo

xbart's People

Contributors

adamsonbryant avatar andyliaw avatar jingyuhe avatar jmurray1022 avatar leereeves avatar maggiewang0614 avatar maggiewang14 avatar prhahn avatar saaryalov avatar socket778 avatar

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

xbart's Issues

pip install xbart : Failed building wheel

pip install xbart not working on windows 10...

Collecting xbart
Using cached xbart-0.1.8.tar.gz (212 kB)
Requirement already satisfied: numpy in c:\dev\anaconda3\lib\site-packages (from xbart) (1.18.5)
Building wheels for collected packages: xbart
Building wheel for xbart (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: 'C:\Dev\Anaconda3\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\abdcfr\AppData\Local\Temp\pip-install-95a7cxhq\xbart\setup.py'"'"'; file='"'"'C:\Users\abdcfr\AppData\Local\Temp\pip-install-95a7cxhq\xbart\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\abdcfr\AppData\Local\Temp\pip-wheel-87p0nsz1'
cwd: C:\Users\abdcfr\AppData\Local\Temp\pip-install-95a7cxhq\xbart
Complete output (1336 lines):
running bdist_wheel
running build
running build_py
file xbart.py (for module xbart) not found
creating build
creating build\lib.win-amd64-3.8
creating build\lib.win-amd64-3.8\xbart
copying xbart\xbart_cpp_.py -> build\lib.win-amd64-3.8\xbart
copying xbart\xbart_python.py -> build\lib.win-amd64-3.8\xbart
copying xbart_init_.py -> build\lib.win-amd64-3.8\xbart
file xbart.py (for module xbart) not found
running build_ext
building 'xbart_cpp' extension
creating build\temp.win-amd64-3.8
creating build\temp.win-amd64-3.8\Release
creating build\temp.win-amd64-3.8\Release\xbart
creating build\temp.win-amd64-3.8\Release\src
C:\Dev\Anaconda3\Library\mingw-w64\bin\gcc.exe -mdll -O -Wall -DMS_WIN64 -IC:\Dev\Anaconda3\lib\site-packages\numpy\core\include -I. -Isrc -Ixbart -IC:\Dev\Anaconda3\lib\site-packages\numpy\core\include -I. -Isrc -Ixbart -IC:\Dev\Anaconda3\include -IC:\Dev\Anaconda3\include -c xbart/xbart_wrap.cxx -o build\temp.win-amd64-3.8\Release\xbart\xbart_wrap.o
In file included from C:/Dev/Anaconda3/Library/mingw-w64/include/c++/5.3.0/random:35:0,
from src/common.h:33,
from src/tree.h:7,
from src/mcmc_loop.h:2,
from xbart/xbart.h:3,
from xbart/xbart_wrap.cxx:2773:
C:/Dev/Anaconda3/Library/mingw-w64/include/c++/5.3.0/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support is currently experimental, and must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
#error This file requires compiler and library support for the
^
In file included from src/tree.h:9:0,
from src/mcmc_loop.h:2,
from xbart/xbart.h:3,
from xbart/xbart_wrap.cxx:2773:
src/model.h:76:5: warning: identifier 'nullptr' is a keyword in C++11 [-Wc++0x-compat]
virtual Model clone() { return nullptr; };
^
In file included from src/tree.h:12:0,
from src/mcmc_loop.h:2,
from xbart/xbart.h:3,
from xbart/xbart_wrap.cxx:2773:
src/json.h:99:5: warning: identifier 'constexpr' is a keyword in C++11 [-Wc++0x-compat]
constexpr operator size_t() const
^
src/json.h:149:5: warning: identifier 'noexcept' is a keyword in C++11 [-Wc++0x-compat]
const char
what() const noexcept override
^
In file included from src/tree.h:12:0,
from src/mcmc_loop.h:2,
from xbart/xbart.h:3,
from xbart/xbart_wrap.cxx:2773:
src/json.h:936:1: warning: identifier 'decltype' is a keyword in C++11 [-Wc++0x-compat]
using to_json_function = decltype(T::to_json(std::declval()...));
^
In file included from src/tree.h:12:0,
from src/mcmc_loop.h:2,
from xbart/xbart.h:3,
from xbart/xbart_wrap.cxx:2773:
src/json.h:2634:9: warning: identifier 'static_assert' is a keyword in C++11 [-Wc++0x-compat]
static_assert(
^
In file included from src/tree.h:7:0,
from src/mcmc_loop.h:2,
from xbart/xbart.h:3,
from xbart/xbart_wrap.cxx:2773:
src/common.h:71:81: error: '>>' should be '> >' within a nested template argument list
std::ostream &operator<<(std::ostream &out, const std::vector<std::vector> &v);
^
src/common.h:72:81: error: '>>' should be '> >' within a nested template argument list
std::ostream &operator<<(std::ostream &out, const std::vector<std::vector<size_t>> &v);
^
src/common.h:78:1: error: expected unqualified-id before 'using'
using matrix = std::vector<std::vector>;
^
In file included from src/utility.h:6:0,
from src/sample_int_crank.h:4,
from src/tree.h:8,
from src/mcmc_loop.h:2,
from xbart/xbart.h:3,
from xbart/xbart_wrap.cxx:2773:
src/thread_pool.h:24:10: error: 'atomic' in namespace 'std' does not name a template type
std::atomic done;
^
src/thread_pool.h:25:10: error: 'condition_variable' in namespace 'std' does not name a type
std::condition_variable changed;
^
src/thread_pool.h:28:58: warning: defaulted and deleted functions only available with -std=c++11 or -std=gnu++11
ThreadPoolTaskStatus(const ThreadPoolTaskStatus &) = delete;
^
src/thread_pool.h: In constructor 'ThreadPoolTaskStatus::ThreadPoolTaskStatus()':
src/thread_pool.h:23:37: error: class 'ThreadPoolTaskStatus' does not have any field named 'done'
inline ThreadPoolTaskStatus() : done(false){};
^
src/thread_pool.h: At global scope:
src/thread_pool.h:49:29: warning: variadic templates only available with -std=c++11 or -std=gnu++11
template <class F, class... Args>
^
src/thread_pool.h:50:5: warning: 'auto' changes meaning in C++11; please remove it [-Wc++0x-compat]
auto add_task(F &&f, Args &&... args)
^
src/thread_pool.h:50:21: error: expected ',' or '...' before '&&' token
auto add_task(F &&f, Args &&... args)
^
src/thread_pool.h:51:17: error: 'future' in namespace 'std' does not name a template type
-> std::future<typename std::result_of<F(Args...)>::type>
^
src/thread_pool.h:51:23: error: expected initializer before '<' token
-> std::future<typename std::result_of<F(Args...)>::type>
^
src/thread_pool.h:103:17: error: 'thread' is not a member of 'std'
std::vectorstd::thread threads;
^
src/thread_pool.h:103:17: error: 'thread' is not a member of 'std'
src/thread_pool.h:103:28: error: template argument 1 is invalid
std::vectorstd::thread threads;
^
src/thread_pool.h:103:28: error: template argument 2 is invalid
src/thread_pool.h:104:16: error: 'shared_ptr' is not a member of 'std'
std::queue<std::shared_ptr> statuses;
^
src/thread_pool.h:104:16: error: 'shared_ptr' is not a member of 'std'
src/thread_pool.h:104:55: error: 'statuses' was not declared in this scope
std::queue<std::shared_ptr> statuses;
^
src/thread_pool.h:104:55: error: template argument 1 is invalid
src/thread_pool.h:104:55: error: template argument 2 is invalid
src/thread_pool.h:105:16: error: 'function' is not a member of 'std'
std::queue<std::function<void()>> tasks;
^
src/thread_pool.h:105:16: error: 'function' is not a member of 'std'
src/thread_pool.h:105:35: error: a call to a constructor cannot appear in a constant-expression
std::queue<std::function<void()>> tasks;
^
src/thread_pool.h:105:39: error: 'tasks' was not declared in this scope
std::queue<std::function<void()>> tasks;
^
src/thread_pool.h:105:39: error: template argument 1 is invalid
src/thread_pool.h:105:39: error: template argument 2 is invalid
src/thread_pool.h:108:10: error: 'mutex' in namespace 'std' does not name a type
std::mutex pool_mutex;
^
src/thread_pool.h:109:10: error: 'condition_variable' in namespace 'std' does not name a type
std::condition_variable wake_worker;
^
src/thread_pool.h:110:10: error: 'atomic' in namespace 'std' does not name a template type
std::atomic stopping;
^
src/thread_pool.h: In constructor 'ThreadPool::ThreadPool()':
src/thread_pool.h:34:27: error: class 'ThreadPool' does not have any field named 'stopping'
inline ThreadPool() : stopping(false){};
^
src/thread_pool.h: In member function 'bool ThreadPool::is_active()':
src/thread_pool.h💯39: error: 'stopping' was not declared in this scope
inline bool is_active() { return !stopping && threads.size() > 0; }
^
src/thread_pool.h💯59: error: request for member 'size' in '((ThreadPool*)this)->ThreadPool::threads', which is of non-class type 'int'
inline bool is_active() { return !stopping && threads.size() > 0; }
^
In file included from src/sample_int_crank.h:4:0,
from src/tree.h:8,
from src/mcmc_loop.h:2,
from xbart/xbart.h:3,
from xbart/xbart_wrap.cxx:2773:
src/utility.h: At global scope:
src/utility.h:19:17: error: variable or field 'ini_matrix' declared void
void ini_matrix(matrix &matrix, size_t N, size_t p)
^
src/utility.h:19:17: error: 'matrix' was not declared in this scope
src/utility.h:19:25: error: expected primary-expression before '>' token
void ini_matrix(matrix &matrix, size_t N, size_t p)
^
src/utility.h:19:28: error: 'matrix' was not declared in this scope
void ini_matrix(matrix &matrix, size_t N, size_t p)
^
src/utility.h:19:43: error: expected primary-expression before 'N'
void ini_matrix(matrix &matrix, size_t N, size_t p)
^
src/utility.h:19:53: error: expected primary-expression before 'p'
void ini_matrix(matrix &matrix, size_t N, size_t p)
^
src/utility.h:31:16: error: variable or field 'ini_xinfo' declared void
void ini_xinfo(matrix &X, size_t N, size_t p);
^
src/utility.h:31:16: error: 'matrix' was not declared in this scope
src/utility.h:31:23: error: expected primary-expression before 'double'
void ini_xinfo(matrix &X, size_t N, size_t p);
^
src/utility.h:31:42: error: expected primary-expression before 'N'
void ini_xinfo(matrix &X, size_t N, size_t p);
^
src/utility.h:31:52: error: expected primary-expression before 'p'
void ini_xinfo(matrix &X, size_t N, size_t p);
^
src/utility.h:33:16: error: variable or field 'ini_xinfo' declared void
void ini_xinfo(matrix &X, size_t N, size_t p, double var);
^
src/utility.h:33:16: error: 'matrix' was not declared in this scope
src/utility.h:33:23: error: expected primary-expression before 'double'
void ini_xinfo(matrix &X, size_t N, size_t p, double var);
^
src/utility.h:33:42: error: expected primary-expression before 'N'
void ini_xinfo(matrix &X, size_t N, size_t p, double var);
^
src/utility.h:33:52: error: expected primary-expression before 'p'
void ini_xinfo(matrix &X, size_t N, size_t p, double var);
^
src/utility.h:33:55: error: expected primary-expression before 'double'
void ini_xinfo(matrix &X, size_t N, size_t p, double var);
^
src/utility.h:36:22: error: variable or field 'ini_xinfo_sizet' declared void
void ini_xinfo_sizet(matrix<size_t> &X, size_t N, size_t p);
^
src/utility.h:36:22: error: 'matrix' was not declared in this scope
src/utility.h:36:35: error: expected primary-expression before '>' token
void ini_xinfo_sizet(matrix<size_t> &X, size_t N, size_t p);
^
src/utility.h:36:38: error: 'X' was not declared in this scope
void ini_xinfo_sizet(matrix<size_t> &X, size_t N, size_t p);
^
src/utility.h:36:48: error: expected primary-expression before 'N'
void ini_xinfo_sizet(matrix<size_t> &X, size_t N, size_t p);
^
src/utility.h:36:58: error: expected primary-expression before 'p'
void ini_xinfo_sizet(matrix<size_t> &X, size_t N, size_t p);
^
src/utility.h:38:14: error: variable or field 'row_sum' declared void
void row_sum(matrix &X, std::vector &output);
^
src/utility.h:38:14: error: 'matrix' was not declared in this scope
src/utility.h:38:21: error: expected primary-expression before 'double'
void row_sum(matrix &X, std::vector &output);
^
src/utility.h:38:53: error: expected primary-expression before '&' token
void row_sum(matrix &X, std::vector &output);
^
src/utility.h:38:54: error: 'output' was not declared in this scope
void row_sum(matrix &X, std::vector &output);
^
src/utility.h:40:14: error: variable or field 'col_sum' declared void
void col_sum(matrix &X, std::vector &output);
^
src/utility.h:40:14: error: 'matrix' was not declared in this scope
src/utility.h:40:21: error: expected primary-expression before 'double'
void col_sum(matrix &X, std::vector &output);
^
src/utility.h:40:53: error: expected primary-expression before '&' token
void col_sum(matrix &X, std::vector &output);
^
src/utility.h:40:54: error: 'output' was not declared in this scope
void col_sum(matrix &X, std::vector &output);
^
src/utility.h: In function 'std::vector sort_indexes(const std::vector<_Tp>&)':
src/utility.h:123:35: error: there are no arguments to 'iota' that depend on a template parameter, so a declaration of 'iota' must be available [-fpermissive]
iota(idx.begin(), idx.end(), 0);
^
src/utility.h:123:35: note: (if you use '-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated)
src/utility.h:130:10: warning: lambda expressions only available with -std=c++11 or -std=gnu++11
});
^
src/utility.h: At global scope:
src/utility.h:139:50: error: 'matrix' has not been declared
void unique_value_count2(const double *Xpointer, matrix<size_t> &Xorder_std, std::vector &X_values, std::vector<size_t> &X_counts, std::vector<size_t> &variable_ind, size_t &total_points, std::vector<size_t> &X_num_unique, size_t &p_categorical, size_t &p_continuous);
^
src/utility.h:139:56: error: expected ',' or '...' before '<' token
void unique_value_count2(const double *Xpointer, matrix<size_t> &Xorder_std, std::vector &X_values, std::vector<size_t> &X_counts, std::vector<size_t> &variable_ind, size_t &total_points, std::vector<size_t> &X_num_unique, size_t &p_categorical, size_t &p_continuous);
^
In file included from src/tree.h:8:0,
from src/mcmc_loop.h:2,
from xbart/xbart.h:3,
from xbart/xbart_wrap.cxx:2773:
src/sample_int_crank.h:16:87: error: 'std::mt19937' has not been declared
std::vector<size_t> sample_int_ccrank(int n, int size, std::vector prob, std::mt19937 &gen);
^
In file included from src/model.h:8:0,
from src/tree.h:9,
from src/mcmc_loop.h:2,
from xbart/xbart.h:3,
from xbart/xbart_wrap.cxx:2773:
src/state.h:16:5: error: 'matrix' does not name a type
matrix residual_std;
^
src/state.h:20:10: error: 'random_device' in namespace 'std' does not name a type
std::random_device rd;
^
src/state.h:21:10: error: 'mt19937' in namespace 'std' does not name a type
std::mt19937 gen;
^
src/state.h:22:10: error: 'discrete_distribution' in namespace 'std' does not name a template type
std::discrete_distribution<> d;
^
src/state.h:25:5: error: 'matrix' does not name a type
matrix split_count_all_tree;
^
src/state.h:30:20: warning: non-static data member initializers only available with -std=c++11 or -std=gnu++11
bool use_all = true;
^
src/state.h:61:35: error: 'matrix' has not been declared
State(const double *Xpointer, matrix<size_t> &Xorder_std, size_t N, size_t p, size_t num_trees, size_t p_categorical, size_t p_continuous, bool set_random_seed, size_t random_seed, size_t n_min, size_t n_cutpoints, bool parallel, size_t mtry, const double *X_std, size_t num_sweeps, bool sample_weights_flag, std::vector *y_std, double sigma, size_t max_depth, double ini_var_yhat, size_t burnin, size_t dim_residual)
^
src/state.h:61:41: error: expected ',' or '...' before '<' token
State(const double *Xpointer, matrix<size_t> &Xorder_std, size_t N, size_t p, size_t num_trees, size_t p_categorical, size_t p_continuous, bool set_random_seed, size_t random_seed, size_t n_min, size_t n_cutpoints, bool parallel, size_t mtry, const double *X_std, size_t num_sweeps, bool sample_weights_flag, std::vector y_std, double sigma, size_t max_depth, double ini_var_yhat, size_t burnin, size_t dim_residual)
^
In file included from src/model.h:8:0,
from src/tree.h:9,
from src/mcmc_loop.h:2,
from xbart/xbart.h:3,
from xbart/xbart_wrap.cxx:2773:
src/state.h: In constructor 'State::State(const double
, int)':
src/state.h:74:26: error: 'class State' has no member named 'residual_std'
ini_matrix(this->residual_std, N, dim_residual);
^
src/state.h:74:40: error: 'N' was not declared in this scope
ini_matrix(this->residual_std, N, dim_residual);
^
src/state.h:74:55: error: 'ini_matrix' was not declared in this scope
ini_matrix(this->residual_std, N, dim_residual);
^
src/state.h:78:15: error: 'class State' has no member named 'gen'
this->gen = std::mt19937(rd());
^
src/state.h:78:21: error: 'mt19937' is not a member of 'std'
this->gen = std::mt19937(rd());
^
src/state.h:78:37: error: 'rd' was not declared in this scope
this->gen = std::mt19937(rd());
^
src/state.h:79:13: error: 'set_random_seed' was not declared in this scope
if (set_random_seed)
^
src/state.h:81:13: error: 'gen' was not declared in this scope
gen.seed(random_seed);
^
src/state.h:81:22: error: 'random_seed' was not declared in this scope
gen.seed(random_seed);
^
src/state.h:83:15: error: 'class State' has no member named 'd'
this->d = std::discrete_distribution<>(prob.begin(), prob.end());
^
src/state.h:83:19: error: 'discrete_distribution' is not a member of 'std'
this->d = std::discrete_distribution<>(prob.begin(), prob.end());
^
src/state.h:83:46: error: expected primary-expression before '>' token
this->d = std::discrete_distribution<>(prob.begin(), prob.end());
^
src/state.h:86:25: error: 'class State' has no member named 'split_count_all_tree'
ini_xinfo(this->split_count_all_tree, p, num_trees);
^
src/state.h:86:59: error: 'ini_xinfo' was not declared in this scope
ini_xinfo(this->split_count_all_tree, p, num_trees);
^
src/state.h: In member function 'void State::update_split_counts(size_t)':
src/state.h:115:9: error: 'split_count_all_tree' was not declared in this scope
split_count_all_tree[tree_ind] = split_count_current_tree;
^
src/state.h: At global scope:
src/state.h:125:41: error: 'matrix' has not been declared
NormalState(const double *Xpointer, matrix<size_t> &Xorder_std, size_t N, size_t p, size_t num_trees, size_t p_categorical, size_t p_continuous, bool set_random_seed, size_t random_seed, size_t n_min, size_t n_cutpoints, bool parallel, size_t mtry, const double *X_std, size_t num_sweeps, bool sample_weights_flag, std::vector *y_std, double sigma, size_t max_depth, double ini_var_yhat, size_t burnin, size_t dim_residual) : State(Xpointer, Xorder_std, N, p, num_trees, p_categorical, p_continuous, set_random_seed, random_seed, n_min, n_cutpoints, parallel, mtry, X_std, num_sweeps, sample_weights_flag, y_std, sigma, max_depth, ini_var_yhat, burnin, dim_residual)
^
src/state.h:125:47: error: expected ',' or '...' before '<' token
NormalState(const double *Xpointer, matrix<size_t> &Xorder_std, size_t N, size_t p, size_t num_trees, size_t p_categorical, size_t p_continuous, bool set_random_seed, size_t random_seed, size_t n_min, size_t n_cutpoints, bool parallel, size_t mtry, const double *X_std, size_t num_sweeps, bool sample_weights_flag, std::vector y_std, double sigma, size_t max_depth, double ini_var_yhat, size_t burnin, size_t dim_residual) : State(Xpointer, Xorder_std, N, p, num_trees, p_categorical, p_continuous, set_random_seed, random_seed, n_min, n_cutpoints, parallel, mtry, X_std, num_sweeps, sample_weights_flag, y_std, sigma, max_depth, ini_var_yhat, burnin, dim_residual)
^
src/state.h: In constructor 'NormalState::NormalState(const double
, int)':
src/state.h:125:455: error: 'Xorder_std' was not declared in this scope
NormalState(const double *Xpointer, matrix<size_t> &Xorder_std, size_t N, size_t p, size_t num_trees, size_t p_categorical, size_t p_continuous, bool set_random_seed, size_t random_seed, size_t n_min, size_t n_cutpoints, bool parallel, size_t mtry, const double X_std, size_t num_sweeps, bool sample_weights_flag, std::vector y_std, double sigma, size_t max_depth, double ini_var_yhat, size_t burnin, size_t dim_residual) : State(Xpointer, Xorder_std, N, p, num_trees, p_categorical, p_continuous, set_random_seed, random_seed, n_min, n_cutpoints, parallel, mtry, X_std, num_sweeps, sample_weights_flag, y_std, sigma, max_depth, ini_var_yhat, burnin, dim_residual)
^
src/state.h:125:467: error: 'N' was not declared in this scope
NormalState(const double Xpointer, matrix<size_t> &Xorder_std, size_t N, size_t p, size_t num_trees, size_t p_categorical, size_t p_continuous, bool set_random_seed, size_t random_seed, size_t n_min, size_t n_cutpoints, bool parallel, size_t mtry, const double X_std, size_t num_sweeps, bool sample_weights_flag, std::vector y_std, double sigma, size_t max_depth, double ini_var_yhat, size_t burnin, size_t dim_residual) : State(Xpointer, Xorder_std, N, p, num_trees, p_categorical, p_continuous, set_random_seed, random_seed, n_min, n_cutpoints, parallel, mtry, X_std, num_sweeps, sample_weights_flag, y_std, sigma, max_depth, ini_var_yhat, burnin, dim_residual)
^
In file included from src/model.h:8:0,
from src/tree.h:9,
from src/mcmc_loop.h:2,
from xbart/xbart.h:3,
from xbart/xbart_wrap.cxx:2773:
src/state.h:125:513: error: 'set_random_seed' was not declared in this scope
NormalState(const double Xpointer, matrix<size_t> &Xorder_std, size_t N, size_t p, size_t num_trees, size_t p_categorical, size_t p_continuous, bool set_random_seed, size_t random_seed, size_t n_min, size_t n_cutpoints, bool parallel, size_t mtry, const double X_std, size_t num_sweeps, bool sample_weights_flag, std::vector y_std, double sigma, size_t max_depth, double ini_var_yhat, size_t burnin, size_t dim_residual) : State(Xpointer, Xorder_std, N, p, num_trees, p_categorical, p_continuous, set_random_seed, random_seed, n_min, n_cutpoints, parallel, mtry, X_std, num_sweeps, sample_weights_flag, y_std, sigma, max_depth, ini_var_yhat, burnin, dim_residual)
^
src/state.h:125:530: error: 'random_seed' was not declared in this scope
NormalState(const double Xpointer, matrix<size_t> &Xorder_std, size_t N, size_t p, size_t num_trees, size_t p_categorical, size_t p_continuous, bool set_random_seed, size_t random_seed, size_t n_min, size_t n_cutpoints, bool parallel, size_t mtry, const double X_std, size_t num_sweeps, bool sample_weights_flag, std::vector y_std, double sigma, size_t max_depth, double ini_var_yhat, size_t burnin, size_t dim_residual) : State(Xpointer, Xorder_std, N, p, num_trees, p_categorical, p_continuous, set_random_seed, random_seed, n_min, n_cutpoints, parallel, mtry, X_std, num_sweeps, sample_weights_flag, y_std, sigma, max_depth, ini_var_yhat, burnin, dim_residual)
^
In file included from src/model.h:9:0,
from src/tree.h:9,
from src/mcmc_loop.h:2,
from xbart/xbart.h:3,
from xbart/xbart_wrap.cxx:2773:
src/X_struct.h: At global scope:
src/X_struct.h:10:5: error: 'matrix' does not name a type
matrix<std::vector > data_pointers;
^
src/X_struct.h:12:5: error: 'matrix' does not name a type
matrix<std::vector > data_pointers_copy;
^
In file included from src/model.h:9:0,
from src/tree.h:9,
from src/mcmc_loop.h:2,
from xbart/xbart.h:3,
from xbart/xbart_wrap.cxx:2773:
src/X_struct.h: In constructor 'X_struct::X_struct(const double
, const std::vector
, size_t, std::vector<std::vector >&, size_t, size_t, std::vector
, size_t)':
src/X_struct.h:30:128: error: cannot convert 'std::vector<std::vector >' to 'int' for argument '2' to 'void unique_value_count2(const double, int)'
unique_value_count2(X_std, Xorder_std, X_values, X_counts, variable_ind, n_y, X_num_unique, p_categorical, p_continuous);
^
src/X_struct.h:35:15: error: 'struct X_struct' has no member named 'data_pointers_copy'
this->data_pointers_copy = this->data_pointers;
^
src/X_struct.h:35:42: error: 'struct X_struct' has no member named 'data_pointers'
this->data_pointers_copy = this->data_pointers;
^
src/X_struct.h: In member function 'void X_struct::create_backup_data_pointers()':
src/X_struct.h:44:9: error: 'data_pointers_copy' was not declared in this scope
data_pointers_copy = data_pointers;
^
src/X_struct.h:44:30: error: 'data_pointers' was not declared in this scope
data_pointers_copy = data_pointers;
^
src/X_struct.h: In member function 'void X_struct::restore_data_pointers(size_t)':
src/X_struct.h:52:9: error: 'data_pointers' was not declared in this scope
data_pointers[tree_ind] = data_pointers_copy[tree_ind];
^
src/X_struct.h:52:35: error: 'data_pointers_copy' was not declared in this scope
data_pointers[tree_ind] = data_pointers_copy[tree_ind];
^
src/X_struct.h: In member function 'void X_struct::init_tree_pointers(std::vector, size_t, size_t)':
src/X_struct.h:58:20: error: 'data_pointers' was not declared in this scope
ini_matrix(data_pointers, N, num_trees);
^
src/X_struct.h:58:47: error: 'ini_matrix' was not declared in this scope
ini_matrix(data_pointers, N, num_trees);
^
In file included from src/tree.h:9:0,
from src/mcmc_loop.h:2,
from xbart/xbart.h:3,
from xbart/xbart_wrap.cxx:2773:
src/model.h: At global scope:
src/model.h:52:30: error: 'matrix' has not been declared
virtual void incSuffStat(matrix &residual_std, size_t index_next_obs, std::vector &suffstats) { return; };
^
src/model.h:52:36: error: expected ',' or '...' before '<' token
virtual void incSuffStat(matrix &residual_std, size_t index_next_obs, std::vector &suffstats) { return; };
^
src/model.h:54:34: error: 'std::unique_ptr' has not been declared
virtual void samplePars(std::unique_ptr &state, std::vector &suff_stat, std::vector &theta_vector, double &prob_leaf) { return; };
^
src/model.h:54:44: error: expected ',' or '...' before '<' token
virtual void samplePars(std::unique_ptr &state, std::vector &suff_stat, std::vector &theta_vector, double &prob_leaf) { return; };
^
In file included from src/tree.h:9:0,
from src/mcmc_loop.h:2,
from xbart/xbart.h:3,
from xbart/xbart_wrap.cxx:2773:
src/model.h:56:36: error: 'std::unique_ptr' has not been declared
virtual void update_state(std::unique_ptr &state, size_t tree_ind, std::unique_ptr<X_struct> &x_struct) { return; };
^
src/model.h:56:46: error: expected ',' or '...' before '<' token
virtual void update_state(std::unique_ptr &state, size_t tree_ind, std::unique_ptr<X_struct> &x_struct) { return; };
^
src/model.h:58:48: error: 'std::unique_ptr' has not been declared
virtual void initialize_root_suffstat(std::unique_ptr &state, std::vector &suff_stat) { return; };
^
src/model.h:58:58: error: expected ',' or '...' before '<' token
virtual void initialize_root_suffstat(std::unique_ptr &state, std::vector &suff_stat) { return; };
^
src/model.h:60:69: error: 'matrix' has not been declared
virtual void updateNodeSuffStat(std::vector &suff_stat, matrix &residual_std, matrix<size_t> &Xorder_std, size_t &split_var, size_t row_ind) { return; };
^
src/model.h:60:75: error: expected ',' or '...' before '<' token
virtual void updateNodeSuffStat(std::vector &suff_stat, matrix &residual_std, matrix<size_t> &Xorder_std, size_t &split_var, size_t row_ind) { return; };
^
src/model.h:64:57: error: 'matrix' has not been declared
virtual void state_sweep(size_t tree_ind, size_t M, matrix &residual_std, std::unique_ptr<X_struct> &x_struct) const { return; };
^
src/model.h:64:63: error: expected ',' or '...' before '<' token
virtual void state_sweep(size_t tree_ind, size_t M, matrix &residual_std, std::unique_ptr<X_struct> &x_struct) const { return; };
^
src/model.h:66:155: error: 'std::unique_ptr' has not been declared
virtual double likelihood(std::vector &temp_suff_stat, std::vector &suff_stat_all, size_t N_left, bool left_side, bool no_split, std::unique_ptr &state) const { return 0.0; };
^
src/model.h:66:165: error: expected ',' or '...' before '<' token
virtual double likelihood(std::vector &temp_suff_stat, std::vector &suff_stat_all, size_t N_left, bool left_side, bool no_split, std::unique_ptr &state) const { return 0.0; };
^
src/model.h:70:40: error: 'std::unique_ptr' has not been declared
virtual void ini_residual_std(std::unique_ptr &state) { return; };
^
src/model.h:70:50: error: expected ',' or '...' before '<' token
virtual void ini_residual_std(std::unique_ptr &state) { return; };
^
src/model.h:74:120: error: 'matrix' has not been declared
virtual void predict_std(const double Xtestpointer, size_t N_test, size_t p, size_t num_trees, size_t num_sweeps, matrix &yhats_test_xinfo, vector<vector> &trees) { return; };
^
src/model.h:74:126: error: expected ',' or '...' before '<' token
virtual void predict_std(const double Xtestpointer, size_t N_test, size_t p, size_t num_trees, size_t num_sweeps, matrix &yhats_test_xinfo, vector<vector> &trees) { return; };
^
src/model.h: In member function 'virtual Model
Model::clone()':
src/model.h:76:37: error: 'nullptr' was not declared in this scope
virtual Model clone() { return nullptr; };
^
src/model.h: At global scope:
src/model.h:101:27: warning: non-static data member initializers only available with -std=c++11 or -std=gnu++11
size_t dim_suffstat = 3;
^
src/model.h:124:22: error: 'matrix' has not been declared
void incSuffStat(matrix &residual_std, size_t index_next_obs, std::vector &suffstats);
^
src/model.h:124:28: error: expected ',' or '...' before '<' token
void incSuffStat(matrix &residual_std, size_t index_next_obs, std::vector &suffstats);
^
src/model.h:126:26: error: 'std::unique_ptr' has not been declared
void samplePars(std::unique_ptr &state, std::vector &suff_stat, std::vector &theta_vector, double &prob_leaf);
^
src/model.h:126:36: error: expected ',' or '...' before '<' token
void samplePars(std::unique_ptr &state, std::vector &suff_stat, std::vector &theta_vector, double &prob_leaf);
^
src/model.h:128:28: error: 'std::unique_ptr' has not been declared
void update_state(std::unique_ptr &state, size_t tree_ind, std::unique_ptr<X_struct> &x_struct);
^
src/model.h:128:38: error: expected ',' or '...' before '<' token
void update_state(std::unique_ptr &state, size_t tree_ind, std::unique_ptr<X_struct> &x_struct);
^
src/model.h:130:40: error: 'std::unique_ptr' has not been declared
void initialize_root_suffstat(std::unique_ptr &state, std::vector &suff_stat);
^
src/model.h:130:50: error: expected ',' or '...' before '<' token
void initialize_root_suffstat(std::unique_ptr &state, std::vector &suff_stat);
^
src/model.h:132:61: error: 'matrix' has not been declared
void updateNodeSuffStat(std::vector &suff_stat, matrix &residual_std, matrix<size_t> &Xorder_std, size_t &split_var, size_t row_ind);
^
src/model.h:132:67: error: expected ',' or '...' before '<' token
void updateNodeSuffStat(std::vector &suff_stat, matrix &residual_std, matrix<size_t> &Xorder_std, size_t &split_var, size_t row_ind);
^
src/model.h:136:49: error: 'matrix' has not been declared
void state_sweep(size_t tree_ind, size_t M, matrix &residual_std, std::unique_ptr<X_struct> &x_struct) const;
^
src/model.h:136:55: error: expected ',' or '...' before '<' token
void state_sweep(size_t tree_ind, size_t M, matrix &residual_std, std::unique_ptr<X_struct> &x_struct) const;
^
src/model.h:138:147: error: 'std::unique_ptr' has not been declared
double likelihood(std::vector &temp_suff_stat, std::vector &suff_stat_all, size_t N_left, bool left_side, bool no_split, std::unique_ptr &state) const;
^
src/model.h:138:157: error: expected ',' or '...' before '<' token
double likelihood(std::vector &temp_suff_stat, std::vector &suff_stat_all, size_t N_left, bool left_side, bool no_split, std::unique_ptr &state) const;
^
src/model.h:142:32: error: 'std::unique_ptr' has not been declared
void ini_residual_std(std::unique_ptr &state);
^
src/model.h:142:42: error: expected ',' or '...' before '<' token
void ini_residual_std(std::unique_ptr &state);
^
src/model.h:144:112: error: 'matrix' has not been declared
void predict_std(const double Xtestpointer, size_t N_test, size_t p, size_t num_trees, size_t num_sweeps, matrix &yhats_test_xinfo, vector<vector> &trees);
^
src/model.h:144:118: error: expected ',' or '...' before '<' token
void predict_std(const double Xtestpointer, size_t N_test, size_t p, size_t num_trees, size_t num_sweeps, matrix &yhats_test_xinfo, vector<vector> &trees);
^
src/model.h:153:16: warning: non-static data member initializers only available with -std=c++11 or -std=gnu++11
double a = 0;
^
src/model.h:154:16: warning: non-static data member initializers only available with -std=c++11 or -std=gnu++11
double b = 1;
^
src/model.h:167:28: error: 'std::unique_ptr' has not been declared
void update_state(std::unique_ptr &state, size_t tree_ind, std::unique_ptr<X_struct> &x_struct);
^
src/model.h:167:38: error: expected ',' or '...' before '<' token
void update_state(std::unique_ptr &state, size_t tree_ind, std::unique_ptr<X_struct> &x_struct);
^
src/model.h:169:49: error: 'matrix' has not been declared
void state_sweep(size_t tree_ind, size_t M, matrix &residual_std, std::unique_ptr<X_struct> &x_struct) const;
^
src/model.h:169:55: error: expected ',' or '...' before '<' token
void state_sweep(size_t tree_ind, size_t M, matrix &residual_std, std::unique_ptr<X_struct> &x_struct) const;
^
src/model.h:178:27: warning: non-static data member initializers only available with -std=c++11 or -std=gnu++11
size_t dim_suffstat = 4;
^
src/model.h:220:72: error: 'std::mt19937' has not been declared
void samplePars(double y_mean, size_t N_Xorder, double sigma, std::mt19937 &generator, std::vector &theta_vector, std::vector &y_std, matrix<size_t> &Xorder, double &prob_leaf)
^
src/model.h:220:155: error: 'matrix' has not been declared
void samplePars(double y_mean, size_t N_Xorder, double sigma, std::mt19937 &generator, std::vector &theta_vector, std::vector &y_std, matrix<size_t> &Xorder, double &prob_leaf)
^
src/model.h:220:161: error: expected ',' or '...' before '<' token
void samplePars(double y_mean, size_t N_Xorder, double sigma, std::mt19937 &generator, std::vector &theta_vector, std::vector &y_std, matrix<size_t> &Xorder, double &prob_leaf)
^
src/model.h:236:89: error: 'std::unique_ptr' has not been declared
void state_sweep(size_t tree_ind, size_t M, std::vector &residual_std, std::unique_ptr<X_struct> &x_struct) const
^
src/model.h:236:99: error: expected ',' or '...' before '<' token
void state_sweep(size_t tree_ind, size_t M, std::vector &residual_std, std::unique_ptr<X_struct> &x_struct) const
^
src/model.h:247:59: error: 'matrix' has not been declared
void calcSuffStat_categorical(std::vector &y, matrix<size_t> &Xorder, size_t &start, size_t &end, const size_t &var)
^
src/model.h:247:65: error: expected ',' or '...' before '<' token
void calcSuffStat_categorical(std::vector &y, matrix<size_t> &Xorder, size_t &start, size_t &end, const size_t &var)
^
src/model.h:344:96: error: 'std::unique_ptr' has not been declared
double likelihood(std::vector &node_suff_stat, size_t N_left, bool left_side, std::unique_ptr &state) const
^
src/model.h:344:106: error: expected ',' or '...' before '<' token
double likelihood(std::vector &node_suff_stat, size_t N_left, bool left_side, std::unique_ptr &state) const
^
In file included from src/tree.h:9:0,
from src/mcmc_loop.h:2,
from xbart/xbart.h:3,
from xbart/xbart_wrap.cxx:2773:
src/model.h:360:69: error: 'std::unique_ptr' has not been declared
double likelihood_no_split(std::vector &suff_stat, std::unique_ptr &state) const
^
src/model.h:360:79: error: expected ',' or '...' before '<' token
double likelihood_no_split(std::vector &suff_stat, std::unique_ptr &state) const
^
src/model.h:377:104: error: 'matrix' has not been declared
virtual void updateNodeSuffStat(std::vector &suff_stat, std::vector &residual_std, matrix<size_t> &Xorder_std, size_t &split_var, size_t row_ind)
^
src/model.h:377:110: error: expected ',' or '...' before '<' token
virtual void updateNodeSuffStat(std::vector &suff_stat, std::vector &residual_std, matrix<size_t> &Xorder_std, size_t &split_var, size_t row_ind)
^
In file included from src/tree.h:9:0,
from src/mcmc_loop.h:2,
from xbart/xbart.h:3,
from xbart/xbart_wrap.cxx:2773:
src/model.h: In member function 'void CLTClass::suff_stat_fill(std::vector&, std::vector&)':
src/model.h:208:16: warning: unused variable 'n' [-Wunused-variable]
size_t n = xorder.size();
^
src/model.h: In member function 'void CLTClass::samplePars(double, size_t, double, int&, std::vector&, std::vector&, int)':
src/model.h:223:35: error: 'Xorder' was not declared in this scope
updateFullSuffStat(y_std, Xorder[0]);
^
src/model.h:225:9: error: 'normal_distribution' is not a member of 'std'
std::normal_distribution normal_samp(0.0, 1.0);
^
src/model.h:225:34: error: expected primary-expression before 'double'
std::normal_distribution normal_samp(0.0, 1.0);
^
src/model.h:228:151: error: 'normal_samp' was not declared in this scope
theta_vector[0] = suff_stat_total[0] / (1.0 / tau + suff_stat_total[1]) + sqrt(1.0 / (1.0 / tau + suff_stat_total[1])) * normal_samp(generator); //Rcpp::rnorm(1, 0, 1)[0];//
as_scalar(arma::randn(1,1));
^
src/model.h:231:9: error: 'prob_leaf' was not declared in this scope
prob_leaf = normal_density(theta_vector[0], y_mean * N_Xorder / pow(sigma, 2) / (1.0 / tau + N_Xorder / pow(sigma, 2)), 1.0 / (1.0 / tau + N_Xorder / pow(sigma, 2)), true);
^
src/model.h: In member function 'void CLTClass::calcSuffStat_categorical(std::vector&, int)':
src/model.h:253:43: error: 'Xorder' was not declared in this scope
std::vector<size_t> &xorder_var = Xorder[var];
^
src/model.h:253:50: error: 'var' was not declared in this scope
std::vector<size_t> &xorder_var = Xorder[var];
^
src/model.h:259:25: error: 'start' was not declared in this scope
for (size_t i = start; i <= end; i++)
^
src/model.h:259:37: error: 'end' was not declared in this scope
for (size_t i = start; i <= end; i++)
^
src/model.h:254:16: warning: unused variable 'n' [-Wunused-variable]
size_t n = xorder_var.size();
^
src/model.h: In member function 'void CLTClass::calcSuffStat_continuous(std::vector&, std::vector&, std::vector&, size_t, bool)':
src/model.h:278:16: warning: unused variable 'n' [-Wunused-variable]
size_t n = xorder.size();
^
In file included from src/tree.h:9:0,
from src/mcmc_loop.h:2,
from xbart/xbart.h:3,
from xbart/xbart_wrap.cxx:2773:
src/model.h: In member function 'virtual void CLTClass::updateNodeSuffStat(std::vector&, std::vector&, int)':
src/model.h:379:38: error: 'Xorder_std' was not declared in this scope
suff_stat[0] += residual_std[Xorder_std[split_var][row_ind]];
^
src/model.h:379:49: error: 'split_var' was not declared in this scope
suff_stat[0] += residual_std[Xorder_std[split_var][row_ind]];
^
src/model.h:379:60: error: 'row_ind' was not declared in this scope
suff_stat[0] += residual_std[Xorder_std[split_var][row_ind]];
^
src/model.h: At global scope:
src/model.h:497:22: error: 'matrix' has not been declared
void incSuffStat(matrix &residual_std, size_t index_next_obs, std::vector &suffstats);
^
src/model.h:497:28: error: expected ',' or '...' before '<' token
void incSuffStat(matrix &residual_std, size_t index_next_obs, std::vector &suffstats);
^
src/model.h:499:26: error: 'std::unique_ptr' has not been declared
void samplePars(std::unique_ptr &state, std::vector &suff_stat, std::vector &theta_vector, double &prob_leaf);
^
src/model.h:499:36: error: expected ',' or '...' before '<' token
void samplePars(std::unique_ptr &state, std::vector &suff_stat, std::vector &theta_vector, double &prob_leaf);
^
src/model.h:501:28: error: 'std::unique_ptr' has not been declared
void update_state(std::unique_ptr &state, size_t tree_ind, std::unique_ptr<X_struct> &x_struct);
^
src/model.h:501:38: error: expected ',' or '...' before '<' token
void update_state(std::unique_ptr &state, size_t tree_ind, std::unique_ptr<X_struct> &x_struct);
^
src/model.h:503:40: error: 'std::unique_ptr' has not been declared
void initialize_root_suffstat(std::unique_ptr &state, std::vector &suff_stat);
^
src/model.h:503:50: error: expected ',' or '...' before '<' token
void initialize_root_suffstat(std::unique_ptr &state, std::vector &suff_stat);
^
src/model.h:505:61: error: 'matrix' has not been declared
void updateNodeSuffStat(std::vector &suff_stat, matrix &residual_std, matrix<size_t> &Xorder_std, size_t &split_var, size_t row_ind);
^
src/model.h:505:67: error: expected ',' or '...' before '<' token
void updateNodeSuffStat(std::vector &suff_stat, matrix &residual_std, matrix<size_t> &Xorder_std, size_t &split_var, size_t row_ind);
^
src/model.h:509:49: error: 'matrix' has not been declared
void state_sweep(size_t tree_ind, size_t M, matrix &residual_std, std::unique_ptr<X_struct> &x_struct) const;
^
src/model.h:509:55: error: expected ',' or '...' before '<' token
void state_sweep(size_t tree_ind, size_t M, matrix &residual_std, std::unique_ptr<X_struct> &x_struct) const;
^
src/model.h:511:147: error: 'std::unique_ptr' has not been declared
double likelihood(std::vector &temp_suff_stat, std::vector &suff_stat_all, size_t N_left, bool left_side, bool no_split, std::unique_ptr &state) const;
^
src/model.h:511:157: error: expected ',' or '...' before '<' token
double likelihood(std::vector &temp_suff_stat, std::vector &suff_stat_all, size_t N_left, bool left_side, bool no_split, std::unique_ptr &state) const;
^
src/model.h:515:32: error: 'std::unique_ptr' has not been declared
void ini_residual_std(std::unique_ptr &state);
^
src/model.h:515:42: error: expected ',' or '...' before '<' token
void ini_residual_std(std::unique_ptr &state);
^
src/model.h:517:112: error: 'matrix' has not been declared
void predict_std(const double Xtestpointer, size_t N_test, size_t p, size_t num_trees, size_t num_sweeps, matrix &yhats_test_xinfo, vector<vector> &trees, std::vector &output_vec);
^
src/model.h:517:118: error: expected ',' or '...' before '<' token
void predict_std(const double Xtestpointer, size_t N_test, size_t p, size_t num_trees, size_t num_sweeps, matrix &yhats_test_xinfo, vector<vector> &trees, std::vector &output_vec);
^
In file included from src/tree.h:12:0,
from src/mcmc_loop.h:2,
from xbart/xbart.h:3,
from xbart/xbart_wrap.cxx:2773:
src/json.h:92:36: warning: non-static data member initializers only available with -std=c++11 or -std=gnu++11
std::size_t chars_read_total = 0;
^
src/json.h:94:43: warning: non-static data member initializers only available with -std=c++11 or -std=gnu++11
std::size_t chars_read_current_line = 0;
^
src/json.h:96:30: warning: non-static data member initializers only available with -std=c++11 or -std=gnu++11
std::size_t lines_read = 0;
^
src/json.h:99:5: error: 'constexpr' does not name a type
constexpr operator size_t() const
^
src/json.h:99:5: note: C++11 'constexpr' only available with -std=c++11 or -std=gnu++11
src/json.h:149:24: error: expected ';' at end of member declaration
const char
what() const noexcept override
^
src/json.h:149:30: error: 'noexcept' does not name a type
const char
what() const noexcept override
^
src/json.h:149:30: note: C++11 'noexcept' only available with -std=c++11 or -std=gnu++11
src/json.h:149:17: error: looser throw specifier for 'virtual const char
nlohmann::detail::exception::what() const'
const char what() const noexcept override
^
In file included from C:/Dev/Anaconda3/Library/mingw-w64/include/c++/5.3.0/stdexcept:38:0,
from xbart/xbart_wrap.cxx:2696:
C:/Dev/Anaconda3/Library/mingw-w64/include/c++/5.3.0/exception:68:25: error: overriding 'virtual const char std::exception::what() const throw ()'
virtual const char what() const GLIBCXX_USE_NOEXCEPT;
^
In file included from src/tree.h:12:0,
from src/mcmc_loop.h:2,
from xbart/xbart.h:3,
from xbart/xbart_wrap.cxx:2773:
src/json.h: In static member function 'static std::cxx11::string nlohmann::detail::exception::name(const string&, int)':
src/json.h:162:51: error: 'to_string' is not a member of 'std'
return "[json.exception." + ename + "." + std::to_string(id
) + "] ";
^
In file included from src/tree.h:12:0,
from src/mcmc_loop.h:2,
from xbart/xbart.h:3,
from xbart/xbart_wrap.cxx:2773:
src/json.h: In static member function 'static nlohmann::detail::parse_error nlohmann::detail::parse_error::create(int, std::size_t, const string&)':
src/json.h:236:54: error: 'to_string' is not a member of 'std'
(byte
!= 0 ? (" at byte " + std::to_string(byte
)) : "") +
^
src/json.h: In static member function 'static std::__cxx11::string nlohmann::detail::parse_error::position_string(const nlohmann::detail::position_t&)':
src/json.h:258:30: error: 'to_string' is not a member of 'std'
return " at line " + std::to_string(pos.lines_read + 1) +
^
src/json.h:259:30: error: 'to_string' is not a member of 'std'
", column " + std::to_string(pos.chars_read_current_line);
^
In file included from src/tree.h:12:0,
from src/mcmc_loop.h:2,
from xbart/xbart.h:3,
from xbart/xbart_wrap.cxx:2773:
src/json.h: At global scope:
src/json.h:617:1: error: expected unqualified-id before 'using'
using enable_if_t = typename std::enable_if<B, T>::type;
^
src/json.h:620:1: error: expected unqualified-id before 'using'
using uncvref_t = typename std::remove_cv<typename std::remove_reference::type>::type;
^
src/json.h:624:25: warning: variadic templates only available with -std=c++11 or -std=gnu++11
template<std::size_t... Ints>
^
src/json.h:627:11: error: expected nested-name-specifier before 'type'
using type = index_sequence;
^
src/json.h:628:11: error: expected nested-name-specifier before 'value_type'
using value_type = std::size_t;
^
src/json.h:629:12: error: 'constexpr' does not name a type
static constexpr std::size_t size() noexcept
^
src/json.h:629:12: note: C++11 'constexpr' only available with -std=c++11 or -std=gnu++11
src/json.h:638:25: warning: variadic templates only available with -std=c++11 or -std=gnu++11
template<std::size_t... I1, std::size_t... I2>
^
src/json.h:638:44: warning: variadic templates only available with -std=c++11 or -std=gnu++11
template<std::size_t... I1, std::size_t... I2>
^
src/json.h:639:70: error: '>>' should be '> >' within a nested template argument list
struct merge_and_renumber<index_sequence<I1...>, index_sequence<I2...>>
^
src/json.h:640:42: warning: variadic templates only available with -std=c++11 or -std=gnu++11
: index_sequence < I1..., (sizeof...(I1) + I2)... > {};
^
src/json.h:650:18: warning: variadic templates only available with -std=c++11 or -std=gnu++11
template<typename... Ts>
^
src/json.h:651:1: error: expected unqualified-id before 'using'
using index_sequence_for = make_index_sequence<sizeof...(Ts)>;
^
src/json.h:661:12: error: 'constexpr' does not name a type
static constexpr T value{};
^
src/json.h:661:12: note: C++11 'constexpr' only available with -std=c++11 or -std=gnu++11
src/json.h:665:1: error: 'constexpr' does not name a type
constexpr T static_const::value;
^
src/json.h:665:1: note: C++11 'constexpr' only available with -std=c++11 or -std=gnu++11
In file included from src/tree.h:12:0,
from src/mcmc_loop.h:2,
from xbart/xbart.h:3,
from xbart/xbart_wrap.cxx:2773:
src/json.h:689:20: warning: variadic templates only available with -std=c++11 or -std=gnu++11
template <typename ...Ts> struct make_void
^
src/json.h:691:11: error: expected nested-name-specifier before 'type'
using type = void;
^
src/json.h:693:20: warning: variadic templates only available with -std=c++11 or -std=gnu++11
template <typename ...Ts> using void_t = typename make_void<Ts...>::type;
^
src/json.h:693:27: error: expected unqualified-id before 'using'
template <typename ...Ts> using void_t = typename make_void<Ts...>::type;
^
src/json.h:710:5: error: 'void_t' was not declared in this scope
void_t<typename It::difference_type, typename It::value_type, typename It::pointer,
^
src/json.h:711:60: error: spurious '>>', use '>' to terminate a template argument list
typename It::reference, typename It::iterator_category >>
^
src/json.h:711:60: error: wrong number of template arguments (6, should be at least 1)
src/json.h:705:8: note: provided for 'template<class It, class> struct nlohmann::detail::iterator_types'
struct iterator_types {};
^
src/json.h:728:29: error: 'enable_if_t' was not declared in this scope
struct iterator_traits < T, enable_if_t < !std::is_pointer::value >>
^
src/json.h:728:44: error: 'is_pointer' is not a member of 'std'
struct iterator_traits < T, enable_if_t < !std::is_pointer::value >>
^
src/json.h:728:61: error: template argument 2 is invalid
struct iterator_traits < T, enable_if_t < !std::is_pointer::value >>
^
src/json.h:728:70: error: expected unqualified-id before '>>' token
struct iterator_traits < T, enable_if_t < !std::is_pointer::value >>
^
src/json.h:734:28: error: 'enable_if_t' was not declared in this scope
struct iterator_traits<T, enable_if_t<std::is_object::value>>
^
src/json.h:734:40: error: 'is_object' is not a member of 'std'
struct iterator_traits<T, enable_if_t<std::is_object::value>>
^
src/json.h:734:56: error: template argument 2 is invalid
struct iterator_traits<T, enable_if_t<std::is_object::value>>
^
src/json.h:734:64: error: expected unqualified-id before '>>' token
struct iterator_traits<T, enable_if_t<std::is_object::value>>
^
src/json.h:764:18: warning: defaulted and deleted functions only available with -std=c++11 or -std=gnu++11
nonesuch() = delete;
^
src/json.h:765:19: warning: defaulted and deleted functions only available with -std=c++11 or -std=gnu++11
~nonesuch() = delete;
^
src/json.h:766:33: warning: defaulted and deleted functions only available with -std=c++11 or -std=gnu++11
nonesuch(nonesuch const&) = delete;
^
src/json.h:767:28: error: expected ',' or '...' before '&&' token
nonesuch(nonesuch const&&) = delete;
^
src/json.h:767:34: warning: defaulted and deleted functions only available with -std=c++11 or -std=gnu++11
nonesuch(nonesuch const&&) = delete;
^
src/json.h:767:34: error: invalid constructor; you probably meant 'nlohmann::detail::nonesuch (const nlohmann::detail::nonesuch&)'
src/json.h:768:39: warning: defaulted and deleted functions only available with -std=c++11 or -std=gnu++11
void operator=(nonesuch const&) = delete;
^
src/json.h:769:28: error: expected ',' or '...' before '&&' token
void operator=(nonesuch&&) = delete;
^
src/json.h:769:34: warning: defaulted and deleted functions only available with -std=c++11 or -std=gnu++11
void operator=(nonesuch&&) = delete;
^
src/json.h:774:26: warning: variadic templates only available with -std=c++11 or -std=gnu++11
template <class...> class Op,
^
src/json.h:775:16: warning: variadic templates only available with -std=c++11 or -std=gnu++11
class... Args>
^
src/json.h:778:11: error: expected nested-name-specifier before 'value_t'
using value_t = std::false_type;
^
src/json.h:779:11: error: expected nested-name-specifier before 'type'
using type = Default;
^
src/json.h:782:41: warning: variadic templates only available with -std=c++11 or -std=gnu++11
template <class Default, template <class...> class Op, class... Args>
^
src/json.h:782:61: warning: variadic templates only available with -std=c++11 or -std=gnu++11
template <class Default, template <class...> class Op, class... Args>
^
src/json.h:783:26: error: 'void_t' was not declared in this scope
struct detector<Default, void_t<Op<Args...>>, Op, Args...>
^
src/json.h:783:43: error: '>>' should be '> >' within a nested template argument list
struct detector<Default, void_t<Op<Args...>>, Op, Args...>
^
src/json.h:783:43: error: wrong number of template arguments (2, should be at least 3)
src/json.h:776:8: note: provided for 'template<class Default, class AlwaysVoid, template<class ...> class Op, class ... Args> struct nlohmann::detail::detector'
struct detector
^
src/json.h:789:26: warning: variadic templates only available with -std=c++11 or -std=gnu++11
template <template <class...> class Op, class... Args>
^
src/json.h:789:46: warning: variadic templates only available with -std=c++11 or -std=gnu++11
template <template <class...> class Op, class... Args>
^
src/json.h:790:1: error: expected unqualified-id before 'using'
using is_detected = typename detector<nonesuch, void, Op, Args...>::value_t;
^
src/json.h:792:26: warning: variadic templates only available with -std=c++11 or -std=gnu++11
template <template <class...> class Op, class... Args>
^
src/json.h:792:46: warning: variadic templates only available with -std=c++11 or -std=gnu++11
template <template <class...> class Op, class... Args>
^
src/json.h:793:1: error: expected unqualified-id before 'using'
using detected_t = typename detector<nonesuch, void, Op, Args...>::type;
^
src/json.h:795:41: warning: variadic templates only available with -std=c++11 or -std=gnu++11
template <class Default, template <class...> class Op, class... Args>
^
src/json.h:795:61: warning: variadic templates only available with -std=c++11 or -std=gnu++11
template <class Default, template <class...> class Op, class... Args>
^
src/json.h:796:1: error: expected unqualified-id before 'using'
using detected_or = detector<Default, void, Op, Args...>;
^
src/json.h:798:41: warning: variadic templates only available with -std=c++11 or -std=gnu++11
template <class Default, template <class...> class Op, class... Args>
^
src/json.h:798:61: warning: variadic templates only available with -std=c++11 or -std=gnu++11
template <class Default, template <class...> class Op, class... Args>
^
src/json.h:799:1: error: expected unqualified-id before 'using'
using detected_or_t = typename detected_or<Default, Op, Args...>::type;
^
src/json.h:801:42: warning: variadic templates only available with -std=c++11 or -std=gnu++11
template <class Expected, template <class...> class Op, class... Args>
^
src/json.h:801:62: warning: variadic templates only available with -std=c++11 or -std=gnu++11
template <class Expected, template <class...> class Op, class... Args>
^
src/json.h:802:1: error: expected unqualified-id before 'using'
using is_detected_exact = std::is_same<Expected, detected_t<Op, Args...>>;
^
src/json.h:804:36: warning: variadic templates only available with -std=c++11 or -std=gnu++11
template <class To, template <class...> class Op, class... Args>
^
src/json.h:804:56: warning: variadic templates only available with -std=c++11 or -std=gnu++11
template <class To, template <class...> class Op, class... Args>
^
src/json.h:805:1: error: expected unqualified-id before 'using'
using is_detected_convertible =
^
In file included from src/tree.h:12:0,
from src/mcmc_loop.h:2,
from xbart/xbart.h:3,
from xbart/xbart_wrap.cxx:2773:
src/json.h:837:51: warning: variadic templates only available with -std=c++11 or -std=gnu++11
template<template<typename U, typename V, typename... Args> class ObjectType =
^
src/json.h:839:39: warning: variadic templates only available with -std=c++11 or -std=gnu++11
template<typename U, typename... Args> class ArrayType = std::vector,
^
src/json.h:841:41: error: 'int64_t' in namespace 'std' does not name a type
class NumberIntegerType = std::int64_t,
^
src/json.h:842:42: error: 'uint64_t' in namespace 'std' does not name a type
class NumberUnsignedType = std::uint64_t,
^
src/json.h:871:7: error: expected nested-name-specifier before 'json'
using json = basic_json<>;
^
src/json.h:902:59: error: expected class-name before '{' token
template struct is_basic_json : std::false_type {};
^
In file included from src/tree.h:12:0,
from src/mcmc_loop.h:2,
from xbart/xbart.h:3,
from xbart/xbart_wrap.cxx:2773:
src/json.h:592:51: warning: variadic templates only available with -std=c++11 or -std=gnu++11
template<template<typename, typename, typename...> class ObjectType,
^
src/json.h:904:1: note: in expansion of macro 'NLOHMANN_BASIC_JSON_TPL_DECLARATION'
NLOHMANN_BASIC_JSON_TPL_DECLARATION
^
src/json.h:593:41: warning: variadic templates only available with -std=c++11 or -std=gnu++11
template<typename, typename...> class ArrayType,
^
src/json.h:904:1: note: in expansion of macro 'NLOHMANN_BASIC_JSON_TPL_DECLARATION'
NLOHMANN_BASIC_JSON_TPL_DECLARATION
^
In file included from src/tree.h:12:0,
from src/mcmc_loop.h:2,
from xbart/xbart.h:3,
from xbart/xbart_wrap.cxx:2773:
src/json.h:905:64: error: expected class-name before '{' token
struct is_basic_json<NLOHMANN_BASIC_JSON_TPL> : std::true_type {};
^
src/json.h:912:1: error: expected unqualified-id before 'using'
using mapped_type_t = typename T::mapped_type;
^
src/json.h:915:1: error: expected unqualified-id before 'using'
using key_type_t = typename T::key_type;
^
src/json.h:918:1: error: expected unqualified-id before 'using'
using value_type_t = typename T::value_type;
^
src/json.h:921:1: error: expected unqualified-id before 'using'
using difference_type_t = typename T::difference_type;
^
src/json.h:924:1: error: expected unqualified-id before 'using'
using pointer_t = typename T::pointer;
^
src/json.h:927:1: error: expected unqualified-id before 'using'
using reference_t = typename T::reference;
^
src/json.h:930:1: error: expected unqualified-id before 'using'
using iterator_category_t = typename T::iterator_category;
^
src/json.h:933:1: error: expected unqualified-id before 'using'
using iterator_t = typename T::iterator;
^
src/json.h:935:31: warning: variadic templates only available with -std=c++11 or -std=gnu++11
template <typename T, typename... Args>
^
src/json.h:936:1: error: expected unqualified-id before 'using'
using to_json_function = decltype(T::to_json(std::declval()...));
^
src/json.h:938:31: warning: variadic templates only available with -std=c++11 or -std=gnu++11
template <typename T, typename... Args>
^
src/json.h:939:1: error: expected unqualified-id before 'using'
using from_json_function = decltype(T::from_json(std::declval()...));
^
src/json.h:942:1: error: expected unqualified-id before 'using'
using get_template_function = decltype(std::declval().template get());
^
src/json.h:946:40: error: expected class-name before '{' token
struct has_from_json : std::false_type {};
^
src/json.h:950:12: error: 'enable_if_t' was not declared in this scope
enable_if_t<not is_basic_json::value>>
^
src/json.h:950:51: error: type/value mismatch at argument 3 in template parameter list for 'template<class BasicJsonType, class T, class> struct nlohmann::detail::has_from_json'
enable_if_t<not is_basic_json::value>>
^
src/json.h:950:51: note: expected a type, got '( < ((! nlohmann::detail::is_basic_json::value) >> ))'
src/json.h:962:52: error: expected class-name before '{' token
struct has_non_default_from_json : std::false_type {};
^
src/json.h:965:52: error: 'enable_if_t' was not declared in this scope
struct has_non_default_from_json<BasicJsonType, T, enable_if_t<not is_basic_json::value>>
^
src/json.h:965:91: error: type/value mismatch at argument 3 in template parameter list for 'template<class BasicJsonType, class T, class> struct nlohmann::detail::has_non_default_from_json'
struct has_non_default_from_json<BasicJsonType, T, enable_if_t<not is_basic_json::value>>
^
src/json.h:965:91: note: expected a type, got '( < ((! nlohmann::detail::is_basic_json::value) >> ))'
src/json.h:977:38: error: expected class-name before '{' token
struct has_to_json : std::false_type {};
^
src/json.h:980:38: error: 'enable_if_t' was not declared in this scope
struct has_to_json<BasicJsonType, T, enable_if_t<not is_basic_json::value>>
^
src/json.h:980:77: error: type/value mismatch at argument 3 in template parameter list for 'template<class BasicJsonType, class T, class> struct nlohmann::detail::has_to_json'
struct has_to_json<BasicJsonType, T, enable_if_t<not is_basic_json::value>>
^
src/json.h:980:77: note: expected a type, got '( < ((! nlohmann::detail::is_basic_json::value) >> ))'
src/json.h:995:45: error: expected class-name before '{' token
struct is_iterator_traits : std::false_type {};
^
src/json.h:998:44: error: '>>' should be '> >' within a nested template argument list
struct is_iterator_traits<iterator_traits>
^
src/json.h:1001:11: error: expected nested-name-specifier before 'traits'
using traits = iterator_traits;
^
src/json.h:1004:12: error: 'constexpr' does not name a type
static constexpr auto value =
^
src/json.h:1004:12: note: C++11 'constexpr' only available with -std=c++11 or -std=gnu++11
src/json.h:1015:43: error: expected class-name before '{' token
struct is_complete_type : std::false_type {};
^
src/json.h:1018:51: error: a call to a constructor cannot appear in a constant-expression
struct is_complete_type<T, decltype(void(sizeof(T)))> : std::true_type {};
^
src/json.h:1018:52: error: a function call cannot appear in a constant-expression
struct is_complete_type<T, decltype(void(sizeof(T)))> : std::true_type {};
^
src/json.h:1018:53: error: template argument 2 is invalid
struct is_complete_type<T, decltype(void(sizeof(T)))> : std::true_type {};
^
src/json.h:1018:72: error: expected class-name before '{' token
struct is_complete_type<T, decltype(void(sizeof(T)))> : std::true_type {};
^
src/json.h:1022:57: error: expected class-name before '{' token
struct is_compatible_object_type_impl : std::false_type {};
^
src/json.h:1027:5: error: 'enable_if_t' was not declared in this scope
enable_if_t<is_detected<mapped_type_t, CompatibleObjectType>::value and
^
src/json.h:1027:17: error: 'is_detected' was not declared in this scope
enable_if_t<is_detected<mapped_type_t, CompatibleObjectType>::value and
^
src/json.h:1027:29: error: 'mapped_type_t' was not declared in this scope
enable_if_t<is_detected<mapped_type_t, CompatibleObjectType>::value and
^
src/json.h:1027:64: error: wrong number of template arguments (4, should be at least 2)
enable_if_t<is_detected<mapped_type_t, CompatibleObjectType>::value and
^
src/json.h:1022:8: note: provided for 'template<class BasicJsonType, class CompatibleObjectType, class> struct nlohmann::detail::is_compatible_object_type_impl'
struct is_compatible_object_type_impl : std::false_type {};
^
src/json.h:1027:73: error: expected unqualified-id before 'and' token
enable_if_t<is_detected<mapped_type_t, CompatibleObjectType>::value and
^
src/json.h:1047:60: error: expected class-name before '{' token
struct is_constructible_object_type_impl : std::false_type {};
^
src/json.h:1052:5: error: 'enable_if_t' was not declared in this scope
enable_if_t<is_detected<mapped_type_t, ConstructibleObjectType>::value and
^
src/json.h:1052:17: error: 'is_detected' was not declared in this scope
enable_if_t<is_detected<mapped_type_t, ConstructibleObjectType>::value and
^
src/json.h:1052:29: error: 'mapped_type_t' was not declared in this scope
enable_if_t<is_detected<mapped_type_t, ConstructibleObjectType>::value and
^
src/json.h:1052:67: error: wrong number of template arguments (4, should be at least 2)
enable_if_t<is_detected<mapped_type_t, ConstructibleObjectType>::value and
^
src/json.h:1047:8: note: provided for 'template<class BasicJsonType, class ConstructibleObjectType, class> struct nlohmann::detail::is_constructible_object_type_impl'
struct is_constructible_object_type_impl : std::false_type {};
^
src/json.h:1052:76: error: expected unqualified-id before 'and' token
enable_if_t<is_detected<mapped_type_t, ConstructibleObjectType>::value and
^
src/json.h:1071:57: error: expected class-name before '{' token
struct is_compatible_string_type_impl : std::false_type {};
^
src/json.h:1076:5: error: 'enable_if_t' was not declared in this scope
enable_if_t<is_detected_exact<typename BasicJsonType::string_t::value_type,
^
src/json.h:1076:17: error: 'is_detected_exact' was not declared in this scope
enable_if_t<is_detected_exact<typename BasicJsonType::string_t::value_type,
^
src/json.h:1077:5: error: 'value_type_t' was not declared in this scope
value_type_t, CompatibleStringType>::value >>
^
src/json.h:1077:39: error: wrong number of template arguments (5, should be at least 2)
value_type_t, CompatibleStringType>::value >>
^
src/json.h:1071:8: note: provided for 'template<class BasicJsonType, class CompatibleStringType, class> struct nlohmann::detail::is_compatible_string_type_impl'
struct is_compatible_string_type_impl : std::false_type {};
^
src/json.h:1077:48: error: expected unqualified-id before '>>' token
value_type_t, CompatibleStringType>::value >>
^
src/json.h:1089:60: error: expected class-name before '{' token
struct is_constructible_string_type_impl : std::false_type {};
^
src/json.h:1094:5: error: 'enable_if_t' was not declared in this scope
enable_if_t<is_detected_exact<typename BasicJsonType::string_t::value_type,
^
src/json.h:1094:17: error: 'is_detected_exact' was not declared in this scope
enable_if_t<is_detected_exact<typename BasicJsonType::string_t::value_type,
^
src/json.h:1095:5: error: 'value_type_t' was not declared in this scope
value_type_t, ConstructibleStringType>::value >>
^
src/json.h:1095:42: error: wrong number of template arguments (5, should be at least 2)
value_type_t, ConstructibleStringType>::value >>
^
src/json.h:1089:8: note: provided for 'template<class BasicJsonType, class ConstructibleStringType, class> struct nlohmann::detail::is_constructible_string_type_impl'
struct is_constructible_string_type_impl : std::false_type {};
^
src/json.h:1095:51: error: expected unqualified-id before '>>' token
value_type_t, ConstructibleStringType>::value >>
^
src/json.h:1107:56: error: expected class-name before '{' token
struct is_compatible_array_type_impl : std::false_type {};
^
src/json.h:1112:5: error: 'enable_if_t' was not declared in this scope
enable_if_t<is_detected<value_type_t, CompatibleArrayType>::value and
^
src/json.h:1112:17: error: 'is_detected' was not declared in this scope
enable_if_t<is_detected<value_type_t, CompatibleArrayType>::value and
^
src/json.h:1112:29: error: 'value_type_t' was not declared in this scope
enable_if_t<is_detected<value_type_t, CompatibleArrayType>::value and
^
src/json.h:1112:62: error: wrong number of template arguments (4, should be at least 2)
enable_if_t<is_detected<value_type_t, CompatibleArrayType>::value and
^
src/json.h:1107:8: note: provided for 'template<class BasicJsonType, class CompatibleArrayType, class> struct nlohmann::detail::is_compatible_array_type_impl'
struct is_compatible_array_type_impl : std::false_type {};
^
src/json.h:1112:71: error: expected unqualified-id before 'and' token
enable_if_t<is_detected<value_type_t, CompatibleArrayType>::value and
^
src/json.h:1130:59: error: expected class-name before '{' token
struct is_constructible_array_type_impl : std::false_type {};
^
src/json.h:1135:5: error: 'enable_if_t' was not declared in this scope
enable_if_t<std::is_same<ConstructibleArrayType,
^
src/json.h:1135:17: error: 'is_same' is not a member of 'std'
enable_if_t<std::is_same<ConstructibleArrayType,
^
src/json.h:1136:39: error: wrong number of template arguments (4, should be at least 2)
typename BasicJsonType::value_type>::value >>
^
src/json.h:1130:8: note: provided for 'template<class BasicJsonType, class ConstructibleArrayType, class> struct nlohmann::detail::is_constructible_array_type_impl'
struct is_constructible_array_type_impl : std::false_type {};
^
src/json.h:1136:48: error: expected unqualified-id before '>>' token
typename BasicJsonType::value_type>::value >>
^
src/json.h:1142:5: error: 'enable_if_t' was not declared in this scope
enable_if_t<not std::is_same<ConstructibleArrayType,
^
src/json.h:1142:21: error: 'is_same' is not a member of 'std'
enable_if_t<not std::is_same<ConstructibleArrayType,
^
src/json.h:1143:39: error: wrong number of template arguments (4, should be at least 2)
typename BasicJsonType::value_type>::value and
^
src/json.h:1130:8: note: provided for 'template<class BasicJsonType, class ConstructibleArrayType, class> struct nlohmann::detail::is_constructible_array_type_impl'
struct is_constructible_array_type_impl : std::false_type {};
^
src/json.h:1143:48: error: expected unqualified-id before 'and' token
typename BasicJsonType::value_type>::value and
^
src/json.h:1170:58: error: expected class-name before '{' token
struct is_compatible_integer_type_impl : std::false_type {};
^
src/json.h:1175:5: error: 'enable_if_t' was not declared in this scope
enable_if_t<std::is_integral::value and
^
src/json.h:1175:17: error: 'is_integral' is not a member of 'std'
enable_if_t<std::is_integral::value and
^
src/json.h:1175:49: error: template argument 3 is invalid
enable_if_t<std::is_integral::value and
^
src/json.h:1175:58: error: expected unqualified-id before 'and' token
enable_if_t<std::is_integral::value and
^
src/json.h:1196:49: error: expected class-name before '{' token
struct is_compatible_type_impl: std::false_type {};
^
src/json.h:1201:5: error: 'enable_if_t' was not declared in this scope
enable_if_t<is_complete_type::value >>
^
src/json.h:1201:57: error: type/value mismatch at argument 3 in template parameter list for 'template<class BasicJsonType, class CompatibleType, class> struct nlohmann::detail::is_compatible_type_impl'
enable_if_t<is_complete_type::value >>
^
src/json.h:1201:57: note: expected a type, got '( < (nlohmann::detail::is_complete_type::value >> ))'
In file included from src/tree.h:12:0,
from src/mcmc_loop.h:2,
from xbart/xbart.h:3,
from xbart/xbart_wrap.cxx:2773:
src/json.h:1254:1: warning: scoped enums only available with -std=c++11 or -std=gnu++11
enum class value_t : std::uint8_t
^
src/json.h:1254:1: warning: elaborated-type-specifier for a scoped enum must not use the 'class' keyword
src/json.h:1254:12: error: use of enum 'value_t' without previous declaration
enum class value_t : std::uint8_t
^
src/json.h:1254:20: error: expected unqualified-id before ':' token
enum class value_t : std::uint8_t
^
src/json.h:1277:29: error: 'value_t' does not name a type
inline bool operator<(const value_t lhs, const value_t rhs) noexcept
^
src/json.h:1277:48: error: 'value_t' does not name a type
inline bool operator<(const value_t lhs, const value_t rhs) noexcept
^
src/json.h:1277:61: error: expected initializer before 'noexcept'
inline bool operator<(const value_t lhs, const value_t rhs) noexcept
^
In file included from src/tree.h:12:0,
from src/mcmc_loop.h:2,
from xbart/xbart.h:3,
from xbart/xbart_wrap.cxx:2773:
src/json.h:20821:31: error: expected '}' before end of line
src/json.h:20821:31: error: expected '}' before end of line
src/json.h:20821:31: error: expected declaration before end of line
xbart/xbart_wrap.cxx:2649:25: warning: 'PyMethodDef SWIG_PythonGetProxyDoc(const char)' declared 'static' but never defined [-Wunused-function]
SWIGINTERN PyMethodDef SWIG_PythonGetProxyDoc(const char name);
^
xbart/xbart_wrap.cxx:2650:22: warning: 'PyObject
SWIG_PyInstanceMethod_New(PyObject
, PyObject)' declared 'static' but never defined [-Wunused-function]
SWIGINTERN PyObject SWIG_PyInstanceMethod_New(PyObject SWIGUNUSEDPARM(self), PyObject func);
^
xbart/xbart_wrap.cxx:2651:22: warning: 'PyObject
SWIG_PyStaticMethod_New(PyObject
, PyObject
)' declared 'static' but never defined [-Wunused-function]
SWIGINTERN PyObject *SWIG_PyStaticMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func);
^
xbart/xbart_wrap.cxx:2665:25: warning: 'swig_module' defined but not used [-Wunused-variable]
static swig_module_info swig_module = {swig_types, 4, 0, 0, 0, 0};
^
error: command 'C:\Dev\Anaconda3\Library\mingw-w64\bin\gcc.exe' failed with exit status 1

ERROR: Failed building wheel for xbart
Running setup.py clean for xbart
Failed to build xbart

XBART.CLT std::bad_alloc error, R

When attempting to use XBART.CLT for binary classification I get the following error:

Error in XBART_CLT_cpp(y, X, Xtest, num_trees, num_sweeps, max_depth, :
std::bad_alloc

Seems to be a C++ error in the backend? I do not encounter this error when running XBART() on the example found here: https://github.com/JingyuHe/XBART/blob/master/tests/test.R

Session info:

sessionInfo()
R version 4.0.2 (2020-06-22)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 21327)

Matrix products: default

locale:
[1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252 LC_MONETARY=English_United States.1252 LC_NUMERIC=C LC_TIME=English_United States.1252

attached base packages:
[1] stats graphics grDevices utils datasets methods base

other attached packages:
[1] forcats_0.5.0 stringr_1.4.0 dplyr_1.0.2 purrr_0.3.4 readr_1.3.1 tidyr_1.1.2 tibble_3.0.3 ggplot2_3.3.2 tidyverse_1.3.0 data.table_1.13.6 XBART_0.3

loaded via a namespace (and not attached):
[1] Rcpp_1.0.6 lubridate_1.7.9 lattice_0.20-41 class_7.3-17 assertthat_0.2.1 ipred_0.9-9 foreach_1.5.0 R6_2.4.1 cellranger_1.1.0 plyr_1.8.6
[11] backports_1.1.7 stats4_4.0.2 reprex_0.3.0 e1071_1.7-3 httr_1.4.2 pillar_1.4.6 rlang_0.4.8 caret_6.0-86 readxl_1.3.1 rstudioapi_0.11
[21] blob_1.2.1 rpart_4.1-15 Matrix_1.2-18 splines_4.0.2 gower_0.2.2 munsell_0.5.0 broom_0.7.0 compiler_4.0.2 modelr_0.1.8 pkgconfig_2.0.3
[31] nnet_7.3-14 tidyselect_1.1.0 prodlim_2019.11.13 codetools_0.2-16 fansi_0.4.1 crayon_1.3.4 dbplyr_1.4.4 withr_2.3.0 ModelMetrics_1.2.2.2 MASS_7.3-51.6
[41] recipes_0.1.15 grid_4.0.2 nlme_3.1-148 jsonlite_1.7.2 gtable_0.3.0 lifecycle_0.2.0 DBI_1.1.0 magrittr_2.0.1 pROC_1.16.2 scales_1.1.1
[51] cli_2.0.2 stringi_1.5.3 reshape2_1.4.4 fs_1.4.1 timeDate_3043.102 xml2_1.3.2 ellipsis_0.3.1 generics_0.1.0 vctrs_0.3.2 lava_1.6.7
[61] iterators_1.0.12 tools_4.0.2 glue_1.4.1 hms_0.5.3 survival_3.1-12 yaml_2.2.1 colorspace_1.4-1 rvest_0.3.5 haven_2.3.1

Parallel computation not working

Hey Jingyu,

When I run XBART, the console output says that it is running in parallel with some number of cores. However, my actual CPU usage only shows on 1 core, and the time it takes for XBART to run is no faster than when setting parallel = FALSE.

This happens for me both on Windows and Linux. Any ideas?

Undefined behavior in XBART.Probit

While exploring the package, I noticed that you have a lot of compiler warnings and decided to run a quick test through Valgrind. It looks like there is indeed a lot of undefined behaviour going on, at least in XBART.Probit using my (potentially flawed) inputs.

Here's the test R code I ran.

Here's the valgrind output, obtained with:

valgrind --trace-children=yes --track-origins=yes R CMD BATCH class_test.R

I haven't had a chance to dig any deeper, but thought this output might be helpful.

XBART.multinomial error during fit

While attempting to fit using XBART.multinomial on a test case I encounter the following error:

Error in r_to_json(obj$model_list$tree_pnt) : argument "tree_pnt" is missing, with no default

Code used for testing is below, I also encounter this error when attempting to use this test file: https://github.com/JingyuHe/XBART/blob/master/tests/test_multinomial_prh.R

#######################################################################

set parameters of XBART

get_XBART_params <- function(y) {
XBART_params = list(num_trees = 30, # number of trees
num_sweeps = 40, # number of sweeps (samples of the forest)
n_min = 1, # minimal node size
alpha = 0.95, # BART prior parameter
beta = 1.25, # BART prior parameter
mtry = 10, # number of variables sampled in each split
burnin = 15,
no_split_penality = "Auto"
) # burnin of MCMC sample
num_tress = XBART_params$num_trees
XBART_params$max_depth = 250
XBART_params$num_cutpoints = 50;

number of adaptive cutpoints

XBART_params$tau = var(y) / num_tress # prior variance of mu (leaf parameter)
return(XBART_params)
}

#######################################################################
library(XBART)

set.seed(100)
new_data = TRUE # generate new data
run_dbarts = TRUE # run dbarts
run_xgboost = FALSE # run xgboost
run_lightgbm = FALSE # run lightgbm
parl = TRUE # parallel computing

small_case = TRUE # run simulation on small data set
verbose = FALSE # print the progress on screen

if (small_case) {
n = 20000 # size of training set
nt = 5000 # size of testing set
d = 20 # number of TOTAL variables
dcat = 10 # number of categorical variables

must be d >= dcat

(X_continuous, X_categorical), 10 and 10 for each case, 20 in total

} else {
n = 100000
nt = 10000
d = 50
dcat = 0
}

#######################################################################

Data generating process

#######################################################################

Have to put continuous variables first, then categorical variables

X = (X_continuous, X_cateogrical)

#######################################################################
if (new_data) {
if (d != dcat) {
x = matrix(runif((d - dcat) * n, -2, 2), n, d - dcat)
if (dcat > 0) {
x = cbind(x, matrix(as.numeric(sample(-2:2, dcat * n, replace = TRUE)), n, dcat))
}
} else {
x = matrix(as.numeric(sample(-2:2, dcat * n, replace = TRUE)), n, dcat)
}

if (d != dcat) {
xtest = matrix(runif((d - dcat) * nt, -2, 2), nt, d - dcat)
if (dcat > 0) {
xtest = cbind(xtest, matrix(as.numeric(sample(-2:2, dcat * nt, replace = TRUE)), nt, dcat))
}
} else {
xtest = matrix(as.numeric(sample(-2:2, dcat * nt, replace = TRUE)), nt, dcat)
}

f = function(x) {
sin(rowSums(x[, 3:4] ^ 2)) + sin(rowSums(x[, 1:2] ^ 2)) + (x[, 15] + x[, 14]) ^ 2 * (x[, 1] + x[, 2] ^ 2) / (3 + x[, 3] + x[, 14] ^ 2)
#rowSums(x[,1:30]^2)
#pmax(x[,1]x[,2], abs(x[,3])(x[,10]>x[,15])+abs(x[,4])*(x[,10]<=x[,15]))
#
}

to test if ties cause a crash in continuous variables

x[, 1] = round(x[, 1], 4)
#xtest[,1] = round(xtest[,1],2)
ftrue = f(x)
ftest = f(xtest)
sigma = sd(ftrue)

#y = ftrue + sigma*(rgamma(n,1,1)-1)/(3+x[,d])
#y_test = ftest + sigma*(rgamma(nt,1,1)-1)/(3+xtest[,d])

y = ftrue + sigma * rnorm(n)
y <- as.numeric(y > 0)
y_test = ftest + sigma * rnorm(nt)
y_test <- as.numeric(y_test > 0)
}

#######################################################################

XBART

categ <- function(z, j) {
q = as.numeric(quantile(x[, j], seq(0, 1, length.out = 100)))
output = findInterval(z, c(q, + Inf))
return(output)
}

params = get_XBART_params(y)
time = proc.time()
fit = XBART.multinomial(y = as.matrix(y), num_class = 2, X = as.matrix(x), Xtest = as.matrix(xtest), p_categorical = dcat,
num_trees = params$num_trees, num_sweeps = params$num_sweeps, max_depth = params$max_depth,
Nmin = params$n_min, alpha = params$alpha, beta = params$beta, s = 1, kap = 1,
mtry = params$mtry, verbose = verbose,
num_cutpoints = params$num_cutpoints, parallel = TRUE, random_seed = 100,
no_split_penality = params$no_split_penality)

Prediction is zero which is incorrect

Hi Jingyu:

From this program, all posterior samples are zero including sigma.


library(XBART)

f = function(x)
    10*sin(pi*x[ , 1]*x[ , 2]) + 5*x[ , 3]*x[ , 4]^2 + 20*x[ , 5]

N = 10000
sigma = 1.0 ##y = f(x) + sigma*z where z~N(0, 1)
P = 25       ##number of covariates
B=8

V = diag(P)
V[5, 6] = 0.8
V[6, 5] = 0.8
L <- chol(V)
set.seed(12)
x.train=matrix(rnorm(N*P), N, P) %*% L
dimnames(x.train)[[2]] <- paste0('x', 1:P)
y.train=(f(x.train)+sigma*rnorm(N))

H=20
x=seq(-3, 3, length.out=H+1)[-(H+1)]
x.test=matrix(0, nrow=H, ncol=P)
x.test[ , 5]=x

##(L=0.25*(log(N)^(log(log(N)))))

post = XBART.CLT(cbind(y.train), x.train, x.test,
                 num_trees=50, num_sweeps=40,
                 burnin=15)
post$yhat.test=post$yhats_test
##post$yhats_test=NULL
post$yhat.test.mean=apply(post$yhat.test, 1, mean)
post$yhat.test.025=apply(post$yhat.test, 1, quantile, probs=0.025)
post$yhat.test.975=apply(post$yhat.test, 1, quantile, probs=0.975)

plot(x, f(x.test), col='blue', type='l', ylab='f(x)')
lines(x, post$yhat.test.mean)
dev.copy2pdf(file='bigdata.pdf')    

The R output is as follows.


R version 3.5.2 (2018-12-20) -- "Eggshell Igloo"
Copyright (C) 2018 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

  Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> setwd('/home/rsparapa/git/XBART/demo')
options(width=78, length=99999)
> library(XBART)
> f = function(x)
+     10*sin(pi*x[ , 1]*x[ , 2]) + 5*x[ , 3]*x[ , 4]^2 + 20*x[ , 5]
> N = 10000
> sigma = 1.0 ##y = f(x) + sigma*z where z~N(0, 1)
> P = 25       ##number of covariates
> B=8
> V = diag(P)
> V[5, 6] = 0.8
> V[6, 5] = 0.8
> L <- chol(V)
> set.seed(12)
> x.train=matrix(rnorm(N*P), N, P) %*% L
> dimnames(x.train)[[2]] <- paste0('x', 1:P)
> y.train=(f(x.train)+sigma*rnorm(N))
> H=20
> x=seq(-3, 3, length.out=H+1)[-(H+1)]
> x.test=matrix(0, nrow=H, ncol=P)
> x.test[ , 5]=x
> ##(L=0.25*(log(N)^(log(log(N)))))
> 
> post = XBART.CLT(cbind(y.train), x.train, x.test,
+                  num_trees=50, num_sweeps=40,
+                  burnin=15)
tau = 1/num_trees, default value. 
mtry = p, use all variables. 
> post$yhat.test=post$yhats_test
> ##post$yhats_test=NULL
> post$yhat.test.mean=apply(post$yhat.test, 1, mean)
> post$yhat.test.025=apply(post$yhat.test, 1, quantile, probs=0.025)
> post$yhat.test.975=apply(post$yhat.test, 1, quantile, probs=0.975)
> plot(x, f(x.test), col='blue', type='l', ylab='f(x)')
> lines(x, post$yhat.test.mean)
> dev.copy2pdf(file='bigdata.pdf')
X11cairo 
       2 
> library(help=XBART)

		Information on package ‘XBART’

Description:

Package:            XBART
Type:               Package
Title:              XBART: Accelerated Bayesian Additive Regression
                    Trees
Version:            0.2
Date:               2019-09-5
Author:             Jingyu He, Saar Yalov, P. Richard Hahn, Lee
                    Reeves
Maintainer:         Jingyu He <[email protected]>
Description:        A highly efficient prediction algorithm based on
                    trees.
License:            Apache License (== 2.0)
Imports:            Rcpp (>= 0.12.13)
LinkingTo:          Rcpp, RcppArmadillo
NeedsCompilation:   yes
Packaged:           2020-05-20 21:08:35 UTC; rsparapa
Built:              R 3.5.2; x86_64-pc-linux-gnu; 2020-05-20 21:08:48
                    UTC; unix

Index:

XBART                   XBART: Accelerated Bayesian Additive Regression
                        Trees
XBART-package           XBART: Accelerated Bayesian Additive Regression
                        Trees
XBART.CLT               XBART: Accelerated Bayesian Additive Regression
                        Trees
XBART.Probit            XBART: Accelerated Bayesian Additive Regression
                        Trees

> sessionInfo()
R version 3.5.2 (2018-12-20)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: CentOS Linux 7 (Core)

Matrix products: default
BLAS: /usr/lib64/libblas.so.3.4.2
LAPACK: /usr/lib64/liblapack.so.3.4.2

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
 [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] XBART_0.2

loaded via a namespace (and not attached):
[1] compiler_3.5.2 tools_3.5.2    Rcpp_1.0.4    
> 

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.