Difference between revisions of "OoDACE:ooDACE toolbox"

From SUMOwiki
Jump to navigationJump to search
Line 47: Line 47:
 
== DACE toolbox interface ==
 
== DACE toolbox interface ==
  
<code><pre>dacefit()</pre></code>
+
The blindDACE toolbox provide two scripts dacefit.m and predictor.m that simulate the behavior of the DACE toolbox ([[http://www2.imm.dtu.dk/~hbn/dace/]]). Note, that full compatibility is not provided. The scripts only aim to ease the transition from the DACE toolbox to blindDACE.
<code><pre>predictor()</pre></code>
+
 
 +
Example code:
 +
<source lang="matlab">
 +
krige = dacefit(samples, values, 'regpoly0', 'corrgauss', theta0, lb, ub )
 +
y = predictor([1 2], krige)
 +
</source>
 +
 
 +
Obviously, a lot less code is used to copy the setup described above. However, less code means less flexibility (e.g., blind kriging and regression kriging is not available using the wrapper scripts). Hence, it is suggested to learn the object oriented interface of blindDACE and use that instead.
  
 
== Contribute ==
 
== Contribute ==
  
 
These bindings are very basic but they work for me.  Please improve, extend, provide binaries, and of course contribute back.
 
These bindings are very basic but they work for me.  Please improve, extend, provide binaries, and of course contribute back.

Revision as of 11:08, 9 February 2010

blindDACE: A versatile kriging Matlab Toolbox

TODO description

Download

See: [[1]]

Quick start guide

IMPORTANT: Before the toolbox can be used you have to include the toolbox in Matlab's path. You can do this manually by running startup or if Matlab is started in the root toolbox directory then startup will be run automatically.

startup


Now the toolbox is ready to be used. The blindDACE toolbox is designed in an object oriented (OO) fashion. It is strongly recommended to exploit the OO design directly, i.e., use the Kriging and Optimizer matlab classes. However, for convenience wrapper scripts (dacefit, predictor) are provided that simulate the DACE toolbox interface (see section TODO for more information).

...
% Generate kriging options structure
opts = getDefaultOptions();
opts.hpBounds = [lb ; ub]; % hyperparameter optimization bounds

% configure the optimization algorithm (only one optimizer is included)
% the Matlab Optimization toolbox is REQUIRED
optimopts.GradObj = 'on';
optimopts.DerivativeCheck = 'off';
optimopts.Diagnostics = 'off';
optimopts.Algorithm = 'active-set';
opts.hpOptimizer = MatlabOptimizer( dim, 1, optimopts );

% build and fit Kriging object
k = Kriging( opts, theta0, 'regpoly0', @corrgauss );
k = k.fit( samples, values );

% k represents the approximation and can now be used, e.g.,
[y mse] = k.predict( [1 2] )
...

See the included demo.m script for more example code on how to use the blindDACE toolbox (including more advances features such as using blind kriging or how to use regression instead of interpolation).

DACE toolbox interface

The blindDACE toolbox provide two scripts dacefit.m and predictor.m that simulate the behavior of the DACE toolbox ([[2]]). Note, that full compatibility is not provided. The scripts only aim to ease the transition from the DACE toolbox to blindDACE.

Example code:

krige = dacefit(samples, values, 'regpoly0', 'corrgauss', theta0, lb, ub )
y = predictor([1 2], krige)

Obviously, a lot less code is used to copy the setup described above. However, less code means less flexibility (e.g., blind kriging and regression kriging is not available using the wrapper scripts). Hence, it is suggested to learn the object oriented interface of blindDACE and use that instead.

Contribute

These bindings are very basic but they work for me. Please improve, extend, provide binaries, and of course contribute back.