Code Monkey home page Code Monkey logo

stk-kriging / stk Goto Github PK

View Code? Open in Web Editor NEW
39.0 39.0 13.0 6.25 MB

The STK is a (not so) Small Toolbox for Kriging. Its primary focus is on the interpolation/regression technique known as kriging, which is very closely related to Splines and Radial Basis Functions, and can be interpreted as a non-parametric Bayesian method using a Gaussian Process (GP) prior.

License: GNU General Public License v3.0

Makefile 0.32% MATLAB 79.41% Shell 0.08% HTML 2.46% CSS 0.19% C 17.54%
computer-experiment-design gaussian-process-optimisation gaussian-process-regression gaussian-processes geostatistics kriging machine-learning

stk's People

Contributors

ashwinr1993 avatar gpmp-dev avatar jbect avatar rmistroh avatar romainait 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

stk's Issues

Make it possible to predict/simulate any model component

Long term goal: make it possible to predict/simulate any model "component".

For instance, in the case of a standard (noisy) STK model:

  • future noisy observations,
  • latent process,
  • lm component of the latent process,
  • zero-mean-GP component of the latent process.

Other examples:

  • components of a process defined as a sum,
  • real / imaginary parts of a complex-valued GP (see #4),
  • partial derivative,
  • ...

(ref original ticket on Sourceforge: https://sourceforge.net/p/kriging/tickets/63/)

Could not run some of the STK functions

Hello all,

When I want to run some of the STK functions (e.g. stk_sampling_randomlhs(2, [2 3; 4 5])), I encounter with the following error:
error: octave_base_value::function_value(): wrong type argument '<unknown type>'

As well, when I run stk_example_kb03 function, it only draws top-left plot and then crashes with the above error.

I use a clean installation of Octave 6.1.0-w64 portable version in 64-bit Windows 7. I installed STK from the .tar.gz file. I am able to run those functions without any problem in Octave 4.4.1.

Btw, should I run anything after installing/loading STK package manually? I'm asking this, because I noticed that there is a STK related script, namely stk-post-install.m, in OCTAVE_HOME/mingw64/share/octave/site/m/once_only.

I will be appreciated if you can help me.

Thanks in advance.

Class hierarchy for sampling criteria

This is a meta-issue to keep track of ongoing work on the development of sampling criterion classes.

(ref of original ticket on Sourceforge: https://sourceforge.net/p/kriging/tickets/42/)

Here are some facts about the current state of implementation:

  • Sampling criterion classes for EI, EQI and AKG have been released in STK 2.5.0 with an "experimental" status (meaning: API might change in the future) and have not been significantly modified since then.
  • The EHVI and EMMI criteria for multi-objective optimization are only available as *_eval functions; the corresponding classes are missing.
  • An drafty implementation of IAGO available on the default branch but not included in the releases yet.
  • One SUR sampling criterion for contour/probfail estimation is available from the BSS repo.

test stk_param_estim.m on octave 8.2.1: multiple FAILures

Failure Summary:

  ..tave/api-v58/packages/stk-2.8.0/param/estim/stk_param_estim.m  pass    6/11  
                                                                   FAIL    5

They all look similar, e.g.:

***** test  % noiseless
 zi = stk_feval (f, xi);
 param1 = stk_param_estim (model, xi, zi, param0);
 assert (isequal (size (param1), size (param0)))
warning: sqp: QP subproblem is non-convex and unbounded
warning: called from
    sqp at line 436 column 9
    stk_minimize_boxconstrained at line 49 column 14
    stk_param_estim_optim at line 70 column 23
    stk_param_estim at line 139 column 15
    __test__ at line 4 column 9
    test at line 682 column 11

!!!!! test failed
operator *: nonconformant arguments (op1 is 3x6, op2 is 0x0)
shared variables     f =

@(x) (-(0.8 * x + sin (5 * x + 1) + 0.1 * sin (10 * x)))

    xi =

      <class stk_factorialdesign>

    zi = [](0x0)
    NI = 20
    param0 =

            0
       1.3863
       0.9163

    param1 = [](0x0)
    model =

      scalar structure containing the fields:

        covariance_type = @stk_materncov_iso
        lm =

          <class stk_lm_constant>

        dim = 1
        param =

           NaN
           NaN
           NaN

        lognoisevariance = -Inf

test stk_param_init FAIL on octave 8.2.1 (and 9.0.0)

***** test
 model = stk_model (@stk_materncov_iso);
 [param0, model.lognoisevariance] = stk_param_init (model, xi, zi, BOX);
 model.param = stk_param_estim (model, xi, zi, param0);
 zp = stk_predict (model, xi, zi, xt);
 assert (max ((zp.mean - zt) .^ 2) < 1e-3)
warning: sqp: QP subproblem is non-convex and unbounded
warning: called from
    sqp at line 436 column 9
    stk_minimize_boxconstrained at line 49 column 14
    stk_param_estim_optim at line 70 column 23
    stk_param_estim at line 139 column 15
    __test__ at line 5 column 14
    test at line 682 column 11

!!!!! test failed
operator *: nonconformant arguments (op1 is 3x6, op2 is 0x0)
shared variables     xi =

      <class stk_factorialdesign>

    zi =

      <class stk_dataframe>

    BOX =

      -1
       1

    xt =

      <class stk_factorialdesign>

    zt =

      <class stk_dataframe>

Sampcrit class + example script for EMMI criterion

The EHVI criterion [1] is available through the stk_sampcrit_emmi_eval function since STK 2.4.0.

The corresponding sampcrit class is missing. Also, an example script would be useful.

[1] Svenson, J., & Santner, T. (2016). Multiobjective optimization of expensive-to-evaluate deterministic computer simulator models. Computational Statistics & Data Analysis, 94, 250-264, DOI: 10.1016/j.csda.2015.08.011.

(original ticket on Sourceforge: https://sourceforge.net/p/kriging/tickets/84/)

(meta-issue about sampcrit classes: #10)

Heteroscedastic noise support

Experimental support for parametric heteroscedastic models has been introduced in STK 2.6.0:

  • the stk_gaussiannoise_het0 class provides a simple example of heteroscedactic noise model, derived from the base class stk_gaussiannoise_,
  • stk_example_misc05 demonstrates the use of noise model objects to estimate the dispersion parameter in an heteroscedatic case.

(original ticket on Sourceforge: https://sourceforge.net/p/kriging/tickets/38/)

This ticket is created to keep track of further developments in this direction, including:

Improve consistency of numerics throughout the toolbox

stk_param_relik uses a combination of "filtering matrix" (obtained using QR) and a Cholesky factorizations of the filtered covariance matrix. This computational approach could/should be encapsulated in a class similar to (but distinct from) stk_kreq_qr.

Other parts of the toolbox work with a different computational approach, encapsulated in stk_kreq_qr (namlely, a QR factorization of the "kriging matrix"). Why not use the same technique in stk_param_relik as well? For instance, it should be possible to compute the restricted likelihood from an stk_model_gpposterior object very quickly (since everything has been pre-computed).

Ideally, once both approaches (and possibly others !) have been properly encapsulated, it should be possible to switch transparently between them for all computations in the toolbox—likelihoods and predictions.

(ref orginal ticket on SourceForge: https://sourceforge.net/p/kriging/tickets/5/)

Missing DESCRIPTION file

As I was updating the MacPorts Portfile to version 2.8.0, the build failed, as

the DESCRIPTION file /opt/local/var/macports/build/_Users_marius_Development_MacPorts_ports_math_octave-stk/octave-stk/work/tmp-build could not be read: invalid stream object

This file was part of the 2.7.0 package.

Numerical instabilities in the evaluation of the restricted likelihood

There are numerical instabilities in the evaluation of the restricted likelihood for the attached dataset in a certain region of the parameter space, for large values of the range parameter:

image

These numerical instabilities can create difficulties in the parameter optimization process. We need better numerical methods for large range models.

Attachment : relikNumericalIssue.zip.

(ref orginal ticket on SourceForge: https://sourceforge.net/p/kriging/tickets/18/)

Failing tests related to fminsearch

There currently two failing tests under Matlab (tested with R2016b) when fminsearch is used as last recourse for box-constrained problems.

The first one is in stk_optim_testmin_box.m and simply indicates that the solution not not satisfy the box constraint:

>> stk_test stk_optim_testmin_box
***** assert (stk_optim_testmin_box (algo));
!!!!! test failed
Error using stk_test>eval_test_code (line 505)
Assertion failed.

The second one is in stk_param_estim, and is probably a symptom of a more severe problem:

>> stk_test stk_param_estim
***** test  % noiseless
 zi = stk_feval (f, xi);
 param1 = stk_param_estim (model, xi, zi, param0);
 param2 = stk_param_estim (model, xi, zi, param0, [], @stk_param_relik);
 % We cannot assume a DETERMINISTIC optimization algorithm
 % (for some reason, Octave's sqp is not exactly deterministic)
 assert (stk_isequal_tolrel (param1, param2, 1e-2))
!!!!! test failed
Error using stk_cholcov (line 66)
A contains NaNs or Infs.

Perhaps should we try to provide a better default optimizer for Matlab users that have neither the Optimization toolbox nor MOSEK?

(ref original ticket on Sourceforge: https://sourceforge.net/p/kriging/tickets/65/)

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.