Commit 57589b78 authored by Jean-Baptiste Mouret's avatar Jean-Baptiste Mouret
Browse files

misc

parent 5941379a
......@@ -32,7 +32,7 @@ import re
from waflib import Utils, Logs
from waflib.Configure import conf
BOOST_LIBS = ['/usr/lib', '/usr/local/lib', '/opt/local/lib', '/sw/lib', '/lib']
BOOST_LIBS = ['/usr/lib', '/usr/local/lib', '/opt/local/lib', '/sw/lib', '/lib', '/usr/lib/x86_64-linux-gnu/']
BOOST_INCLUDES = ['/usr/include', '/usr/local/include', '/opt/local/include', '/sw/include']
BOOST_VERSION_FILE = 'boost/version.hpp'
BOOST_VERSION_CODE = '''
......
......@@ -2,13 +2,6 @@ import sys, os
import subprocess
import commands
json_ok = True
try:
import simplejson
except:
json_ok = False
print "WARNING simplejson not found some function may not work"
import glob
def options(opt):
......
......@@ -146,7 +146,7 @@ int main() {
typedef zdt1 func_t;
#elif defined ZDT2
typedef zdt2 func_t;
#elif defined ZDT3
#elif defined ZDT3
typedef zdt3 func_t;
#elif defined MOP2
typedef mop2 func_t;
......
......@@ -28,7 +28,7 @@ namespace limbo {
};
struct pop {
SFERES_CONST unsigned size = 100;
SFERES_CONST unsigned nb_gen = 2000;
SFERES_CONST unsigned nb_gen = 1000;
SFERES_CONST int dump_period = -1;
SFERES_CONST int initial_aleat = 1;
};
......@@ -109,7 +109,9 @@ namespace limbo {
// will be called at the end of the algo
template<int D>
void update_pareto_model() {
std::cout<<"updating models..."; std::cout.flush();
this->_update_models();
std::cout<< "ok" << std::endl;
typedef sferes::gen::EvoFloat<D, multi::SferesParams> gen_t;
typedef sferes::phen::Parameters<gen_t, multi::SferesFit<model_t>, multi::SferesParams> phen_t;
typedef sferes::eval::Parallel<multi::SferesParams> eval_t;
......
......@@ -109,13 +109,13 @@ namespace limbo {
double _mu(const Eigen::VectorXd& v, const Eigen::VectorXd& k) const {
return _mean_function(v) + k.transpose() * _alpha;
// return _mean_function(v)
// + (k.transpose() * _inverted_kernel * (_obs_mean))[0];
// return _mean_function(v)
// + (k.transpose() * _inverted_kernel * (_obs_mean))[0];
}
double _sigma(const Eigen::VectorXd& v, const Eigen::VectorXd& k) const {
Eigen::VectorXd z = _llt.matrixL().solve(k);
return _kernel_function(v, v) - z.dot(z);
// return _kernel_function(v, v) - (k.transpose() * _inverted_kernel * k)[0];
// return _kernel_function(v, v) - (k.transpose() * _inverted_kernel * k)[0];
}
Eigen::VectorXd _compute_k(const Eigen::VectorXd& v) const {
Eigen::VectorXd k(_samples.size());
......
......@@ -26,7 +26,9 @@ namespace limbo {
this->_init(feval, reset);
while (this->_samples.size() == 0 || this->_pursue()) {
std::cout<<"updating pareto model..."; std::cout.flush();
this->template update_pareto_model<EvalFunction::dim>();
std::cout<<"ok"<<std::endl;
auto pareto = this->pareto_model();
// this is hack to test wether we need a bound
pareto.erase(std::remove_if(pareto.begin(), pareto.end(),
......
......@@ -29,12 +29,6 @@ def configure(conf):
conf.load('tbb')
conf.load('sferes')
if conf.options.exp:
for i in conf.options.exp.split(','):
print 'Building exp: ' + i
conf.recurse('exp/' + i)
common_flags = "-Wall -std=c++11"
cxxflags = conf.env['CXXFLAGS']
......@@ -51,11 +45,16 @@ def configure(conf):
if conf.is_defined('USE_SFERES'):
common_flags += " -DUSE_SFERES -DSFERES_FAST_DOMSORT"
# release
opt_flags = common_flags + ' -O3 -msse2 -ggdb3 -g'
conf.env['CXXFLAGS'] = cxxflags + opt_flags.split(' ')
print conf.env['CXXFLAGS']
if conf.options.exp:
for i in conf.options.exp.split(','):
print 'configuring for exp: ' + i
conf.recurse('exp/' + i)
def build(bld):
bld.recurse('src/limbo')
bld.recurse('src/examples')
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment