claesenm / ensemblesvm Goto Github PK
View Code? Open in Web Editor NEWA Library for Ensemble Learning Using Support Vector Machines
License: Other
A Library for Ensemble Learning Using Support Vector Machines
License: Other
Base model predictions are constant per prediction, must be some indexing error when making the output vector.
./configure --host=i686-w64-mingw32
make
leads to errors in the LibSVM wrapper, related to malloc:
src/LibSVM.cpp:43:32: error: 'rpl_malloc' is not a member of 'std'
This appears to be because of a directive in configure.ac, based on http://nerdland.net/unstumping-the-internet/malloc-has-not-been-declared/
not sure whether can be compiled in current version of gcc and mingw32 in windows.
when I type make, It shows hundreds of error messages:
/usr/bin/make all-recursive
make[1]: Entering directory/c/Users/LIPS/Desktop/ensemblesvm-2.0.tar/ensembles vm-2.0' Making all in . make[2]: Entering directory
/c/Users/LIPS/Desktop/ensemblesvm-2.0.tar/ensemblesvm-2.0'
depbase=echo src/tools/esvm-predict.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'
;
g++ -DHAVE_CONFIG_H -I. -I./include -I./src/libsvm -ffast-math -Wall -pedantic -O3 -march=native -std=gnu++11 -pthread -MT src/tools/esvm-predict.o -MD -MP -MF $depbase.Tpo -c -o src/tools/esvm-predict.o src/tools/esvm-predict.cpp &&
mv -f $depbase.Tpo $depbase.Po
In file included from src/tools/esvm-predict.cpp:32:0:
./include/ThreadPool.hpp:46:49: error: 'std::thread' has not been declared
extern const unsigned NUM_HARDWARE_THREADS{std::thread::hardware_concurrency()};
^
./include/ThreadPool.hpp:63:7: error: 'mutex' in namespace 'std' does not name a type
std::mutex jobs_mutex;
^
./include/ThreadPool.hpp:64:7: error: 'condition_variable' in namespace 'std' does not name a type
std::condition_variable jobs_cv;
^
./include/ThreadPool.hpp:75:7: error: 'condition_variable' in namespace 'std' does not name a type
std::condition_variable maxjobs_cv;
^
./include/ThreadPool.hpp:85:8: error: 'thread' in namespace 'std' does not name a type
std::thread t;
^
./include/ThreadPool.hpp: In static member function 'static void ensemble::ThreadPool<Ret(Args ...)>::Worker::thread_func_static(ensemble::ThreadPool<Ret(Args ...)>::Worker*)':
./include/ThreadPool.hpp:88:21: error: 'mutex' is not a member of 'std'
std::unique_lockstd::mutex l(t->mgr.jobs_mutex, std::defer_lock);
^
./include/ThreadPool.hpp:88:21: error: 'mutex' is not a member of 'std'
./include/ThreadPool.hpp:88:31: error: template argument 1 is invalid
std::unique_lockstd::mutex l(t->mgr.jobs_mutex, std::defer_lock);
^
./include/ThreadPool.hpp:88:69: error: expression list treated as compound expression in initializer [-fpermissive]
std::unique_lockstd::mutex l(t->mgr.jobs_mutex, std::defer_lock);
^
./include/ThreadPool.hpp:91:7: error: request for member 'lock' in 'l', which is of non-class type 'int'
l.lock();
^
./include/ThreadPool.hpp:107:7: error: request for member 'unlock' in 'l', which is of non-class type 'int'
l.unlock();
^
./include/ThreadPool.hpp: In constructor 'ensemble::ThreadPool<Ret(Args ...)>::Worker::Worker(ensemble::ThreadPool<Ret(Args ...)>&)':
./include/ThreadPool.hpp:116:4: error: 't' was not declared in this scope
t = std::thread(thread_func_static,this);
^
./include/ThreadPool.hpp:116:8: error: 'thread' is not a member of 'std'
t = std::thread(thread_func_static,this);
^
./include/ThreadPool.hpp: In constructor 'ensemble::ThreadPool<Ret(Args ...)>::ThreadPool(ensemble::ThreadPool<Ret(Args ...)>::Fun&&)':
./include/ThreadPool.hpp:135:55: error: 'std::thread' has not been declared
ThreadPool(Fun&& fun):ThreadPool{std::move(fun),std::thread::hardware_concurrency(),0}{};
^
./include/ThreadPool.hpp: In member function 'void ensemble::ThreadPool<Ret(Args ...)>::addjob(Args ...)':
./include/ThreadPool.hpp:167:20: error: 'mutex' is not a member of 'std'
std::unique_lockstd::mutex lck(jobs_mutex);
^
./include/ThreadPool.hpp:167:20: error: 'mutex' is not a member of 'std'
./include/ThreadPool.hpp:167:30: error: template argument 1 is invalid
std::unique_lockstd::mutex lck(jobs_mutex);
^
./include/ThreadPool.hpp:167:36: error: 'jobs_mutex' was not declared in this scope
std::unique_lockstd::mutex lck(jobs_mutex);
^
./include/ThreadPool.hpp:170:45: error: 'maxjobs_cv' was not declared in this scope
if(maxjobs > 0 && jobs.size() >= maxjobs) maxjobs_cv.wait(lck);
^
./include/ThreadPool.hpp:178:3: error: 'jobs_cv' was not declared in this scope
jobs_cv.notify_one();
^
./include/ThreadPool.hpp: In member function 'void ensemble::ThreadPool<Ret(Args ...)>::stop()':
./include/ThreadPool.hpp:189:3: error: 'jobs_cv' was not declared in this scope
jobs_cv.notify_all();
^
src/tools/esvm-predict.cpp: In function 'int main(int, char**)':
src/tools/esvm-predict.cpp:276:48: error: invalid use of incomplete type 'class std::future<std::tuple<ensemble::Prediction, bool, double> >'
std::tuple<Prediction,bool,double> result=job.get();
^
In file included from ./include/ThreadPool.hpp:32:0,
from src/tools/esvm-predict.cpp:32:
c:\mingw\lib\gcc\mingw32\5.3.0\include\c++\future:115:11: note: declaration of 'class std::future<std::tuple<ensemble::Prediction, bool, double> >'
class future;
^
In file included from src/tools/esvm-predict.cpp:32:0:
./include/ThreadPool.hpp: In instantiation of 'ensemble::ThreadPool<Ret(Args ...)>::ThreadPool(ensemble::ThreadPool<Ret(Args ...)>::Fun&&) [with Ret = std::tuple<ensemble::Prediction, bool, double>; Args = {std::shared_ptrensemble::ConstDataLine}; ensemble::ThreadPool<Ret(Args ...)>::Fun = std::function<std::tuple<ensemble::Prediction, bool, double>(std::shared_ptrensemble::ConstDataLine)>]':
src/tools/esvm-predict.cpp:253:103: required from here
./include/ThreadPool.hpp:135:87: error: no matching function for call to 'ensemble::ThreadPool<std::tuple<ensemble::Prediction, bool, double>(std::shared_ptrensemble::ConstDataLine)>::ThreadPool()'
ThreadPool(Fun&& fun):ThreadPool{std::move(fun),std::thread::hardware_concurrency(),0}{};
^
./include/ThreadPool.hpp:143:2: note: candidate: ensemble::ThreadPool<Ret(Args ...)>::ThreadPool(ensemble::ThreadPool<Ret(Args ...)>::Fun&&, unsigned int, unsigned int) [with Ret = std::tuple<ensemble::Prediction, bool, double>; Args = {std::shared_ptrensemble::ConstDataLine}; ensemble::ThreadPool<Ret(Args ...)>::Fun = std::function<std::tuple<ensemble::Prediction, bool, double>(std::shared_ptrensemble::ConstDataLine)>]
ThreadPool(Fun&& fun, unsigned numthreads, unsigned maxjobs=0)
^
./include/ThreadPool.hpp:143:2: note: conversion of argument 2 would be ill-formed:
./include/ThreadPool.hpp:135:2: note: candidate: ensemble::ThreadPool<Ret(Args ...)>::ThreadPool(ensemble::ThreadPool<Ret(Args ...)>::Fun&&) [with Ret = std::tuple<ensemble::Prediction, bool, double>; Args = {std::shared_ptrensemble::ConstDataLine}; ensemble::ThreadPool<Ret(Args ...)>::Fun = std::function<std::tuple<ensemble::Prediction, bool, double>(std::shared_ptrensemble::ConstDataLine)>]
ThreadPool(Fun&& fun):ThreadPool{std::move(fun),std::thread::hardware_concurrency(),0}{};
^
./include/ThreadPool.hpp:135:2: note: candidate expects 1 argument, 3 provided
./include/ThreadPool.hpp: In instantiation of 'void ensemble::ThreadPool<Ret(Args ...)>::addjob(Args ...) [with Ret = std::tuple<ensemble::Prediction, bool, double>; Args = {std::shared_ptrensemble::ConstDataLine}]':
src/tools/esvm-predict.cpp:273:26: required from here
./include/ThreadPool.hpp:171:41: error: 'ensemble::ThreadPool<std::tuple<ensemble::Prediction, bool, double>(std::shared_ptrensemble::ConstDataLine)>::job newjob' has incomplete type
job newjob(std::bind(fun,arguments...));
^
In file included from c:\mingw\lib\gcc\mingw32\5.3.0\include\c++\deque:64:0,
from ./include/CLI.hpp:33,
from src/tools/esvm-predict.cpp:26:
c:\mingw\lib\gcc\mingw32\5.3.0\include\c++\bits\stl_deque.h: In instantiation of 'std::_Deque_iterator<_Tp, _Ref, _Ptr>::_Self& std::_Deque_iterator<_Tp, _Ref, _Ptr>::operator++() [with _Tp = std::future<std::tuple<ensemble::Prediction, bool, double> >; _Ref = std::future<std::tuple<ensemble::Prediction, bool, double> >&; _Ptr = std::future<std::tuple<ensemble::Prediction, bool, double> >; std::_Deque_iterator<_Tp, _Ref, _Ptr>::_Self = std::_Deque_iterator<std::future<std::tuple<ensemble::Prediction, bool, double> >, std::future<std::tuple<ensemble::Prediction, bool, double> >&, std::future<std::tuple<ensemble::Prediction, bool, double> >>]':
src/tools/esvm-predict.cpp:275:17: required from here
c:\mingw\lib\gcc\mingw32\5.3.0\include\c++\bits\stl_deque.h:168:2: error: cannot increment a pointer to incomplete type 'std::future<std::tuple<ensemble::Prediction, bool, double> >'
++_M_cur;
^
In file included from src/tools/esvm-predict.cpp:32:0:
./include/ThreadPool.hpp: In instantiation of 'void ensemble::ThreadPool<Ret(Args ...)>::join() [with Ret = std::tuple<ensemble::Prediction, bool, double>; Args = {std::shared_ptrensemble::ConstDataLine}]':
./include/ThreadPool.hpp:160:7: required from 'ensemble::ThreadPool<Ret(Args ...)>::~ThreadPool() [with Ret = std::tuple<ensemble::Prediction, bool, double>; Args = {std::shared_ptrensemble::ConstDataLine}]'
src/tools/esvm-predict.cpp:253:103: required from here
./include/ThreadPool.hpp:184:28: error: 'class ensemble::ThreadPool<std::tuple<ensemble::Prediction, bool, double>(std::shared_ptrensemble::ConstDataLine)>::Worker' has no member named 't'
for (auto &td: threads){ td.t.join(); }
^
In file included from c:\mingw\lib\gcc\mingw32\5.3.0\include\c++\deque:64:0,
from ./include/CLI.hpp:33,
from src/tools/esvm-predict.cpp:26:
c:\mingw\lib\gcc\mingw32\5.3.0\include\c++\bits\stl_deque.h: In instantiation of 'void std::deque<_Tp, _Alloc>::_M_destroy_data(std::deque<_Tp, _Alloc>::iterator, std::deque<_Tp, _Alloc>::iterator, const std::allocator<_Tp1>&) [with _Tp = std::packaged_task<std::tuple<ensemble::Prediction, bool, double>()>; _Alloc = std::allocator<std::packaged_task<std::tuple<ensemble::Prediction, bool, double>()> >; std::deque<_Tp, _Alloc>::iterator = std::_Deque_iterator<std::packaged_task<std::tuple<ensemble::Prediction, bool, double>()>, std::packaged_task<std::tuple<ensemble::Prediction, bool, double>()>&, std::packaged_task<std::tuple<ensemble::Prediction, bool, double>()>>]':
c:\mingw\lib\gcc\mingw32\5.3.0\include\c++\bits\stl_deque.h:1039:24: required from 'std::deque<_Tp, _Alloc>::~deque() [with _Tp = std::packaged_task<std::tuple<ensemble::Prediction, bool, double>()>; _Alloc = std::allocator<std::packaged_task<std::tuple<ensemble::Prediction, bool, double>()> >]'
c:\mingw\lib\gcc\mingw32\5.3.0\include\c++\bits\stl_queue.h:96:11: required from 'ensemble::ThreadPool<Ret(Args ...)>::~ThreadPool() [with Ret = std::tuple<ensemble::Prediction, bool, double>; Args = {std::shared_ptrensemble::ConstDataLine}]'
src/tools/esvm-predict.cpp:253:103: required from here
c:\mingw\lib\gcc\mingw32\5.3.0\include\c++\bits\stl_deque.h:2036:2: error: invalid use of incomplete type 'std::deque<std::packaged_task<std::tuple<ensemble::Prediction, bool, double>()>, std::allocator<std::packaged_task<std::tuple<ensemble::Prediction, bool, double>()> > >::value_type {aka class std::packaged_task<std::tuple<ensemble::Prediction, bool, double>()>}'
if (!__has_trivial_destructor(value_type))
^
In file included from ./include/ThreadPool.hpp:32:0,
from src/tools/esvm-predict.cpp:32:
c:\mingw\lib\gcc\mingw32\5.3.0\include\c++\future:121:11: note: declaration of 'std::deque<std::packaged_task<std::tuple<ensemble::Prediction, bool, double>()>, std::allocator<std::packaged_task<std::tuple<ensemble::Prediction, bool, double>()> > >::value_type {aka class std::packaged_task<std::tuple<ensemble::Prediction, bool, double>()>}'
class packaged_task;
^
In file included from c:\mingw\lib\gcc\mingw32\5.3.0\include\c++\deque:64:0,
from ./include/CLI.hpp:33,
from src/tools/esvm-predict.cpp:26:
c:\mingw\lib\gcc\mingw32\5.3.0\include\c++\bits\stl_deque.h: In instantiation of 'void std::deque<_Tp, _Alloc>::_M_destroy_data(std::deque<_Tp, _Alloc>::iterator, std::deque<_Tp, _Alloc>::iterator, const std::allocator<_Tp1>&) [with _Tp = std::future<std::tuple<ensemble::Prediction, bool, double> >; _Alloc = std::allocator<std::future<std::tuple<ensemble::Prediction, bool, double> > >; std::deque<_Tp, _Alloc>::iterator = std::_Deque_iterator<std::future<std::tuple<ensemble::Prediction, bool, double> >, std::future<std::tuple<ensemble::Prediction, bool, double> >&, std::future<std::tuple<ensemble::Prediction, bool, double> >>]':
c:\mingw\lib\gcc\mingw32\5.3.0\include\c++\bits\stl_deque.h:1039:24: required from 'std::deque<_Tp, _Alloc>::~deque() [with _Tp = std::future<std::tuple<ensemble::Prediction, bool, double> >; _Alloc = std::allocator<std::future<std::tuple<ensemble::Prediction, bool, double> > >]'
./include/ThreadPool.hpp:161:2: required from 'ensemble::ThreadPool<Ret(Args ...)>::~ThreadPool() [with Ret = std::tuple<ensemble::Prediction, bool, double>; Args = {std::shared_ptrensemble::ConstDataLine}]'
src/tools/esvm-predict.cpp:253:103: required from here
c:\mingw\lib\gcc\mingw32\5.3.0\include\c++\bits\stl_deque.h:2036:2: error: invalid use of incomplete type 'std::deque<std::future<std::tuple<ensemble::Prediction, bool, double> >, std::allocator<std::future<std::tuple<ensemble::Prediction, bool, double> > > >::value_type {aka class std::future<std::tuple<ensemble::Prediction, bool, double> >}'
if (!__has_trivial_destructor(value_type))
^
In file included from ./include/ThreadPool.hpp:32:0,
from src/tools/esvm-predict.cpp:32:
c:\mingw\lib\gcc\mingw32\5.3.0\include\c++\future:115:11: note: declaration of 'std::deque<std::future<std::tuple<ensemble::Prediction, bool, double> >, std::allocator<std::future<std::tuple<ensemble::Prediction, bool, double> > > >::value_type {aka class std::future<std::tuple<ensemble::Prediction, bool, double> >}'
class future;
^
In file included from c:\mingw\lib\gcc\mingw32\5.3.0\include\c++\deque:64:0,
from ./include/CLI.hpp:33,
from src/tools/esvm-predict.cpp:26:
c:\mingw\lib\gcc\mingw32\5.3.0\include\c++\bits\stl_deque.h: In instantiation of 'typename std::_Deque_iterator<_Tp, _Ref, _Ptr>::difference_type std::operator-(const std::_Deque_iterator<_Tp, _Ref, _Ptr>&, const std::_Deque_iterator<_Tp, _Ref, _Ptr>&) [with _Tp = std::packaged_task<std::tuple<ensemble::Prediction, bool, double>()>; _Ref = std::packaged_task<std::tuple<ensemble::Prediction, bool, double>()>&; _Ptr = std::packaged_task<std::tuple<ensemble::Prediction, bool, double>()>*; typename std::_Deque_iterator<_Tp, _Ref, _Ptr>::difference_type = int]':
c:\mingw\lib\gcc\mingw32\5.3.0\include\c++\bits\stl_deque.h:1264:40: required from 'std::deque<_Tp, _Alloc>::size_type std::deque<_Tp, _Alloc>::size() const [with _Tp = std::packaged_task<std::tuple<ensemble::Prediction, bool, double>()>; _Alloc = std::allocator<std::packaged_task<std::tuple<ensemble::Prediction, bool, double>()> >; std::deque<_Tp, _Alloc>::size_type = unsigned int]'
c:\mingw\lib\gcc\mingw32\5.3.0\include\c++\bits\stl_queue.h:159:23: required from 'std::queue<_Tp, _Sequence>::size_type std::queue<_Tp, _Sequence>::size() const [with _Tp = std::packaged_task<std::tuple<ensemble::Prediction, bool, double>()>; _Sequence = std::deque<std::packaged_task<std::tuple<ensemble::Prediction, bool, double>()>, std::allocator<std::packaged_task<std::tuple<ensemble::Prediction, bool, double>()> > >; std::queue<_Tp, _Sequence>::size_type = unsigned int]'
./include/ThreadPool.hpp:170:33: required from 'void ensemble::ThreadPool<Ret(Args ...)>::addjob(Args ...) [with Ret = std::tuple<ensemble::Prediction, bool, double>; Args = {std::shared_ptrensemble::ConstDataLine}]'
src/tools/esvm-predict.cpp:273:26: required from here
c:\mingw\lib\gcc\mingw32\5.3.0\include\c++\bits\stl_deque.h:354:50: error: invalid use of incomplete type 'class std::packaged_task<std::tuple<ensemble::Prediction, bool, double>()>'
/c/Users/LIPS/Desktop/ensemblesvm-2.0.tar/ensemblesvm-2.0' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory
/c/Users/LIPS/Desktop/ensemblesvm-2.0.tar/ensemblesvm-2.0'While merging 2 models generated using svm lite can be done using ensemble svm.
If so, i got an error.
unknown text in model file: [svm-light]
Segmentation fault (core dumped)
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.