Skip to content
This repository was archived by the owner on Oct 31, 2023. It is now read-only.

Commit

Permalink
Fixing a link in README. Fix issue in Sobol.
Browse files Browse the repository at this point in the history
  • Loading branch information
rmcantin committed Mar 29, 2017
1 parent fdc6659 commit 7d744f6
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 19 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ or the git mirror:


The online documentation can be found at:
<http://rmcantin.bitbucket.org/html/> where it includes a [install
guide](http://rmcantin.bitbucket.org/html/install.html).
<http://rmcantin.bitbucket.io/html/> where it includes a [install
guide](http://rmcantin.bitbucket.io/html/install.html).


Questions and issues
Expand Down
10 changes: 8 additions & 2 deletions matlab/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,22 +18,28 @@
# along with BayesOpt. If not, see <http://www.gnu.org/licenses/>.
# ------------------------------------------------------------------------

#Modify the path to your MATLAB folder
MATLABROOT=C:\Program Files (x86)\MATLAB\R2010a

MATLABROOT= C:\Program Files (x86)\MATLAB\R2010a
CC=mingw32-c++
INCLUDES=-I"$(MATLABROOT)\extern\include" -I"." -I"..\include" -I"..\wrappers"
LIBS=-L"$(MATLABROOT)\bin\win32" -lmex -lmx -leng -lmat
FLAGS=-shared -DMATLAB_MEX_FILE -Wl,--export-all-symbols

#Use BOPT=libbayesopt.lib if you compiled BayesOpt as a static library.
BOPT=libbayesopt.dll

all: disc cont
all: disc cont cat

cont:
$(CC) $(FLAGS) $(INCLUDES) -o bayesoptcont.mexw32 bayesoptmex.c $(BOPT) $(LIBS)

disc:
$(CC) $(FLAGS) $(INCLUDES) -o bayesoptdisc.mexw32 bayesoptdiscmex.c $(BOPT) $(LIBS)

cat:
$(CC) $(FLAGS) $(INCLUDES) -o bayesoptcat.mexw32 bayesoptcatmex.c $(BOPT) $(LIBS)




Expand Down
8 changes: 4 additions & 4 deletions python/demo_quad.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,15 @@
def testfunc(Xin):
total = 5.0
for value in Xin:
total = total + (value -0.33)*(value-0.33)
total = total + (value - 0.33)*(value-0.33)

return total

# Class for OO testing.
class BayesOptTest(BayesOptContinuous):
def evaluateSample(self,Xin):
return testfunc(Xin)



# Let's define the parameters
# For different options: see parameters.h and cpp
# If a parameter is not define, it will be automatically set
Expand All @@ -48,7 +47,7 @@ def evaluateSample(self,Xin):
params['n_iter_relearn'] = 5
params['n_init_samples'] = 2

print "Callback implementation"
print("Callback implementation")

n = 5 # n dimensions
lb = np.zeros((n,))
Expand All @@ -61,6 +60,7 @@ def evaluateSample(self,Xin):
print "Running time:", clock() - start, "seconds"
raw_input('Press INTRO to continue')


print "OO implementation"
bo_test = BayesOptTest(n)
bo_test.parameters = params
Expand Down
12 changes: 2 additions & 10 deletions src/inneroptimization.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,16 +64,8 @@ namespace bayesopt

// It seems BOBYQA can be unstable if the same point is repeated
// tested over and over. NLOPT bug?
if (algo == nlopt::LN_BOBYQA)
{
opt.set_ftol_rel(1e-8);
opt.set_ftol_abs(1e-8);
}
else
{
opt.set_ftol_rel(1e-12);
opt.set_ftol_abs(1e-12);
}
opt.set_ftol_rel(1e-12);
opt.set_ftol_abs(1e-12);

std::copy(Xnext.begin(),Xnext.end(),xstd.begin());

Expand Down
2 changes: 1 addition & 1 deletion utils/lhs.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ namespace bayesopt

double *sobol_seq = i8_sobol_generate(nDims,nSamples,seed);

std::copy(sobol_seq,sobol_seq+nSamples*nDims,result.begin2());
std::copy(sobol_seq,sobol_seq+(nSamples*nDims),result.data().begin());
}
#endif

Expand Down

0 comments on commit 7d744f6

Please sign in to comment.