Diff of the two buildlogs: -- --- b1/build.log 2024-10-06 05:10:49.864458811 +0000 +++ b2/build.log 2024-10-06 05:14:47.570343814 +0000 @@ -1,6 +1,6 @@ I: pbuilder: network access will be disabled during build -I: Current time: Fri Nov 7 23:30:58 -12 2025 -I: pbuilder-time-stamp: 1762601458 +I: Current time: Sun Oct 6 19:10:52 +14 2024 +I: pbuilder-time-stamp: 1728191452 I: Building the build Environment I: extracting base tarball [/var/cache/pbuilder/trixie-reproducible-base.tgz] I: copying local configuration @@ -29,53 +29,85 @@ dpkg-source: info: applying 0003-Mark-expected-failure.patch I: Not using root during the build. I: Installing the build-deps -I: user script /srv/workspace/pbuilder/17486/tmp/hooks/D02_print_environment starting +I: user script /srv/workspace/pbuilder/25398/tmp/hooks/D01_modify_environment starting +debug: Running on infom07-i386. +I: Changing host+domainname to test build reproducibility +I: Adding a custom variable just for the fun of it... +I: Changing /bin/sh to bash +'/bin/sh' -> '/bin/bash' +lrwxrwxrwx 1 root root 9 Oct 6 05:11 /bin/sh -> /bin/bash +I: Setting pbuilder2's login shell to /bin/bash +I: Setting pbuilder2's GECOS to second user,second room,second work-phone,second home-phone,second other +I: user script /srv/workspace/pbuilder/25398/tmp/hooks/D01_modify_environment finished +I: user script /srv/workspace/pbuilder/25398/tmp/hooks/D02_print_environment starting I: set - BUILDDIR='/build/reproducible-path' - BUILDUSERGECOS='first user,first room,first work-phone,first home-phone,first other' - BUILDUSERNAME='pbuilder1' - BUILD_ARCH='i386' - DEBIAN_FRONTEND='noninteractive' - DEB_BUILD_OPTIONS='buildinfo=+all reproducible=+all parallel=6 ' - DISTRIBUTION='trixie' - HOME='/root' - HOST_ARCH='i386' + BASH=/bin/sh + BASHOPTS=checkwinsize:cmdhist:complete_fullquote:extquote:force_fignore:globasciiranges:globskipdots:hostcomplete:interactive_comments:patsub_replacement:progcomp:promptvars:sourcepath + BASH_ALIASES=() + BASH_ARGC=() + BASH_ARGV=() + BASH_CMDS=() + BASH_LINENO=([0]="12" [1]="0") + BASH_LOADABLES_PATH=/usr/local/lib/bash:/usr/lib/bash:/opt/local/lib/bash:/usr/pkg/lib/bash:/opt/pkg/lib/bash:. + BASH_SOURCE=([0]="/tmp/hooks/D02_print_environment" [1]="/tmp/hooks/D02_print_environment") + BASH_VERSINFO=([0]="5" [1]="2" [2]="32" [3]="1" [4]="release" [5]="i686-pc-linux-gnu") + BASH_VERSION='5.2.32(1)-release' + BUILDDIR=/build/reproducible-path + BUILDUSERGECOS='second user,second room,second work-phone,second home-phone,second other' + BUILDUSERNAME=pbuilder2 + BUILD_ARCH=i386 + DEBIAN_FRONTEND=noninteractive + DEB_BUILD_OPTIONS='buildinfo=+all reproducible=+all parallel=5 ' + DIRSTACK=() + DISTRIBUTION=trixie + EUID=0 + FUNCNAME=([0]="Echo" [1]="main") + GROUPS=() + HOME=/root + HOSTNAME=i-capture-the-hostname + HOSTTYPE=i686 + HOST_ARCH=i386 IFS=' ' - INVOCATION_ID='eb85bdc68a4e4ec89350e6f26095fd20' - LANG='C' - LANGUAGE='en_US:en' - LC_ALL='C' - LD_LIBRARY_PATH='/usr/lib/libeatmydata' - LD_PRELOAD='libeatmydata.so' - MAIL='/var/mail/root' - OPTIND='1' - PATH='/usr/sbin:/usr/bin:/sbin:/bin:/usr/games' - PBCURRENTCOMMANDLINEOPERATION='build' - PBUILDER_OPERATION='build' - PBUILDER_PKGDATADIR='/usr/share/pbuilder' - PBUILDER_PKGLIBDIR='/usr/lib/pbuilder' - PBUILDER_SYSCONFDIR='/etc' - PPID='17486' - PS1='# ' - PS2='> ' + INVOCATION_ID=e6e6495ef30c4595b551ed1fc81e17ec + LANG=C + LANGUAGE=de_CH:de + LC_ALL=C + LD_LIBRARY_PATH=/usr/lib/libeatmydata + LD_PRELOAD=libeatmydata.so + MACHTYPE=i686-pc-linux-gnu + MAIL=/var/mail/root + OPTERR=1 + OPTIND=1 + OSTYPE=linux-gnu + PATH=/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/i/capture/the/path + PBCURRENTCOMMANDLINEOPERATION=build + PBUILDER_OPERATION=build + PBUILDER_PKGDATADIR=/usr/share/pbuilder + PBUILDER_PKGLIBDIR=/usr/lib/pbuilder + PBUILDER_SYSCONFDIR=/etc + PIPESTATUS=([0]="0") + POSIXLY_CORRECT=y + PPID=25398 PS4='+ ' - PWD='/' - SHELL='/bin/bash' - SHLVL='2' - SUDO_COMMAND='/usr/bin/timeout -k 18.1h 18h /usr/bin/ionice -c 3 /usr/bin/nice /usr/sbin/pbuilder --build --configfile /srv/reproducible-results/rbuild-debian/r-b-build.boBCQuxc/pbuilderrc_vixQ --distribution trixie --hookdir /etc/pbuilder/first-build-hooks --debbuildopts -b --basetgz /var/cache/pbuilder/trixie-reproducible-base.tgz --buildresult /srv/reproducible-results/rbuild-debian/r-b-build.boBCQuxc/b1 --logfile b1/build.log octave-stk_2.8.1-3.dsc' - SUDO_GID='111' - SUDO_UID='104' - SUDO_USER='jenkins' - TERM='unknown' - TZ='/usr/share/zoneinfo/Etc/GMT+12' - USER='root' - _='/usr/bin/systemd-run' + PWD=/ + SHELL=/bin/bash + SHELLOPTS=braceexpand:errexit:hashall:interactive-comments:posix + SHLVL=3 + SUDO_COMMAND='/usr/bin/timeout -k 24.1h 24h /usr/bin/ionice -c 3 /usr/bin/nice -n 11 /usr/bin/unshare --uts -- /usr/sbin/pbuilder --build --configfile /srv/reproducible-results/rbuild-debian/r-b-build.boBCQuxc/pbuilderrc_Vqwe --distribution trixie --hookdir /etc/pbuilder/rebuild-hooks --debbuildopts -b --basetgz /var/cache/pbuilder/trixie-reproducible-base.tgz --buildresult /srv/reproducible-results/rbuild-debian/r-b-build.boBCQuxc/b2 --logfile b2/build.log octave-stk_2.8.1-3.dsc' + SUDO_GID=111 + SUDO_UID=104 + SUDO_USER=jenkins + TERM=unknown + TZ=/usr/share/zoneinfo/Etc/GMT-14 + UID=0 + USER=root + _='I: set' I: uname -a - Linux infom08-i386 6.10.6+bpo-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.10.6-1~bpo12+1 (2024-08-26) x86_64 GNU/Linux + Linux i-capture-the-hostname 6.1.0-26-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.112-1 (2024-09-30) x86_64 GNU/Linux I: ls -l /bin - lrwxrwxrwx 1 root root 7 Aug 4 2024 /bin -> usr/bin -I: user script /srv/workspace/pbuilder/17486/tmp/hooks/D02_print_environment finished + lrwxrwxrwx 1 root root 7 Aug 4 21:30 /bin -> usr/bin +I: user script /srv/workspace/pbuilder/25398/tmp/hooks/D02_print_environment finished -> Attempting to satisfy build-dependencies -> Creating pbuilder-satisfydepends-dummy package Package: pbuilder-satisfydepends-dummy @@ -652,7 +684,7 @@ Get: 537 http://deb.debian.org/debian trixie/main i386 gfortran i386 4:14.1.0-2 [1432 B] Get: 538 http://deb.debian.org/debian trixie/main i386 octave-dev i386 9.2.0-3 [1003 kB] Get: 539 http://deb.debian.org/debian trixie/main i386 dh-octave all 1.8.0 [22.7 kB] -Fetched 224 MB in 6s (38.7 MB/s) +Fetched 224 MB in 2s (92.6 MB/s) debconf: delaying package configuration, since apt-utils is not installed Selecting previously unselected package netbase. (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 19774 files and directories currently installed.) @@ -2865,7 +2897,11 @@ Building tag database... -> Finished parsing the build-deps I: Building the package -I: Running cd /build/reproducible-path/octave-stk-2.8.1/ && env PATH="/usr/sbin:/usr/bin:/sbin:/bin:/usr/games" HOME="/nonexistent/first-build" dpkg-buildpackage -us -uc -b && env PATH="/usr/sbin:/usr/bin:/sbin:/bin:/usr/games" HOME="/nonexistent/first-build" dpkg-genchanges -S > ../octave-stk_2.8.1-3_source.changes +I: user script /srv/workspace/pbuilder/25398/tmp/hooks/A99_set_merged_usr starting +Not re-configuring usrmerge for trixie +I: user script /srv/workspace/pbuilder/25398/tmp/hooks/A99_set_merged_usr finished +hostname: Name or service not known +I: Running cd /build/reproducible-path/octave-stk-2.8.1/ && env PATH="/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/i/capture/the/path" HOME="/nonexistent/second-build" dpkg-buildpackage -us -uc -b && env PATH="/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/i/capture/the/path" HOME="/nonexistent/second-build" dpkg-genchanges -S > ../octave-stk_2.8.1-3_source.changes dpkg-buildpackage: info: source package octave-stk dpkg-buildpackage: info: source version 2.8.1-3 dpkg-buildpackage: info: source distribution unstable @@ -2905,48 +2941,48 @@ /usr/bin/mkoctfile --verbose --mex --output __get_column_number__.mex get_column_number.c /usr/bin/mkoctfile --verbose --mex --output __stk_dist_matrixy__.mex stk_dist_matrixy.c /usr/bin/mkoctfile --verbose --mex --output __stk_filldist_discr_mex__.mex stk_filldist_discr_mex.c +gcc -c -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/octave-9.2.0/octave/.. -I/usr/include/octave-9.2.0/octave -pthread -fopenmp -mieee-fp -fexceptions -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/build/reproducible-path/octave-stk-2.8.1=. -fstack-protector-strong -Wformat -Werror=format-security -I. -DMEX_DEBUG stk_dist_pairwise.c -o /tmp/oct-vQHFUv.o +gcc -c -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/octave-9.2.0/octave/.. -I/usr/include/octave-9.2.0/octave -pthread -fopenmp -mieee-fp -fexceptions -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/build/reproducible-path/octave-stk-2.8.1=. -fstack-protector-strong -Wformat -Werror=format-security -I. -DMEX_DEBUG get_column_number.c -o /tmp/oct-U7lSBh.o +gcc -c -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/octave-9.2.0/octave/.. -I/usr/include/octave-9.2.0/octave -pthread -fopenmp -mieee-fp -fexceptions -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/build/reproducible-path/octave-stk-2.8.1=. -fstack-protector-strong -Wformat -Werror=format-security -I. -DMEX_DEBUG stk_dist_matrixy.c -o /tmp/oct-ZC6Nfn.o /usr/bin/mkoctfile --verbose --mex --output __stk_gpquadform_matrixy__.mex stk_gpquadform_matrixy.c -gcc -c -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/octave-9.2.0/octave/.. -I/usr/include/octave-9.2.0/octave -pthread -fopenmp -mieee-fp -fexceptions -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/build/reproducible-path/octave-stk-2.8.1=. -fstack-protector-strong -Wformat -Werror=format-security -I. -DMEX_DEBUG stk_dist_pairwise.c -o /tmp/oct-ygbYGg.o -gcc -c -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/octave-9.2.0/octave/.. -I/usr/include/octave-9.2.0/octave -pthread -fopenmp -mieee-fp -fexceptions -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/build/reproducible-path/octave-stk-2.8.1=. -fstack-protector-strong -Wformat -Werror=format-security -I. -DMEX_DEBUG get_column_number.c -o /tmp/oct-dUuU8b.o +gcc -c -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/octave-9.2.0/octave/.. -I/usr/include/octave-9.2.0/octave -pthread -fopenmp -mieee-fp -fexceptions -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/build/reproducible-path/octave-stk-2.8.1=. -fstack-protector-strong -Wformat -Werror=format-security -I. -DMEX_DEBUG stk_filldist_discr_mex.c -o /tmp/oct-lpgPBN.o /usr/bin/mkoctfile --verbose --mex --output __stk_isdominated_mex__.mex stk_isdominated_mex.c -gcc -c -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/octave-9.2.0/octave/.. -I/usr/include/octave-9.2.0/octave -pthread -fopenmp -mieee-fp -fexceptions -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/build/reproducible-path/octave-stk-2.8.1=. -fstack-protector-strong -Wformat -Werror=format-security -I. -DMEX_DEBUG stk_dist_matrixy.c -o /tmp/oct-RVjqtZ.o -gcc -c -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/octave-9.2.0/octave/.. -I/usr/include/octave-9.2.0/octave -pthread -fopenmp -mieee-fp -fexceptions -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/build/reproducible-path/octave-stk-2.8.1=. -fstack-protector-strong -Wformat -Werror=format-security -I. -DMEX_DEBUG stk_filldist_discr_mex.c -o /tmp/oct-u2v740.o +gcc -c -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/octave-9.2.0/octave/.. -I/usr/include/octave-9.2.0/octave -pthread -fopenmp -mieee-fp -fexceptions -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/build/reproducible-path/octave-stk-2.8.1=. -fstack-protector-strong -Wformat -Werror=format-security -I. -DMEX_DEBUG stk_gpquadform_matrixy.c -o /tmp/oct-98FQKT.o /usr/bin/mkoctfile --verbose --mex --output __stk_mindist_mex__.mex stk_mindist_mex.c -gcc -c -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/octave-9.2.0/octave/.. -I/usr/include/octave-9.2.0/octave -pthread -fopenmp -mieee-fp -fexceptions -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/build/reproducible-path/octave-stk-2.8.1=. -fstack-protector-strong -Wformat -Werror=format-security -I. -DMEX_DEBUG stk_isdominated_mex.c -o /tmp/oct-MYnOvZ.o +gcc -c -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/octave-9.2.0/octave/.. -I/usr/include/octave-9.2.0/octave -pthread -fopenmp -mieee-fp -fexceptions -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/build/reproducible-path/octave-stk-2.8.1=. -fstack-protector-strong -Wformat -Werror=format-security -I. -DMEX_DEBUG stk_isdominated_mex.c -o /tmp/oct-inz7eB.o +gcc -c -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/octave-9.2.0/octave/.. -I/usr/include/octave-9.2.0/octave -pthread -fopenmp -mieee-fp -fexceptions -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/build/reproducible-path/octave-stk-2.8.1=. -fstack-protector-strong -Wformat -Werror=format-security -I. -DMEX_DEBUG stk_mindist_mex.c -o /tmp/oct-SlyBqK.o /usr/bin/mkoctfile --verbose --mex --output __stk_dist_matrixx__.mex stk_dist_matrixx.c -gcc -c -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/octave-9.2.0/octave/.. -I/usr/include/octave-9.2.0/octave -pthread -fopenmp -mieee-fp -fexceptions -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/build/reproducible-path/octave-stk-2.8.1=. -fstack-protector-strong -Wformat -Werror=format-security -I. -DMEX_DEBUG stk_gpquadform_matrixy.c -o /tmp/oct-jYPS82.o -gcc -c -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/octave-9.2.0/octave/.. -I/usr/include/octave-9.2.0/octave -pthread -fopenmp -mieee-fp -fexceptions -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/build/reproducible-path/octave-stk-2.8.1=. -fstack-protector-strong -Wformat -Werror=format-security -I. -DMEX_DEBUG stk_mindist_mex.c -o /tmp/oct-ZEKQbH.o -gcc -c -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/octave-9.2.0/octave/.. -I/usr/include/octave-9.2.0/octave -pthread -fopenmp -mieee-fp -fexceptions -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/build/reproducible-path/octave-stk-2.8.1=. -fstack-protector-strong -Wformat -Werror=format-security -I. -DMEX_DEBUG stk_dist_matrixx.c -o /tmp/oct-nYt1Tc.o -g++ -I/usr/include/octave-9.2.0/octave/.. -I/usr/include/octave-9.2.0/octave -pthread -fopenmp -mieee-fp -g -O2 -ffile-prefix-map=/build/reproducible-path/octave-stk-2.8.1=. -fstack-protector-strong -Wformat -Werror=format-security -o __stk_dist_matrixy__.mex /tmp/oct-RVjqtZ.o -shared -Wl,-Bsymbolic -Wl,-z,relro -flto=auto -ffat-lto-objects -Wl,-z,relro -g++ -I/usr/include/octave-9.2.0/octave/.. -I/usr/include/octave-9.2.0/octave -pthread -fopenmp -mieee-fp -g -O2 -ffile-prefix-map=/build/reproducible-path/octave-stk-2.8.1=. -fstack-protector-strong -Wformat -Werror=format-security -o __stk_dist_matrixx__.mex /tmp/oct-nYt1Tc.o -shared -Wl,-Bsymbolic -Wl,-z,relro -flto=auto -ffat-lto-objects -Wl,-z,relro -g++ -I/usr/include/octave-9.2.0/octave/.. -I/usr/include/octave-9.2.0/octave -pthread -fopenmp -mieee-fp -g -O2 -ffile-prefix-map=/build/reproducible-path/octave-stk-2.8.1=. -fstack-protector-strong -Wformat -Werror=format-security -o __stk_filldist_discr_mex__.mex /tmp/oct-u2v740.o -shared -Wl,-Bsymbolic -Wl,-z,relro -flto=auto -ffat-lto-objects -Wl,-z,relro -g++ -I/usr/include/octave-9.2.0/octave/.. -I/usr/include/octave-9.2.0/octave -pthread -fopenmp -mieee-fp -g -O2 -ffile-prefix-map=/build/reproducible-path/octave-stk-2.8.1=. -fstack-protector-strong -Wformat -Werror=format-security -o __stk_dist_pairwise__.mex /tmp/oct-ygbYGg.o -shared -Wl,-Bsymbolic -Wl,-z,relro -flto=auto -ffat-lto-objects -Wl,-z,relro +gcc -c -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/octave-9.2.0/octave/.. -I/usr/include/octave-9.2.0/octave -pthread -fopenmp -mieee-fp -fexceptions -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/build/reproducible-path/octave-stk-2.8.1=. -fstack-protector-strong -Wformat -Werror=format-security -I. -DMEX_DEBUG stk_dist_matrixx.c -o /tmp/oct-3cRGXC.o +g++ -I/usr/include/octave-9.2.0/octave/.. -I/usr/include/octave-9.2.0/octave -pthread -fopenmp -mieee-fp -g -O2 -ffile-prefix-map=/build/reproducible-path/octave-stk-2.8.1=. -fstack-protector-strong -Wformat -Werror=format-security -o __stk_gpquadform_matrixy__.mex /tmp/oct-98FQKT.o -shared -Wl,-Bsymbolic -Wl,-z,relro -flto=auto -ffat-lto-objects -Wl,-z,relro /usr/bin/mkoctfile --verbose --mex --output __stk_gpquadform_matrixx__.mex stk_gpquadform_matrixx.c -gcc -c -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/octave-9.2.0/octave/.. -I/usr/include/octave-9.2.0/octave -pthread -fopenmp -mieee-fp -fexceptions -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/build/reproducible-path/octave-stk-2.8.1=. -fstack-protector-strong -Wformat -Werror=format-security -I. -DMEX_DEBUG stk_gpquadform_matrixx.c -o /tmp/oct-aGZsbM.o -g++ -I/usr/include/octave-9.2.0/octave/.. -I/usr/include/octave-9.2.0/octave -pthread -fopenmp -mieee-fp -g -O2 -ffile-prefix-map=/build/reproducible-path/octave-stk-2.8.1=. -fstack-protector-strong -Wformat -Werror=format-security -o __get_column_number__.mex /tmp/oct-dUuU8b.o -shared -Wl,-Bsymbolic -Wl,-z,relro -flto=auto -ffat-lto-objects -Wl,-z,relro +gcc -c -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/octave-9.2.0/octave/.. -I/usr/include/octave-9.2.0/octave -pthread -fopenmp -mieee-fp -fexceptions -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/build/reproducible-path/octave-stk-2.8.1=. -fstack-protector-strong -Wformat -Werror=format-security -I. -DMEX_DEBUG stk_gpquadform_matrixx.c -o /tmp/oct-pzKcq2.o +g++ -I/usr/include/octave-9.2.0/octave/.. -I/usr/include/octave-9.2.0/octave -pthread -fopenmp -mieee-fp -g -O2 -ffile-prefix-map=/build/reproducible-path/octave-stk-2.8.1=. -fstack-protector-strong -Wformat -Werror=format-security -o __stk_dist_matrixy__.mex /tmp/oct-ZC6Nfn.o -shared -Wl,-Bsymbolic -Wl,-z,relro -flto=auto -ffat-lto-objects -Wl,-z,relro +g++ -I/usr/include/octave-9.2.0/octave/.. -I/usr/include/octave-9.2.0/octave -pthread -fopenmp -mieee-fp -g -O2 -ffile-prefix-map=/build/reproducible-path/octave-stk-2.8.1=. -fstack-protector-strong -Wformat -Werror=format-security -o __get_column_number__.mex /tmp/oct-U7lSBh.o -shared -Wl,-Bsymbolic -Wl,-z,relro -flto=auto -ffat-lto-objects -Wl,-z,relro +g++ -I/usr/include/octave-9.2.0/octave/.. -I/usr/include/octave-9.2.0/octave -pthread -fopenmp -mieee-fp -g -O2 -ffile-prefix-map=/build/reproducible-path/octave-stk-2.8.1=. -fstack-protector-strong -Wformat -Werror=format-security -o __stk_filldist_discr_mex__.mex /tmp/oct-lpgPBN.o -shared -Wl,-Bsymbolic -Wl,-z,relro -flto=auto -ffat-lto-objects -Wl,-z,relro +g++ -I/usr/include/octave-9.2.0/octave/.. -I/usr/include/octave-9.2.0/octave -pthread -fopenmp -mieee-fp -g -O2 -ffile-prefix-map=/build/reproducible-path/octave-stk-2.8.1=. -fstack-protector-strong -Wformat -Werror=format-security -o __stk_dist_matrixx__.mex /tmp/oct-3cRGXC.o -shared -Wl,-Bsymbolic -Wl,-z,relro -flto=auto -ffat-lto-objects -Wl,-z,relro +g++ -I/usr/include/octave-9.2.0/octave/.. -I/usr/include/octave-9.2.0/octave -pthread -fopenmp -mieee-fp -g -O2 -ffile-prefix-map=/build/reproducible-path/octave-stk-2.8.1=. -fstack-protector-strong -Wformat -Werror=format-security -o __stk_mindist_mex__.mex /tmp/oct-SlyBqK.o -shared -Wl,-Bsymbolic -Wl,-z,relro -flto=auto -ffat-lto-objects -Wl,-z,relro +g++ -I/usr/include/octave-9.2.0/octave/.. -I/usr/include/octave-9.2.0/octave -pthread -fopenmp -mieee-fp -g -O2 -ffile-prefix-map=/build/reproducible-path/octave-stk-2.8.1=. -fstack-protector-strong -Wformat -Werror=format-security -o __stk_dist_pairwise__.mex /tmp/oct-vQHFUv.o -shared -Wl,-Bsymbolic -Wl,-z,relro -flto=auto -ffat-lto-objects -Wl,-z,relro +g++ -I/usr/include/octave-9.2.0/octave/.. -I/usr/include/octave-9.2.0/octave -pthread -fopenmp -mieee-fp -g -O2 -ffile-prefix-map=/build/reproducible-path/octave-stk-2.8.1=. -fstack-protector-strong -Wformat -Werror=format-security -o __stk_isdominated_mex__.mex /tmp/oct-inz7eB.o -shared -Wl,-Bsymbolic -Wl,-z,relro -flto=auto -ffat-lto-objects -Wl,-z,relro /usr/bin/mkoctfile --verbose --mex --output __stk_gpquadform_pairwise__.mex stk_gpquadform_pairwise.c -g++ -I/usr/include/octave-9.2.0/octave/.. -I/usr/include/octave-9.2.0/octave -pthread -fopenmp -mieee-fp -g -O2 -ffile-prefix-map=/build/reproducible-path/octave-stk-2.8.1=. -fstack-protector-strong -Wformat -Werror=format-security -o __stk_mindist_mex__.mex /tmp/oct-ZEKQbH.o -shared -Wl,-Bsymbolic -Wl,-z,relro -flto=auto -ffat-lto-objects -Wl,-z,relro -gcc -c -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/octave-9.2.0/octave/.. -I/usr/include/octave-9.2.0/octave -pthread -fopenmp -mieee-fp -fexceptions -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/build/reproducible-path/octave-stk-2.8.1=. -fstack-protector-strong -Wformat -Werror=format-security -I. -DMEX_DEBUG stk_gpquadform_pairwise.c -o /tmp/oct-tX5EmS.o -g++ -I/usr/include/octave-9.2.0/octave/.. -I/usr/include/octave-9.2.0/octave -pthread -fopenmp -mieee-fp -g -O2 -ffile-prefix-map=/build/reproducible-path/octave-stk-2.8.1=. -fstack-protector-strong -Wformat -Werror=format-security -o __stk_gpquadform_matrixy__.mex /tmp/oct-jYPS82.o -shared -Wl,-Bsymbolic -Wl,-z,relro -flto=auto -ffat-lto-objects -Wl,-z,relro /usr/bin/mkoctfile --verbose --mex --output __stk_paretofind_mex__.mex stk_paretofind_mex.c -gcc -c -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/octave-9.2.0/octave/.. -I/usr/include/octave-9.2.0/octave -pthread -fopenmp -mieee-fp -fexceptions -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/build/reproducible-path/octave-stk-2.8.1=. -fstack-protector-strong -Wformat -Werror=format-security -I. -DMEX_DEBUG stk_paretofind_mex.c -o /tmp/oct-qhUIWU.o /usr/bin/mkoctfile --verbose --mex --output __stk_sampling_vdc_rr2__.mex stk_sampling_vdc_rr2.c -gcc -c -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/octave-9.2.0/octave/.. -I/usr/include/octave-9.2.0/octave -pthread -fopenmp -mieee-fp -fexceptions -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/build/reproducible-path/octave-stk-2.8.1=. -fstack-protector-strong -Wformat -Werror=format-security -I. -DMEX_DEBUG stk_sampling_vdc_rr2.c -o /tmp/oct-G4Ziv8.o -g++ -I/usr/include/octave-9.2.0/octave/.. -I/usr/include/octave-9.2.0/octave -pthread -fopenmp -mieee-fp -g -O2 -ffile-prefix-map=/build/reproducible-path/octave-stk-2.8.1=. -fstack-protector-strong -Wformat -Werror=format-security -o __stk_isdominated_mex__.mex /tmp/oct-MYnOvZ.o -shared -Wl,-Bsymbolic -Wl,-z,relro -flto=auto -ffat-lto-objects -Wl,-z,relro /usr/bin/mkoctfile --verbose --mex --output __stk_sampling_sobol_mex__.mex stk_sampling_sobol_mex.c +gcc -c -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/octave-9.2.0/octave/.. -I/usr/include/octave-9.2.0/octave -pthread -fopenmp -mieee-fp -fexceptions -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/build/reproducible-path/octave-stk-2.8.1=. -fstack-protector-strong -Wformat -Werror=format-security -I. -DMEX_DEBUG stk_gpquadform_pairwise.c -o /tmp/oct-1WPqKE.o +gcc -c -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/octave-9.2.0/octave/.. -I/usr/include/octave-9.2.0/octave -pthread -fopenmp -mieee-fp -fexceptions -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/build/reproducible-path/octave-stk-2.8.1=. -fstack-protector-strong -Wformat -Werror=format-security -I. -DMEX_DEBUG stk_paretofind_mex.c -o /tmp/oct-y4aIzw.o /usr/bin/mkoctfile --verbose --mex --output __stk_distrib_bivnorm0_cdf__.mex stk_distrib_bivnorm0_cdf.c -gcc -c -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/octave-9.2.0/octave/.. -I/usr/include/octave-9.2.0/octave -pthread -fopenmp -mieee-fp -fexceptions -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/build/reproducible-path/octave-stk-2.8.1=. -fstack-protector-strong -Wformat -Werror=format-security -I. -DMEX_DEBUG stk_sampling_sobol_mex.c -o /tmp/oct-8tGFIz.o +gcc -c -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/octave-9.2.0/octave/.. -I/usr/include/octave-9.2.0/octave -pthread -fopenmp -mieee-fp -fexceptions -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/build/reproducible-path/octave-stk-2.8.1=. -fstack-protector-strong -Wformat -Werror=format-security -I. -DMEX_DEBUG stk_sampling_vdc_rr2.c -o /tmp/oct-LY1zN6.o +gcc -c -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/octave-9.2.0/octave/.. -I/usr/include/octave-9.2.0/octave -pthread -fopenmp -mieee-fp -fexceptions -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/build/reproducible-path/octave-stk-2.8.1=. -fstack-protector-strong -Wformat -Werror=format-security -I. -DMEX_DEBUG stk_sampling_sobol_mex.c -o /tmp/oct-MnozPI.o /usr/bin/mkoctfile --verbose --mex --output __stk_dominatedhv_mex__.mex stk_dominatedhv_mex.c wfg.c -gcc -c -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/octave-9.2.0/octave/.. -I/usr/include/octave-9.2.0/octave -pthread -fopenmp -mieee-fp -fexceptions -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/build/reproducible-path/octave-stk-2.8.1=. -fstack-protector-strong -Wformat -Werror=format-security -I. -DMEX_DEBUG stk_dominatedhv_mex.c -o /tmp/oct-bPnB7H.o -gcc -c -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/octave-9.2.0/octave/.. -I/usr/include/octave-9.2.0/octave -pthread -fopenmp -mieee-fp -fexceptions -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/build/reproducible-path/octave-stk-2.8.1=. -fstack-protector-strong -Wformat -Werror=format-security -I. -DMEX_DEBUG stk_distrib_bivnorm0_cdf.c -o /tmp/oct-BviFH1.o -g++ -I/usr/include/octave-9.2.0/octave/.. -I/usr/include/octave-9.2.0/octave -pthread -fopenmp -mieee-fp -g -O2 -ffile-prefix-map=/build/reproducible-path/octave-stk-2.8.1=. -fstack-protector-strong -Wformat -Werror=format-security -o __stk_gpquadform_matrixx__.mex /tmp/oct-aGZsbM.o -shared -Wl,-Bsymbolic -Wl,-z,relro -flto=auto -ffat-lto-objects -Wl,-z,relro -g++ -I/usr/include/octave-9.2.0/octave/.. -I/usr/include/octave-9.2.0/octave -pthread -fopenmp -mieee-fp -g -O2 -ffile-prefix-map=/build/reproducible-path/octave-stk-2.8.1=. -fstack-protector-strong -Wformat -Werror=format-security -o __stk_gpquadform_pairwise__.mex /tmp/oct-tX5EmS.o -shared -Wl,-Bsymbolic -Wl,-z,relro -flto=auto -ffat-lto-objects -Wl,-z,relro -g++ -I/usr/include/octave-9.2.0/octave/.. -I/usr/include/octave-9.2.0/octave -pthread -fopenmp -mieee-fp -g -O2 -ffile-prefix-map=/build/reproducible-path/octave-stk-2.8.1=. -fstack-protector-strong -Wformat -Werror=format-security -o __stk_paretofind_mex__.mex /tmp/oct-qhUIWU.o -shared -Wl,-Bsymbolic -Wl,-z,relro -flto=auto -ffat-lto-objects -Wl,-z,relro -g++ -I/usr/include/octave-9.2.0/octave/.. -I/usr/include/octave-9.2.0/octave -pthread -fopenmp -mieee-fp -g -O2 -ffile-prefix-map=/build/reproducible-path/octave-stk-2.8.1=. -fstack-protector-strong -Wformat -Werror=format-security -o __stk_sampling_vdc_rr2__.mex /tmp/oct-G4Ziv8.o -shared -Wl,-Bsymbolic -Wl,-z,relro -flto=auto -ffat-lto-objects -Wl,-z,relro -g++ -I/usr/include/octave-9.2.0/octave/.. -I/usr/include/octave-9.2.0/octave -pthread -fopenmp -mieee-fp -g -O2 -ffile-prefix-map=/build/reproducible-path/octave-stk-2.8.1=. -fstack-protector-strong -Wformat -Werror=format-security -o __stk_sampling_sobol_mex__.mex /tmp/oct-8tGFIz.o -shared -Wl,-Bsymbolic -Wl,-z,relro -flto=auto -ffat-lto-objects -Wl,-z,relro -g++ -I/usr/include/octave-9.2.0/octave/.. -I/usr/include/octave-9.2.0/octave -pthread -fopenmp -mieee-fp -g -O2 -ffile-prefix-map=/build/reproducible-path/octave-stk-2.8.1=. -fstack-protector-strong -Wformat -Werror=format-security -o __stk_distrib_bivnorm0_cdf__.mex /tmp/oct-BviFH1.o -shared -Wl,-Bsymbolic -Wl,-z,relro -flto=auto -ffat-lto-objects -Wl,-z,relro -gcc -c -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/octave-9.2.0/octave/.. -I/usr/include/octave-9.2.0/octave -pthread -fopenmp -mieee-fp -fexceptions -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/build/reproducible-path/octave-stk-2.8.1=. -fstack-protector-strong -Wformat -Werror=format-security -I. -DMEX_DEBUG wfg.c -o /tmp/oct-CebdW7.o -g++ -I/usr/include/octave-9.2.0/octave/.. -I/usr/include/octave-9.2.0/octave -pthread -fopenmp -mieee-fp -g -O2 -ffile-prefix-map=/build/reproducible-path/octave-stk-2.8.1=. -fstack-protector-strong -Wformat -Werror=format-security -o __stk_dominatedhv_mex__.mex /tmp/oct-bPnB7H.o /tmp/oct-CebdW7.o -shared -Wl,-Bsymbolic -Wl,-z,relro -flto=auto -ffat-lto-objects -Wl,-z,relro +gcc -c -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/octave-9.2.0/octave/.. -I/usr/include/octave-9.2.0/octave -pthread -fopenmp -mieee-fp -fexceptions -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/build/reproducible-path/octave-stk-2.8.1=. -fstack-protector-strong -Wformat -Werror=format-security -I. -DMEX_DEBUG stk_distrib_bivnorm0_cdf.c -o /tmp/oct-uFvMH0.o +gcc -c -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/octave-9.2.0/octave/.. -I/usr/include/octave-9.2.0/octave -pthread -fopenmp -mieee-fp -fexceptions -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/build/reproducible-path/octave-stk-2.8.1=. -fstack-protector-strong -Wformat -Werror=format-security -I. -DMEX_DEBUG stk_dominatedhv_mex.c -o /tmp/oct-3QcSHU.o +g++ -I/usr/include/octave-9.2.0/octave/.. -I/usr/include/octave-9.2.0/octave -pthread -fopenmp -mieee-fp -g -O2 -ffile-prefix-map=/build/reproducible-path/octave-stk-2.8.1=. -fstack-protector-strong -Wformat -Werror=format-security -o __stk_gpquadform_matrixx__.mex /tmp/oct-pzKcq2.o -shared -Wl,-Bsymbolic -Wl,-z,relro -flto=auto -ffat-lto-objects -Wl,-z,relro +g++ -I/usr/include/octave-9.2.0/octave/.. -I/usr/include/octave-9.2.0/octave -pthread -fopenmp -mieee-fp -g -O2 -ffile-prefix-map=/build/reproducible-path/octave-stk-2.8.1=. -fstack-protector-strong -Wformat -Werror=format-security -o __stk_sampling_vdc_rr2__.mex /tmp/oct-LY1zN6.o -shared -Wl,-Bsymbolic -Wl,-z,relro -flto=auto -ffat-lto-objects -Wl,-z,relro +g++ -I/usr/include/octave-9.2.0/octave/.. -I/usr/include/octave-9.2.0/octave -pthread -fopenmp -mieee-fp -g -O2 -ffile-prefix-map=/build/reproducible-path/octave-stk-2.8.1=. -fstack-protector-strong -Wformat -Werror=format-security -o __stk_paretofind_mex__.mex /tmp/oct-y4aIzw.o -shared -Wl,-Bsymbolic -Wl,-z,relro -flto=auto -ffat-lto-objects -Wl,-z,relro +g++ -I/usr/include/octave-9.2.0/octave/.. -I/usr/include/octave-9.2.0/octave -pthread -fopenmp -mieee-fp -g -O2 -ffile-prefix-map=/build/reproducible-path/octave-stk-2.8.1=. -fstack-protector-strong -Wformat -Werror=format-security -o __stk_gpquadform_pairwise__.mex /tmp/oct-1WPqKE.o -shared -Wl,-Bsymbolic -Wl,-z,relro -flto=auto -ffat-lto-objects -Wl,-z,relro +g++ -I/usr/include/octave-9.2.0/octave/.. -I/usr/include/octave-9.2.0/octave -pthread -fopenmp -mieee-fp -g -O2 -ffile-prefix-map=/build/reproducible-path/octave-stk-2.8.1=. -fstack-protector-strong -Wformat -Werror=format-security -o __stk_sampling_sobol_mex__.mex /tmp/oct-MnozPI.o -shared -Wl,-Bsymbolic -Wl,-z,relro -flto=auto -ffat-lto-objects -Wl,-z,relro +gcc -c -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/octave-9.2.0/octave/.. -I/usr/include/octave-9.2.0/octave -pthread -fopenmp -mieee-fp -fexceptions -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/build/reproducible-path/octave-stk-2.8.1=. -fstack-protector-strong -Wformat -Werror=format-security -I. -DMEX_DEBUG wfg.c -o /tmp/oct-x2batg.o +g++ -I/usr/include/octave-9.2.0/octave/.. -I/usr/include/octave-9.2.0/octave -pthread -fopenmp -mieee-fp -g -O2 -ffile-prefix-map=/build/reproducible-path/octave-stk-2.8.1=. -fstack-protector-strong -Wformat -Werror=format-security -o __stk_distrib_bivnorm0_cdf__.mex /tmp/oct-uFvMH0.o -shared -Wl,-Bsymbolic -Wl,-z,relro -flto=auto -ffat-lto-objects -Wl,-z,relro +g++ -I/usr/include/octave-9.2.0/octave/.. -I/usr/include/octave-9.2.0/octave -pthread -fopenmp -mieee-fp -g -O2 -ffile-prefix-map=/build/reproducible-path/octave-stk-2.8.1=. -fstack-protector-strong -Wformat -Werror=format-security -o __stk_dominatedhv_mex__.mex /tmp/oct-3QcSHU.o /tmp/oct-x2batg.o -shared -Wl,-Bsymbolic -Wl,-z,relro -flto=auto -ffat-lto-objects -Wl,-z,relro make[1]: Leaving directory '/build/reproducible-path/octave-stk-2.8.1/src' copyfile /build/reproducible-path/octave-stk-2.8.1/./src/__get_column_number__.mex /build/reproducible-path/octave-stk-2.8.1/./src/__stk_dist_matrixx__.mex /build/reproducible-path/octave-stk-2.8.1/./src/__stk_dist_matrixy__.mex /build/reproducible-path/octave-stk-2.8.1/./src/__stk_dist_pairwise__.mex /build/reproducible-path/octave-stk-2.8.1/./src/__stk_distrib_bivnorm0_cdf__.mex /build/reproducible-path/octave-stk-2.8.1/./src/__stk_dominatedhv_mex__.mex /build/reproducible-path/octave-stk-2.8.1/./src/__stk_filldist_discr_mex__.mex /build/reproducible-path/octave-stk-2.8.1/./src/__stk_gpquadform_matrixx__.mex /build/reproducible-path/octave-stk-2.8.1/./src/__stk_gpquadform_matrixy__.mex /build/reproducible-path/octave-stk-2.8.1/./src/__stk_gpquadform_pairwise__.mex /build/reproducible-path/octave-stk-2.8.1/./src/__stk_isdominated_mex__.mex /build/reproducible-path/octave-stk-2.8.1/./src/__stk_mindist_mex__.mex /build/reproducible-path/octave-stk-2.8.1/./src/__stk_paretofind_mex__.mex /build/reproducible-path/octave-stk-2.8.1/./src/__stk_sampling_sobol_mex__.mex /build/reproducible-path/octave-stk-2.8.1/./src/__stk_sampling_vdc_rr2__.mex /build/reproducible-path/octave-stk-2.8.1/./inst/i686-pc-linux-gnu-api-v59 For information about changes from previous versions of the stk package, run 'news stk'. @@ -2955,2474 +2991,1668 @@ Checking package... Run the unit tests... Checking m files ... -[inst/core/stk_predict_leaveoneout.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/core/stk_predict_leaveoneout.m -***** shared n, x_obs, z_obs, model - n = 20; - x_obs = stk_sampling_regulargrid (n, 1, [0; 2*pi]); - z_obs = stk_feval (@sin, x_obs); - model = stk_model (@stk_materncov32_iso); - model.param = log ([1; 5]); -***** test % one output - - loo_pred = stk_predict_leaveoneout (model, x_obs, z_obs); - - assert (isequal (size (loo_pred), [n 2])); - assert (isequal (loo_pred.colnames, {'mean', 'var'})); - assert (all (isfinite (loo_pred(:)))); -***** test % two outputs - - [loo_pred, loo_res] = stk_predict_leaveoneout (model, x_obs, z_obs); - - assert (isequal (size (loo_pred), [n 2])); - assert (isequal (loo_pred.colnames, {'mean', 'var'})); - assert (all (isfinite (loo_pred(:)))); - - assert (isequal (size (loo_res), [n 2])); - assert (isequal (loo_res.colnames, {'residuals', 'norm_res'})); - assert (all (isfinite (loo_res(:)))); -***** test % heteroscedastic noise case - - model.lognoisevariance = (1 + rand (n, 1)) * 1e-6; - [loo_pred, loo_res] = stk_predict_leaveoneout (model, x_obs, z_obs); - - assert (isequal (size (loo_pred), [n 2])); - assert (isequal (loo_pred.colnames, {'mean', 'var'})); - assert (all (isfinite (loo_pred(:)))); - - assert (isequal (size (loo_res), [n 2])); - assert (isequal (loo_res.colnames, {'residuals', 'norm_res'})); - assert (all (isfinite (loo_res(:)))); -3 tests, 3 passed, 0 known failure, 0 skipped -[inst/core/stk_cholcov.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/core/stk_cholcov.m -***** shared Q, K, L, U, epsi - Q = 0.25 * hadamard(4); -***** test - K = Q * diag ([1, 0.1, 0.01, 1e-7]) * Q'; - [U, epsi] = stk_cholcov (K); -***** assert (istriu (U)) -***** assert (epsi == 0) -***** test - K = Q * diag ([1, 0.1, 0.01, 1e-7]) * Q'; - [L, epsi] = stk_cholcov (K, 'lower'); -***** assert (istril (L)) -***** assert (epsi == 0) -***** test - K = Q * diag ([1, 0.1, 0.01, -1e-7]) * Q'; - [U, epsi] = stk_cholcov (K); -***** assert (istriu (U)) -***** assert (epsi > 0) -***** test - K = Q * diag ([1, 0.1, 0.01, -1e-7]) * Q'; - [L, epsi] = stk_cholcov (K, 'lower'); -***** assert (istril (L)) -***** assert (epsi > 0) -12 tests, 12 passed, 0 known failure, 0 skipped -[inst/core/stk_predict.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/core/stk_predict.m -***** shared n, m, model, x0, x_obs, z_obs, x_prd, y_prd1, idx_obs, idx_prd - - n = 10; % number of observations - m = n + 1; % number of predictions - d = 1; % dimension of the input space - - x0 = stk_sampling_regulargrid(n+m, d, [0; pi]); - - idx_obs = (2:2:(n+m-1))'; - idx_prd = (1:2:(n+m))'; +[inst/covfcs/stk_expcov_iso.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/covfcs/stk_expcov_iso.m +***** shared param, x, y + dim = 1; + param = log ([1.0; 2.5]); + x = stk_sampling_randunif (5, dim); + y = stk_sampling_randunif (5, dim); +***** error K = stk_expcov_iso ([param; 1.234], x, y); +***** error stk_expcov_iso (); +***** error stk_expcov_iso (param); +***** error stk_expcov_iso (param, x); +***** test stk_expcov_iso (param, x, y); +***** test stk_expcov_iso (param, x, y, -1); +***** test stk_expcov_iso (param, x, y, -1, false); +***** error stk_expcov_iso (param, x, y, -2); +***** test stk_expcov_iso (param, x, y, -1); +***** error stk_expcov_iso (param, x, y, 0); +***** test stk_expcov_iso (param, x, y, 1); +***** test stk_expcov_iso (param, x, y, 2); +***** error stk_expcov_iso (param, x, y, 3); +***** error stk_expcov_iso (param, x, y, nan); +***** error stk_expcov_iso (param, x, y, inf); +***** shared dim, param, x, y, nx, ny + dim = 3; + param = log ([1.0; 2.5]); + nx = 4; ny = 10; + x = stk_sampling_randunif (nx, dim); + y = stk_sampling_randunif (ny, dim); +***** test + K1 = stk_expcov_iso (param, x, y); + K2 = stk_expcov_iso (param, x, y, -1); + assert (isequal (size (K1), [nx ny])); + assert (stk_isequal_tolabs (K1, K2)); +***** test + for i = 1:2, + dK = stk_expcov_iso (param, x, y, i); + assert (isequal (size (dK), [nx ny])); + end +***** test + n = 7; + x = stk_sampling_randunif (n, dim); + y = stk_sampling_randunif (n, dim); - x_obs = x0(idx_obs); - z_obs = sin (double (x_obs)); - x_prd = x0(idx_prd); + K1 = stk_expcov_iso (param, x, y); + K2 = stk_expcov_iso (param, x, y, -1, true); + assert (isequal (size (K1), [n n])); + assert (stk_isequal_tolabs (K2, diag (K1))); - model = stk_model (@stk_materncov32_iso); - model.param = log ([1.0; 2.1]); -***** error y_prd1 = stk_predict (); -***** error y_prd1 = stk_predict (model); -***** test y_prd1 = stk_predict (model, x_prd); -***** error y_prd1 = stk_predict (model, data, x_prd); -***** test y_prd1 = stk_predict (model, x_obs, z_obs, x_prd); -***** error y_prd1 = stk_predict (model, [x_obs; x_obs], [z_obs; z_obs], x_prd); -***** test % nargout = 2 - [y_prd1, lambda] = stk_predict (model, x_obs, z_obs, x_prd); - assert (isequal (size (lambda), [n m])); -***** test % nargout = 2, compute only variances - [y_prd1, lambda] = stk_predict (model, x_obs, [], x_prd); - assert (isequal (size (lambda), [n m])); - assert (all (isnan (y_prd1.mean))); -***** test % nargout = 3 - [y_prd1, lambda, mu] = stk_predict (model, x_obs, z_obs, x_prd); - assert (isequal (size (lambda), [n m])); - assert (isequal (size (mu), [1 m])); % ordinary kriging -***** test % nargout = 4 - [y_prd1, lambda, mu, K] = stk_predict (model, x_obs, z_obs, x_prd); - assert (isequal (size (lambda), [n m])); - assert (isequal (size (mu), [1 m])); % ordinary kriging - assert (isequal (size (K), [m m])); -***** test % predict on large set of locations - x_prd = stk_sampling_regulargrid (1e5, 1, [0; pi]); - y_prd = stk_predict (model, x_obs, z_obs, x_prd); -***** test % predict on an observation point - % https://sourceforge.net/p/kriging/tickets/49/ - [zp, lambda] = stk_predict (model, x_obs, z_obs, x_obs(4)); - assert (isequal (z_obs(4), zp.mean)) - assert (isequal (zp.var, 0)) - lambda_ref = zeros (n, 1); lambda_ref(4) = 1; - assert (isequal (lambda, lambda_ref)) -12 tests, 12 passed, 0 known failure, 0 skipped -[inst/core/stk_make_matcov.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/core/stk_make_matcov.m -***** shared model, model2, x0, x1, n0, n1, d, Ka, Kb, Kc, Pa, Pb, Pc - n0 = 20; n1 = 10; d = 4; - model = stk_model (@stk_materncov52_aniso, d); - model.lm = stk_lm_affine; - model.param = log ([1.0; 2.1; 2.2; 2.3; 2.4]); - model2 = model; model2.lognoisevariance = log(0.01); - x0 = stk_sampling_randunif (n0, d); - x1 = stk_sampling_randunif (n1, d); -***** error [KK, PP] = stk_make_matcov (); -***** error [KK, PP] = stk_make_matcov (model); -***** test [Ka, Pa] = stk_make_matcov (model, x0); % (1) -***** test [Kb, Pb] = stk_make_matcov (model, x0, x0); % (2) -***** test [Kc, Pc] = stk_make_matcov (model, x0, x1); % (3) -***** error [KK, PP] = stk_make_matcov (model, x0, x1, pi); -***** assert (isequal (size (Ka), [n0 n0])); -***** assert (isequal (size (Kb), [n0 n0])); -***** assert (isequal (size (Kc), [n0 n1])); -***** assert (isequal (size (Pa), [n0 d + 1])); -***** assert (isequal (size (Pb), [n0 d + 1])); -***** assert (isequal (size (Pc), [n0 d + 1])); -***** assert (isequal (Kb, Ka)); -***** test [Ka, Pa] = stk_make_matcov (model2, x0); % (1') -***** test [Kb, Pb] = stk_make_matcov (model2, x0, x0); % (2') -***** error assert (isequal (Kb, Ka)); -***** assert (isequal (Pa, Pb)); -***** assert (isequal (Pa, Pc)); + for i = 1:2, + dK1 = stk_expcov_iso (param, x, y, i); + dK2 = stk_expcov_iso (param, x, y, i, true); + assert (isequal (size (dK1), [n n])); + assert (stk_isequal_tolabs (dK2, diag (dK1))); + end 18 tests, 18 passed, 0 known failure, 0 skipped -[inst/core/@stk_kreq_qr/stk_kreq_qr.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/core/@stk_kreq_qr/stk_kreq_qr.m -***** test stk_test_class ('stk_kreq_qr') -1 test, 1 passed, 0 known failure, 0 skipped -[inst/core/stk_model_update.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/core/stk_model_update.m +[inst/covfcs/stk_noisecov.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/covfcs/stk_noisecov.m +***** shared ni, lognoisevariance, diff + ni = 5; + lognoisevariance = 0.0; + diff = -1; +***** error K = stk_noisecov (); +***** error K = stk_noisecov (ni); +***** test K = stk_noisecov (ni, lognoisevariance); +***** test K = stk_noisecov (ni, lognoisevariance, diff); +***** test K = stk_noisecov (ni, lognoisevariance, diff, true); +5 tests, 5 passed, 0 known failure, 0 skipped +[inst/covfcs/stk_materncov52_iso.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/covfcs/stk_materncov52_iso.m +***** shared param, x, y + dim = 1; + param = log ([1.0; 2.5]); + x = stk_sampling_randunif (5, dim); + y = stk_sampling_randunif (5, dim); +***** error K = stk_materncov52_iso ([param; 1.234], x, y); +***** error stk_materncov52_iso (); +***** error stk_materncov52_iso (param); +***** error stk_materncov52_iso (param, x); +***** test stk_materncov52_iso (param, x, y); +***** test stk_materncov52_iso (param, x, y, -1); +***** test stk_materncov52_iso (param, x, y, -1, false); +***** error stk_materncov52_iso (param, x, y, -2); +***** test stk_materncov52_iso (param, x, y, -1); +***** error stk_materncov52_iso (param, x, y, 0); +***** test stk_materncov52_iso (param, x, y, 1); +***** test stk_materncov52_iso (param, x, y, 2); +***** error stk_materncov52_iso (param, x, y, 3); +***** error stk_materncov52_iso (param, x, y, nan); +***** error stk_materncov52_iso (param, x, y, inf); +***** shared dim, param, x, y, nx, ny + dim = 3; + param = log ([1.0; 2.5]); + nx = 4; ny = 10; + x = stk_sampling_randunif (nx, dim); + y = stk_sampling_randunif (ny, dim); ***** test - x1 = (linspace (0, 1, 15))'; z1 = sin (x1); - x2 = (linspace (2, 3, 15))'; z2 = sin (x2); - xt = (linspace (1, 2, 15))'; zt = sin (xt); - - % Prior model - M0 = stk_model (@stk_materncov32_iso); - M0.param = log ([1.0; 2.1]); - - M1 = stk_model_update (M0, x1, z1); - M1 = stk_model_update (M1, x2, z2); % this calls @stk_model_gpposterior/... - zp1 = stk_predict (M1, xt); - - M2 = stk_model_gpposterior (M0, [x1; x2], [z1; z2]); - zp2 = stk_predict (M2, xt); + K1 = stk_materncov52_iso (param, x, y); + K2 = stk_materncov52_iso (param, x, y, -1); + assert (isequal (size (K1), [nx ny])); + assert (stk_isequal_tolabs (K1, K2)); +***** test + for i = 1:2, + dK = stk_materncov52_iso (param, x, y, i); + assert (isequal (size (dK), [nx ny])); + end +***** test + n = 7; + x = stk_sampling_randunif (n, dim); + y = stk_sampling_randunif (n, dim); - assert (stk_isequal_tolabs (double (zp2 - zp1), zeros (15, 2), 1e-10)) -1 test, 1 passed, 0 known failure, 0 skipped -[inst/misc/text/stk_sprintf_colvect.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/misc/text/stk_sprintf_colvect.m -***** shared s -***** test s = stk_sprintf_colvect ([1 1e1], 6); -***** assert (isequal (s, [' 1'; '10'])) -***** test s = stk_sprintf_colvect ([1 1e3], 6); -***** assert (isequal (s, [' 1'; '1000'])) -***** test s = stk_sprintf_colvect ([1 1e5], 6); -***** assert (isequal (s, [' 1'; '100000'])) -***** test s = stk_sprintf_colvect ([1 1e6], 6); -***** assert (isequal (s, ['1e+00'; '1e+06'])) -8 tests, 8 passed, 0 known failure, 0 skipped -[inst/misc/text/stk_disp_progress.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/misc/text/stk_disp_progress.m -***** error stk_disp_progress ('toto ', 0, 1); -***** test stk_disp_progress ('toto ', 1, 1); -warning: implicit conversion from numeric to char -warning: called from - stk_disp_progress at line 53 column 1 - __test__ at line 2 column 3 - test at line 682 column 11 - /tmp/tmp.leWC69aW4i at line 70 column 31 + K1 = stk_materncov52_iso (param, x, y); + K2 = stk_materncov52_iso (param, x, y, -1, true); + assert (isequal (size (K1), [n n])); + assert (stk_isequal_tolabs (K2, diag (K1))); -toto -***** error stk_disp_progress ('toto ', 2, 1); + for i = 1:2, + dK1 = stk_materncov52_iso (param, x, y, i); + dK2 = stk_materncov52_iso (param, x, y, i, true); + assert (isequal (size (dK1), [n n])); + assert (stk_isequal_tolabs (dK2, diag (dK1))); + end +18 tests, 18 passed, 0 known failure, 0 skipped +[inst/covfcs/stk_sphcov_aniso.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/covfcs/stk_sphcov_aniso.m +***** shared param, x, y, K1, K2, K3 + dim = 1; + param = log ([1.0; 2.5]); + x = stk_sampling_randunif (5, dim); + y = stk_sampling_randunif (6, dim); +***** error K0 = stk_sphcov_aniso (); +***** error K0 = stk_sphcov_aniso (param); +***** error K0 = stk_sphcov_aniso (param, x); +***** test K1 = stk_sphcov_aniso (param, x, y); +***** test K2 = stk_sphcov_aniso (param, x, y, -1); +***** test K3 = stk_sphcov_aniso (param, x, y, -1, false); +***** assert (isequal (K1, K2)); +***** assert (isequal (K1, K3)); +***** test % df versus ordinary array + u = double (x); v = double (y); + K1 = stk_sphcov_aniso (param, u, v, -1); + K2 = stk_sphcov_aniso (param, stk_dataframe (u), stk_dataframe (v), -1); + assert (isequal (K1, K2)); +***** error stk_sphcov_aniso (param, x, y, -2); +***** test stk_sphcov_aniso (param, x, y, -1); +***** error stk_sphcov_aniso (param, x, y, 0); +***** test stk_sphcov_aniso (param, x, y, 1); +***** test stk_sphcov_aniso (param, x, y, 2); +***** error stk_sphcov_aniso (param, x, y, 3); +***** error stk_sphcov_aniso (param, x, y, nan); +***** error stk_sphcov_aniso (param, x, y, inf); +***** shared dim, param, x, y, nx, ny + dim = 3; + param = log ([1.0; 2.5; 2.4; 2.6]); + nx = 4; ny = 10; + x = stk_sampling_randunif (nx, dim); + y = stk_sampling_randunif (ny, dim); ***** test - stk_disp_progress ('toto ', 1, 2); - stk_disp_progress ('toto ', 2, 2); -warning: implicit conversion from numeric to char -warning: called from - stk_disp_progress at line 53 column 1 - __test__ at line 3 column 2 - test at line 682 column 11 - /tmp/tmp.leWC69aW4i at line 70 column 31 - -toto toto -4 tests, 4 passed, 0 known failure, 0 skipped -[inst/misc/text/stk_sprintf_colvect_scientific.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/misc/text/stk_sprintf_colvect_scientific.m -***** shared x, s - x = [1.2; -34567]; -***** test s = stk_sprintf_colvect_scientific(x, 1); -***** assert (isequal(s, ['#'; '#'])) -***** test s = stk_sprintf_colvect_scientific(x, 3); -***** assert (isequal(s, ['###'; '###'])) -***** test s = stk_sprintf_colvect_scientific(x, 5); -***** assert (isequal(s, ['#####'; '#####'])) -***** test s = stk_sprintf_colvect_scientific(x, 6); -***** assert (isequal(s, [' 1e+00'; '-3e+04'])) -***** test s = stk_sprintf_colvect_scientific(x, 7); -***** assert (isequal(s, [' 1e+00'; '-3e+04'])) -***** test s = stk_sprintf_colvect_scientific(x, 8); -***** assert (isequal(s, [' 1.2e+00'; '-3.5e+04'])) -***** test s = stk_sprintf_colvect_scientific(x, 9); -***** assert (isequal(s, [' 1.20e+00'; '-3.46e+04'])) -***** test s = stk_sprintf_colvect_scientific(x, 10); -***** assert (isequal(s, [' 1.200e+00'; '-3.457e+04'])) -***** test s = stk_sprintf_colvect_scientific(x, 11); -***** assert (isequal(s, [' 1.2000e+00'; '-3.4567e+04'])) -***** test s = stk_sprintf_colvect_scientific(x, 12); -***** assert (isequal(s, [' 1.2000e+00'; '-3.4567e+04'])) -***** shared x, s - x = [0.9; 0.91; 0.99; 0.999]; -***** test s = stk_sprintf_colvect_scientific (x, 4); -***** assert (isequal(s, ['####'; '####'; '####'; '####'])) -***** test s = stk_sprintf_colvect_scientific (x, 5); -***** assert (isequal(s, ['9e-01'; '9e-01'; '1e+00'; '1e+00'])) -***** test s = stk_sprintf_colvect_scientific (x, 6); -***** assert (isequal(s, ['9e-01'; '9e-01'; '1e+00'; '1e+00'])) -***** test s = stk_sprintf_colvect_scientific (x, 7); -***** assert (isequal(s, ['9.0e-01'; '9.1e-01'; '9.9e-01'; '1.0e+00'])) -***** test s = stk_sprintf_colvect_scientific (x, 8); -***** assert (isequal(s, ['9.00e-01'; '9.10e-01'; '9.90e-01'; '9.99e-01'])) -***** shared x, s - x = [0.9; -0.91; 0.99; 0.999]; -***** test s = stk_sprintf_colvect_scientific (x, 4); -***** assert (isequal(s, ['####'; '####'; '####'; '####'])) -***** test s = stk_sprintf_colvect_scientific (x, 5); -***** assert (isequal(s, ['#####'; '#####'; '#####'; '#####'])) -***** test s = stk_sprintf_colvect_scientific (x, 6); -***** assert (isequal(s, [' 9e-01'; '-9e-01'; ' 1e+00'; ' 1e+00'])) -***** test s = stk_sprintf_colvect_scientific (x, 7); -***** assert (isequal(s, [' 9e-01'; '-9e-01'; ' 1e+00'; ' 1e+00'])) -***** test s = stk_sprintf_colvect_scientific (x, 8); -***** assert (isequal(s, [' 9.0e-01'; '-9.1e-01'; ' 9.9e-01'; ' 1.0e+00'])) + K1 = stk_sphcov_aniso (param, x, y); + K2 = stk_sphcov_aniso (param, x, y, -1); + assert (isequal (size(K1), [nx ny])); + assert (stk_isequal_tolabs (K1, K2)); ***** test - x = [1e6; -1e10; 1e-221]; - s = stk_sprintf_colvect_scientific(x, 10); - assert(isequal(s, [' 1e+006'; '-1e+010'; ' 1e-221'])); -41 tests, 41 passed, 0 known failure, 0 skipped -[inst/misc/text/stk_sprintf_colvect_fixedpoint.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/misc/text/stk_sprintf_colvect_fixedpoint.m -***** shared x, s - x = [1.2; 3.48]; -***** test s = stk_sprintf_colvect_fixedpoint(x, 1); -***** assert (isequal(s, ['1'; '3'])) -***** test s = stk_sprintf_colvect_fixedpoint(x, 2); -***** assert (isequal(s, ['1'; '3'])) -***** test s = stk_sprintf_colvect_fixedpoint(x, 3); -***** assert (isequal(s, ['1.2'; '3.5'])) -***** test s = stk_sprintf_colvect_fixedpoint(x, 4); -***** assert (isequal(s, ['1.20'; '3.48'])) -***** test s = stk_sprintf_colvect_fixedpoint(x, 5); -***** assert (isequal(s, ['1.20'; '3.48'])) -***** shared x, s - x = [1.2; -3.48]; -***** test s = stk_sprintf_colvect_fixedpoint(x, 1); -***** assert (isequal(s, ['#'; '#'])) -***** test s = stk_sprintf_colvect_fixedpoint(x, 2); -***** assert (isequal(s, [' 1'; '-3'])) -***** test s = stk_sprintf_colvect_fixedpoint(x, 3); -***** assert (isequal(s, [' 1'; '-3'])) -***** test s = stk_sprintf_colvect_fixedpoint(x, 4); -***** assert (isequal(s, [' 1.2'; '-3.5'])) -***** test s = stk_sprintf_colvect_fixedpoint(x, 5); -***** assert (isequal(s, [' 1.20'; '-3.48'])) -***** test s = stk_sprintf_colvect_fixedpoint(x, 6); -***** assert (isequal(s, [' 1.20'; '-3.48'])) -***** shared x, s - x = [0.2; 0.48]; -***** test s = stk_sprintf_colvect_fixedpoint(x, 1); -***** assert (isequal(s, ['0'; '0'])) -***** test s = stk_sprintf_colvect_fixedpoint(x, 2); -***** assert (isequal(s, ['0'; '0'])) -***** test s = stk_sprintf_colvect_fixedpoint(x, 3); -***** assert (isequal(s, ['0.2'; '0.5'])) -***** test s = stk_sprintf_colvect_fixedpoint(x, 4); -***** assert (isequal(s, ['0.20'; '0.48'])) -***** test s = stk_sprintf_colvect_fixedpoint(x, 5); -***** assert (isequal(s, ['0.20'; '0.48'])) -32 tests, 32 passed, 0 known failure, 0 skipped -[inst/misc/optim/stk_minimize_boxconstrained.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/misc/optim/stk_minimize_boxconstrained.m -***** test % Call fmincon using function name - if stk_optim_isavailable ('fmincon') - assert (stk_optim_testmin_box ('fmincon')); - end -***** test % Call fmincon directly, using algorithm object - if stk_optim_isavailable ('fmincon') - algo = stk_optim_fmincon ('TolX', 1e-12, 'TolFun', 1e-12); - assert (stk_optim_testmin_box (algo)); + for i = 1:(dim + 1), + dK = stk_sphcov_aniso (param, x, y, i); + assert (isequal (size (dK), [nx ny])); end -***** test % Call sqp using function name - if stk_optim_isavailable ('octavesqp') - assert (stk_optim_testmin_box ('octavesqp')); +***** test + n = 7; + x = stk_sampling_randunif (n, dim); + y = stk_sampling_randunif (n, dim); + + K1 = stk_sphcov_aniso (param, x, y); + K2 = stk_sphcov_aniso (param, x, y, -1, true); + assert (isequal (size (K1), [n n])); + assert (stk_isequal_tolabs (K2, diag (K1))); + + for i = 1:(dim + 1), + dK1 = stk_sphcov_aniso (param, x, y, i); + dK2 = stk_sphcov_aniso (param, x, y, i, true); + assert (isequal (size (dK1), [n n])); + assert (stk_isequal_tolabs (dK2, diag (dK1))); end -***** test % Call sqp directly, using algorithm object - if stk_optim_isavailable ('octavesqp') - algo = stk_optim_octavesqp (); - assert (stk_optim_testmin_box (algo)); +20 tests, 20 passed, 0 known failure, 0 skipped +[inst/covfcs/rbf/stk_rbf_matern.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/covfcs/rbf/stk_rbf_matern.m +***** shared nu, h, diff + nu = 1.0; h = 1.0; diff = -1; +***** error stk_rbf_matern (); +***** error stk_rbf_matern (nu); +***** test stk_rbf_matern (nu, h); +***** test stk_rbf_matern (nu, h, diff); +***** test %% h = 0.0 => correlation = 1.0 + for nu = 0.1:0.2:5.0, + x = stk_rbf_matern (nu, 0.0); + assert (stk_isequal_tolrel (x, 1.0, 1e-8)); end -***** error assert (stk_optim_testmin_box ('InexistentOptimizer')); -***** error assert (stk_optim_testmin_box (100)); +5 tests, 5 passed, 0 known failure, 0 skipped +[inst/covfcs/rbf/stk_rbf_gauss.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/covfcs/rbf/stk_rbf_gauss.m +***** shared h, diff + h = 1.0; diff = -1; +***** error stk_rbf_gauss (); +***** test stk_rbf_gauss (h); +***** test stk_rbf_gauss (h, diff); +***** test % h = 0.0 => correlation = 1.0 + x = stk_rbf_gauss (0.0); + assert (stk_isequal_tolrel (x, 1.0, 1e-8)); +4 tests, 4 passed, 0 known failure, 0 skipped +[inst/covfcs/rbf/stk_rbf_spherical.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/covfcs/rbf/stk_rbf_spherical.m +***** shared h, diff + h = 1.0; diff = -1; +***** error stk_rbf_spherical (); +***** test stk_rbf_spherical (h); +***** test stk_rbf_spherical (h, diff); +***** test %% h = 0.0 => correlation = 1.0 + x = stk_rbf_spherical (0.0); + assert (stk_isequal_tolrel (x, 1.0, 1e-8)); +***** test %% check derivative numerically + h = [-1 -0.5 -0.1 0.1 0.5 1]; delta = 1e-9; + d1 = (stk_rbf_spherical (h + delta) - stk_rbf_spherical (h)) / delta; + d2 = stk_rbf_spherical (h, 1); + assert (stk_isequal_tolabs (d1, d2, 1e-4)); +***** assert (stk_rbf_spherical (inf) == 0) 6 tests, 6 passed, 0 known failure, 0 skipped -[inst/misc/optim/stk_optim_testmin_unc.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/misc/optim/stk_optim_testmin_unc.m -***** shared algo - algo = stk_options_get ('stk_param_estim', 'minimize_unc'); -***** error b = stk_optim_testmin_unc (); -***** assert (stk_optim_testmin_unc (algo)); -***** assert (~ stk_optim_testmin_unc ('dudule')); -3 tests, 3 passed, 0 known failure, 0 skipped -[inst/misc/optim/@stk_optim_fminsearch/stk_optim_fminsearch.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/misc/optim/@stk_optim_fminsearch/stk_optim_fminsearch.m -***** test stk_test_class ('stk_optim_fminsearch') -1 test, 1 passed, 0 known failure, 0 skipped -[inst/misc/optim/stk_optim_testmin_box.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/misc/optim/stk_optim_testmin_box.m -***** shared algo - algo = stk_options_get ('stk_param_estim', 'minimize_box'); -***** error b = stk_optim_testmin_box (); -***** assert (stk_optim_testmin_box (algo)); -***** assert (~ stk_optim_testmin_box ('dudule')); -3 tests, 3 passed, 0 known failure, 0 skipped -[inst/misc/optim/stk_minimize_unconstrained.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/misc/optim/stk_minimize_unconstrained.m -***** test % Call fminsearch using function name - if stk_optim_isavailable ('fminsearch') - assert (stk_optim_testmin_unc ('fminsearch')); +[inst/covfcs/rbf/stk_rbf_exponential.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/covfcs/rbf/stk_rbf_exponential.m +***** shared h, diff + h = 1.0; diff = -1; +***** error stk_rbf_exponential (); +***** test stk_rbf_exponential (h); +***** test stk_rbf_exponential (h, diff); +***** test %% h = 0.0 => correlation = 1.0 + x = stk_rbf_exponential (0.0); + assert (stk_isequal_tolrel (x, 1.0, 1e-8)); +***** test %% check derivative numerically + h = [-1 -0.5 -0.1 0.1 0.5 1]; delta = 1e-9; + d1 = (stk_rbf_exponential (h + delta) - stk_rbf_exponential (h)) / delta; + d2 = stk_rbf_exponential (h, 1); + assert (stk_isequal_tolabs (d1, d2, 1e-4)); +***** test %% consistency with stk_rbf_matern: function values + for h = 0.1:0.1:2.0, + x = stk_rbf_matern (1/2, h); + y = stk_rbf_exponential (h); + assert (stk_isequal_tolrel (x, y, 1e-8)); end -***** test % Call fminsearch directly, using algorithm object - if stk_optim_isavailable ('fminsearch') - algo = stk_optim_fminsearch ('TolX', 1e-12, 'TolFun', 1e-12); - assert (stk_optim_testmin_unc (algo)); +***** test %% consistency with stk_rbf_matern: derivatives + for h = 0.1:0.1:2.0, + x = stk_rbf_matern (1/2, h, 2); + y = stk_rbf_exponential (h, 1); + assert (stk_isequal_tolrel (x, y, 1e-8)); end -***** test % Call sqp using function name - if stk_optim_isavailable ('octavesqp') - assert (stk_optim_testmin_unc ('octavesqp')); +***** assert (stk_rbf_exponential (inf) == 0) +8 tests, 8 passed, 0 known failure, 0 skipped +[inst/covfcs/rbf/stk_rbf_matern32.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/covfcs/rbf/stk_rbf_matern32.m +***** shared h, diff + h = 1.0; diff = -1; +***** error stk_rbf_matern32 (); +***** test stk_rbf_matern32 (h); +***** test stk_rbf_matern32 (h, diff); +***** test %% h = 0.0 => correlation = 1.0 + x = stk_rbf_matern32 (0.0); + assert (stk_isequal_tolrel (x, 1.0, 1e-8)); +***** test %% consistency with stk_rbf_matern: function values + for h = 0.1:0.1:2.0, + x = stk_rbf_matern (3/2, h); + y = stk_rbf_matern32 (h); + assert (stk_isequal_tolrel (x, y, 1e-8)); end -***** test % Call sqp directly, using algorithm object - if stk_optim_isavailable ('octavesqp') - algo = stk_optim_octavesqp (); - assert (stk_optim_testmin_unc (algo)); +***** test %% consistency with stk_rbf_matern: derivatives + for h = 0.1:0.1:2.0, + x = stk_rbf_matern (3/2, h, 2); + y = stk_rbf_matern32 (h, 1); + assert (stk_isequal_tolrel (x, y, 1e-8)); end -***** error assert (stk_optim_testmin_unc ('InexistentOptimizer')); -***** error assert (stk_optim_testmin_unc (100)); -6 tests, 6 passed, 0 known failure, 0 skipped -[inst/misc/optim/@stk_optim_fmincon/stk_optim_fmincon.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/misc/optim/@stk_optim_fmincon/stk_optim_fmincon.m -***** test stk_test_class ('stk_optim_fmincon') -1 test, 1 passed, 0 known failure, 0 skipped -[inst/misc/optim/@stk_optim_optimizer_/stk_optim_optimizer_.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/misc/optim/@stk_optim_optimizer_/stk_optim_optimizer_.m -***** test stk_test_class ('stk_optim_optimizer_') -1 test, 1 passed, 0 known failure, 0 skipped -[inst/misc/optim/@stk_optim_octavesqp/stk_optim_octavesqp.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/misc/optim/@stk_optim_octavesqp/stk_optim_octavesqp.m -***** test stk_test_class ('stk_optim_octavesqp') -1 test, 1 passed, 0 known failure, 0 skipped -[inst/misc/distrib/stk_distrib_student_pdf.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/misc/distrib/stk_distrib_student_pdf.m -***** assert (stk_isequal_tolrel ( ... - stk_distrib_student_pdf ([1; 3], [1; 2], [0 1], [1 10]), ... - [0.50 / pi ... % tpdf ((1 - 1) / 10, 1) - 0.10 / pi; ... % tpdf ((1 - 1) / 10, 1) / 10 - 1 / (11 * sqrt(11)) ... % tpdf ((3 - 0) / 1, 2) / 1 - 3.4320590294804165e-02 ... % tpdf ((3 - 1) / 10, 2) / 10 - ], eps)); -***** assert (isequal (stk_distrib_student_pdf ( inf, 1.0), 0.0)); -***** assert (isequal (stk_distrib_student_pdf (-inf, 1.0), 0.0)); -***** assert (isnan (stk_distrib_student_pdf ( nan, 1.0))); -4 tests, 4 passed, 0 known failure, 0 skipped -[inst/misc/distrib/stk_distrib_normal_ei.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/misc/distrib/stk_distrib_normal_ei.m -***** assert (stk_isequal_tolrel (stk_distrib_normal_ei (0.0), 1 / sqrt (2 * pi), eps)) -***** test % Decreasing as a function of z - ei = stk_distrib_normal_ei (linspace (-10, 10, 200)); - assert (all (diff (ei) < 0)) -***** shared M, mu, sigma, ei - M = randn (1, 10); - mu = randn (5, 1); - sigma = 1 + rand (1, 1, 7); - ei = stk_distrib_normal_ei (M, mu, sigma); -***** assert (isequal (size (ei), [5, 10, 7])) -***** assert (all (ei(:) >= 0)) -***** assert (isequal (ei, stk_distrib_normal_ei (M, mu, sigma, false))); -***** assert (isequal (ei, stk_distrib_normal_ei (-M, -mu, sigma, true))); -6 tests, 6 passed, 0 known failure, 0 skipped -[inst/misc/distrib/stk_distrib_student_ei.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/misc/distrib/stk_distrib_student_ei.m -***** assert (stk_isequal_tolrel (stk_distrib_student_ei (0, 2), 1 / sqrt (2), eps)) -***** test % Decreasing as a function of z - ei = stk_distrib_student_ei (linspace (-10, 10, 200), 3.33); - assert (all (diff (ei) < 0)) -***** shared M, mu, sigma, ei, nu - M = randn (1, 10); - mu = randn (5, 1); - sigma = 1 + rand (1, 1, 7); - nu = 2; - ei = stk_distrib_student_ei (M, nu, mu, sigma); -***** assert (isequal (size (ei), [5, 10, 7])) -***** assert (all (ei(:) >= 0)) -***** assert (isequal (ei, stk_distrib_student_ei (M, nu, mu, sigma, false))); -***** assert (isequal (ei, stk_distrib_student_ei (-M, nu, -mu, sigma, true))); -6 tests, 6 passed, 0 known failure, 0 skipped -[inst/misc/distrib/stk_distrib_normal_cdf.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/misc/distrib/stk_distrib_normal_cdf.m -***** assert (stk_isequal_tolrel (stk_distrib_normal_cdf ([1; 3], 1, [1 10]), ... - [0.5, ... % normcdf ((1 - 1) / 1) - 0.5; ... % normcdf ((1 - 1) / 10) - 0.5 * erfc(-sqrt(2)), ... % normcdf ((3 - 1) / 1) - 0.5 * erfc(-0.1*sqrt(2)) ... % normcdf ((3 - 1) / 10) - ], eps)); +***** assert (stk_rbf_matern32 (inf) == 0) +7 tests, 7 passed, 0 known failure, 0 skipped +[inst/covfcs/rbf/stk_rbf_matern52.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/covfcs/rbf/stk_rbf_matern52.m +***** shared h, diff + h = 1.0; diff = -1; +***** error stk_rbf_matern52 (); +***** test stk_rbf_matern52 (h); +***** test stk_rbf_matern52 (h, diff); +***** test %% h = 0.0 => correlation = 1.0 + x = stk_rbf_matern52 (0.0); + assert (stk_isequal_tolrel (x, 1.0, 1e-8)); +***** test %% consistency with stk_rbf_matern: function values + for h = 0.1:0.1:2.0, + x = stk_rbf_matern (5/2, h); + y = stk_rbf_matern52 (h); + assert (stk_isequal_tolrel (x, y, 1e-8)); + end +***** test %% consistency with stk_rbf_matern: derivatives + for h = 0.1:0.1:2.0, + x = stk_rbf_matern (5/2, h, 2); + y = stk_rbf_matern52 (h, 1); + assert (stk_isequal_tolrel (x, y, 1e-8)); + end +***** assert (stk_rbf_matern52 (inf) == 0) +7 tests, 7 passed, 0 known failure, 0 skipped +[inst/covfcs/stk_materncov32_aniso.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/covfcs/stk_materncov32_aniso.m +***** shared param, x, y, K1, K2, K3 + dim = 1; + param = log ([1.0; 2.5]); + x = stk_sampling_randunif (5, dim); + y = stk_sampling_randunif (6, dim); +***** error K0 = stk_materncov32_aniso (); +***** error K0 = stk_materncov32_aniso (param); +***** error K0 = stk_materncov32_aniso (param, x); +***** test K1 = stk_materncov32_aniso (param, x, y); +***** test K2 = stk_materncov32_aniso (param, x, y, -1); +***** test K3 = stk_materncov32_aniso (param, x, y, -1, false); +***** assert (isequal (K1, K2)); +***** assert (isequal (K1, K3)); +***** test % df versus ordinary array + u = double (x); v = double (y); + K1 = stk_materncov32_aniso (param, u, v, -1); + K2 = stk_materncov32_aniso (param, stk_dataframe (u), stk_dataframe (v), -1); + assert (isequal (K1, K2)); +***** error stk_materncov32_aniso (param, x, y, -2); +***** test stk_materncov32_aniso (param, x, y, -1); +***** error stk_materncov32_aniso (param, x, y, 0); +***** test stk_materncov32_aniso (param, x, y, 1); +***** test stk_materncov32_aniso (param, x, y, 2); +***** error stk_materncov32_aniso (param, x, y, 3); +***** error stk_materncov32_aniso (param, x, y, nan); +***** error stk_materncov32_aniso (param, x, y, inf); +***** shared dim, param, x, y, nx, ny + dim = 3; + param = log ([1.0; 2.5; 2.4; 2.6]); + nx = 4; ny = 10; + x = stk_sampling_randunif (nx, dim); + y = stk_sampling_randunif (ny, dim); ***** test - [p, q] = stk_distrib_normal_cdf (10); - assert (isequal (p, 1.0)); - assert (stk_isequal_tolrel (q, 7.6198530241604975e-24, eps)); -***** assert (isequal (stk_distrib_normal_cdf ( 0.0), 0.5)); -***** assert (isequal (stk_distrib_normal_cdf ( inf), 1.0)); -***** assert (isequal (stk_distrib_normal_cdf (-inf), 0.0)); -***** assert (isnan (stk_distrib_normal_cdf ( nan))); -***** assert (isnan (stk_distrib_normal_cdf (0, 0, -1))); -***** assert (isequal (stk_distrib_normal_cdf (0, 0, 0), 1.0)); -***** assert (isequal (stk_distrib_normal_cdf (0, 1, 0), 0.0)); -***** assert (isequal (stk_distrib_normal_cdf (1, 0, 0), 1.0)); -10 tests, 10 passed, 0 known failure, 0 skipped -[inst/misc/distrib/stk_distrib_normal_pdf.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/misc/distrib/stk_distrib_normal_pdf.m -***** assert (stk_isequal_tolrel (stk_distrib_normal_pdf ([1; 3], 1, [1 10]), ... - [1 / sqrt(2 * pi) ... % normpdf ((1 - 1) / 1) - 0.1 / sqrt(2 * pi); ... % normpdf ((1 - 1) / 10) / 10 - exp(-2) / sqrt(2 * pi) ... % normpdf ((3 - 1) / 1) - 3.910426939754558780e-2 ... % normpdf ((3 - 1) / 10) / 10 - ], eps)); -***** assert (isequal (stk_distrib_normal_pdf (inf), 0.0)); -***** assert (isequal (stk_distrib_normal_pdf (-inf), 0.0)); -***** assert (isnan (stk_distrib_normal_pdf (nan))); -***** assert (isnan (stk_distrib_normal_pdf (0, 0, -1))); -5 tests, 5 passed, 0 known failure, 0 skipped -[inst/misc/distrib/stk_distrib_student_cdf.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/misc/distrib/stk_distrib_student_cdf.m -***** assert (stk_isequal_tolrel ( ... - stk_distrib_student_cdf ([-1; 0; 1], [1 2], 0, [1 10]), ... - [0.25, ... % tcdf ((-1 - 0)/1, 1) - 4.6473271920707004e-01; ... % tcdf ((-1 - 0)/10, 2) - 0.50, ... % tcdf (( 0 - 0)/1, 1) - 0.50; ... % tcdf (( 0 - 0)/10, 2) - 0.75, ... % tcdf (( 1 - 0)/1, 1) - 5.3526728079292996e-01 ... % tcdf (( 1 - 0)/10, 2) - ], 4 * eps)) + K1 = stk_materncov32_aniso (param, x, y); + K2 = stk_materncov32_aniso (param, x, y, -1); + assert (isequal (size(K1), [nx ny])); + assert (stk_isequal_tolabs (K1, K2)); ***** test - [p, q] = stk_distrib_student_cdf (1e10, 2); - assert (isequal (p, 1.0)); - assert (stk_isequal_tolrel (q, 4.999999999999999999925e-21, 10 * eps)); -***** assert (isequal (stk_distrib_student_cdf (0.0, 1), 0.5)); -***** assert (isequal (stk_distrib_student_cdf (inf, 1), 1.0)); -***** assert (isequal (stk_distrib_student_cdf (-inf, 1), 0.0)); -***** assert (isnan (stk_distrib_student_cdf (nan, 1))); -6 tests, 6 passed, 0 known failure, 0 skipped -[inst/misc/distrib/stk_distrib_normal_crps.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/misc/distrib/stk_distrib_normal_crps.m -***** assert (stk_isequal_tolabs (stk_distrib_normal_crps (0.0, 0.0, 0.0), 0.0)) -***** assert (stk_isequal_tolabs (stk_distrib_normal_crps (0.0, 0.0, 1.0), (sqrt(2) - 1)/sqrt(pi))) -***** shared n, x_obs, mu, sigma, crps, crps_exp - x_obs = [ 1.78; -2.29; -1.62; -5.89; 2.88; 0.65; 2.74; -3.42]; % observations - mu = [-0.31; -0.59; 1.48; -1.57; -0.05; -0.27; 1.05; 1.27]; % predictions - sigma = [ 2.76; 6.80; 1.63; 1.19; 4.98; 9.60; 5.85; 2.24]; % standard dev - n = size(x_obs, 1); - crps = stk_distrib_normal_crps (x_obs, mu, sigma); -***** assert (isequal (size (crps), [n, 1])) -***** assert (all (crps >= 0)) -***** assert (stk_isequal_tolabs (crps, stk_distrib_normal_crps(mu, x_obs, sigma))) -***** assert (stk_isequal_tolabs (stk_distrib_normal_crps (x_obs, mu, 0), abs (x_obs - mu))) - crps_ref = [ ... - 1.247856605928301 ... - 1.757798727719891 ... - 2.216236225997414 ... - 3.648696666764968 ... - 1.832355265287495 ... - 2.278618297947438 ... - 1.560544734359158 ... - 3.455697443411153 ]; - assert (stk_isequal_tolabs (crps, crps_ref, 1e-10)); -6 tests, 6 passed, 0 known failure, 0 skipped -[inst/misc/distrib/stk_distrib_bivnorm_cdf.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/misc/distrib/stk_distrib_bivnorm_cdf.m + for i = 1:(dim + 1), + dK = stk_materncov32_aniso (param, x, y, i); + assert (isequal (size (dK), [nx ny])); + end ***** test + n = 7; + x = stk_sampling_randunif (n, dim); + y = stk_sampling_randunif (n, dim); - z1 = [0 1; -1 2]; - z2 = [0 1; 1 -2]; - - z = cat (3, z1, z2); % 2 x 2 x 2 - - mu1 = 0; % 1 x 1 x 1 - mu2 = [0 1]; % 1 x 2 x 1 - - sigma1 = [1 3]; % 1 x 2 x 1 - sigma2 = [1; 2]; % 2 x 1 x 1 - - rho = [0; 0.5]; % 2 x 1 x 1 - - %% BROADCASTING => the result will be a 2 x 2 matrix - - p = stk_distrib_bivnorm_cdf (z, mu1, mu2, sigma1, sigma2, rho); - - p11 = 0.25; % mvncdf ([ 0 0], [0 0], [1 0; 0 1]); - p12 = 0.315279329909118; % mvncdf ([ 1 1], [0 1], [9 0; 0 1]); - p21 = 0.146208349559646; % mvncdf ([-1 1], [0 0], [1 1; 1 4]); - p22 = 0.064656239880040; % mvncdf ([ 2 -2], [0 1], [9 3; 3 4]); + K1 = stk_materncov32_aniso (param, x, y); + K2 = stk_materncov32_aniso (param, x, y, -1, true); + assert (isequal (size (K1), [n n])); + assert (stk_isequal_tolabs (K2, diag (K1))); - assert (stk_isequal_tolabs (p, [p11 p12; p21 p22], 1e-14)) -***** test - [p, q] = stk_distrib_bivnorm_cdf ([inf -inf], 0, 0, 1, 1, 0); - assert ((p == 0.0) && (q == 1.0)) -***** test - [p, q] = stk_distrib_bivnorm_cdf ([inf -10], 0, 0, 1, 1, 0); - assert (stk_isequal_tolrel (p, 7.619853024160489e-24, 1e-12)) - assert (q == 1.0) -***** test - [p, q] = stk_distrib_bivnorm_cdf ([inf 0], 0, 0, 1, 1, 0); - assert (stk_isequal_tolrel (p, 0.5, 1e-12)) - assert (stk_isequal_tolrel (q, 0.5, 1e-12)) -***** test - [p, q] = stk_distrib_bivnorm_cdf ([inf 10], 0, 0, 1, 1, 0); - assert (p == 1.0); - assert (stk_isequal_tolrel (q, 7.619853024160489e-24, 1e-12)) -***** test - [p, q] = stk_distrib_bivnorm_cdf ([inf inf], 0, 0, 1, 1, 0); - assert ((p == 1.0) && (q == 0.0)) -***** test - [p, q] = stk_distrib_bivnorm_cdf ([-inf inf], 0, 0, 1, 1, 0); - assert ((p == 0.0) && (q == 1.0)) -***** test - [p, q] = stk_distrib_bivnorm_cdf ([-10 inf], 0, 0, 1, 1, 0); - assert (stk_isequal_tolrel (p, 7.619853024160489e-24, 1e-12)) - assert (q == 1.0) -***** test - [p, q] = stk_distrib_bivnorm_cdf ([0 inf], 0, 0, 1, 1, 0); - assert (stk_isequal_tolrel (p, 0.5, 1e-12)) - assert (stk_isequal_tolrel (q, 0.5, 1e-12)) -***** test - [p, q] = stk_distrib_bivnorm_cdf ([10 inf], 0, 0, 1, 1, 0); - assert (p == 1.0); - assert (stk_isequal_tolrel (q, 7.619853024160489e-24, 1e-12)) -***** test - [p, q] = stk_distrib_bivnorm_cdf ([inf inf], 0, 0, 1, 1, 0); - assert ((p == 1.0) && (q == 0.0)) -***** test % A mixture of singular and non-singular cases - p = stk_distrib_bivnorm_cdf ([0 0], 0, 0, [1; 0], 1, 0); - assert (isequal (p, [0.25; 0.5])); -12 tests, 12 passed, 0 known failure, 0 skipped -[inst/misc/pareto/stk_isdominated.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/misc/pareto/stk_isdominated.m -***** test - A = [1 3 2]; - B = [0 0 0]; - [isdom, dpos] = stk_isdominated (A, B); - assert (isdom == 1); - assert (dpos == 1); -***** test - A = [1 3 2]; - B = [0 0 3]; - [isdom, dpos] = stk_isdominated (A, B); - assert (isdom == 0); - assert (dpos == 0); + for i = 1:(dim + 1), + dK1 = stk_materncov32_aniso (param, x, y, i); + dK2 = stk_materncov32_aniso (param, x, y, i, true); + assert (isequal (size (dK1), [n n])); + assert (stk_isequal_tolabs (dK2, diag (dK1))); + end +20 tests, 20 passed, 0 known failure, 0 skipped +[inst/covfcs/stk_materncov_iso.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/covfcs/stk_materncov_iso.m +***** shared param, x, y + dim = 1; + param = log ([1.0; 1.5; 2.9]); + x = stk_sampling_randunif(5, dim); + y = stk_sampling_randunif(5, dim); +***** error K = stk_materncov_iso ([param; 1.234], x, y); +***** error stk_materncov_iso(); +***** error stk_materncov_iso(param); +***** error stk_materncov_iso(param, x); +***** test stk_materncov_iso(param, x, y); +***** test stk_materncov_iso(param, x, y, -1); +***** test stk_materncov_iso(param, x, y, -1, false); +***** error stk_materncov_iso(param, x, y, -2); +***** test stk_materncov_iso(param, x, y, -1); +***** error stk_materncov_iso(param, x, y, 0); +***** test stk_materncov_iso(param, x, y, 1); +***** test stk_materncov_iso(param, x, y, 2); +***** test stk_materncov_iso(param, x, y, 3); +***** error stk_materncov_iso(param, x, y, 4); +***** error stk_materncov_iso(param, x, y, nan); +***** error stk_materncov_iso(param, x, y, inf); +***** shared dim, param, x, y, nx, ny + dim = 3; + param = log ([1.0; 1.5; 2.9]); + nx = 4; ny = 10; + x = stk_sampling_randunif (nx, dim); + y = stk_sampling_randunif (ny, dim); ***** test - A = [1 3 2]; - B = [0 0 0; 0 0 3]; - [isdom, dpos] = stk_isdominated (A, B); - assert (isdom == 1); - assert (dpos == 1); + K1 = stk_materncov_iso (param, x, y); + K2 = stk_materncov_iso (param, x, y, -1); + assert (isequal (size (K1), [nx ny])); + assert (stk_isequal_tolabs (K1, K2)); ***** test - A = [1 3 2]; - B = [0 0 3; 0 0 0]; - [isdom, dpos] = stk_isdominated (A, B); - assert (isdom == 1); - assert (dpos == 2); + for i = 1:3, + dK = stk_materncov_iso (param, x, y, i); + assert (isequal (size (dK), [nx ny])); + end ***** test - A = [1 3 2; 1 0 1; -1 0 0; 1 3 2]; - B = [1 0 0; 0 0 3; 0 0 0]; - [isdom, dpos] = stk_isdominated (A, B); - assert (isequal (isdom, logical ([1; 1; 0; 1]))); - assert (isequal (dpos, [3; 3; 0; 3])); -5 tests, 5 passed, 0 known failure, 0 skipped -[inst/misc/pareto/stk_paretofind.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/misc/pareto/stk_paretofind.m -***** shared x, ndpos, drank - x = [ ... - 0 2; ... - 2 2; ... - ]; -***** test [ndpos, drank] = stk_paretofind (x); -***** assert (isequal (ndpos, 1)); -***** assert (isequal (drank, [0; 1])); -***** shared x, ndpos, drank - x = [ ... - 3 2; ... - 2 2; ... - ]; -***** test [ndpos, drank] = stk_paretofind (x); -***** assert (isequal (ndpos, 2)); -***** assert (isequal (drank, [1; 0])); -***** shared x, ndpos, drank - x = [ ... - 1 0; ... - 2 0; ... - 0 2; ... - 2 2; ... - -1 3 ]; -***** test [ndpos, drank] = stk_paretofind (x); -***** assert (isequal (ndpos, [5; 3; 1])); -***** assert (isequal (drank, [0; 3; 0; 2; 0])); -***** shared x, ndpos, drank - x = [ ... - 1 0; ... - 2 0; ... - 0 2; ... - 2 2; ... - -1 3; ... - -1 4; ... - 2 2 ]; -***** test [ndpos, drank] = stk_paretofind (x); -***** assert (isequal (ndpos, [5; 3; 1])); -***** assert (isequal (drank, [0; 3; 0; 2; 0; 1; 2])); -12 tests, 12 passed, 0 known failure, 0 skipped -[inst/misc/pareto/stk_dominatedhv.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/misc/pareto/stk_dominatedhv.m -***** error hv = stk_dominatedhv (); -***** error hv = stk_dominatedhv (-y, 'incorrect ref type'); -***** error hv = stk_dominatedhv (-y, [0 0]); -***** error hv = stk_dominatedhv (-y, [0 0 0 0 0], 0, 'too many input args'); -***** shared y, hv0 % Example from README.TXT in WFG 1.10 + n = 7; + x = stk_sampling_randunif(n, dim); + y = stk_sampling_randunif(n, dim); - y = [ ... - 0.598 0.737 0.131 0.916 6.745; ... - 0.263 0.740 0.449 0.753 6.964; ... - 0.109 8.483 0.199 0.302 8.872 ]; + K1 = stk_materncov_iso(param, x, y); + K2 = stk_materncov_iso(param, x, y, -1, true); + assert(isequal(size(K1), [n n])); + assert(stk_isequal_tolabs(K2, diag(K1))); - hv0 = 1.1452351120; -***** test - hv = stk_dominatedhv (-y); - assert (stk_isequal_tolrel (hv, hv0, 1e-10)); -***** test - yy = stk_dataframe (- y); % Check that @stk_dataframe inputs are accepted - hv = stk_dominatedhv (yy); - assert (stk_isequal_tolrel (hv, hv0, 1e-10)); -***** test - hv = stk_dominatedhv (-y, [], 0); - assert (stk_isequal_tolrel (hv, hv0, 1e-10)); -***** test - hv = stk_dominatedhv (-y, [0 0 0 0 0]); - assert (stk_isequal_tolrel (hv, hv0, 1e-10)); -***** test - hv = stk_dominatedhv (1 - y, [1 1 1 1 1]); - assert (stk_isequal_tolrel (hv, hv0, 1e-10)); + for i = 1:3, + dK1 = stk_materncov_iso(param, x, y, i); + dK2 = stk_materncov_iso(param, x, y, i, true); + assert(isequal(size(dK1), [n n])); + assert(stk_isequal_tolabs(dK2, diag(dK1))); + end +19 tests, 19 passed, 0 known failure, 0 skipped +[inst/covfcs/stk_expcov_aniso.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/covfcs/stk_expcov_aniso.m +***** shared param, x, y, K1, K2, K3 + dim = 1; + param = log ([1.0; 2.5]); + x = stk_sampling_randunif (5, dim); + y = stk_sampling_randunif (6, dim); +***** error K0 = stk_expcov_aniso (); +***** error K0 = stk_expcov_aniso (param); +***** error K0 = stk_expcov_aniso (param, x); +***** test K1 = stk_expcov_aniso (param, x, y); +***** test K2 = stk_expcov_aniso (param, x, y, -1); +***** test K3 = stk_expcov_aniso (param, x, y, -1, false); +***** assert (isequal (K1, K2)); +***** assert (isequal (K1, K3)); +***** test % df versus ordinary array + u = double (x); v = double (y); + K1 = stk_expcov_aniso (param, u, v, -1); + K2 = stk_expcov_aniso (param, stk_dataframe (u), stk_dataframe (v), -1); +***** error stk_expcov_aniso (param, x, y, -2); +***** test stk_expcov_aniso (param, x, y, -1); +***** error stk_expcov_aniso (param, x, y, 0); +***** test stk_expcov_aniso (param, x, y, 1); +***** test stk_expcov_aniso (param, x, y, 2); +***** error stk_expcov_aniso (param, x, y, 3); +***** error stk_expcov_aniso (param, x, y, nan); +***** error stk_expcov_aniso (param, x, y, inf); +***** shared dim, param, x, y, nx, ny + dim = 3; + param = log ([1.0; 2.5; 2.4; 2.6]); + nx = 4; ny = 10; + x = stk_sampling_randunif (nx, dim); + y = stk_sampling_randunif (ny, dim); ***** test - r = stk_dominatedhv (-y, [], 1); - hv = sum (r.sign .* prod (r.xmax - r.xmin, 2)); - assert (stk_isequal_tolrel (hv, hv0, 1e-10)); -***** shared y1, y2, y0, S, S1 - y0 = [1.00 1.00]; % Reference point - y1 = [1.50 1.50]; % Above the reference point - y2 = [0.50 0.50]; % Below the reference point -***** assert (isequal (0.00, stk_dominatedhv (y1, y0))); -***** assert (isequal (0.25, stk_dominatedhv (y2, y0))); -***** assert (isequal (0.25, stk_dominatedhv ([y1; y2], y0))); -***** assert (isequal (0.25, stk_dominatedhv ([y2; y1; y2], y0))); -***** test S = stk_dominatedhv (y1, y0, 1); % empty decomposition -***** assert (isequal (size (S.xmin, 1), 0)); -***** test S = stk_dominatedhv (y2, y0, 1); % trivial decomposition -***** assert (isequal (S.sign, 1)); -***** assert (isequal (S.xmin, y2)); -***** assert (isequal (S.xmax, y0)); -***** test S1 = stk_dominatedhv ([y2; y0], y0, 1); % shoud be the same as before -***** assert (isequal (S1, S)); -***** test S1 = stk_dominatedhv ([y2; y1], y0, 1); % shoud be the same as before -***** assert (isequal (S1, S)); -***** test S1 = stk_dominatedhv ([y2; y2], y0, 1); % shoud be the same as before -***** assert (isequal (S1, S)); + K1 = stk_expcov_aniso (param, x, y); + K2 = stk_expcov_aniso (param, x, y, -1); + assert (isequal (size(K1), [nx ny])); + assert (stk_isequal_tolabs (K1, K2)); ***** test - for d = 1:10, - y = - 0.5 * ones (1, d); - hv = stk_dominatedhv (y); - assert (isequal (stk_dominatedhv (y), 0.5 ^ d)); + for i = 1:(dim + 1), + dK = stk_expcov_aniso (param, x, y, i); + assert (isequal (size (dK), [nx ny])); end ***** test - for d = 1:10, - y = - 0.5 * ones (1, d); - r = stk_dominatedhv (y, [], 1); - hv = sum (r.sign .* prod (r.xmax - r.xmin, 2)); - assert (isequal (stk_dominatedhv (y), 0.5 ^ d)); - end -***** shared y, y_ref, dv, hv0 - y1 = [0.25 0.75]; - y2 = [0.50 0.50]; - y3 = [0.75 0.25]; - - y_ref = [1 1]; + n = 7; + x = stk_sampling_randunif (n, dim); + y = stk_sampling_randunif (n, dim); - y = {[], y1, y2, y3; [y1; y2], [y1; y3], [y2; y3], [y1; y2; y3]}; + K1 = stk_expcov_aniso (param, x, y); + K2 = stk_expcov_aniso (param, x, y, -1, true); + assert (isequal (size (K1), [n n])); + assert (stk_isequal_tolabs (K2, diag (K1))); - dv = 0.25 ^ 2; hv0 = [0 3 4 3; 5 5 5 6] * dv; + for i = 1:(dim + 1), + dK1 = stk_expcov_aniso (param, x, y, i); + dK2 = stk_expcov_aniso (param, x, y, i, true); + assert (isequal (size (dK1), [n n])); + assert (stk_isequal_tolabs (dK2, diag (dK1))); + end +20 tests, 20 passed, 0 known failure, 0 skipped +[inst/covfcs/stk_materncov52_aniso.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/covfcs/stk_materncov52_aniso.m +***** shared param, x, y + dim = 1; + param = log ([1.0; 2.5]); + x = stk_sampling_randunif (5, dim); + y = stk_sampling_randunif (5, dim); +***** error stk_materncov52_aniso (); +***** error stk_materncov52_aniso (param); +***** error stk_materncov52_aniso (param, x); +***** test stk_materncov52_aniso (param, x, y); +***** test stk_materncov52_aniso (param, x, y, -1); +***** test stk_materncov52_aniso (param, x, y, -1, false); +***** error stk_materncov52_aniso (param, x, y, -2); +***** test stk_materncov52_aniso (param, x, y, -1); +***** error stk_materncov52_aniso (param, x, y, 0); +***** test stk_materncov52_aniso (param, x, y, 1); +***** test stk_materncov52_aniso (param, x, y, 2); +***** error stk_materncov52_aniso (param, x, y, 3); +***** error stk_materncov52_aniso (param, x, y, nan); +***** error stk_materncov52_aniso (param, x, y, inf); +***** shared dim, param, x, y, nx, ny + dim = 3; + param = log ([1.0; 2.5; 2.4; 2.6]); + nx = 4; ny = 10; + x = stk_sampling_randunif (nx, dim); + y = stk_sampling_randunif (ny, dim); ***** test - hv1 = stk_dominatedhv (y, y_ref); - assert (isequal (hv0, hv1)); + K1 = stk_materncov52_aniso (param, x, y); + K2 = stk_materncov52_aniso (param, x, y, -1); + assert (isequal (size (K1), [nx ny])); + assert (stk_isequal_tolabs (K1, K2)); ***** test - r = stk_dominatedhv (y, y_ref, 1); - - % Check the first decomposition, which should be empty - assert (isempty (r(1).sign)); - assert (isempty (r(1).xmin)); - assert (isempty (r(1).xmax)); - - % Check the other decompositions - for i = 2:6, - hv2 = sum (r(i).sign .* prod (r(i).xmax - r(i).xmin, 2)); - assert (isequal (hv0(i), hv2)); + for i = 1:(dim + 1), + dK = stk_materncov52_aniso (param, x, y, i); + assert (isequal (size (dK), [nx ny])); end ***** test - y = (0.3:0.1:0.8)'; - hv0 = 0.7; - hv1 = stk_dominatedhv (y, 1); - r = stk_dominatedhv (y, 1, true); - hv2 = sum (r.sign .* prod (r.xmax - r.xmin, 2)); -***** test % four non-dominated points (hypervolume) - zr = [1 1]; - zi = [0.2 0.8; 0.4 0.6; 0.6 0.4; 0.8 0.2] - P = perms (1:4); - for i = 1:24 - HV = stk_dominatedhv (zi(P(i, :), :), zr, 0); - assert (stk_isequal_tolrel (HV, 0.4, 1e-15)); - end -zi = - - 0.2000 0.8000 - 0.4000 0.6000 - 0.6000 0.4000 - 0.8000 0.2000 - -***** test % four non-dominated points (decomposition) - zr = [1 1]; - zi = [0.2 0.8; 0.4 0.6; 0.6 0.4; 0.8 0.2] - P = perms (1:4); - for i = 1:24 - S = stk_dominatedhv (zi(P(i, :), :), zr, 1); - HV = sum (S.sign .* prod (S.xmax - S.xmin, 2)); - assert (stk_isequal_tolrel (HV, 0.4, 1e-15)); - end -zi = - - 0.2000 0.8000 - 0.4000 0.6000 - 0.6000 0.4000 - 0.8000 0.2000 - -***** test % a case with 8 points and 5 objectives - % http://sourceforge.net/p/kriging/tickets/33 - - yr = [1.03 0.91 0.96 1.99 16.2]; - - y = [ ... - 0.8180 0.5600 0.1264 1.0755 1.2462; ... - 0.8861 0.6928 0.2994 0.7228 0.9848; ... - 0.9021 0.8829 0.6060 0.1642 0.4282; ... - 0.9116 0.3097 0.8601 0.0468 0.2813; ... - 0.9306 0.1429 0.6688 0.1462 1.3661; ... - 0.9604 0.3406 0.4046 0.7239 1.8741; ... - 0.9648 0.7764 0.5199 0.4098 1.3436; ... - 0.9891 0.4518 0.7956 0.1164 1.2025]; - - hv1 = stk_dominatedhv (y, yr, 0); + n = 7; + x = stk_sampling_randunif (n, dim); + y = stk_sampling_randunif (n, dim); - S = stk_dominatedhv (y, yr, 1); - hv2 = sum (S.sign .* prod (S.xmax - S.xmin, 2)); + K1 = stk_materncov52_aniso (param, x, y); + K2 = stk_materncov52_aniso(param, x, y, -1, true); + assert (isequal (size (K1), [n n])); + assert (stk_isequal_tolabs (K2, diag (K1))); - assert (isequal (size (S.sign), [87 1])); - assert (isequal (size (S.xmin), [87 5])); - assert (isequal (size (S.xmax), [87 5])); - assert (stk_isequal_tolrel (hv1, 1.538677420906463, 2 * eps)); - assert (stk_isequal_tolrel (hv1, hv2, eps)); -***** test % with random data - NREP = 5; - for p = 1:5 - for n = 1:10 - for i = 1:NREP - % Draw random data - y = rand (n, p); - y = - y ./ (norm (y)); - % Compute hypervolume directly - hv1 = stk_dominatedhv (y, [], 0); - % Compute decomposition, then hypervolume - R = stk_dominatedhv (y, [], 1); - hv2 = sum (R.sign .* prod (R.xmax - R.xmin, 2)); - % Compare results - assert (stk_isequal_tolabs (hv1, hv2, eps)); - end - end + for i = 1:(dim + 1), + dK1 = stk_materncov52_aniso (param, x, y, i); + dK2 = stk_materncov52_aniso (param, x, y, i, true); + assert (isequal (size (dK1), [n n])); + assert (stk_isequal_tolabs (dK2, diag (dK1))); end -35 tests, 35 passed, 0 known failure, 0 skipped -[inst/misc/dist/stk_dist.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/misc/dist/stk_dist.m -***** error stk_dist(); -***** error stk_dist(0, 0, 0); -***** error stk_dist(0, 0, 0, 0); -***** error stk_dist(0, ones(1, 2)); -***** error stk_dist(eye(3), ones(1, 2)); -***** error stk_dist(ones(2, 1), zeros(2)); -***** shared x, y, z - x = zeros(11, 5); - y = zeros(13, 5); - z = ones(7, 5); -***** test - Dx = stk_dist(x); - assert(isequal(Dx, zeros(11))); -***** test - Dxx = stk_dist(x, x); - assert(isequal(Dxx, zeros(11))); -***** test - Dxy = stk_dist(x, y); - assert(isequal(Dxy, zeros(11, 13))); -***** test - Dzz = stk_dist(z, z); - assert(isequal(Dzz, zeros(7))); -***** test - Dxz = stk_dist(x, z); - assert(stk_isequal_tolabs(Dxz, sqrt(5)*ones(11, 7))); -***** test - x = randn(5,3); - y = randn(5,3); - D1 = stk_dist(x, y, true); % pairwise - D2 = stk_dist(x, y); - assert(stk_isequal_tolabs(D1, diag(D2))); -***** test - x = randn(5,3); - D1 = stk_dist(x, [], true); % pairwise - assert(stk_isequal_tolabs(D1, zeros(5, 1))); - D1 = stk_dist(x, x, true); % pairwise - assert(stk_isequal_tolabs(D1, zeros(5, 1))); -13 tests, 13 passed, 0 known failure, 0 skipped -[inst/misc/dist/stk_mindist.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/misc/dist/stk_mindist.m +17 tests, 17 passed, 0 known failure, 0 skipped +[inst/covfcs/stk_gausscov_aniso.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/covfcs/stk_gausscov_aniso.m +***** shared param, x, y, K1, K2, K3 + dim = 1; + param = log ([1.0; 2.5]); + x = stk_sampling_randunif (5, dim); + y = stk_sampling_randunif (6, dim); +***** error K0 = stk_gausscov_aniso (); +***** error K0 = stk_gausscov_aniso (param); +***** error K0 = stk_gausscov_aniso (param, x); +***** test K1 = stk_gausscov_aniso (param, x, y); +***** test K2 = stk_gausscov_aniso (param, x, y, -1); +***** test K3 = stk_gausscov_aniso (param, x, y, -1, false); +***** assert (isequal (K1, K2)); +***** assert (isequal (K1, K3)); +***** test % df versus ordinary array + u = double (x); v = double (y); + K1 = stk_gausscov_aniso (param, u, v, -1); + K2 = stk_gausscov_aniso (param, stk_dataframe (u), stk_dataframe (v), -1); +***** error stk_gausscov_aniso (param, x, y, -2); +***** test stk_gausscov_aniso (param, x, y, -1); +***** error stk_gausscov_aniso (param, x, y, 0); +***** test stk_gausscov_aniso (param, x, y, 1); +***** test stk_gausscov_aniso (param, x, y, 2); +***** error stk_gausscov_aniso (param, x, y, 3); +***** error stk_gausscov_aniso (param, x, y, nan); +***** error stk_gausscov_aniso (param, x, y, inf); +***** shared dim, param, x, y, nx, ny + dim = 3; + param = log ([1.0; 2.5; 2.4; 2.6]); + nx = 4; ny = 10; + x = stk_sampling_randunif (nx, dim); + y = stk_sampling_randunif (ny, dim); ***** test - d = 3; x = rand(7, d); - md1 = stk_mindist(x); - md2 = stk_mindist(stk_dataframe(x)); - assert(stk_isequal_tolabs(md1, md2)); + K1 = stk_gausscov_aniso (param, x, y); + K2 = stk_gausscov_aniso (param, x, y, -1); + assert (isequal (size (K1), [nx ny])); + assert (stk_isequal_tolabs (K1, K2)); ***** test - for nc = [0 5 10], - x = zeros(0, nc); - d = stk_mindist(x); - assert(isempty(d)); + for i = 1:(dim + 1), + dK = stk_gausscov_aniso (param, x, y, i); + assert (isequal (size (dK), [nx ny])); end ***** test - for nc = [0 5 10], - x = rand(1, nc); - d = stk_mindist(x); - assert(isempty(d)); + n = 7; + x = stk_sampling_randunif (n, dim); + y = stk_sampling_randunif (n, dim); + + K1 = stk_gausscov_aniso (param, x, y); + K2 = stk_gausscov_aniso (param, x, y, -1, true); + assert (isequal (size (K1), [n n])); + assert (stk_isequal_tolabs (K2, diag (K1))); + + for i = 1:(dim + 1), + dK1 = stk_gausscov_aniso (param, x, y, i); + dK2 = stk_gausscov_aniso (param, x, y, i, true); + assert (isequal (size (dK1), [n n])); + assert (stk_isequal_tolabs (dK2, diag (dK1))); end +20 tests, 20 passed, 0 known failure, 0 skipped +[inst/covfcs/stk_gausscov_iso.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/covfcs/stk_gausscov_iso.m +***** shared param, x, y + dim = 1; + param = log ([1.0; 2.5]); + x = stk_sampling_randunif (5, dim); + y = stk_sampling_randunif (5, dim); +***** error K = stk_gausscov_iso ([param; 1.234], x, y); +***** error stk_gausscov_iso (); +***** error stk_gausscov_iso (param); +***** error stk_gausscov_iso (param, x); +***** test stk_gausscov_iso (param, x, y); +***** test stk_gausscov_iso (param, x, y, -1); +***** test stk_gausscov_iso (param, x, y, -1, false); +***** error stk_gausscov_iso (param, x, y, -2); +***** test stk_gausscov_iso (param, x, y, -1); +***** error stk_gausscov_iso (param, x, y, 0); +***** test stk_gausscov_iso (param, x, y, 1); +***** test stk_gausscov_iso (param, x, y, 2); +***** error stk_gausscov_iso (param, x, y, 3); +***** error stk_gausscov_iso (param, x, y, nan); +***** error stk_gausscov_iso (param, x, y, inf); +***** shared dim, param, x, y, nx, ny + dim = 3; + param = log ([1.0; 2.5]); + nx = 4; ny = 10; + x = stk_sampling_randunif (nx, dim); + y = stk_sampling_randunif (ny, dim); ***** test - for nr = [2 5 10], - x = zeros(nr, 0); - d = stk_mindist(x); - assert(isequal(d, 0.0)); + K1 = stk_gausscov_iso (param, x, y); + K2 = stk_gausscov_iso (param, x, y, -1); + assert (isequal (size (K1), [nx ny])); + assert (stk_isequal_tolabs (K1, K2)); +***** test + for i = 1:2, + dK = stk_gausscov_iso (param, x, y, i); + assert (isequal (size (dK), [nx ny])); end ***** test + n = 7; + x = stk_sampling_randunif (n, dim); + y = stk_sampling_randunif (n, dim); - nrep = 20; - TOL_REL = 1e-15; - - for irep = 1:nrep, - - n = 2 + floor(rand * 10); - d = 1 + floor(rand * 10); - x = rand(n, d); - z = stk_mindist(x); - - assert(isequal(size(d), [1, 1])); - assert(~isnan(d)); - assert(~isinf(d)); - - % check the result - mindist = Inf; - for i = 1:(n-1), - for j = (i+1):n, - mindist = min(mindist, norm(x(i,:) - x(j,:))); - end - end - assert(abs(z - mindist) <= TOL_REL * mindist); + K1 = stk_gausscov_iso (param, x, y); + K2 = stk_gausscov_iso (param, x, y, -1, true); + assert (isequal (size (K1), [n n])); + assert (stk_isequal_tolabs (K2, diag (K1))); + for i = 1:2, + dK1 = stk_gausscov_iso (param, x, y, i); + dK2 = stk_gausscov_iso (param, x, y, i, true); + assert (isequal (size (dK1), [n n])); + assert (stk_isequal_tolabs (dK2, diag (dK1))); end -5 tests, 5 passed, 0 known failure, 0 skipped -[inst/misc/dist/stk_filldist_exact.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/misc/dist/stk_filldist_exact.m -***** test - d = 3; x = rand(7, d); box = repmat([0; 1], 1, d); - fd1 = stk_filldist_exact(x, box); - fd2 = stk_filldist_exact(stk_dataframe(x), stk_dataframe(box)); - assert(stk_isequal_tolabs(fd1, fd2)); +18 tests, 18 passed, 0 known failure, 0 skipped +[inst/covfcs/stk_sphcov_iso.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/covfcs/stk_sphcov_iso.m +***** shared param, x, y + dim = 1; + param = log ([1.0; 2.5]); + x = stk_sampling_randunif (5, dim); + y = stk_sampling_randunif (5, dim); +***** error K = stk_sphcov_iso ([param; 1.234], x, y); +***** error stk_sphcov_iso (); +***** error stk_sphcov_iso (param); +***** error stk_sphcov_iso (param, x); +***** test stk_sphcov_iso (param, x, y); +***** test stk_sphcov_iso (param, x, y, -1); +***** test stk_sphcov_iso (param, x, y, -1, false); +***** error stk_sphcov_iso (param, x, y, -2); +***** test stk_sphcov_iso (param, x, y, -1); +***** error stk_sphcov_iso (param, x, y, 0); +***** test stk_sphcov_iso (param, x, y, 1); +***** test stk_sphcov_iso (param, x, y, 2); +***** error stk_sphcov_iso (param, x, y, 3); +***** error stk_sphcov_iso (param, x, y, nan); +***** error stk_sphcov_iso (param, x, y, inf); +***** shared dim, param, x, y, nx, ny + dim = 3; + param = log ([1.0; 2.5]); + nx = 4; ny = 10; + x = stk_sampling_randunif (nx, dim); + y = stk_sampling_randunif (ny, dim); ***** test - for dim = 1:6, - x = 0.5 * ones(1, dim); - fd = stk_filldist_exact(x); % [0; 1]^d is the default box - assert(stk_isequal_tolabs(fd, 0.5 * sqrt(dim))); - end + K1 = stk_sphcov_iso (param, x, y); + K2 = stk_sphcov_iso (param, x, y, -1); + assert (isequal (size (K1), [nx ny])); + assert (stk_isequal_tolabs (K1, K2)); ***** test - for dim = [1 3 7], - box = repmat([1; 2], 1, dim); - x = 1 + 0.5 * ones(1, dim); - fd = stk_filldist_exact(x, box); - assert(stk_isequal_tolabs(fd, 0.5 * sqrt(dim))); + for i = 1:2, + dK = stk_sphcov_iso (param, x, y, i); + assert (isequal (size (dK), [nx ny])); end ***** test - for dim = [1 3 7], - x = zeros(1, dim); - [fd, ymax] = stk_filldist_exact(x); - assert(stk_isequal_tolabs(fd, sqrt(dim))); - assert(stk_isequal_tolabs(ymax, ones(1, dim))); + n = 7; + x = stk_sampling_randunif (n, dim); + y = stk_sampling_randunif (n, dim); + + K1 = stk_sphcov_iso (param, x, y); + K2 = stk_sphcov_iso (param, x, y, -1, true); + assert (isequal (size (K1), [n n])); + assert (stk_isequal_tolabs (K2, diag (K1))); + + for i = 1:2, + dK1 = stk_sphcov_iso (param, x, y, i); + dK2 = stk_sphcov_iso (param, x, y, i, true); + assert (isequal (size (dK1), [n n])); + assert (stk_isequal_tolabs (dK2, diag (dK1))); end -4 tests, 4 passed, 0 known failure, 0 skipped -[inst/misc/dist/stk_gpquadform.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/misc/dist/stk_gpquadform.m -***** shared x, y, z, rx, ry, rz - x = rand(5, 2); rx = rand(5, 2) + 1; - y = rand(6, 2); ry = rand(6, 2) + 1; - z = rand(5, 3); rz = rand(5, 3) + 1; -***** error Q = stk_gpquadform(x, ry, y, ry) -***** error Q = stk_gpquadform(x, rz, y, ry) -***** error Q = stk_gpquadform(x, rx, y, rx) -***** error Q = stk_gpquadform(x, rx, y, rz) -***** error Q = stk_gpquadform(x, rx, z, ry) -***** shared x, y, z, rx, ry, rz - x = zeros (11, 5); rx = 1/sqrt(2) * ones (11, 5); - y = zeros (13, 5); ry = 1/sqrt(2) * ones (13, 5); - z = ones ( 7, 5); rz = 1/sqrt(2) * ones ( 7, 5); -***** test - Qx = stk_gpquadform(x, [], rx); - assert(isequal(Qx, zeros(11))); -***** test - Qxx = stk_gpquadform(x, x, rx, rx); - assert(isequal(Qxx, zeros(11))); -***** test - Qxy = stk_gpquadform(x, y, rx, ry); - assert(isequal(Qxy, zeros(11, 13))); -***** test - Qzz = stk_gpquadform(z, [], rz); - assert(isequal(Qzz, zeros(7))); -***** test - Qxz = stk_gpquadform(x, z, rx, rz); - assert(stk_isequal_tolabs(Qxz, 5 * ones(11, 7))); -***** test - x = randn(5, 3); rx = 1 + rand(5, 3); - y = randn(5, 3); ry = 1 + rand(5, 3); - Q1 = stk_gpquadform(x, y, rx, ry, true); % pairwise - Q2 = stk_gpquadform(x, y, rx, ry, false); - assert(isequal(size(Q1), [5 1])); - assert(isequal(size(Q2), [5 5])); - assert(stk_isequal_tolabs(Q1, diag(Q2))); -***** test - x = randn(5, 3); rx = 1 + rand(5, 3); - Q1 = stk_gpquadform(x, [], rx, [], true); % pairwise - assert(stk_isequal_tolabs(Q1, zeros(5, 1))); - Q1 = stk_gpquadform(x, x, rx, rx, true); % pairwise - assert(stk_isequal_tolabs(Q1, zeros(5, 1))); -***** shared x, y, z, rx, ry, rz - x = zeros (11, 5); rx = 2 * ones (11, 5); - y = zeros (13, 5); ry = 2 * ones (13, 5); - z = ones ( 7, 5); rz = 2 * ones ( 7, 5); -***** test - Qx = stk_gpquadform(x, [], rx); - assert(isequal(Qx, zeros(11))); -***** test - Qxx = stk_gpquadform(x, x, rx, rx); - assert(isequal(Qxx, zeros(11))); -***** test - Qxy = stk_gpquadform(x, y, rx, ry); - assert(isequal(Qxy, zeros(11, 13))); -***** test - Qzz = stk_gpquadform(z, [], rz); - assert(isequal(Qzz, zeros(7))); -***** test - Qxz = stk_gpquadform(x, z, rx, rz); - assert(stk_isequal_tolabs(Qxz, 5/8 * ones(11, 7))); -17 tests, 17 passed, 0 known failure, 0 skipped -[inst/misc/dist/stk_filldist_discretized.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/misc/dist/stk_filldist_discretized.m -***** error stk_filldist_discretized(0.0) % incorrect nb of arguments -***** error stk_filldist_discretized(0.0, []) % second arg is empty -***** error stk_filldist_discretized([], 0.0) % first arg is empty +18 tests, 18 passed, 0 known failure, 0 skipped +[inst/covfcs/stk_materncov_aniso.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/covfcs/stk_materncov_aniso.m +***** shared param, x, y + dim = 1; + param = log ([1.0; 1.5; 2.8]); + x = stk_sampling_randunif(5, dim); + y = stk_sampling_randunif(5, dim); +***** error stk_materncov_aniso(); +***** error stk_materncov_aniso(param); +***** error stk_materncov_aniso(param, x); +***** test stk_materncov_aniso(param, x, y); +***** test stk_materncov_aniso(param, x, y, -1); +***** test stk_materncov_aniso(param, x, y, -1, false); +***** error stk_materncov_aniso(param, x, y, -2); +***** test stk_materncov_aniso(param, x, y, -1); +***** error stk_materncov_aniso(param, x, y, 0); +***** test stk_materncov_aniso(param, x, y, 1); +***** test stk_materncov_aniso(param, x, y, 2); +***** test stk_materncov_aniso(param, x, y, 3); +***** error stk_materncov_aniso(param, x, y, 4); +***** error stk_materncov_aniso(param, x, y, nan); +***** error stk_materncov_aniso(param, x, y, inf); +***** shared dim, param, x, y, nx, ny + dim = 3; + param = log ([1.0; 1.5; 2.8; 2.7; 2.9]); + nx = 4; ny = 10; + x = stk_sampling_randunif(nx, dim); + y = stk_sampling_randunif(ny, dim); ***** test - d = 3; x = rand(7, d); y = rand(20, d); - fd1 = stk_filldist_discretized(x, y); - fd2 = stk_filldist_discretized(stk_dataframe(x), stk_dataframe(y)); - assert(stk_isequal_tolabs(fd1, fd2)); + K1 = stk_materncov_aniso(param, x, y); + K2 = stk_materncov_aniso(param, x, y, -1); + assert(isequal(size(K1), [nx ny])); + assert(stk_isequal_tolabs(K1, K2)); ***** test - n = 5; - for dim = 1:10, - x = rand(n, dim); - fd = stk_filldist_discretized(x, x); - assert(stk_isequal_tolabs(fd, 0.0)); + for i = 1:(dim+2), + dK = stk_materncov_aniso(param, x, y, i); + assert(isequal(size(dK), [nx ny])); end ***** test - for dim = 1:10, - x = rand(1, dim); - y = rand(1, dim); - fd = stk_filldist_discretized(x, y); - assert(stk_isequal_tolabs(fd, norm(x - y))); + n = 7; + x = stk_sampling_randunif(n, dim); + y = stk_sampling_randunif(n, dim); + + K1 = stk_materncov_aniso(param, x, y); + K2 = stk_materncov_aniso(param, x, y, -1, true); + assert(isequal(size(K1), [n n])); + assert(stk_isequal_tolabs(K2, diag(K1))); + + for i = 1:(dim+2), + dK1 = stk_materncov_aniso(param, x, y, i); + dK2 = stk_materncov_aniso(param, x, y, i, true); + assert(isequal(size(dK1), [n n])); + assert(stk_isequal_tolabs(dK2, diag(dK1))); end +18 tests, 18 passed, 0 known failure, 0 skipped +[inst/covfcs/stk_discretecov.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/covfcs/stk_discretecov.m +***** shared model, model2, x0 + n0 = 20; n1 = 10; dim = 4; + x0 = stk_sampling_randunif (n0, dim); + x1 = stk_sampling_randunif (n1, dim); + model = stk_model (@stk_materncov52_aniso, dim); + model.lm = stk_lm_affine (); + model.param = log ([1.0; 2.1; 2.2; 2.3; 2.4]); +***** test % without noise, pairwise = false + model.lognoisevariance = - inf; + model2 = stk_model (@stk_discretecov, model, x0); + idx = [1 4 9]; + [K1, P1] = stk_make_matcov (model, x0(idx, :)); + [K2, P2] = stk_make_matcov (model2, idx'); + assert (stk_isequal_tolrel (K1, K2)); + assert (stk_isequal_tolrel (P1, P2)); +***** test % without noise, pairwise = true + K1 = stk_make_matcov (model, x0([2 5 6], :), [], true); + K2 = stk_make_matcov (model2, [2 5 6]', [], true); + assert (stk_isequal_tolrel (K1, K2)); +***** test % with noise, pairwise = false + model.lognoisevariance = log (0.01); + model2 = stk_model (@stk_discretecov, model, x0); + idx = [1 4 9]; + [K1, P1] = stk_make_matcov (model, x0(idx, :)); + [K2, P2] = stk_make_matcov (model2, idx'); + assert (stk_isequal_tolrel (K1, K2)); + assert (stk_isequal_tolrel (P1, P2)); +3 tests, 3 passed, 0 known failure, 0 skipped +[inst/covfcs/stk_materncov32_iso.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/covfcs/stk_materncov32_iso.m +***** shared param, x, y + dim = 1; + param = log ([1.0; 2.5]); + x = stk_sampling_randunif (5, dim); + y = stk_sampling_randunif (5, dim); +***** error K = stk_materncov32_iso ([param; 1.234], x, y); +***** error stk_materncov32_iso (); +***** error stk_materncov32_iso (param); +***** error stk_materncov32_iso (param, x); +***** test stk_materncov32_iso (param, x, y); +***** test stk_materncov32_iso (param, x, y, -1); +***** test stk_materncov32_iso (param, x, y, -1, false); +***** error stk_materncov32_iso (param, x, y, -2); +***** test stk_materncov32_iso (param, x, y, -1); +***** error stk_materncov32_iso (param, x, y, 0); +***** test stk_materncov32_iso (param, x, y, 1); +***** test stk_materncov32_iso (param, x, y, 2); +***** error stk_materncov32_iso (param, x, y, 3); +***** error stk_materncov32_iso (param, x, y, nan); +***** error stk_materncov32_iso (param, x, y, inf); +***** shared dim, param, x, y, nx, ny + dim = 3; + param = log ([1.0; 2.5]); + nx = 4; ny = 10; + x = stk_sampling_randunif (nx, dim); + y = stk_sampling_randunif (ny, dim); ***** test - n = 4; - for dim = 2:10, - x = zeros(n, dim); - y = rand(1, dim); - fd = stk_filldist_discretized(x, y); - assert(stk_isequal_tolabs(fd, max(stk_dist(x, y)))); - end + K1 = stk_materncov32_iso (param, x, y); + K2 = stk_materncov32_iso (param, x, y, -1); + assert (isequal (size (K1), [nx ny])); + assert (stk_isequal_tolabs (K1, K2)); ***** test - for dim = [1 3 6], - x = 0.5 * ones(1, dim); - y = stk_sampling_regulargrid(2^dim, dim); % [0; 1]^d is the default box - fd = stk_filldist_discretized(x, y); - assert(stk_isequal_tolabs(fd, 0.5 * sqrt(dim))); + for i = 1:2, + dK = stk_materncov32_iso (param, x, y, i); + assert (isequal (size (dK), [nx ny])); end ***** test - for dim = [1 3 7], - x = zeros(1, dim); - y = stk_sampling_regulargrid(3^dim, dim); - [fd, ymax] = stk_filldist_discretized(x, y); - assert(stk_isequal_tolabs(fd, sqrt(dim))); - assert(stk_isequal_tolabs(ymax, ones(1, dim))); + n = 7; + x = stk_sampling_randunif (n, dim); + y = stk_sampling_randunif (n, dim); + + K1 = stk_materncov32_iso (param, x, y); + K2 = stk_materncov32_iso (param, x, y, -1, true); + assert (isequal (size (K1), [n n])); + assert (stk_isequal_tolabs (K2, diag (K1))); + + for i = 1:2, + dK1 = stk_materncov32_iso (param, x, y, i); + dK2 = stk_materncov32_iso (param, x, y, i, true); + assert (isequal (size (dK1), [n n])); + assert (stk_isequal_tolabs (dK2, diag (dK1))); end +18 tests, 18 passed, 0 known failure, 0 skipped +[inst/sampling/stk_sampcrit_akg_eval.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/sampling/stk_sampcrit_akg_eval.m +***** shared zc_mean, zc_std, zr_mean, zr_std, zcr_cov, AKG, nc + xi = [0; 0.2; 0.7; 0.9]; + zi = [1; 0.9; 0.6; 0.1] - 10; + ni = 4; + + M_prior = stk_model (@stk_materncov32_iso); + M_prior.param = log ([1.0; 2.1]); + M_prior.lognoisevariance = 0.678; + + nc = 20; + xc = stk_sampling_regulargrid (nc, 1, [0; 1]); + [zp, ~, ~, K] = stk_predict (M_prior, xi, zi, [xi; xc]); + + ir = 1:ni; ic = ni + (1:nc); + + zc_mean = zp.mean(ic); + zc_std = sqrt (zp.var(ic)); + + % reference grid: current evaluation points ("KGCP") + zr_mean = zp.mean(ir); + zr_std = sqrt (zp.var(ir)); + + zcr_cov = K(ic, ir); +***** test AKG = stk_sampcrit_akg_eval (zc_mean, zc_std, zr_mean, zr_std, zcr_cov); +***** assert (isequal (size (AKG), [nc 1])) +***** assert (all (AKG >= 0)) +***** error AKG = stk_sampcrit_akg_eval (zc_mean, zc_std, zr_mean, zr_std); +4 tests, 4 passed, 0 known failure, 0 skipped +[inst/sampling/stk_halfpintl.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/sampling/stk_halfpintl.m +***** test % case #1 + a = 1; + b = 1; + [a_out, b_out, z_out] = stk_halfpintl (a, b); + assert (a_out == 1) + assert (b_out == 1) + assert (isempty (z_out)) +***** test % case #2: two lines, slopes not equal, already sorted + a = [1; -1]; + b = [0; 2]; + [a_out, b_out, z_out] = stk_halfpintl (a, b); + assert (isequal (a_out, [1; -1])) + assert (isequal (b_out, [0; 2])) + assert (z_out == 1) +***** test % case #3: same as #2, but not sorted + a = [-1; 1]; + b = [ 2; 0]; + [a_out, b_out, z_out] = stk_halfpintl (a, b); + assert (isequal (a_out, [1; -1])) + assert (isequal (b_out, [0; 2])) + assert (z_out == 1) +***** test % case #4: two lines, equal slopes, already sorted + a = [0; 0]; + b = [1; 2]; + [a_out, b_out, z_out] = stk_halfpintl (a, b); + assert (a_out == 0) + assert (b_out == 1) + assert (isempty (z_out)) +***** test % case #5: same as #4, but not sorted + a = [0; 0]; + b = [2; 1]; + [a_out, b_out, z_out] = stk_halfpintl (a, b); + assert (a_out == 0) + assert (b_out == 1) + assert (isempty (z_out)) +***** test % case #6: add a dominated line to #2 (the result does not change) + a = [1; -1; 0]; + b = [0; 2; 1]; + [a_out, b_out, z_out] = stk_halfpintl (a, b); + assert (isequal (a_out, [1; -1])) + assert (isequal (b_out, [0; 2])) + assert (z_out == 1) +***** test % case #7: permutation of #6 + a = [1; 0; -1]; + b = [0; 1; 2]; + [a_out, b_out, z_out] = stk_halfpintl (a, b); + assert (isequal (a_out, [1; -1])) + assert (isequal (b_out, [0; 2])) + assert (z_out == 1) +***** test % case #8: another permutation of #6 + a = [0; 1; -1]; + b = [1; 0; 2]; + [a_out, b_out, z_out] = stk_halfpintl (a, b); + assert (isequal (a_out, [1; -1])) + assert (isequal (b_out, [0; 2])) + assert (z_out == 1) +***** test % case #9: same as #8, with some duplicated lines added + a = [0; 1; 0; -1; 0; -1; 1]; + b = [1; 0; 1; 2; 1; 2; 0]; + [a_out, b_out, z_out] = stk_halfpintl (a, b); + assert (isequal (a_out, [1; -1])) + assert (isequal (b_out, [0; 2])) + assert (z_out == 1) 9 tests, 9 passed, 0 known failure, 0 skipped -[inst/misc/dist/stk_filldist.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/misc/dist/stk_filldist.m -***** test %%% exact - d = 3; x = rand(7, d); box = repmat([0; 1], 1, d); - fd1 = stk_filldist(x, box); - fd2 = stk_filldist(stk_dataframe(x), stk_dataframe(box)); - assert(stk_isequal_tolabs(fd1, fd2)); -***** test %%% discretized - d = 3; x = rand(7, d); y = rand(20, d); - fd1 = stk_filldist(x, y); - fd2 = stk_filldist(stk_dataframe(x), stk_dataframe(y)); - assert(stk_isequal_tolabs(fd1, fd2)); +[inst/sampling/stk_sampcrit_ehvi_eval.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/sampling/stk_sampcrit_ehvi_eval.m +***** shared zr, zi + zr = [1 1]; + zi = [0.25 0.75; 0.5 0.5; 0.75 0.25]; +***** test % no improvement (1 computation) + zp_mean = [0.6 0.6]; zp_std = [0 0]; + EHVI = stk_sampcrit_ehvi_eval (zp_mean, zp_std, zi, zr); + assert (stk_isequal_tolabs (EHVI, 0, 1e-12)); +***** test % guaranteed improvement (1 computation) + zp_mean = [0 0]; zp_std = [0 0]; + EHVI = stk_sampcrit_ehvi_eval (zp_mean, zp_std, zi, zr); + assert (stk_isequal_tolabs (EHVI, 10 * 0.25 ^ 2)); +***** test % no improvement again (2 computations) + zp_mean = [0.5 0.5; 0.6 0.6]; zp_std = [0 0; 0 0]; + EHVI = stk_sampcrit_ehvi_eval (zp_mean, zp_std, zi, zr); + assert (stk_isequal_tolabs (EHVI, [0; 0], 1e-12)); +***** test % no observation -> EHVI wrt zr + zp_mean = [0.6 0.6]; zp_std = 0.01 * [1 1]; zi = []; + EHVI = stk_sampcrit_ehvi_eval (zp_mean, zp_std, zi, zr); + assert (stk_isequal_tolabs (EHVI, (1 - 0.6)^2, 1e-12)); +***** test % no observation below zr -> EHVI wrt zr + zp_mean = [0.6 0.6]; zp_std = 0.01 * [1 1]; zi = [2 2]; + EHVI = stk_sampcrit_ehvi_eval (zp_mean, zp_std, zi, zr); + assert (stk_isequal_tolabs (EHVI, (1 - 0.6)^2, 1e-12)); +5 tests, 5 passed, 0 known failure, 0 skipped +[inst/sampling/stk_sampling_randunif.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/sampling/stk_sampling_randunif.m +***** shared x, n, dim, box + n = 10; dim = 2; box = [0, 0; 2, 2]; +***** error x = stk_sampling_randunif (); +***** test x = stk_sampling_randunif (n); +***** test x = stk_sampling_randunif (n, dim); +***** test x = stk_sampling_randunif (n, dim, box); +***** assert (isa(x, 'stk_dataframe')); +***** assert (isequal (x.colnames, {})); ***** test - n = 5; % must be bigger than 2 - for dim = 1:10, - x = rand(n, dim); - fd = stk_filldist(x, x); - assert(stk_isequal_tolabs(fd, 0.0)); - end -***** test %%% exact - for dim = 1:6, - x = 0.5 * ones(1, dim); - fd = stk_filldist(x); % [0; 1]^d is the default box - assert(stk_isequal_tolabs(fd, 0.5 * sqrt(dim))); - end -***** test %%% discretized - for dim = 1:6, - x = 0.5 * ones(1, dim); - y = stk_sampling_regulargrid(2^dim, dim); % [0; 1]^d is the default box - fd = stk_filldist(x, y); - assert(stk_isequal_tolabs(fd, 0.5 * sqrt(dim))); - end + cn = {'W', 'H'}; box = stk_hrect (box, cn); + x = stk_sampling_randunif (n, dim, box); + assert (isequal (x.colnames, cn)); ***** test - for dim = [1 3 7], - box = repmat([1; 2], 1, dim); - x = 1 + 0.5 * ones(1, dim); - fd = stk_filldist(x, box); - assert(stk_isequal_tolabs(fd, 0.5 * sqrt(dim))); + for dim = 1:5, + x = stk_sampling_randunif(n, dim); + assert(isequal(size(x), [n dim])); + u = double(x); u = u(:); + assert(~any(isnan(u) | isinf(u))); + assert((min(u) >= 0) && (max(u) <= 1)); end +8 tests, 8 passed, 0 known failure, 0 skipped +[inst/sampling/stk_sampling_regulargrid.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/sampling/stk_sampling_regulargrid.m +***** shared x, n, dim, box + n = 9; dim = 2; box = [0, 0; 1, 1]; +***** error x = stk_sampling_regulargrid (); +***** test x = stk_sampling_regulargrid (n); +***** test x = stk_sampling_regulargrid (n, dim); +***** test x = stk_sampling_regulargrid (n, dim, box); +***** assert (isa (x, 'stk_dataframe')); +***** assert (isa (x, 'stk_factorialdesign')); +***** assert (isequal (x.colnames, {})); ***** test - dim = 3; - box = repmat([-1; 1], 1, dim); - x = stk_sampling_randunif(20, dim, box); - y = stk_sampling_regulargrid(3^dim, dim, box); - fd1 = stk_filldist(x, box); - fd2 = stk_filldist(x, y); - assert(fd1 >= fd2 - 10 * eps); -***** test %%% exact - for dim = [1 3 7], - x = zeros(1, dim); - [fd, ymax] = stk_filldist_exact(x); - assert(stk_isequal_tolabs(fd, sqrt(dim))); - assert(stk_isequal_tolabs(ymax, ones(1, dim))); - end -***** test %%% discretized - for dim = [1 3 7], - x = zeros(1, dim); - y = stk_sampling_regulargrid(3^dim, dim); - [fd, ymax] = stk_filldist(x, y); - assert(stk_isequal_tolabs(fd, sqrt(dim))); - assert(stk_isequal_tolabs(ymax, ones(1, dim))); - end -9 tests, 9 passed, 0 known failure, 0 skipped -[inst/misc/test/stk_isequal_tolrel.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/misc/test/stk_isequal_tolrel.m -***** shared r1, r2, r3, a, b, tolrel - a = 1.01; b = 1.02; tolrel = 0.1; -***** error rr = stk_isequal_tolrel(); -***** error rr = stk_isequal_tolrel(a); -***** test r1 = stk_isequal_tolrel(a, b); -***** test r2 = stk_isequal_tolrel(a, b, tolrel); -***** test r3 = stk_isequal_tolrel(a, [b b]); -***** test assert (isequal (r1, false)); -***** test assert (isequal (r2, true)); -***** test assert (isequal (r3, false)); + cn = {'W', 'H'}; box = stk_hrect (box, cn); + x = stk_sampling_regulargrid (n, dim, box); + assert (isequal (x.colnames, cn)); ***** test - a = struct('u', []); b = struct('v', []); - assert(~ stk_isequal_tolrel(a, b)) + for dim = 1:3, + n = 3^dim; + x = stk_sampling_regulargrid(n, dim); + assert(isequal(size(x), [n dim])); + u = double(x); u = u(:); + assert(~any(isnan(u) | isinf(u))); + assert((min(u) >= 0) && (max(u) <= 1)); + end ***** test - a = struct('u', 1.01); b = struct('u', 1.02); - assert(stk_isequal_tolrel(a, b, tolrel)) + nn = [3 4 5]; + for dim = 1:3, + x = stk_sampling_regulargrid(nn(1:dim), dim); + assert(isequal(size(x), [prod(nn(1:dim)) dim])); + u = double(x); u = u(:); + assert(~any(isnan(u) | isinf(u))); + assert((min(u) >= 0) && (max(u) <= 1)); + end 10 tests, 10 passed, 0 known failure, 0 skipped -[inst/misc/test/stk_isequal_tolabs.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/misc/test/stk_isequal_tolabs.m -***** shared r1, r2, a, b, tolabs - a = 1.01; b = 1.02; tolabs = 0.1; -***** error rr = stk_isequal_tolabs(); -***** error rr = stk_isequal_tolabs(a); -***** test r1 = stk_isequal_tolabs(a, b); -***** test r2 = stk_isequal_tolabs(a, b, tolabs); -***** test assert(~r1); -***** test assert(r2); -***** test - a = struct('u', []); b = struct('v', []); - assert(~ stk_isequal_tolabs(a, b)) +[inst/sampling/stk_sampling_maximinlhs.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/sampling/stk_sampling_maximinlhs.m +***** shared x, n, dim, box, niter + n = 20; dim = 2; box = [0, 0; 1, 1]; niter = 1; +***** error x = stk_sampling_maximinlhs (); +***** test x = stk_sampling_maximinlhs (n); +***** test x = stk_sampling_maximinlhs (n, dim); +***** test x = stk_sampling_maximinlhs (n, dim, box); +***** test x = stk_sampling_maximinlhs (n, dim, box, niter); +***** assert (isa (x, 'stk_dataframe')); +***** assert (isequal (x.colnames, {})); ***** test - a = struct('u', 1.01); b = struct('u', 1.02); - assert(stk_isequal_tolabs(a, b, tolabs)) -8 tests, 8 passed, 0 known failure, 0 skipped -[inst/misc/test/stk_test.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/misc/test/stk_test.m -***** assert(isempty([])) % support for test assert shorthand -***** assert((1 + 1) == 2) -***** test a=1; -***** test assert(~exist('a')); -***** shared a % create a shared variable -***** test a = 3; % assign to a shared variable -***** test assert(a == 3); % variable should equal 3 in this second 'test' block -***** shared b, c % replace shared variables {'a'} --> {'b', 'c'} -***** test assert(~exist('a')); % a no longer exists -***** test assert(isempty(b)); % variables start off empty -***** shared a % recreate a shared variable that had been deleted -***** test assert (isempty(a)); % it is empty, even though it was equal to 3 before -***** shared a, b, c % creates three shared variables - a = 1; b = 2; c = 3; % give values to all variables, in the same block -***** assert(isequal([a, b, c], [1, 2, 3])); % test all of them together -***** test c=6; % update a value -***** test % show that the update sticks between blocks - assert(isequal([a, b, c], [1, 2, 6])); -***** shared % clear all shared variables -***** assert(~exist('a')) % show that they are cleared -***** error test % not enough input arguments -***** error test(1, 2, 3, 4) % too many input args -***** error garbage % usage on nonexistent function should be -***** error stt_test('test', 'bogus'); % undefined function error -***** error stk_test('test', 'bogus'); % error raised by stk_test itself -***** error stk_test(); -***** error stk_test('disp', 'verbose', [], 'extra arg !!!'); -***** error stk_test([]) -***** error stk_test(0.0) -***** error stk_test('stk_mindist', 0.0) -***** error stk_test('stk_mindist', 'dudule') -24 tests, 24 passed, 0 known failure, 0 skipped -[inst/misc/error/stk_error.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/misc/error/stk_error.m -***** shared errmsg, mnemonic, badstack - errmsg = 'Go ahead, make my day.'; - mnemonic = 'ClintEastwood'; - badstack = 0; % not a valid stack structure -***** error stk_error(errmsg, mnemonic); -***** error stk_error (errmsg, mnemonic, badstack); -***** error id=STK:stk_error:InvalidArgument stk_error (errmsg, mnemonic, badstack); -3 tests, 3 passed, 0 known failure, 0 skipped -[inst/misc/parallel/@stk_parallel_engine_none/stk_parallel_engine_none.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/misc/parallel/@stk_parallel_engine_none/stk_parallel_engine_none.m -***** test stk_test_class ('stk_parallel_engine_none') -1 test, 1 passed, 0 known failure, 0 skipped -[inst/misc/design/stk_phipcrit.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/misc/design/stk_phipcrit.m -***** shared x - x = [0, 0.2, 0.4, 0.6, 0.8, 1.0; - 0, 0.6, 0.8, 1.0, 0.2, 0.4]'; -***** assert (stk_isequal_tolabs ... - (stk_phipcrit (x, 10), 3.946317664423303, 1e-15)) -***** assert (stk_isequal_tolabs ... - (stk_phipcrit (x, 50), 3.614077252813102, 1e-15)); -***** assert (stk_isequal_tolabs ... - (stk_phipcrit (x, 100), 3.574589859827413, 1e-15)); -***** assert (stk_isequal_tolabs ... - (stk_phipcrit (x, 1e9), 1 / stk_mindist (x), 1e-8)); -***** assert (isequal (stk_phipcrit (ones (2)), Inf)); -5 tests, 5 passed, 0 known failure, 0 skipped -[inst/misc/design/stk_maxabscorr.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/misc/design/stk_maxabscorr.m -***** assert (stk_isequal_tolabs (0.0, ... % Test on an OLHS(5) - stk_maxabscorr ([0.4 0.8 0 -0.4 -0.8; -0.8 0.4 0 0.8 -0.4]'))); -1 test, 1 passed, 0 known failure, 0 skipped -[inst/param/estim/stk_param_init.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/param/estim/stk_param_init.m + cn = {'W', 'H'}; box = stk_hrect (box, cn); + x = stk_sampling_maximinlhs (n, dim, box); + assert (isequal (x.colnames, cn)); ***** test - xi = (1:10)'; zi = sin (xi); - model = stk_model (@stk_materncov52_iso); - model.param = stk_param_init (model, xi, zi, [1; 10], false); - xt = (1:9)' + 0.5; zt = sin (xt); - zp = stk_predict (model, xi, zi, xt); - assert (sum ((zt - zp.mean) .^ 2) < 1e-3); -***** test % check equivariance of parameter estimates - f = @(x) sin (x); - xi = stk_sampling_regulargrid (10, 1); zi = stk_feval (f, xi); - shift = 1000; scale = 0.01; - model = stk_model (@stk_materncov32_iso); - p1 = stk_param_init (model, xi, zi); - p2 = stk_param_init (model, xi, shift + scale .* zi); - assert (stk_isequal_tolabs (p2(1), p1(1) + log (scale^2), 1e-10)) - assert (stk_isequal_tolabs (p2(2), p1(2), eps)) -***** shared xi, zi, BOX, xt, zt + for dim = 1:5, + x = stk_sampling_randomlhs (n, dim); + assert (isequal (size (x), [n dim])); + u = double (x); u = u(:); + assert (~ any (isnan (u) | isinf (u))); + assert ((min (u) >= 0) && (max (u) <= 1)); + assert (stk_is_lhs (x, n, dim)); + end +9 tests, 9 passed, 0 known failure, 0 skipped +[inst/sampling/@stk_sampcrit_eqi/stk_sampcrit_eqi.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/sampling/@stk_sampcrit_eqi/stk_sampcrit_eqi.m +***** shared F, M, EQI + M = stk_model_gpposterior (stk_model, [1 2 3]', [1.234 3 2]'); +warning: Something went wrong during the optimization +crit0 = 2.594852, crit_opt = 2.594852: crit0 < crit_opt +***** test F = stk_sampcrit_eqi () % ending ";" omitted on purpose, to test disp - f = @(x)(- (0.8 * x + sin (5 * x + 1) + 0.1 * sin (10 * x))); - DIM = 1; % Dimension of the factor space - BOX = [-1.0; 1.0]; % Factor space +F = +| +| model: -- (not instantiated) +| quantile_order: 0.5 +| point_batch_size: 1 +| current_minimum: Inf +| - xi = stk_sampling_regulargrid (20, DIM, BOX); % Evaluation points - zi = stk_feval (f, xi); % Evaluation results +***** assert (isempty (F.model)) +***** assert (isempty (get (F, 'model'))) +***** assert (F.quantile_order == 0.5) +***** assert (get (F, 'quantile_order') == 0.5) +***** assert (F.current_minimum == +inf) +***** assert (get (F, 'current_minimum') == +inf) +***** error F.toto +***** error get (F, 'toto') +***** error F.current_min = 1.234; % read-only +***** error F = set (F, 'current_min', 1.234); % read-only +***** error F.toto = 1.234; % field does not exist +***** error F = set (F, 'toto', 1.234); % field does not exist +***** test F.quantile_order = 0.9; assert (F.quantile_order == 0.9) +***** test F = set (F, 'quantile_order', 0.8); assert (F.quantile_order == 0.8) +***** error F.quantile_order = 1.1; +***** error F.quantile_order = -0.1; +***** error F.quantile_order = [1 2]; +***** error F.current_minimum = 3.333; % read-only +***** error F.quantile_value = 2.222; % read-only +***** error EQI = feval (F, 1.0); +***** test F = stk_sampcrit_eqi (); F.model = M; + assert (~ isempty (F.model)); +***** test F = stk_sampcrit_eqi (); F = set (F, 'model', M); + assert (~ isempty (F.model)); +***** test F.model = []; % remove model + assert (isempty (F.model)); + assert (F.current_minimum == +inf); +***** test F = stk_sampcrit_eqi (M) % ending ";" omitted on purpose, to test disp - NT = 400; % Number of points in the grid - xt = stk_sampling_regulargrid (NT, DIM, BOX); % Generate a regular grid - zt = stk_feval (f, xt); % Values of f on the grid -***** xtest % This test is known to fail in Debian buster i386 - % because of a known problem in Octave's sqp/qp functions - % http://savannah.gnu.org/bugs/?38875 - 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) -***** test - model = stk_model (@stk_materncov_aniso); - [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 441 column 9 - stk_minimize_boxconstrained at line 57 column 18 - 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 - /tmp/tmp.leWC69aW4i at line 350 column 31 +F = +| +| model: +| quantile_order: 0.5 +| point_batch_size: 1 +| current_minimum: 1.234 +| +***** assert (isequal (F.model, M)) +***** assert (stk_isequal_tolrel (F.current_minimum, 1.234, 10 * eps)); +***** test EQI = feval (F, [1.0; 1.1; 1.2]); +***** assert (isequal (size (EQI), [3 1])) +***** assert (all (EQI >= 0)) +***** test F.quantile_order = 0.9; assert (F.quantile_order == 0.9) +***** shared F, M, EQI + prior_model = stk_model (); + prior_model.lognoisevariance = 0.678; + M = stk_model_gpposterior (prior_model, [1 2 3]', [1.234 3 2]'); +***** test F = stk_sampcrit_eqi (M); +***** assert (isequal (F.model, M)) +***** assert (stk_isequal_tolrel (F.current_minimum, 2.077997, 1e-5)); +***** test EQI = feval (F, [1.0; 1.1; 1.2]); +***** assert (isequal (size (EQI), [3 1])) +***** assert (all (EQI >= 0)) +***** test F.quantile_order = 0.9; assert (F.quantile_order == 0.9) +***** shared F +***** test F = stk_sampcrit_eqi (stk_model ()); +***** assert (F.current_minimum == +inf); +***** error feval (F, 1.0); +***** shared F, M + M = stk_model_gpposterior (stk_model (), [1 2 3]', [1.234 3 2]'); +warning: Something went wrong during the optimization +crit0 = 2.594852, crit_opt = 2.594852: crit0 < crit_opt +***** error F = stk_sampcrit_eqi (M, [], 0); +***** error F = stk_sampcrit_eqi (M, [], 1.5); +***** error F = stk_sampcrit_eqi (M, [], nan); +***** error F = stk_sampcrit_eqi (M, [], [10 20]); +***** test F = stk_sampcrit_eqi (M, [], 10); +***** assert (isequal (F.quantile_order, 0.5)); +***** assert (isequal (F.point_batch_size, 10)); +***** error F = stk_sampcrit_eqi (M, 0.8, 0); +***** error F = stk_sampcrit_eqi (M, 0.8, 1.5); +***** error F = stk_sampcrit_eqi (M, 0.8, nan); +***** error F = stk_sampcrit_eqi (M, 0.8, [10 20]); +***** test F = stk_sampcrit_eqi (M, 0.8, 5); +***** assert (isequal (F.quantile_order, 0.8)); +***** assert (isequal (F.point_batch_size, 5)); +***** shared F, M, EQI + prior_model = stk_model (); + prior_model.lognoisevariance = 0.678; + M = stk_model_gpposterior (prior_model, [1 2 3]', [1.234 3 2]'); + F = stk_sampcrit_eqi (M); +***** test F.point_batch_size = 10; % numeric +***** assert (isequal (F.point_batch_size, 10)) +***** test EQI = feval (F, [1.0; 1.1; 1.2]); +***** test F.point_batch_size = @(x, n) 100 - n; % function handle +***** assert (isa (F.point_batch_size, 'function_handle')) +***** test EQI = feval (F, [1.0; 1.1; 1.2]); +***** test F.point_batch_size = 'sin'; % char +***** assert (isa (F.point_batch_size, 'function_handle')) +63 tests, 63 passed, 0 known failure, 0 skipped +[inst/sampling/stk_sampling_halton_rr2.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/sampling/stk_sampling_halton_rr2.m +***** error stk_sampling_halton_rr2 () % nargin < 1 ***** test - model = stk_model (@stk_materncov32_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) -***** test - model = stk_model (@stk_materncov32_aniso); - [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) -***** test - model = stk_model (@stk_materncov52_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) + n = 300; d = 25; + x = stk_sampling_halton_rr2 (n, d); + assert (isequal (size (x), [n d])) ***** test - model = stk_model (@stk_materncov52_aniso); - [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) + x = stk_sampling_halton_rr2 (1000, 3); + y = double (x(end, :)); + yref = [0.9052734375 0.028349336991312 0.74848]; + assert (stk_isequal_tolrel (y, yref, 1e-13)); ***** test - model = stk_model (@stk_gausscov_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: matrix singular to machine precision, rcond = 3.84351e-18 -warning: called from - linsolve at line 113 column 7 - linsolve at line 42 column 3 - stk_set_righthandside at line 44 column 16 - stk_make_kreq at line 35 column 6 - stk_predict_ at line 112 column 10 - stk_predict at line 104 column 16 - __test__ at line 6 column 5 - test at line 682 column 11 - /tmp/tmp.leWC69aW4i at line 350 column 31 - + dim = 2; box = stk_hrect (dim); + x = stk_sampling_halton_rr2 (5, dim, box); + assert (isequal (x.colnames, {})); ***** test - model = stk_model (@stk_gausscov_aniso); - [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: matrix singular to machine precision, rcond = 1.97535e-18 -warning: called from - linsolve at line 113 column 7 - linsolve at line 42 column 3 - stk_set_righthandside at line 44 column 16 - stk_make_kreq at line 35 column 6 - stk_predict_ at line 112 column 10 - stk_predict at line 104 column 16 - __test__ at line 6 column 5 - test at line 682 column 11 - /tmp/tmp.leWC69aW4i at line 350 column 31 - -***** test % Homoscedastic case / do_estim_lnv = true - model = stk_model (@stk_materncov32_iso); - [model.param, model.lognoisevariance] = ... - stk_param_init (model, xi, zi, BOX, true); - [model.param, model.lognoisevariance] = ... - stk_param_estim (model, xi, zi); - zp = stk_predict (model, xi, zi, xt); - assert (model.lognoisevariance > -inf); - assert (max ((zp.mean - zt) .^ 2) < 1e-3) -warning: This way of setting do_estim_lnv is deprecated -warning: called from - stk_param_init>stk_param_init_ at line 250 column 5 - stk_param_init at line 87 column 18 - __test__ at line 4 column 40 - test at line 682 column 11 - /tmp/tmp.leWC69aW4i at line 350 column 31 - -***** error % Homoscedastic case / do_estim_lnv = false / model.lnv = nan - model = stk_model (@stk_materncov32_iso); - model.lognoisevariance = nan; % not compatible with do_estim_lnv == false - [model.param, model.lognoisevariance] = ... - stk_param_init (model, xi, zi, BOX, false); -***** test % Heteroscedastic case / known noise variance - model = stk_model (@stk_materncov32_iso); - lnv = log ((100 + rand (size (zi))) / 1e6); - model.lognoisevariance = lnv; % here we say that lnv is known - [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 (isequal (model.lognoisevariance, lnv)); % should be untouched - assert (max ((zp.mean - zt) .^ 2) < 1e-3) -***** shared model, x, z - model = stk_model (@stk_materncov52_iso); - n = 10; x = stk_sampling_regulargrid (n, 1, [0; 1]); z = ones (size (x)); -***** test % Constant response, noiseless model - [param, lnv] = stk_param_init (model, x, z); - assert ((all (isfinite (param))) && (length (param) == 2)); - assert (isequal (lnv, -inf)); -warning: Parameter estimation is impossible with constant-response data. -warning: called from - stk_param_init>paraminit_ at line 351 column 5 - stk_param_init>stk_param_init_ at line 323 column 14 - stk_param_init at line 87 column 18 - __test__ at line 3 column 15 - test at line 682 column 11 - /tmp/tmp.leWC69aW4i at line 350 column 31 - -***** test % Constant response, noisy model - model.lognoisevariance = nan; - [param, lnv] = stk_param_init (model, x, z); - assert ((all (isfinite (param))) && (length (param) == 2)); - assert (isscalar (lnv) && isfinite (lnv)); -warning: Parameter estimation is impossible with constant-response data. -warning: called from - stk_param_init>paraminit_ at line 351 column 5 - stk_param_init>stk_param_init_ at line 323 column 14 - stk_param_init at line 87 column 18 - __test__ at line 4 column 15 - test at line 682 column 11 - /tmp/tmp.leWC69aW4i at line 350 column 31 + dim = 2; cn = {'W', 'H'}; box = stk_hrect (dim, cn); + x = stk_sampling_halton_rr2 (5, dim, box); + assert (isequal (x.colnames, cn)); +5 tests, 5 passed, 0 known failure, 0 skipped +[inst/sampling/@stk_sampcrit_akg/stk_sampcrit_akg.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/sampling/@stk_sampcrit_akg/stk_sampcrit_akg.m +***** shared F, M, AKG + M = stk_model_gpposterior (stk_model, [1 2 3]', [1.234 3 2]'); +warning: Something went wrong during the optimization +crit0 = 2.594852, crit_opt = 2.594852: crit0 < crit_opt +***** test F = stk_sampcrit_akg () % ending ";" omitted on purpose, to test disp -15 tests, 15 passed, 0 known failure, 0 skipped -[inst/param/estim/stk_param_relik.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/param/estim/stk_param_relik.m -***** shared f, xi, zi, NI, model, C, dC1, dC2 +F = +| +| model: -- (not instantiated) +| reference_grid: -- (use current evaluation points) +| - f = @(x)(- (0.8 * x(:, 1) + sin (5 * x(:, 2) + 1) ... - + 0.1 * sin (10 * x(:, 3)))); - DIM = 3; NI = 20; box = repmat ([-1.0; 1.0], 1, DIM); - xi = stk_sampling_halton_rr2 (NI, DIM, box); - zi = stk_feval (f, xi); +***** assert (isempty (F.model)) +***** assert (isempty (get (F, 'model'))) +***** assert (isempty (F.reference_grid)) +***** assert (isempty (get (F, 'reference_grid'))) +***** error F.toto +***** error get (F, 'toto') +***** error F.toto = 1.234; % field does not exist +***** error F = set (F, 'toto', 1.234); % field does not exist +***** error AKG = feval (F, 1.0); +***** test F = stk_sampcrit_akg (); F.model = M; + assert (isequal (F.model, M)); +***** test F = stk_sampcrit_akg (); F = set (F, 'model', M); + assert (isequal (F.model, M)); + assert (isequal (size (F.zr_mean), [3 1])) % n x 1 + assert (isequal (size (F.zr_std), [3 1])) % n x 1 + assert (isequal (size (F.zr_lambdamu), [4 3])) % (n+1) x n (constant mean) +***** test F.model = []; % remove model + assert (isempty (F.model)); + assert (isempty (F.zr_mean)) + assert (isempty (F.zr_std)) + assert (isempty (F.zr_lambdamu)) +***** test xr = [1 1.5 2 2.5 3]'; + F.reference_grid = xr % ending ";" omitted on purpose, to test disp + assert (isequal (F.reference_grid, xr)) + assert (isempty (F.zr_mean)) + assert (isempty (F.zr_std)) + assert (isempty (F.zr_lambdamu)) - SIGMA2 = 1.0; % variance parameter - NU = 4.0; % regularity parameter - RHO1 = 0.4; % scale (range) parameter +F = +| +| model: -- (not instantiated) +| reference_grid: <5x1 double array> +| - model = stk_model (@stk_materncov_aniso); - model.param = log ([SIGMA2; NU; 1/RHO1 * ones(DIM, 1)]); -***** error [C, dC1, dC2] = stk_param_relik (); -***** error [C, dC1, dC2] = stk_param_relik (model); -***** error [C, dC1, dC2] = stk_param_relik (model, xi); -***** test [C, dC1, dC2] = stk_param_relik (model, xi, zi); -***** test - TOL_REL = 0.01; - assert (stk_isequal_tolrel (C, 21.6, TOL_REL)); - assert (stk_isequal_tolrel (dC1, [4.387 -0.1803 0.7917 0.1392 2.580]', TOL_REL)); - assert (isequal (dC2, [])); -***** shared xi, zi, model, TOL_REL - xi = [-1 -.6 -.2 .2 .6 1]'; - zi = [-0.11 1.30 0.23 -1.14 0.36 -0.37]'; - model = stk_model (@stk_materncov_iso); - model.param = log ([1.0 4.0 2.5]); - model.lognoisevariance = log (0.01); - TOL_REL = 0.01; -***** test % Another simple 1D check - [C, dC1, dC2] = stk_param_relik (model, xi, zi); - assert (stk_isequal_tolrel (C, 6.327, TOL_REL)); - assert (stk_isequal_tolrel (dC1, [0.268 0.0149 -0.636]', TOL_REL)); - assert (stk_isequal_tolrel (dC2, -1.581e-04, TOL_REL)); -***** test % Same 1D test with simple kriging - model.lm = stk_lm_null; - [C, dC1, dC2] = stk_param_relik (model, xi, zi); - assert (stk_isequal_tolrel (C, 7.475, TOL_REL)); - assert (stk_isequal_tolrel (dC1, [0.765 0.0238 -1.019]', TOL_REL)); - assert (stk_isequal_tolrel (dC2, 3.0517e-03, TOL_REL)); -***** test % Check the gradient on a 2D test case +***** test F.reference_grid = []; + assert (isempty (F.reference_grid)) +***** test F = stk_sampcrit_akg (); F.model = M; + assert (isequal (F.model, M)); + xr = [1 1.5 2 2.5 3]'; + F.reference_grid = xr % ending ";" omitted on purpose, to test disp + assert (isequal (F.reference_grid, xr)) + assert (isequal (size (F.zr_mean), [5 1])) % nr x 1 + assert (isequal (size (F.zr_std), [5 1])) % nr x 1 + assert (isequal (size (F.zr_lambdamu), [4 5])) % (n+1) x nr (constant mean) - f = @stk_testfun_braninhoo; - DIM = 2; - BOX = [[-5; 10], [0; 15]]; - NI = 20; - TOL_REL = 1e-2; - DELTA = 1e-6; +F = +| +| model: +| reference_grid: <5x1 double array> +| - model = stk_model (@stk_materncov52_iso, DIM); - model.param = [1 1]; +***** test F.reference_grid = []; + assert (isempty (F.reference_grid)) +***** test F = stk_sampcrit_akg (M) % ending ";" omitted on purpose, to test disp - xi = stk_sampling_halton_rr2 (NI, DIM, BOX); - zi = stk_feval (f, xi); +F = +| +| model: +| reference_grid: -- (use current evaluation points) +| - for range = [0.3 2 10] - model.param(2) = - log (range); - for diff = 1:2 - assert (stk_test_critgrad ... - (@stk_param_relik, model, xi, zi, diff, 1e-6)); - end - end -8 tests, 8 passed, 0 known failure, 0 skipped -[inst/param/estim/stk_param_gls.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/param/estim/stk_param_gls.m -***** shared xi, zi, model, beta, sigma2 - xi = (1:10)'; zi = sin (xi); - model = stk_model (@stk_materncov52_iso); - model.param = [0.0 0.0]; -***** test - model.lm = stk_lm_constant (); - [beta, sigma2] = stk_param_gls (model, xi, zi); -***** assert (stk_isequal_tolabs (beta, 0.1346064, 1e-6)) -***** assert (stk_isequal_tolabs (sigma2, 0.4295288, 1e-6)) +***** assert (isequal (F.model, M)) +***** test AKG = feval (F, [1.0; 1.1; 1.2]); +***** assert (isequal (size (AKG), [3 1])) +***** assert (all (AKG >= 0)) +***** test [AKG2, zp] = feval (F, [1.0; 1.1; 1.2]); + assert (isequal (AKG2, AKG)); + assert (isa (zp, 'stk_dataframe') && isequal (size (zp), [3 2])) +***** shared F, xr + xr = [1 1.5 2 2.5 3]'; +***** test F = stk_sampcrit_akg (stk_model ()); +***** assert (isempty (F.reference_grid)) +***** test F.reference_grid = xr; +***** assert (isequal (F.reference_grid, xr)) +***** assert (isempty (F.zr_mean)) +***** assert (isempty (F.zr_std)) +***** assert (isempty (F.zr_lambdamu)) +***** error AKG = feval (F, 1.0); +***** shared F, M, xr + xr = [1 1.5 2 2.5 3]'; + M = stk_model_gpposterior (stk_model, [1 2 3]', [1.234 3 2]'); +warning: Something went wrong during the optimization +crit0 = 2.594852, crit_opt = 2.594852: crit0 < crit_opt +***** test F = stk_sampcrit_akg (M, xr); +***** assert (isequal (F.model, M)) +***** assert (isequal (F.reference_grid, xr)) +***** assert (isequal (size (F.zr_mean), [5 1])) % nr x 1 +***** assert (isequal (size (F.zr_std), [5 1])) % nr x 1 +***** assert (isequal (size (F.zr_lambdamu), [4 5])) % (n+1) x nr (constant mean) +37 tests, 37 passed, 0 known failure, 0 skipped +[inst/sampling/stk_sampling_vdc_rr2.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/sampling/stk_sampling_vdc_rr2.m +***** error __stk_sampling_vdc_rr2__() % two inputs required +***** error __stk_sampling_vdc_rr2__(10) % two inputs required +***** error __stk_sampling_vdc_rr2__(10, 3, -1) % two inputs required +***** test + n = 300; j = 25; + x = __stk_sampling_vdc_rr2__(n, j); + assert(isequal(size(x), [n 1])) ***** test - model.lm = stk_lm_affine (); - [beta, sigma2] = stk_param_gls (model, xi, zi); -***** assert (stk_isequal_tolabs (beta, [0.4728342; -0.0614960], 1e-6)) -***** assert (stk_isequal_tolabs (sigma2, 0.4559431, 1e-6)) + x = __stk_sampling_vdc_rr2__(2000, 7); + y = double (x(1998:2000, :)); + yref = [0.849786281294525; 0.085080398941584; 0.555668634235701]; + assert(stk_isequal_tolrel(y, yref, 1e-13)); +5 tests, 5 passed, 0 known failure, 0 skipped +[inst/sampling/stk_sampling_randomlhs.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/sampling/stk_sampling_randomlhs.m +***** shared x, n, dim, box + n = 10; dim = 2; box = [0, 0; 1, 1]; +***** error x = stk_sampling_randomlhs (); +***** test x = stk_sampling_randomlhs (n); +***** test x = stk_sampling_randomlhs (n, dim); +***** test x = stk_sampling_randomlhs (n, dim, box); +***** assert (isa(x, 'stk_dataframe')); +***** assert (isequal (x.colnames, {})); ***** test - model.lm = stk_lm_null (); - [beta, sigma2] = stk_param_gls (model, xi, zi); -***** assert (isequal (beta, zeros (0, 1))) -***** assert (stk_isequal_tolabs (sigma2, 0.3977993, 1e-6)) -9 tests, 9 passed, 0 known failure, 0 skipped -[inst/param/estim/stk_param_init_lnv.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/param/estim/stk_param_init_lnv.m + cn = {'W', 'H'}; box = stk_hrect (box, cn); + x = stk_sampling_randomlhs (n, dim, box); + assert (isequal (x.colnames, cn)); ***** test - f = @(x)(- (0.8 * x + sin (5 * x + 1) + 0.1 * sin (10 * x))); - ni = 20; - xi = (linspace (-1, 1, ni))' + 0.2 * (randn (ni, 1)); - zi = stk_feval (f, xi); - - model = stk_model (@stk_materncov_iso); - model.param = log ([1; 5/2; 1/0.4]); - model.lognoisevariance = nan; - lnv = stk_param_init_lnv (model, xi, zi); - - assert ((isscalar (lnv)) && (lnv > -30) && (lnv < 30)); -1 test, 1 passed, 0 known failure, 0 skipped -[inst/param/estim/stk_param_estim.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/param/estim/stk_param_estim.m -***** shared f, xi, zi, NI, param0, param1, model - - f = @(x)(- (0.8 * x + sin (5 * x + 1) + 0.1 * sin (10 * x)) ); - DIM = 1; NI = 20; box = [-1.0; 1.0]; - xi = stk_sampling_regulargrid (NI, DIM, box); - - SIGMA2 = 1.0; % variance parameter - NU = 4.0; % regularity parameter - RHO1 = 0.4; % scale (range) parameter - param0 = log ([SIGMA2; NU; 1/RHO1]); - - model = stk_model (@stk_materncov_iso); -***** 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 441 column 9 - stk_minimize_boxconstrained at line 57 column 18 - 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 - /tmp/tmp.leWC69aW4i at line 382 column 31 - -***** test % same thing, with empty lnv0 (ok) - param2 = stk_param_estim (model, xi, zi, param0, []); - assert (stk_isequal_tolrel (param2, param1, 1e-2)) -warning: sqp: QP subproblem is non-convex and unbounded -warning: called from - sqp at line 441 column 9 - stk_minimize_boxconstrained at line 57 column 18 - stk_param_estim_optim at line 70 column 23 - stk_param_estim at line 139 column 15 - __test__ at line 3 column 9 - test at line 682 column 11 - /tmp/tmp.leWC69aW4i at line 382 column 31 - -***** error % same thing, with lnv0 == NaN (not ok as a starting point) - param2 = stk_param_estim (model, xi, zi, param0, nan); -***** error % same thing, with lnv0 == -inf (not ok as a starting point) - param2 = stk_param_estim (model, xi, zi, param0, -inf); -***** test % same thing, with explicit value for 'criterion' - param2 = stk_param_estim (model, xi, zi, param0, [], @stk_param_relik); - assert (stk_isequal_tolrel (param1, param2, 1e-2)) -warning: sqp: QP subproblem is non-convex and unbounded -warning: called from - sqp at line 441 column 9 - stk_minimize_boxconstrained at line 57 column 18 - stk_param_estim_optim at line 70 column 23 - stk_param_estim at line 139 column 15 - __test__ at line 3 column 9 - test at line 682 column 11 - /tmp/tmp.leWC69aW4i at line 382 column 31 - -***** 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)) -warning: sqp: QP subproblem is non-convex and unbounded -warning: called from - sqp at line 441 column 9 - stk_minimize_boxconstrained at line 57 column 18 - 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 - /tmp/tmp.leWC69aW4i at line 382 column 31 - -warning: sqp: QP subproblem is non-convex and unbounded -warning: called from - sqp at line 441 column 9 - stk_minimize_boxconstrained at line 57 column 18 - stk_param_estim_optim at line 70 column 23 - stk_param_estim at line 139 column 15 - __test__ at line 5 column 9 - test at line 682 column 11 - /tmp/tmp.leWC69aW4i at line 382 column 31 - -***** test % noisy - NOISE_STD_TRUE = 0.1; - NOISE_STD_INIT = 1e-5; - zi = zi + NOISE_STD_TRUE * randn(NI, 1); - model.lognoisevariance = 2 * log(NOISE_STD_INIT); - [param, lnv] = stk_param_estim ... - (model, xi, zi, param0, model.lognoisevariance); -***** error param = stk_param_estim () -***** error param = stk_param_estim (model); -***** error param = stk_param_estim (model, xi); -***** test % Constant response - model = stk_model (@stk_materncov52_iso); - n = 10; x = stk_sampling_regulargrid (n, 1, [0; 1]); z = ones (size (x)); - param = stk_param_estim (model, x, z); - assert ((all (isfinite (param))) && (length (param) == 2)); -warning: Constant-response data: the output of stk_param_estim is likely to be unreliable. -warning: called from - stk_param_estim at line 95 column 5 - __test__ at line 5 column 8 - test at line 682 column 11 - /tmp/tmp.leWC69aW4i at line 382 column 31 + for dim = 1:5, + x = stk_sampling_randomlhs(n, dim); + assert(isequal(size(x), [n dim])); + u = double(x); u = u(:); + assert(~any(isnan(u) | isinf(u))); + assert((min(u) >= 0) && (max(u) <= 1)); + assert(stk_is_lhs(x, n, dim)); + end +8 tests, 8 passed, 0 known failure, 0 skipped +[inst/sampling/@stk_function/stk_function.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/sampling/@stk_function/stk_function.m +***** shared F +***** test F = stk_function () % ending ";" omitted on purpose, to test disp -warning: Parameter estimation is impossible with constant-response data. -warning: called from - stk_param_init>paraminit_ at line 351 column 5 - stk_param_init>stk_param_init_ at line 323 column 14 - stk_param_init at line 87 column 18 - stk_param_estim>provide_starting_point at line 205 column 20 - stk_param_estim at line 110 column 30 - __test__ at line 5 column 8 - test at line 682 column 11 - /tmp/tmp.leWC69aW4i at line 382 column 31 +F = -warning: Something went wrong during the optimization -crit0 = -15.421654, crit_opt = -15.421654: crit0 < crit_opt +***** error [F F]; % arrays of sampling criterion objects are not supported +***** error [F; F]; % idem +***** error get (F, 'toto'); % field does not exist +***** error y = feval (F, 1.0); % not implemented for "pure" function objects +***** error dummy = F{2}; % illegal indexing +***** error dummy = F(1.0); % feval not implemented +***** error dummy = F.toto; % field does not exist +***** error F{2} = 1.234; % illegal indexing +***** error F(5) = 1.234; % illegal indexing +***** error F.toto = 1.234; % field does not exist 11 tests, 11 passed, 0 known failure, 0 skipped -[inst/examples/03_miscellaneous/stk_example_misc03.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/examples/03_miscellaneous/stk_example_misc03.m -***** test stk_example_misc03; close all; - -#==========================# -# stk_example_misc03 # -#==========================# - -'stk_example_misc03' is a script from the file /build/reproducible-path/octave-stk-2.8.1/debian/octave-stk/usr/share/octave/packages/stk-2.8.1/examples/03_miscellaneous/stk_example_misc03.m - - STK_EXAMPLE_MISC03 How to deal with (known) seasonality - - -Additional help for built-in functions and operators is -available in the online version of the manual. Use the command -'doc ' to search the manual index. - -Help and information about Octave is also available on the WWW -at https://www.octave.org and via the help@octave.org -mailing list. -warning: using the gnuplot graphics toolkit is discouraged - -The gnuplot graphics toolkit is not actively maintained and has a number -of limitations that are unlikely to be fixed. Communication with gnuplot -uses a one-directional pipe and limited information is passed back to the -Octave interpreter so most changes made interactively in the plot window -will not be reflected in the graphics properties managed by Octave. For -example, if the plot window is closed with a mouse click, Octave will not -be notified and will not update its internal list of open figure windows. -The qt toolkit is recommended instead. -model = - - scalar structure containing the fields: - - covariance_type = @stk_materncov52_iso - lm = - - - - dim = 1 - param = - - 1.3927 - -1.7292 - - lognoisevariance = -4.4797 - -model2 = - - scalar structure containing the fields: - - covariance_type = @stk_materncov52_iso - lm = - -@(t) [ones(length (t), 1), sin(2 * pi * t / T0), cos(2 * pi * t / T0)] - - dim = 1 - param = - - 2.3903 - -8.1781 - - lognoisevariance = -4.4817 - -1 test, 1 passed, 0 known failure, 0 skipped -[inst/examples/03_miscellaneous/stk_example_misc05.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/examples/03_miscellaneous/stk_example_misc05.m +[inst/sampling/stk_sampling_olhs.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/sampling/stk_sampling_olhs.m +***** shared x, n, d, box, permut + n = 5; d = 2; box = [0 0; 1, 1]; permut = 1:2; +***** error x = stk_sampling_olhs(); +***** test x = stk_sampling_olhs(n); +***** test x = stk_sampling_olhs(n, d); +***** test x = stk_sampling_olhs(n, d, box); +***** test x = stk_sampling_olhs(n, d, box, permut); +***** error x = stk_sampling_olhs(n, d, box, permut, pi); +***** assert (isa (x, 'stk_dataframe')); +***** assert (isequal (x.colnames, {})); ***** test - stk_example_misc05; close all; - assert (isa (model.lognoisevariance, 'stk_gaussiannoise_het0')); - -#==========================# -# stk_example_misc05 # -#==========================# - -'stk_example_misc05' is a script from the file /build/reproducible-path/octave-stk-2.8.1/debian/octave-stk/usr/share/octave/packages/stk-2.8.1/examples/03_miscellaneous/stk_example_misc05.m - - STK_EXAMPLE_MISC05 Parameter estimation for heteroscedastic noise variance - - DESCRIPTION - - We consider a 1d prediction problem with noisy data, where the variance of - the noise depends on the input location. - - A simple heteroscedastic model is used, where the only parameter to be - estimated is a dispersion parameter (the square of a scale parameter). - More preciesely, the variance of the noise is assumed to be of the form - - tau^2(x) = phi * (x + 1) ^ 2, - - and the dispersion parameter phi is estimated together with the parameters - of the covariance function. - - EXPERIMENTAL FEATURE WARNING - - This script demonstrates an experimental feature of STK (namely, gaussian - noise model objects). STK users that wish to experiment with it are - welcome to do so, but should be aware that API-breaking changes are likely - to happen in future releases. We invite them to direct any questions, - remarks or comments about this experimental feature to the STK mailing - list. - - See also: stk_example_kb09 - - -Additional help for built-in functions and operators is -available in the online version of the manual. Use the command -'doc ' to search the manual index. - -Help and information about Octave is also available on the WWW -at https://www.octave.org and via the help@octave.org -mailing list. -model = - - scalar structure containing the fields: - - covariance_type = @stk_materncov52_iso - lm = - - - - dim = 1 - param = + cn = {'W', 'H'}; box = stk_hrect (box, cn); + x = stk_sampling_olhs (n, d, box); + assert (isequal (x.colnames, cn)); +***** test + for r = 1:5 - 0.066833 - 0.707310 + n = 2 ^ (r + 1) + 1; d = 2 * r; + x = stk_sampling_olhs (n, d); - lognoisevariance = + assert (isequal (size (x), [n d])); - + box = repmat ([-1; 1], 1, d); + assert (stk_is_lhs (x, n, d, box)); + x = double (x); w = x' * x; + assert (stk_isequal_tolabs (w / w(1,1), eye (d))); + end +10 tests, 10 passed, 0 known failure, 0 skipped +[inst/sampling/stk_sampcrit_ei_eval.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/sampling/stk_sampcrit_ei_eval.m +***** error EI = stk_sampcrit_ei_eval () % not enough args +***** error EI = stk_sampcrit_ei_eval (0) % not enough args +***** shared xi, zi, M_prior, xt, zp, EIref, EI1, EI2, EI3 + xi = [0; 0.2; 0.7; 0.9]; + zi = [1; 0.9; 0.6; 0.1]; + M_prior = stk_model (@stk_materncov32_iso); + M_prior.param = log ([1.0; 2.1]); + xt = stk_sampling_regulargrid (20, 1, [0; 1]); + zp = stk_predict (M_prior, xi, zi, xt); + EIref = stk_distrib_normal_ei (min (zi), zp.mean, sqrt (zp.var), true); +***** test % Current syntax (STK 2.4.1 and later) + EI1 = stk_sampcrit_ei_eval (zp.mean, sqrt (zp.var), min (zi)); +***** assert (isequal (EI1, EIref)) +4 tests, 4 passed, 0 known failure, 0 skipped +[inst/sampling/stk_sampling_nestedlhs.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/sampling/stk_sampling_nestedlhs.m +***** shared x, n, dim, box, niter, levels + n = [48; 12; 4; 2]; dim = 2; box = [0, 0; 4, 4]; niter = 10; + levels = [10.1; 15.2; -9.3; 2.4; 17.5]; +***** error x = stk_sampling_nestedlhs (); +***** test x = stk_sampling_nestedlhs (n); +***** test x = stk_sampling_nestedlhs (n, dim); +***** test x = stk_sampling_nestedlhs (n, dim, box); +***** test x = stk_sampling_nestedlhs (n, dim, box, niter); +***** test x = stk_sampling_nestedlhs (n, dim, box, niter, levels); +***** assert ( isequal(size(x), [sum(n), dim + 1]) ); +***** assert ( isa(x, 'stk_dataframe') ); + cn = [0; cumsum(n)]; + for lev = 1:length(n), + y = x( (cn(lev) + 1):(cn(lev + 1)), 1:dim ); + assert (isequal (size (y), [n(lev) dim])); + assert (stk_is_lhs (y, n(lev), dim, box)); + if lev > 1 + assert ( isequal(z((end - n(lev) + 1):end, :), y) ); + end + z = y; + end +***** assert (isequal (x.colnames{dim + 1}, 'Level')); + levels = stk_dataframe(levels, {'t'}); + box = stk_hrect(box, {'x1', 'x2', 'x3', 'x4'}); +***** test x = stk_sampling_nestedlhs (n, [], box, [], levels); +***** assert (isequal(x.colnames, {'x1', 'x2', 'x3', 'x4', 't'}) ); +11 tests, 11 passed, 0 known failure, 0 skipped +[inst/sampling/stk_sampling_nesteddesign.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/sampling/stk_sampling_nesteddesign.m +***** shared x, n, dim, box, niter, levels + n = [23; 14; 5; 2]; dim = 2; box = [0, 0; 4, 4]; niter = 10; + levels = [10.1; 15.2; -9.3; 2.4; 17.5]; +***** error x = stk_sampling_nesteddesign (); +***** test x = stk_sampling_nesteddesign (n); +***** test x = stk_sampling_nesteddesign (n, dim); +***** test x = stk_sampling_nesteddesign (n, dim, box); +***** test x = stk_sampling_nesteddesign (n, dim, box, niter); +***** test x = stk_sampling_nesteddesign (n, dim, box, niter, levels); +***** assert ( isequal(size(x), [sum(n), dim + 1]) ); +***** assert ( isa(x, 'stk_dataframe') ); + cn = [0; cumsum(n)]; + for lev = 1:length(n), + y = x( (cn(lev) + 1):(cn(lev + 1)), 1:dim ); + assert (isequal (size (y), [n(lev) dim])); + if lev > 1 + assert ( isequal(z((end - n(lev) + 1):end, :), y) ); + end + if lev == length(n) + assert (stk_is_lhs (y, n(lev), dim, box)); + end + z = y; + end +***** assert (isequal (x.colnames{dim + 1}, 'Level')); + levels = stk_dataframe(levels, {'t'}); + box = stk_hrect(box, {'x1', 'x2', 'x3', 'x4'}); +***** test x = stk_sampling_nesteddesign (n, [], box, [], levels); +***** assert (isequal(x.colnames, {'x1', 'x2', 'x3', 'x4', 't'}) ); +11 tests, 11 passed, 0 known failure, 0 skipped +[inst/sampling/@stk_sampcrit_ei/stk_sampcrit_ei.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/sampling/@stk_sampcrit_ei/stk_sampcrit_ei.m +***** shared F, M, EI + M = stk_model_gpposterior (stk_model, [1 2 3]', [1.234 3 2]'); +warning: Something went wrong during the optimization +crit0 = 2.594852, crit_opt = 2.594852: crit0 < crit_opt +***** test F = stk_sampcrit_ei () % ending ";" omitted on purpose, to test disp -gn = -| -| Heteroscedastic variance model: tau^2(x) = dispersion * variance_function(x) +F = | -| dispersion: 2.4169 [log_dispersion = 0.8825] -| variance_function: @(x) (x + 1) .^ 2 +| model: -- (not instantiated) +| current_minimum: Inf | -1 test, 1 passed, 0 known failure, 0 skipped -[inst/examples/03_miscellaneous/stk_example_misc01.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/examples/03_miscellaneous/stk_example_misc01.m -***** test stk_example_misc01; close all; - -#==========================# -# stk_example_misc01 # -#==========================# - -'stk_example_misc01' is a script from the file /build/reproducible-path/octave-stk-2.8.1/debian/octave-stk/usr/share/octave/packages/stk-2.8.1/examples/03_miscellaneous/stk_example_misc01.m - - STK_EXAMPLE_MISC01 Several correlation functions from the Matern family - - The Matern 1/2 correlation function is also known as the "exponential correla- - tion function". This is the correlation function of an Ornstein-Ulhenbeck pro- - cess. - - The Matern covariance function tends to the Gaussian correlation function when - its regularity (smoothness) parameter tends to infinity. - - See also: stk_materncov_iso, stk_materncov_aniso - - -Additional help for built-in functions and operators is -available in the online version of the manual. Use the command -'doc ' to search the manual index. - -Help and information about Octave is also available on the WWW -at https://www.octave.org and via the help@octave.org -mailing list. -1 test, 1 passed, 0 known failure, 0 skipped -[inst/examples/03_miscellaneous/stk_example_misc04.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/examples/03_miscellaneous/stk_example_misc04.m -***** test stk_example_misc04; close all; - -#==========================# -# stk_example_misc04 # -#==========================# - -'stk_example_misc04' is a script from the file /build/reproducible-path/octave-stk-2.8.1/debian/octave-stk/usr/share/octave/packages/stk-2.8.1/examples/03_miscellaneous/stk_example_misc04.m - - STK_EXAMPLE_MISC04 Pareto front simulation - - DESCRIPTION - - We consider a bi-objective optimization problem, where the objective - functions are modeled as a pair of independent stationary Gaussian - processes with a Matern 5/2 anisotropic covariance function. - - Figure (a): represent unconditional realizations of the Pareto front and - and estimate of the probability of being non-dominated at each point - of the objective space. - - Figure (b): represent conditional realizations of the Pareto front and - and estimate of the posteriorior probability of being non-dominated - at each point of the objective space. - - EXPERIMENTAL FUNCTION WARNING - - This script uses the stk_plot_probdom2d function, which is currently - considered an experimental function. Read the help for more information. - - REFERENCE - - [1] Michael Binois, David Ginsbourger and Olivier Roustant, Quantifying - uncertainty on Pareto fronts with Gaussian Process conditional simu- - lations, European J. of Operational Research, 2043(2):386-394, 2015. - - See also: stk_plot_probdom2d - - -Additional help for built-in functions and operators is -available in the online version of the manual. Use the command -'doc ' to search the manual index. - -Help and information about Octave is also available on the WWW -at https://www.octave.org and via the help@octave.org -mailing list. - line 0: warning: iconv failed to convert degree sign - -multiplot> set style increment default; - ^ - line 0: warning: deprecated command - Proba. of being dominated - simulated Pareto fronts--| || - | + + @**$%&$$$#$$$$$| ++----+----+----+-+ ++||00% - 500 +|++ + @**$%& * # =+-+| 500 +---+##|####|##+---+ || - #|#########@**$%&#*###=# | |+####+####+####+#| || - #|#########@@*$%&@@@#@@@@@| |#################| || - #|##########**$%====#=====| |#################| || - #|##########**$%****#*****| |#################| ++||5% - #|##########*#$%&%**######| |#################| || - 0 +|+#########*#$%$$$$$$$$$$| 0 +---+##########+---+ || - #|##########*##%&#########| |#################| || - #|##########*##%&#####second objective#################| ++||0% - #|##########*##%&&&&&&&&&&| |#################| || - #|##########***%**********| |#################| || - #|#############%**********| -500 |#################| || - -500 +|+############%#######+-+| +---+##########+---+ || - #|#############%######## | |#################| ++||5% - #|#############%######## | |#################| || - #|#############%######## | |#################| || - #|#############%######## | |+####+####+####+#| || - #|------------------------| +|----|----|----|-+ || - ###+#####+######+#####+# -4000-2000 0 2000 ++-0% - -4000 -2000 0 2000 - first objective first objective -1 test, 1 passed, 0 known failure, 0 skipped -[inst/examples/03_miscellaneous/stk_example_misc02.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/examples/03_miscellaneous/stk_example_misc02.m -***** test stk_example_misc02; close all; - -#==========================# -# stk_example_misc02 # -#==========================# - -'stk_example_misc02' is a script from the file /build/reproducible-path/octave-stk-2.8.1/debian/octave-stk/usr/share/octave/packages/stk-2.8.1/examples/03_miscellaneous/stk_example_misc02.m - - STK_EXAMPLE_MISC02 How to use priors on the covariance parameters - - A Matern covariance in dimension one is considered as an example. A Gaussian - prior is used for all three parameters: log-variance, log-regularity and log- - inverse-range. The corresponding parameter estimates are Maximum A Posteriori - (MAP) estimates or, more precisely, Restricted MAP (ReMAP) estimates. - - Several values for the variance of the prior are successively considered, to - illustrate the effect of this prior variance on the parameter estimates. When - the variance is small, the MAP estimate is close to the mode of the prior. On - the other hand, when the variance is large, the prior becomes "flat" and the - MAP estimate is close to the ReML estimate (see figure b). - - -Additional help for built-in functions and operators is -available in the online version of the manual. Use the command -'doc ' to search the manual index. - -Help and information about Octave is also available on the WWW -at https://www.octave.org and via the help@octave.org -mailing list. - line 0: warning: iconv failed to convert degree sign - - | prior std = 10.00 | prior std = 1.00 - 3 +|+ 4 +|+ #### - %|%## ####%%%% 3 +|+# ##%%%%% - 2 +|+&&&%&&&%######%&&&&&&&& 2 +|+&&%##%%%######%%&&&&&&& - 1 +|+#==GG==&&%###&&&######& 1 +|+#&&GG==&&%###&&&&#####& - =|===&&&&====G=G=====predicted outpu| z===&&====G=G========== - 0 +|+&&&##%&&&&&&&&&&######& 0 +|+&&&##%&&&&&&&&&&######& - -1 +|+%#############%&&&&&&&& -1 +|+%#############%&&&&&&&& - +|------------------------- -2 +|------------------------- - -2 +-+##+####+####+####+### + -3 +-+##+####+####+####+####+ - 0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1 - | prior std = 0.20 | prior std = 0.01 - 6 +|+ 6 +|+ - | ### | # - 4 +|+#################%%%%%% 4 +|+##################%%%%% - 2 +|+%####&&%######%&&&&&&&& 2 +|+#####%%########&&&&&&&& - &|&&==GG=====&&======predicted outpu| z&=GG=====#%=========== - 0 +|+==&###%&&=G=G&&&&#####& 0 +|+===####%&=G=G&&&&&&###& - -2 +|+&%#############%&&&&&&& -2 +|+&###############%%&&&&& - +|------------------------- +|------------------------- - -4 +-+##+####+####+####+### + -4 +-+##+####+####+####+### + - 0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1 - input x input x -1 test, 1 passed, 0 known failure, 0 skipped -[inst/examples/01_kriging_basics/stk_example_kb09.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/examples/01_kriging_basics/stk_example_kb09.m -***** test stk_example_kb09; close all; - -#========================# -# stk_example_kb09 # -#========================# - -'stk_example_kb09' is a script from the file /build/reproducible-path/octave-stk-2.8.1/debian/octave-stk/usr/share/octave/packages/stk-2.8.1/examples/01_kriging_basics/stk_example_kb09.m - - STK_EXAMPLE_KB09 Generation of sample paths conditioned on noisy observations - - A Matern Gaussian process model is used, with constant but unknown mean - (ordinary kriging) and known covariance parameters. - - Given noisy observations from the unknown function, a batch of conditioned - sample paths is drawn using the "conditioning by kriging" technique - (stk_generate_samplepaths function). - - See also: stk_generate_samplepaths, stk_conditioning, stk_example_kb05 - - -Additional help for built-in functions and operators is -available in the online version of the manual. Use the command -'doc ' to search the manual index. - -Help and information about Octave is also available on the WWW -at https://www.octave.org and via the help@octave.org -mailing list. -1 test, 1 passed, 0 known failure, 0 skipped -[inst/examples/01_kriging_basics/stk_example_kb08.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/examples/01_kriging_basics/stk_example_kb08.m -***** test stk_example_kb08; close all; - -#========================# -# stk_example_kb08 # -#========================# - -'stk_example_kb08' is a script from the file /build/reproducible-path/octave-stk-2.8.1/debian/octave-stk/usr/share/octave/packages/stk-2.8.1/examples/01_kriging_basics/stk_example_kb08.m - - STK_EXAMPLE_KB08 Generation of conditioned sample paths made easy - - It has been demonstrated, in stk_example_kb05, how to generate conditioned - sample paths using unconditioned sample paths and conditioning by kriging. - - This example shows how to do the same in a more concise way, letting STK - take care of the details. - - -Additional help for built-in functions and operators is -available in the online version of the manual. Use the command -'doc ' to search the manual index. - -Help and information about Octave is also available on the WWW -at https://www.octave.org and via the help@octave.org -mailing list. -1 test, 1 passed, 0 known failure, 0 skipped -[inst/examples/01_kriging_basics/stk_example_kb06.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/examples/01_kriging_basics/stk_example_kb06.m -***** test stk_example_kb06; close all; - -#========================# -# stk_example_kb06 # -#========================# - -'stk_example_kb06' is a script from the file /build/reproducible-path/octave-stk-2.8.1/debian/octave-stk/usr/share/octave/packages/stk-2.8.1/examples/01_kriging_basics/stk_example_kb06.m - - STK_EXAMPLE_KB06 Ordinary kriging VS kriging with a linear trend - - The same dataset is analyzed using two variants of kriging. - - The left panel shows the result of ordinary kriging, in other words, Gaussian - process interpolation assuming a constant (but unknown) mean. The right panel - shows the result of adding a linear trend in the mean of the Gaussian process. - - The difference with the left plot is clear in extrapolation: the first predic- - tor exhibits a "mean reverting" behaviour, while the second one captures an - increasing trend in the data. - - -Additional help for built-in functions and operators is -available in the online version of the manual. Use the command -'doc ' to search the manual index. - -Help and information about Octave is also available on the WWW -at https://www.octave.org and via the help@octave.org -mailing list. -1 test, 1 passed, 0 known failure, 0 skipped -[inst/examples/01_kriging_basics/stk_example_kb05.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/examples/01_kriging_basics/stk_example_kb05.m -***** test stk_example_kb05; close all; - -#========================# -# stk_example_kb05 # -#========================# - -'stk_example_kb05' is a script from the file /build/reproducible-path/octave-stk-2.8.1/debian/octave-stk/usr/share/octave/packages/stk-2.8.1/examples/01_kriging_basics/stk_example_kb05.m - - STK_EXAMPLE_KB05 Generation of conditioned sample paths - - A Matern Gaussian process model is used, with constant but unknown mean - (ordinary kriging) and known covariance parameters. - - Given noiseless observations from the unknown function, a batch of conditioned - sample paths is drawn using the "conditioning by kriging" technique. In short, - this means that unconditioned sample path are simulated first (using - stk_generate_samplepaths), and then conditioned on the observations by kriging - (using stk_conditioning). - - Note: in this example, for pedagogical purposes, conditioned samplepaths are - simulated in two steps: first, unconditioned samplepaths are simulated; - second, conditioned samplepaths are obtained using conditioning by kriging. - In practice, these two steps can be carried out all at once using - stk_generate_samplepath (see, e.g., stk_example_kb09). - - See also: stk_generate_samplepaths, stk_conditioning, stk_example_kb09 - - -Additional help for built-in functions and operators is -available in the online version of the manual. Use the command -'doc ' to search the manual index. - -Help and information about Octave is also available on the WWW -at https://www.octave.org and via the help@octave.org -mailing list. -1 test, 1 passed, 0 known failure, 0 skipped -[inst/examples/01_kriging_basics/stk_example_kb02n.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/examples/01_kriging_basics/stk_example_kb02n.m -***** test stk_example_kb02n; close all; - -#=========================# -# stk_example_kb02n # -#=========================# - -'stk_example_kb02n' is a script from the file /build/reproducible-path/octave-stk-2.8.1/debian/octave-stk/usr/share/octave/packages/stk-2.8.1/examples/01_kriging_basics/stk_example_kb02n.m - - STK_EXAMPLE_KB02N Noisy ordinary kriging in 1D with parameter estimation - - This example shows how to estimate covariance parameters and compute - ordinary kriging predictions on a one-dimensional noisy dataset. - - The model and data are the same as in stk_example_kb02, but this time the - parameters of the covariance function and the variance of the noise are - jointly estimated using the Restricted Maximum Likelihood (ReML) method. - - See also: stk_example_kb01n, stk_example_kb02 - - -Additional help for built-in functions and operators is -available in the online version of the manual. Use the command -'doc ' to search the manual index. - -Help and information about Octave is also available on the WWW -at https://www.octave.org and via the help@octave.org -mailing list. -model = - - scalar structure containing the fields: - - covariance_type = @stk_materncov_iso - lm = - - - - dim = 1 - param = - - -0.098610 - 2.302585 - 0.613435 - - lognoisevariance = -3.0915 - -True noise variance = 0.0400 -Estimated noise variance = 0.0454 - - line 0: warning: iconv failed to convert degree sign - - - | True function and noisy observed data - 1.5 +|+ - | G ***** +--------------------+ - #|#######***##G##G**########################|***?***True function| - 1 +|+####G**#########**G######################+---G---Observations-+ - #|####**#############***######################################### - #|###**################**######################################## - 0.5 +|+#**##################G*##########################G#***######## - G|#**####################**########################****#G**G*##G# - #|*G######################**#####################***########***## - F1 0 *|+########################**###################**############*** - *|##########################**#################**G##############**G - #|###########################**G##############**#################** - -0.5 +|+#########################G#**#############**################## - #|#############################**###########*G################### - #|##############################***G######**##################### - -1 +|+###############################**#####*G###################### - #|#################################***G**######################## - +|------------------------------------------------------------------ - -1.5 +-+##############+###############+################+############## + - -1 -0.5 0 0.5 1 - -1 test, 1 passed, 0 known failure, 0 skipped -[inst/examples/01_kriging_basics/stk_example_kb01.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/examples/01_kriging_basics/stk_example_kb01.m -***** test stk_example_kb01; close all; - -#========================# -# stk_example_kb01 # -#========================# - -'stk_example_kb01' is a script from the file /build/reproducible-path/octave-stk-2.8.1/debian/octave-stk/usr/share/octave/packages/stk-2.8.1/examples/01_kriging_basics/stk_example_kb01.m - - STK_EXAMPLE_KB01 Ordinary kriging in 1D, with noiseless data - - This example shows how to compute ordinary kriging predictions on a - one-dimensional noiseless dataset. - - The word 'ordinary' indicates that the mean function of the GP prior is - assumed to be constant and unknown. - - A Matern covariance function is used for the Gaussian Process (GP) prior. - The parameters of this covariance function are assumed to be known (i.e., - no parameter estimation is performed here). - - Note that the kriging predictor, which is the posterior mean of the GP, - interpolates the data in this noiseless example. - - See also: stk_example_kb01n, stk_example_kb02 - - -Additional help for built-in functions and operators is -available in the online version of the manual. Use the command -'doc ' to search the manual index. - -Help and information about Octave is also available on the WWW -at https://www.octave.org and via the help@octave.org -mailing list. -model = - - scalar structure containing the fields: - - covariance_type = @stk_materncov_iso - lm = - - - - dim = 1 - param = - - -0.6931 - 1.3863 - 0.9163 - - lognoisevariance = -Inf - - line 0: warning: iconv failed to convert degree sign - - - | True function and observed data - 1.5 +|+ - | ****G** +--------------------+ - #|#######***#####****#######################|***?***True function| - 1 +|+####***##########***#####################+---G---Observations-+ - #|####**##############**######################################### - #|###**################**######################################## - 0.5 +|+#**##################**###########################*****G###### - #|*G######################**######################***######***### - 0 +|*########################**####################G*##########***# - G|##########################**#################***#############*** - #|###########################**###############**#################** - -0.5 +|+###########################**#############**################## * - #|#############################**###########**################### - #|##############################*G#########**#################### - -1 +|+##############################***#####**###################### - #|#################################*******####################### - +|------------------------------------------------------------------ - -1.5 +-+##############+###############+################+############## + - -1 -0.5 0 0.5 1 - input variable x - -1 test, 1 passed, 0 known failure, 0 skipped -[inst/examples/01_kriging_basics/stk_example_kb07.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/examples/01_kriging_basics/stk_example_kb07.m -***** test stk_example_kb07; close all; - -#========================# -# stk_example_kb07 # -#========================# - -'stk_example_kb07' is a script from the file /build/reproducible-path/octave-stk-2.8.1/debian/octave-stk/usr/share/octave/packages/stk-2.8.1/examples/01_kriging_basics/stk_example_kb07.m - - STK_EXAMPLE_KB07 Simulation of sample paths from a Matern process - - -Additional help for built-in functions and operators is -available in the online version of the manual. Use the command -'doc ' to search the manual index. - -Help and information about Octave is also available on the WWW -at https://www.octave.org and via the help@octave.org -mailing list. - line 0: warning: iconv failed to convert degree sign - - |--Matern, nu = 0.5------| |--Matern, nu = 1.5------| - 3 +|+ + + + +-+| 3 +|+ ** + + = +-+| - 2 $|+ + % ###%%&+ #-+| 2 +|+ ****** + *****====-+| - 1 *|&&&##%%%#######&*&&#####| #|##**##%%####**@@@*******| - 0 *|#*####**####**#########*| 1 &|&&%######*###=@**=@***-$| -response z#|###*##*##******#*#*=***response z*|######******####*****@%%| - -1 =|*##@*###***@@===*******&| -1 #|#**&&***==@*&&&###**&###| - -2 +|+*****#@@*@@@*******=#@@| #|@******==####&$$######&&| - -3 +|------------------------| -2 +|------------------------| - -4 +-+###+######+#####+###+-+ -3 +-+###+######+#####+###+-+ - -1 -0.5 0 0.5 1 -1 -0.5 0 0.5 1 - |--Matern, nu = 2.5------| |--Matern, nu = 10.0-----| - 3 +|+ + + + +-+| 3 +|+ + + + +-+| - 2 @|+ +===== + + ***+| 2 +|+ + %**** + +-+| - %|@@##==###=====#**%%*****| *|###%%%%%**#%**#######***| - 1 %|%=****########******==**| 1 #|##&&&&**********==#####=| -response z*|***##*##@%*######******response z*|*####***&######*###***##| - -1 *|*&#####&&&&&%%@*########| -1 *|****######==#$###**@@@&&| - #|###*&&**********$$#### &| %|$$########$&&$#&&##### | - -2 $|------------------------| -2 +|------------------------| - -3 +-+###+######+#$$$#+###+-+ -3 +-+###+######+#####+###+-+ - -1 -0.5 0 0.5 1 -1 -0.5 0 0.5 1 - input variable x input variable x -1 test, 1 passed, 0 known failure, 0 skipped -[inst/examples/01_kriging_basics/stk_example_kb01n.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/examples/01_kriging_basics/stk_example_kb01n.m -***** test stk_example_kb01n; close all; - -#=========================# -# stk_example_kb01n # -#=========================# - -'stk_example_kb01n' is a script from the file /build/reproducible-path/octave-stk-2.8.1/debian/octave-stk/usr/share/octave/packages/stk-2.8.1/examples/01_kriging_basics/stk_example_kb01n.m - - STK_EXAMPLE_KB01N Ordinary kriging in 1D, with noisy data - - This example shows how to compute ordinary kriging predictions on a - one-dimensional noisy dataset. - - The Gaussian Process (GP) prior is the same as in stk_example_kb01. - - The observation noise is Gaussian and homoscedastic (constant variance). - Its variance is assumed to be known. - - Note that the kriging predictor, which is the posterior mean of the GP, - does NOT interpolate the data in this noisy example. - - See also: stk_example_kb01, stk_example_kb02n - - -Additional help for built-in functions and operators is -available in the online version of the manual. Use the command -'doc ' to search the manual index. - -Help and information about Octave is also available on the WWW -at https://www.octave.org and via the help@octave.org -mailing list. -model = - - scalar structure containing the fields: - - covariance_type = @stk_materncov_iso - lm = - - - - dim = 1 - param = - - -0.6931 - 1.3863 - 0.9163 - - lognoisevariance = -3.2189 - - line 0: warning: iconv failed to convert degree sign - - - | True function and observed data - 1.5 +|+ - | G******* +--------------------+ - #|#######***##G##G***#######################|***?***True function| - 1 +|+####G**##########*G*#####################+---G---Observations-+ - #|####**##############**######################################### - #|###**################*G###########################G############ - 0.5 G|+#**##################**###########################******G###G# - #|*G######################**######################***###G##***### - 0 +|*########################**####################**##########***# - *|##########################**#################**G#############*** - #|###########################**###############**#################*G - -0.5 +|+#########################G#*G#############**################## * - #|#############################**###########*G################### - #|##############################**#G#######**#################### - -1 +|+##############################***#####*G###################### - #|#################################***G***####################### - +|------------------------------------------------------------------ - -1.5 +-+##############+###############+################+############## + - -1 -0.5 0 0.5 1 - input variable x - -1 test, 1 passed, 0 known failure, 0 skipped -[inst/examples/01_kriging_basics/stk_example_kb03.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/examples/01_kriging_basics/stk_example_kb03.m -***** test stk_example_kb03; close all; - -#========================# -# stk_example_kb03 # -#========================# - -'stk_example_kb03' is a script from the file /build/reproducible-path/octave-stk-2.8.1/debian/octave-stk/usr/share/octave/packages/stk-2.8.1/examples/01_kriging_basics/stk_example_kb03.m - - STK_EXAMPLE_KB03 Ordinary kriging in 2D - - An anisotropic Matern covariance function is used for the Gaussian Process - (GP) prior. The parameters of this covariance function (variance, regularity - and ranges) are estimated using the Restricted Maximum Likelihood (ReML) - method. - - The mean function of the GP prior is assumed to be constant and unknown. This - default choice can be overridden by means of the model.lm property. +***** assert (isempty (F.model)) +***** assert (isempty (get (F, 'model'))) +***** assert (F.current_minimum == +inf) +***** assert (get (F, 'current_minimum') == +inf) +***** error F.toto +***** error get (F, 'toto') +***** error F.current_min = 1.234; % read-only +***** error F = set (F, 'current_min', 1.234); % read-only +***** error F.toto = 1.234; % field does not exist +***** error F = set (F, 'toto', 1.234); % field does not exist +***** error EI = feval (F, 1.0); +***** test F = stk_sampcrit_ei (); F.model = M; + assert (~ isempty (F.model)); +***** test F = stk_sampcrit_ei (); F = set (F, 'model', M); + assert (~ isempty (F.model)); +***** test F.model = []; % remove model + assert (isempty (F.model)); + assert (F.current_minimum == +inf); +***** test F = stk_sampcrit_ei (M) % ending ";" omitted on purpose, to test disp - The function is sampled on a space-filling Latin Hypercube design, and the - data is assumed to be noiseless. +F = +| +| model: +| current_minimum: 1.234 +| +***** assert (isequal (F.model, M)) +***** assert (F.current_minimum == 1.234); +***** test EI = feval (F, [1.0; 1.1; 1.2]); +***** assert (isequal (size (EI), [3 1])) +***** assert (all (EI >= 0)) +***** shared F +***** test F = stk_sampcrit_ei (stk_model ()); +***** assert (F.current_minimum == +inf); +***** error feval (F, 1.0); +24 tests, 24 passed, 0 known failure, 0 skipped +[inst/core/stk_make_matcov.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/core/stk_make_matcov.m +***** shared model, model2, x0, x1, n0, n1, d, Ka, Kb, Kc, Pa, Pb, Pc + n0 = 20; n1 = 10; d = 4; + model = stk_model (@stk_materncov52_aniso, d); + model.lm = stk_lm_affine; + model.param = log ([1.0; 2.1; 2.2; 2.3; 2.4]); + model2 = model; model2.lognoisevariance = log(0.01); + x0 = stk_sampling_randunif (n0, d); + x1 = stk_sampling_randunif (n1, d); +***** error [KK, PP] = stk_make_matcov (); +***** error [KK, PP] = stk_make_matcov (model); +***** test [Ka, Pa] = stk_make_matcov (model, x0); % (1) +***** test [Kb, Pb] = stk_make_matcov (model, x0, x0); % (2) +***** test [Kc, Pc] = stk_make_matcov (model, x0, x1); % (3) +***** error [KK, PP] = stk_make_matcov (model, x0, x1, pi); +***** assert (isequal (size (Ka), [n0 n0])); +***** assert (isequal (size (Kb), [n0 n0])); +***** assert (isequal (size (Kc), [n0 n1])); +***** assert (isequal (size (Pa), [n0 d + 1])); +***** assert (isequal (size (Pb), [n0 d + 1])); +***** assert (isequal (size (Pc), [n0 d + 1])); +***** assert (isequal (Kb, Ka)); +***** test [Ka, Pa] = stk_make_matcov (model2, x0); % (1') +***** test [Kb, Pb] = stk_make_matcov (model2, x0, x0); % (2') +***** error assert (isequal (Kb, Ka)); +***** assert (isequal (Pa, Pb)); +***** assert (isequal (Pa, Pc)); +18 tests, 18 passed, 0 known failure, 0 skipped +[inst/core/stk_predict.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/core/stk_predict.m +***** shared n, m, model, x0, x_obs, z_obs, x_prd, y_prd1, idx_obs, idx_prd -Additional help for built-in functions and operators is -available in the online version of the manual. Use the command -'doc ' to search the manual index. + n = 10; % number of observations + m = n + 1; % number of predictions + d = 1; % dimension of the input space -Help and information about Octave is also available on the WWW -at https://www.octave.org and via the help@octave.org -mailing list. + x0 = stk_sampling_regulargrid(n+m, d, [0; pi]); -BOX = 2-dimensional hyper-rectangle (stk_hrect object): + idx_obs = (2:2:(n+m-1))'; + idx_prd = (1:2:(n+m))'; - : x_1 x_2 - lower_bounds : -5 0 - upper_bounds : 10 15 + x_obs = x0(idx_obs); + z_obs = sin (double (x_obs)); + x_prd = x0(idx_prd); + model = stk_model (@stk_materncov32_iso); + model.param = log ([1.0; 2.1]); +***** error y_prd1 = stk_predict (); +***** error y_prd1 = stk_predict (model); +***** test y_prd1 = stk_predict (model, x_prd); +***** error y_prd1 = stk_predict (model, data, x_prd); +***** test y_prd1 = stk_predict (model, x_obs, z_obs, x_prd); +***** error y_prd1 = stk_predict (model, [x_obs; x_obs], [z_obs; z_obs], x_prd); +***** test % nargout = 2 + [y_prd1, lambda] = stk_predict (model, x_obs, z_obs, x_prd); + assert (isequal (size (lambda), [n m])); +***** test % nargout = 2, compute only variances + [y_prd1, lambda] = stk_predict (model, x_obs, [], x_prd); + assert (isequal (size (lambda), [n m])); + assert (all (isnan (y_prd1.mean))); +***** test % nargout = 3 + [y_prd1, lambda, mu] = stk_predict (model, x_obs, z_obs, x_prd); + assert (isequal (size (lambda), [n m])); + assert (isequal (size (mu), [1 m])); % ordinary kriging +***** test % nargout = 4 + [y_prd1, lambda, mu, K] = stk_predict (model, x_obs, z_obs, x_prd); + assert (isequal (size (lambda), [n m])); + assert (isequal (size (mu), [1 m])); % ordinary kriging + assert (isequal (size (K), [m m])); +***** test % predict on large set of locations + x_prd = stk_sampling_regulargrid (1e5, 1, [0; pi]); + y_prd = stk_predict (model, x_obs, z_obs, x_prd); +***** test % predict on an observation point + % https://sourceforge.net/p/kriging/tickets/49/ + [zp, lambda] = stk_predict (model, x_obs, z_obs, x_obs(4)); + assert (isequal (z_obs(4), zp.mean)) + assert (isequal (zp.var, 0)) + lambda_ref = zeros (n, 1); lambda_ref(4) = 1; + assert (isequal (lambda, lambda_ref)) +12 tests, 12 passed, 0 known failure, 0 skipped +[inst/core/@stk_kreq_qr/stk_kreq_qr.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/core/@stk_kreq_qr/stk_kreq_qr.m +***** test stk_test_class ('stk_kreq_qr') 1 test, 1 passed, 0 known failure, 0 skipped -[inst/examples/01_kriging_basics/stk_example_kb02.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/examples/01_kriging_basics/stk_example_kb02.m -***** test stk_example_kb02; close all; - -#========================# -# stk_example_kb02 # -#========================# - -'stk_example_kb02' is a script from the file /build/reproducible-path/octave-stk-2.8.1/debian/octave-stk/usr/share/octave/packages/stk-2.8.1/examples/01_kriging_basics/stk_example_kb02.m - - STK_EXAMPLE_KB02 Ordinary kriging in 1D with parameter estimation - - This example shows how to estimate covariance parameters and compute - ordinary kriging predictions on a one-dimensional noiseless dataset. - - The model and data are the same as in stk_example_kb01, but this time the - parameters of the covariance function are estimated using the Restricted - Maximum Likelihood (ReML) method. - - See also: stk_example_kb01, stk_example_kb02n - - -Additional help for built-in functions and operators is -available in the online version of the manual. Use the command -'doc ' to search the manual index. - -Help and information about Octave is also available on the WWW -at https://www.octave.org and via the help@octave.org -mailing list. -model = - - scalar structure containing the fields: - - covariance_type = @stk_materncov_iso - lm = - - +[inst/core/stk_predict_leaveoneout.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/core/stk_predict_leaveoneout.m +***** shared n, x_obs, z_obs, model + n = 20; + x_obs = stk_sampling_regulargrid (n, 1, [0; 2*pi]); + z_obs = stk_feval (@sin, x_obs); + model = stk_model (@stk_materncov32_iso); + model.param = log ([1; 5]); +***** test % one output - dim = 1 - param = + loo_pred = stk_predict_leaveoneout (model, x_obs, z_obs); - -0.2108 - 2.3026 - 0.7562 + assert (isequal (size (loo_pred), [n 2])); + assert (isequal (loo_pred.colnames, {'mean', 'var'})); + assert (all (isfinite (loo_pred(:)))); +***** test % two outputs - lognoisevariance = -Inf + [loo_pred, loo_res] = stk_predict_leaveoneout (model, x_obs, z_obs); - line 0: warning: iconv failed to convert degree sign - - - | True function and observed data - 1.5 +|+ - | ***G* +--------------------+ - #|#######***#####***########################|***?***True function| - 1 +|+#####**#########***######################+---G---Observations-+ - #|####**#############***######################################### - #|###**################**######################################## - 0.5 +|+#**##################**############################***######## - #|#G*####################**########################****##*G**#### - #|**######################**#####################G**########***## - F1 0 *|+########################**###################**############*** - G|##########################**#################**###############** - #|###########################**###############**#################** - -0.5 +|+###########################**#############**################## - #|#############################**###########*#################### - #|##############################*G*#######**##################### - -1 +|+###############################**#####**###################### - #|#################################******######################## - +|------------------------------------------------------------------ - -1.5 +-+##############+###############+################+############## + - -1 -0.5 0 0.5 1 - -1 test, 1 passed, 0 known failure, 0 skipped -[inst/examples/02_design_of_experiments/stk_example_doe01.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/examples/02_design_of_experiments/stk_example_doe01.m -***** test stk_example_doe01; close all; + assert (isequal (size (loo_pred), [n 2])); + assert (isequal (loo_pred.colnames, {'mean', 'var'})); + assert (all (isfinite (loo_pred(:)))); -#=========================# -# stk_example_doe01 # -#=========================# + assert (isequal (size (loo_res), [n 2])); + assert (isequal (loo_res.colnames, {'residuals', 'norm_res'})); + assert (all (isfinite (loo_res(:)))); +***** test % heteroscedastic noise case -'stk_example_doe01' is a script from the file /build/reproducible-path/octave-stk-2.8.1/debian/octave-stk/usr/share/octave/packages/stk-2.8.1/examples/02_design_of_experiments/stk_example_doe01.m + model.lognoisevariance = (1 + rand (n, 1)) * 1e-6; + [loo_pred, loo_res] = stk_predict_leaveoneout (model, x_obs, z_obs); - STK_EXAMPLE_DOE01 Examples of two-dimensional designs + assert (isequal (size (loo_pred), [n 2])); + assert (isequal (loo_pred.colnames, {'mean', 'var'})); + assert (all (isfinite (loo_pred(:)))); - All designs are constructed on the hyper-rectangle BOX = [0; 2] x [0; 4]. + assert (isequal (size (loo_res), [n 2])); + assert (isequal (loo_res.colnames, {'residuals', 'norm_res'})); + assert (all (isfinite (loo_res(:)))); +3 tests, 3 passed, 0 known failure, 0 skipped +[inst/core/stk_model_update.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/core/stk_model_update.m +***** test + x1 = (linspace (0, 1, 15))'; z1 = sin (x1); + x2 = (linspace (2, 3, 15))'; z2 = sin (x2); + xt = (linspace (1, 2, 15))'; zt = sin (xt); - Examples of the following designs are shown: - a) Regular grid --> stk_sampling_regulargrid, - b) "Maximin" latin hypercube sample --> stk_sampling_maximinlhs, - c) RR2-scrambled Halton sequence --> stk_sampling_halton_rr2, - d) Uniformly distributed random sample --> stk_sampling_randunif. + % Prior model + M0 = stk_model (@stk_materncov32_iso); + M0.param = log ([1.0; 2.1]); + M1 = stk_model_update (M0, x1, z1); + M1 = stk_model_update (M1, x2, z2); % this calls @stk_model_gpposterior/... + zp1 = stk_predict (M1, xt); -Additional help for built-in functions and operators is -available in the online version of the manual. Use the command -'doc ' to search the manual index. + M2 = stk_model_gpposterior (M0, [x1; x2], [z1; z2]); + zp2 = stk_predict (M2, xt); -Help and information about Octave is also available on the WWW -at https://www.octave.org and via the help@octave.org -mailing list. + assert (stk_isequal_tolabs (double (zp2 - zp1), zeros (15, 2), 1e-10)) 1 test, 1 passed, 0 known failure, 0 skipped +[inst/core/stk_cholcov.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/core/stk_cholcov.m +***** shared Q, K, L, U, epsi + Q = 0.25 * hadamard(4); +***** test + K = Q * diag ([1, 0.1, 0.01, 1e-7]) * Q'; + [U, epsi] = stk_cholcov (K); +***** assert (istriu (U)) +***** assert (epsi == 0) +***** test + K = Q * diag ([1, 0.1, 0.01, 1e-7]) * Q'; + [L, epsi] = stk_cholcov (K, 'lower'); +***** assert (istril (L)) +***** assert (epsi == 0) +***** test + K = Q * diag ([1, 0.1, 0.01, -1e-7]) * Q'; + [U, epsi] = stk_cholcov (K); +***** assert (istriu (U)) +***** assert (epsi > 0) +***** test + K = Q * diag ([1, 0.1, 0.01, -1e-7]) * Q'; + [L, epsi] = stk_cholcov (K, 'lower'); +***** assert (istril (L)) +***** assert (epsi > 0) +12 tests, 12 passed, 0 known failure, 0 skipped [inst/examples/02_design_of_experiments/stk_example_doe05.m] >>>>> /build/reproducible-path/octave-stk-2.8.1/inst/examples/02_design_of_experiments/stk_example_doe05.m ***** test stk_example_doe05; close all; @@ -5452,6 +4682,16 @@ Help and information about Octave is also available on the WWW at https://www.octave.org and via the help@octave.org mailing list. +warning: using the gnuplot graphics toolkit is discouraged + +The gnuplot graphics toolkit is not actively maintained and has a number +of limitations that are unlikely to be fixed. Communication with gnuplot +uses a one-directional pipe and limited information is passed back to the +Octave interpreter so most changes made interactively in the plot window +will not be reflected in the graphics properties managed by Octave. For +example, if the plot window is closed with a mouse click, Octave will not +be notified and will not update its internal list of open figure windows. +The qt toolkit is recommended instead. line 0: warning: iconv failed to convert degree sign multiplot> " font ":Bold,11" textcolor rgb " @@ -5461,25 +4701,25 @@ | n = 5 + 0 = 5. 15 +|+ - 10 +|+ ######## ###%%%%%%### - #|%%%%%&&&&&%%%%%&&&&&&&&&&&&&&&&&&&========&&&%%%######### - 5 +|+&&&&####&&&&G&*************G**************G*&&&&&&%%#### - z 0 +|+***************=######&&&&&====&&&&&&&&&&&&******#&&&&&%## - -5 +|+&&&&&&&&&&&&%%&=============##%%%%%%%%%%%%%&&===#*****&&&& - #|###############################################%===&&&&***G - -10 +|------------------------------------------------------------ - -15 +-+#######+#########+#########+#########+#########+#########+ + 10 +|+##%%%%%%%## ######### #%%%%%%%%####%%%%## + 5 +|+&&&&&&&&&&&&&&&&&&&&&&&%%#####%&===========&&&&&&&&%%### + 0 +|+===*********G*****####&&&&&&====##********G*****##&&&&%# + z G|****#####&&&&&====**********G*******##&&&&&&&===******&&&&& + -5 +|+&&&&&&&&&%%###%&&&&&&===&&&&&&&&&&&&&&%%#####%&===##****** + -10 +|+##%%%%###########%%%&&&&%%%##%%%%%%%###########%%=======&G + -15 +|------------------------------------------------------------ + -20 +-+#######+#########+#########+#########+#########+######## + 0 2 4 6 8 10 12 |-----------------------------------------------------------| - 0.002 +|+ + + + + + +-+| - +| + + + + + F +| - 0.0015 +|+###################################################*#*#+-+| - #|####################################################*#*## | -AKG 0.001 +|+##################################################*##*#+-+| - #|###################################################*###*# | - 0.0005 +|+#################################################**###*+-+| - +|-----------------------------------------------------------| - 0 ****************************************************######*** + 0.16 +|+ + + + + + +-+| + 0.14 +|+ + + + + + F +-+| + 0.12 +|+####################################################*#*+-+| + 0.1 +|+###################################################**#**-+| + AKG0.08 +|+###################################################*###*-+| + 0.06 +|+####################****##########################*####*-+| + 0.04 +|+###################**###*######***###############**####*-+| + 0.02 +|-----------------------------------------------------------| + 0 ******##*************########****######*************######+** 0 2 4 6 8 10 12 x line 0: warning: iconv failed to convert degree sign @@ -5490,26 +4730,26 @@ | n = 5 + 5 = 10. - 15 +|+ - 10 +|+ ######## ###%%%%%%%## - #|%%%%&&&&&&%%%%%&&&&&&&&&&&&&&&&&&&========&%############# - 5 +|+&&&&####&&&&G&*************G**************G=&%########## - z 0 +|+***************=######&&&&&====&&&&&&&&&&*****&&%####### - -5 +|+&&&&&&&&&&&&%%&=============####%%%%%%%%%%&&&=****G&&%%%&G - #|###############################################%==G*******G + 15 +|+ #### + 10 +|+ ###%%%%### ####### #%%%%%%%%# + #|#%%&&&&&&&&&%%%%&&&&&%%%########%&========&&%############ + 5 +|+&&#########&G&&####&&&&&&%##%&====##******G=&%########## + z 0 +|+*********************###&&&====*****###&&&***=&######### + -5 +|+#######&&&&&&&&=====*******G***####&&&&&%%%&&**G&######%&G + %|&&&&&&&&&%%####%%&&&&&##&&&&&&&&&&&&&%%#######&&***&&&&***G -10 +|------------------------------------------------------------ - -15 +-+#######+#########+#########+#########+#########+######## + + -15 +-+#######+#########+#########+#########+#########+#G%%%%## + 0 2 4 6 8 10 12 |-----------------------------------------------------------| - 0.25 +|+ + + + + + *F* +-+| - +| + + + + +** ** *| - 0.2 +|+###############################################**###*##+-*| - 0.15 +|+###############################################*####*##+*+| - AKG #|###############################################*#####*###* | - 0.1 +|+#############################################**######*#+*+| - 0.05 +|+############################################**#######*#+*+| - +|-----------------------------------------------------------| - 0 ***********************************************###+######**-+ + 0.03 +|+ + + + + + +-+| + 0.025 +|+ + + + + + +-+| + #|#######################################################*F | + 0.02 +|+######################################################*+*+| + AKG0.015 +|+#####################**########################***####*+*+| + 0.01 +|+###################**#**#######################*##*##*#+*+| + #|####################*###**#####################*###*#**## *| + 0.005 +|-----------------------------------------------------------| + 0 *******#*************#######*********************#+###**##+-+ 0 2 4 6 8 10 12 x line 0: warning: iconv failed to convert degree sign @@ -5521,25 +4761,25 @@ | n = 5 + 10 = 15. 20 +|+ - 15 +|+ ###### ######## ###%%%%%## - 10 +|+#%%%&&&%%%#####%%&&&&&&&%%###%&&&&&&&&&&&############### - 5 +|+&&&&&#&&&&&&&&&&&&#####&&&&&&&&#==========&&%%########## - z G|*************G**************G**************G**&&%######## - 0 +|+=########&&&========####======&&&##&&&&&&&&&****&&###### - -5 +|+&&&&&&&&&&%###%&&&&======%####%%%&&&%%%#####%&=**GG&&&&&*G - -10 +|------------------------------------------------------------ - -15 +-+#######+#########+#########+#########+#########+####%%%# + + | ######## ###%%%%## + 10 +|+%%&&&&&&&&%%###################%%&&====&&&%############# + %|&&&&#######&&&&&&&&&%########%&======##****G*&&########## + z 0 +|+************G*****&&&&&&&&=====********#&&&****%######## + &|&########&&&&&&&&==***G*****G***#####&&&&&%#%&&*GG&##%&&G*G + -10 +|+&&&&&&&&&%#####%&&&&&&&&&&&&&&&&&&&&&%%#######%&*G*G*G*G=G + +|------------------------------------------------------------ + -20 +-+#######+#########+#########+#########+#########+######## + 0 2 4 6 8 10 12 |-----------------------------------------------------------| - 0.08 +|+ + + + + + +-+| - +| + + + + + F +| - 0.06 +|+######################################################*+-+| - #|#######################################################*# | - AKG0.04 +|+######################################################*+-+| - #|###################################################**##*# | - 0.02 +|+##################################################*#**#**+| - +|-----------------------------------------------------------| - 0 *****************************************************##**#*-+ + 0.12 +|+ + + + + + +-+| + 0.1 +|+ + + + + + F* +-+| + #|#####################################################**## | + 0.08 +|+####################################################***+-+| + AKG0.06 +|+################################################**#*##*+-+| + 0.04 +|+###############################################*#*#*##*+-+| + #|####***##########################***############*#*#*###* | + 0.02 +|-----------------------------------------------------------| + 0 *****#####************************#####***********+#***###*** 0 2 4 6 8 10 12 x line 0: warning: iconv failed to convert degree sign @@ -5551,25 +4791,25 @@ | n = 5 + 15 = 20. 20 +|+ - 15 +|+ ###### ######## ###%%%%%## - 10 +|+#%%%&&&%%%#####%%&&&&&&&%%###%&&&&&&&&&&&%############## - 5 +|+&&&&&#&&&&&&&&&&&&#####&&&&&&&&#==========&&%########### - z G|*************G**************G**************G**&&%######## - 0 +|+=########&&&========####======&&&##&&&&&&&&&****&%###### - -5 +|+&&&&&&&&&&%###%&&&&======%####%%%&&&%%%#####%&=**GG&%#%&*G - -10 +|------------------------------------------------------------ - -15 +-+#######+#########+#########+#########+#########+#####%## + + | ######## ##%%%%%## + 10 +|+%%&&&&&&&&%%###################%%&&====&&&%############# + %|&&&&#######&&&&&&&&&%########%&======##****G=&&########## + z 0 +|+************G*****&&&&&&&&====*********#&&&***&%######## + &|&########&&&&&&&&==***G*****G***#####&&&&&%#%&&*GG&G##%&G*G + -10 +|+&&&&&&&&&%#####%&&&&&&&&&&&&&&&&&&&&&%%#######&&*G*GGG*G=G + +|------------------------------------------------------------ + -20 +-+#######+#########+#########+#########+#########+######## + 0 2 4 6 8 10 12 |-----------------------------------------------------------| 0.08 +|+ + + + + + +-+| - 0.07 +|+ + + + + + F-+| - 0.06 +|+##################################################**###**+| - 0.05 +|+##################################################**##*+*+| - AKG0.04 +|+#################################################*##*#*+*+| - 0.03 +|+#################################################*##*#*+-*| - 0.02 +|+#################################################*##**#+-*| + 0.07 +|+ + + + + + +-+| + 0.06 +|+#################################################F##**#+-+| + 0.05 +|+################################################*#*#*#*+-+| + AKG0.04 +|+################################################*#*#*#*+-+| + 0.03 +|+###***##########################***#############*#***#*+-+| + 0.02 +|+##*##**#######################**##**###########*###**##*-+| 0.01 +|-----------------------------------------------------------| - 0 ****************************************************####*#+-+ + 0 ****######+**********************######************#######*** 0 2 4 6 8 10 12 x line 0: warning: iconv failed to convert degree sign @@ -5581,25 +4821,25 @@ | n = 5 + 20 = 25. 20 +|+ - 15 +|+ ###### ######## ##%%%%%%## - 10 +|+#%%&&&&%%%#####%%&&&&&&&%%###%&&&&&&&&&&&%############## - 5 +|+&&&&###&&&&&&&&&&######&&&&&&&&#==========&&%%########## - z G|*************G**************G**************G**&&%######## - 0 +|+=########&&&========####======&&&###&&&&&&&&****&%###### - -5 +|+&&&&&&&&&&%%##%&&&&======%####%%&&&&&%%#####%&=**GG%##%G*G + 15 +|+ #### ####### + 10 +|+##%%%%%%%%######################%%&&&&&&%############### + 5 +|+&&&&&&&&&&&&&&%%%%############%&==========&&############ + z &|&=====*******G**&&&&&%%#####%&====*********G*=&%######### + 0 +|+*****####&&&==*******&&&===*******###&&&&&&&***&######## % + -5 +|+&&&&&&&&&&%%#%&&&&&=*G*****G&&&&&&&&&&%%####%&*GGGG##%&G*G -10 +|------------------------------------------------------------ - -15 +-+#######+#########+#########+#########+#########+######## + + -15 +-+#######+#########+#########+#########+#########+#G###### + 0 2 4 6 8 10 12 |-----------------------------------------------------------| - 0.04 +|+ + + + + + +-+| - 0.035 +|+ + + + + + ** F-+| - 0.03 +|+##################################################**###*-+| - 0.025 +|+##################################################**##*+*+| - AKG 0.02 +|+##################################################*#*#*+*+| - 0.015 +|+#################################################*##***+*+| - 0.01 +|+#################################################*##***+*+| - 0.005 +|-----------------------------------------------------------| - 0 *******##********************************************##*##+-* + 0.12 +|+ + + + + + +-+| + 0.1 +|+ + + + + + F+-+| + #|##################################################**##*** | + 0.08 +|+#################################################*#*#*#*-+| + AKG0.06 +|+#################################################*#*#*#+*+| + 0.04 +|+################################################*##**##+*+| + #|#################################################*###*###**| + 0.02 +|-----------------------------------------------------------| + 0 ***************************************************####*##+-+ 0 2 4 6 8 10 12 x line 0: warning: iconv failed to convert degree sign @@ -5611,25 +4851,25 @@ | n = 5 + 25 = 30. 20 +|+ - 15 +|+ ###### ######## ##%%%%%%## - 10 +|+#%%&&&&%%%#####%%&&&&&&&%%###%&&&&&&&&&&&%############## - 5 +|+&&&&###&&&&&&&&&&######&&&&&&&&#==========&&%%########## - z G|*************G**************G**************G**&&%######## - 0 +|+=########&&&========####======&&&###&&&&&&&&****&%###### - -5 +|+&&&&&&&&&&%%##%&&&&======%####%%&&&&&%%#####%&=**GGG###G*G + 15 +|+ #### ####### + 10 +|+##%%%%%%%%######################%%&&&&&&%############### + 5 +|+&&&&&&&&&&&&&&%%%%############%&==========&&############ + z &|&=====*******G**&&&&&%%#####%&====*********G*=&%######### + 0 +|+*****####&&&==*******&&&===*******###&&&&&&&***&######## % + -5 +|+&&&&&&&&&&%%#%&&&&&=*G*****G&&&&&&&&&&%%####%&*GGGG###GG*G -10 +|------------------------------------------------------------ - -15 +-+#######+#########+#########+#########+#########+######## + + -15 +-+#######+#########+#########+#########+#########+#G###### + 0 2 4 6 8 10 12 |-----------------------------------------------------------| - 0.06 +|+ + + + + + +-+| - 0.05 +|+ + + + + + +-+| - #|###################################################*F###* | - 0.04 +|+##################################################**##**-+| - AKG0.03 +|+##################################################*#*#*+*+| - 0.02 +|+#################################################*##*#*+*+| - #|##################################################*##***#* | - 0.01 +|-----------------------------------------------------------| - 0 *****************************************************##**#+-* + 0.04 +|+ + + + + + +-+| + 0.035 +|+ + + + + + * F+-+| + 0.03 +|+##################################################*###**-+| + 0.025 +|+#################################################*#*#*#*-+| + AKG 0.02 +|+#################################################*#*#*#*-+| + 0.015 +|+#################################################*#***#*-+| + 0.01 +|+#################################################*#***#+*+| + 0.005 +|-----------------------------------------------------------| + 0 *****####*************************####**************###*##+** 0 2 4 6 8 10 12 x line 0: warning: iconv failed to convert degree sign @@ -5640,26 +4880,26 @@ | n = 5 + 30 = 35. - 20 +|+ ## ##### - 15 +|+ ####%### ###%%%%%## #%%%%%%%%## - 10 +|+%%&&&&&&&%%###%%&&&&&&&&&%###%&&&&&&&&&&&%############## - 5 +|+&&&#####&&&&&&&&########&&&&&&&#==========&&&%########## - z G|*************G**************G**************G***&&######## - 0 +|+=#########&&========####======&#######&&&&&&=***&%###### - -5 +|+&&&&#&&&&&&%#%&&&&&======%###%&&&&&&&&%%####%&=**GGG###G*G + 20 +|+ + 15 +|+ #### ####### + 10 +|+##%%%%%%%%######################%%%&&&&&%############### + 5 +|+&&&&&&&&&&&&&%%%%%############%&==========&&############ + z &|&=====*******G**&&&&&%%#####%&====*********G*=&%######### + 0 +|+*****####&&&==*******&&&===*******###&&&&&&&***&######## # + -5 +|+&&&&&&&&&&%%#%&&&&&=*G*****G&&&&&&&&&&%%####%&*GGGG###GG*G -10 +|------------------------------------------------------------ - -15 +-+#######+#########+#########+#########+#########+###G&&%G + + -15 +-+#######+#########+#########+#########+#########+#G###### + 0 2 4 6 8 10 12 |-----------------------------------------------------------| - 0.02 +|+ + + + + + F +-+| - +| + + + + + * * +| - 0.015 +|+###################################################*###*-+| - #|###################################################*#*#** | - AKG 0.01 +|+##################################################*#*#**-+| - #|###################################################*#***#* | - 0.005 +|+###****###########################################*#***+*+| - +|-----------------------------------------------------------| - 0 *****#####***********####*****************************#**#+** + 0.03 +|+ + + + + + +-+| + 0.025 +|+ + + + + + +-+| + #|######################################################### | + 0.02 +|+##################################################*###F*-+| + AKG0.015 +|+##################################################**##**-+| + 0.01 +|+##################################################***#**-+| + #|##################################################*##**##* | + 0.005 +|-----------------------------------------------------------| + 0 *****####*************************####***************##*##+-* 0 2 4 6 8 10 12 x line 0: warning: iconv failed to convert degree sign @@ -5670,26 +4910,26 @@ | n = 5 + 35 = 40. - 20 +|+ ## ##### - 15 +|+ ####%### ###%%%%%## #%%%%%%%%## - 10 +|+%%&&&&&&&%%###%%&&&&&&&&&%###%&&&&&&&&&&&%############## - 5 +|+&&&#####&&&&&&&&########&&&&&&&#==========&&&%########## - z G|*************G**************G**************G***&&######## - 0 +|+=#########&&========####======&#######&&&&&&=***&%###### - -5 +|+&&&&#&&&&&&%#%&&&&&======%###%&&&&&&&&%%####%&=**GGG###G*G + 20 +|+ + 15 +|+ #### ####### + 10 +|+##%%%%%%%%######################%%%&&&&&%############### + 5 +|+&&&&&&&&&&&&&%%%%%############%&==========&&############ + z &|&=====*******G**&&&&&%%#####%&====*********G*=&%######### + 0 +|+*****####&&&==*******&&&===*******###&&&&&&&***&######## # + -5 +|+&&&&&&&&&&%%#%&&&&&=*G*****G&&&&&&&&&&%%####%&*GGGG###GG*G -10 +|------------------------------------------------------------ - -15 +-+#######+#########+#########+#########+#########+###G&&%G + + -15 +-+#######+#########+#########+#########+#########+#G####G# + 0 2 4 6 8 10 12 |-----------------------------------------------------------| - 0.03 +|+ + + + + + +-+| - 0.025 +|+ + + + + + F+-+| - #|#######################################################** | - 0.02 +|+##################################################**##**-+| - AKG0.015 +|+##################################################**#*#*-+| - 0.01 +|+##################################################*#**#*-+| - #|#####**############################################*#**#* | - 0.005 +|-----------------------------------------------------------| - 0 ******####************##*****************************##*##+** + 0.02 +|+ + + + + + +-+| + +| + + + + + *F * +| + 0.015 +|+##################################################*#*#**-+| + #|###################################################*#*#** | + AKG 0.01 +|+##################################################*#*#*+*+| + #|###################################################*#*#*#* | + 0.005 +|+###***###########################################*##**#+*+| + +|-----------------------------------------------------------| + 0 *****#####************************####***************##**#+-* 0 2 4 6 8 10 12 x line 0: warning: iconv failed to convert degree sign @@ -5700,26 +4940,26 @@ | n = 5 + 40 = 45. - 20 +|+ ##### - 15 +|+ ######## ###%%%%%## #%%%%%%%%## - 10 +|+%%&&&&&&&%%###%%&&&&&&&&&%###%&&&&&&&&&&&%############## - 5 +|+&&&#####&&&&&&&&########&&&&&&&#==========&&&%########## - z G|*************G**************G**************G**&&&######## - 0 +|+=#########&&========####======&#######&&&&&&=***&%###### - -5 +|+&&&&&&&&&&&%#%&&&&&======%###%&&&&&&&&%%####%&=**GGG##GG*G + 20 +|+ + 15 +|+ #### ####### + 10 +|+##%%%%%%%%######################%%&&&&&&%############### + 5 +|+&&&&&&&&&&&&&%%%%%############%&==========&&############ + z &|&====********G**&&&&&%%#####%&====*********G*=&%######### + 0 +|+*****####&&&==*******&&&===*******###&&&&&&&***&######## # + -5 +|+&&&&&&&&&&%%#%&&&&&=*G*****G&&&&&&&&&&%%####%&*GGGG###GG*G -10 +|------------------------------------------------------------ - -15 +-+#######+#########+#########+#########+#########+###G&&#G + + -15 +-+#######+#########+#########+#########+#########+#G#G##G# + 0 2 4 6 8 10 12 |-----------------------------------------------------------| - 0.014 +|+ + + + + + +-+| - 0.012 +|+ + + + + + * F+-+| - 0.01 +|+###################################################*##**-+| - 0.008 +|+##################################################**##**-+| - AKG #|#####**############################################*#**#* | - 0.006 +|+###****###########################################*#**#*-+| - 0.004 +|+##**##*###########***#############################*#**#*-+| + 0.012 +|+ + + + + + +-+| + 0.01 +|+ + + + + + F+-+| + #|###################################################**##** | + 0.008 +|+##################################################*#*#**-+| + AKG0.006 +|+##################################################*#*#**-+| + 0.004 +|+###**#############################################*#**#*-+| + #|###**#*#########################***###############*##**##* | 0.002 +|-----------------------------------------------------------| - 0 *****#####+**********####************#***************##*##+** + 0 *****#####***********************#####***************##*##+** 0 2 4 6 8 10 12 x line 0: warning: iconv failed to convert degree sign @@ -5730,26 +4970,26 @@ | n = 5 + 45 = 50. - 20 +|+ ##### - 15 +|+ ##%%%%%## #%%%%%%%%## - 10 +|+##############%%&&&&&&&&&%###%&&&&&&&&&&&%############## - 5 +|+&&&&&&&&&&&&&&&&&#######&&&&&&&#==========&&&%########## - z G|*****G*******G**************G**************G**&&&######## - 0 +|+=&&&&&&&&&&&========####======&#######&&&&&&=***&%###### - -5 +|+%%%###%%%%%##%&&&&&======%###%%&&&&&&&%%####%&=**GGG##GG*G + 20 +|+ + 15 +|+ #### ####### + 10 +|+##%%%%%%%%######################%%&&&&&&%############### + 5 +|+&&&&&&&&&&&&&%%%%%############%&==========&&############ + z &|&====********G**&&&&&%%#####%&====*********G*=&%######### + 0 +|+*****####&&&==*******&&&===*******###&&&&&&&***&######## # + -5 +|+&&&&&&&&&&%%#%&&&&&=*G*****G&&&&&&&&&&%%####%&*GGGGG##GG*G -10 +|------------------------------------------------------------ - -15 +-+#######+#########+#########+#########+#########+###G%%#G + + -15 +-+#######+#########+#########+#########+#########+#G#G##G# + 0 2 4 6 8 10 12 |-----------------------------------------------------------| - 0.02 +|+ + + + + + +-+| - +| + + + + + +| - 0.015 +|+###################################################*##F+-+| - #|###################################################**##** | - AKG 0.01 +|+##################################################*#*#**-+| - #|###################################################*#**#* | - 0.005 +|+##################################################*#**#*-+| - +|-----------------------------------------------------------| - 0 *********************####****************************##**#+** + 0.03 +|+ + + + + + +-+| + 0.025 +|+ + + + + + F *-+| + #|###################################################*#*#** | + 0.02 +|+##################################################*#*#**-+| + AKG0.015 +|+##################################################*#*#*+*+| + 0.01 +|+##################################################*#*#*+*+| + #|##################################################*##**##* | + 0.005 +|-----------------------------------------------------------| + 0 *****####*************************###****************###*#+-+ 0 2 4 6 8 10 12 x line 0: warning: iconv failed to convert degree sign @@ -5761,25 +5001,25 @@ | n = 5 + 50 = 55. 20 +|+ - 15 +|+ ######## ##%%%%%%## - 10 +|+###############%%&&&&&&&%%###%&&&&&&&&&&&%############## - 5 +|+&&&&&&&&&&&&&&&&&&#####&&&&&&&&#==========&&%%########## - z G|*****G*******G**************G**************G**&&%######## - 0 +|+=&&&&&&&&&&&========####======&&&###&&&&&&&&****&####### - -5 +|+%%%###########%&&&&======%####%%&&&&%%%#####%&=**GGG##GG*G + 15 +|+ ##### ####### + 10 +|+##%%%%%%%%######################%%&&&&&&%############### + 5 +|+&&&&&&&&&&&&&&%%%%############%&==========&&############ + z &|&====********G**&&&&&%%#####%&====*********G*=&%######### + 0 +|+*****####&&&==*******&&&===*******###&&&&&&&***&######## # + -5 +|+&&&&&&&&&&%%#%&&&&&=*G*****G&&&&&&&&&&%%####%&*GGGGG##GG*G -10 +|------------------------------------------------------------ - -15 +-+#######+#########+#########+#########+#########+###G###G + + -15 +-+#######+#########+#########+#########+#########+#G#G##G# + 0 2 4 6 8 10 12 |-----------------------------------------------------------| - 0.03 +|+ + + + + + +-+| - 0.025 +|+ + + + + + *F **-+| - #|###################################################**##** | - 0.02 +|+##################################################*#**#*-+| - AKG0.015 +|+##################################################*#**#*-+| - 0.01 +|+#################################################*##**#+*+| - #|##################################################*##**##* | + 0.03 +|+ + + + + + F *-+| + 0.025 +|+ + + + + + ** **-+| + #|###################################################*#*#** | + 0.02 +|+##################################################*#*#*+*+| + AKG0.015 +|+##################################################*#*#*+*+| + 0.01 +|+##################################################*#*#*+*+| + #|###################################################*#**##* | 0.005 +|-----------------------------------------------------------| - 0 ****************************************************###*##+** + 0 *****####*************************####***************###*#+-+ 0 2 4 6 8 10 12 x line 0: warning: iconv failed to convert degree sign @@ -5791,25 +5031,25 @@ | n = 5 + 55 = 60. 20 +|+ - 15 +|+ ######## ##%%%%%%## - 10 +|+###############%%&&&&&&&%%###%&&&&&&&&&&&%############## - 5 +|+&&&&&&&&&&&&&&&&&&#####&&&&&&&&#==========&&%%########## - z G|*****G*******G**************G**************G**&&%######## - 0 +|+=&&&&&&&&&&&========####======&&&###&&&&&&&&****&####### - -5 +|+%%%###########%&&&&======%####%%&&&&%%%#####%&=**GGG##GG*G + 15 +|+ ##### ####### + 10 +|+##%%%%%%%%######################%%&&&&&&%############### + 5 +|+&&&&&&&&&&&&&&%%%%############%&==========&&############ + z &|&====********G**&&&&&%%#####%&====*********G*=&%######### + 0 +|+*****####&&&==*******&&&===*******###&&&&&&&***&######## # + -5 +|+&&&&&&&&&&%%#%&&&&&=*G*****G&&&&&&&&&&%%####%&*GGGGG##GG*G -10 +|------------------------------------------------------------ - -15 +-+#######+#########+#########+#########+#########+###G###G + + -15 +-+#######+#########+#########+#########+#########+#G#G##G# + 0 2 4 6 8 10 12 |-----------------------------------------------------------| - 0.04 +|+ + + + + + +-+| - 0.035 +|+ + + + + + +-+| - 0.03 +|+###################################################*##F*-+| - 0.025 +|+##################################################**##**-+| - AKG 0.02 +|+##################################################*#**#*-+| - 0.015 +|+#################################################*##**#*-+| - 0.01 +|+#################################################*##**#+*+| + 0.03 +|+ + + + + + +-+| + 0.025 +|+ + + + + + * *F-+| + #|####################################################**#** | + 0.02 +|+##################################################*#*#**-+| + AKG0.015 +|+##################################################*#*#*+*+| + 0.01 +|+##################################################*#**#+*+| + #|###################################################*#**##* | 0.005 +|-----------------------------------------------------------| - 0 ***********************************************##***###*##+** + 0 *****####*************************###****************###*#+-* 0 2 4 6 8 10 12 x line 0: warning: iconv failed to convert degree sign @@ -5821,25 +5061,25 @@ | n = 5 + 60 = 65. 20 +|+ - 15 +|+ ####### ##%%%%%%## - 10 +|+###############%%&&&&&&&%%###%&&&&&&&&&&&%############## - 5 +|+&&&&&&&&&&&&&&&&&&#####&&&&&&&&#==========&&%########### - z G|*****G*******G**************G**************G**&&%######## - 0 +|+=&&&&&&&&&&&========####======&&&###&&&&&&&&****&####### - -5 +|+%%%###########%&&&&======%####%%&&&&%%%#####%&=**GGG##GG*G + 15 +|+ #### ####### + 10 +|+##%%%%%%%%######################%%&&&&&&%############### + 5 +|+&&&&&&&&&&&&&%%%%%############%&==========&&############ + z &|&====********G**&&&&&%%#####%&====*********G*=&%######### + 0 +|+*****####&&&==*******&&&===*******###&&&&&&&***&######## # + -5 +|+&&&&&&&&&&%%#%&&&&&=*G*****G&&&&&&&&&&%%####%&*GGGGG##GG*G -10 +|------------------------------------------------------------ - -15 +-+#######+#########+#########+#########+#########+###G###G + + -15 +-+#######+#########+#########+#########+#########+#G#G##G# + 0 2 4 6 8 10 12 |-----------------------------------------------------------| - 0.02 +|+ + + + + + F *+-+| - +| + + + + + ** ** +| + 0.02 +|+ + + + + + F *-+| + +| + + + + + ** ** +| 0.015 +|+##################################################*#*#**-+| #|###################################################*#*#** | - AKG 0.01 +|+##################################################*#**#*-+| - #|###################################################*#**#* | - 0.005 +|+#################################################*##**#*-+| + AKG 0.01 +|+##################################################*#*#**-+| + #|###################################################*#*#*#* | + 0.005 +|+##################################################*#**#+*+| +|-----------------------------------------------------------| - 0 *****************************************************##**#+** + 0 *****####*************************####***************###*#+-* 0 2 4 6 8 10 12 x line 0: warning: iconv failed to convert degree sign @@ -5851,25 +5091,25 @@ | n = 5 + 65 = 70. 20 +|+ - 15 +|+ ######## ##%%%%%%## - 10 +|+###############%%&&&&&&&%%###%&&&&&&&&&&&%############## - 5 +|+&&&&&&&&&&&&&&&&&&#####&&&&&&&&#==========&&%%########## - z G|*****G*******G**************G**************G**&&%######## - 0 +|+=&&&&&&&&&&&========####======&&&###&&&&&&&&****&####### - -5 +|+%%%###########%&&&&======%####%%&&&&%%%#####%&=**GGG##GG*G + 15 +|+ #### ####### + 10 +|+##%%%%%%%%######################%%&&&&&&%############### + 5 +|+&&&&&&&&&&&&&%%%%%############%&==========&&############ + z &|&====********G**&&&&&%%#####%&====*********G*=&%######### + 0 +|+*****####&&&==*******&&&===*******###&&&&&&&***&######## # + -5 +|+&&&&&&&&&&%%#%&&&&&=*G*****G&&&&&&&&&&%%####%&*GGGGG##GG*G -10 +|------------------------------------------------------------ - -15 +-+#######+#########+#########+#########+#########+###G###G + + -15 +-+#######+#########+#########+#########+#########+#G#G##G# + 0 2 4 6 8 10 12 |-----------------------------------------------------------| - 0.02 +|+ + + + + + +-+| - +| + + + + + +| - 0.015 +|+###################################################F##**-+| - #|###################################################**##** | - AKG 0.01 +|+##################################################*#*#**-+| - #|###################################################*#**#* | - 0.005 +|+##################################################*#**#*-+| - +|-----------------------------------------------------------| - 0 *****************************************************##**#+** + 0.03 +|+ + + + + + +-+| + 0.025 +|+ + + + + + +-+| + #|####################################################*##*F | + 0.02 +|+###################################################**#**-+| + AKG0.015 +|+##################################################*#*#**-+| + 0.01 +|+##################################################*#*#**-+| + #|###################################################*#**##* | + 0.005 +|-----------------------------------------------------------| + 0 ******###**************************##****************###*#+-* 0 2 4 6 8 10 12 x line 0: warning: iconv failed to convert degree sign @@ -5881,25 +5121,25 @@ | n = 5 + 70 = 75. 20 +|+ - 15 +|+ ####### ##%%%%%%## - 10 +|+###############%%&&&&&&&%%###%&&&&&&&&&&&%############## - 5 +|+&&&&&&&&&&&&&&&&&&#####&&&&&&&&#==========&&%########### - z G|*****G*******G**************G**************G**&&%######## - 0 +|+=&&&&&&&&&&&========####======&&&##&&&&&&&&&****&####### - -5 +|+%%%###########%&&&&======%####%%%&&&%%%#####%&=**GGG##GG*G + 15 +|+ ##### ####### + 10 +|+##%%%%%%%%######################%%&&&&&&%############### + 5 +|+&&&&&&&&&&&&&&%%%%############%&==========&&############ + z &|&====********G**&&&&&%%#####%&====*********G**&%######### + 0 +|+*****####&&&==*******&&&===*******###&&&&&&&***&######## + -5 +|+&&&&&&&&&&%%#%&&&&&=*G*****G&&&&&&&&&&%%####%&*GGGGG##GG*G -10 +|------------------------------------------------------------ - -15 +-+#######+#########+#########+#########+#########+###G###G + + -15 +-+#######+#########+#########+#########+#########+#G#G##GG + 0 2 4 6 8 10 12 |-----------------------------------------------------------| - 0.03 +|+ + + + + + +-+| - 0.025 +|+ + + + + + * F*-+| - #|###################################################**##** | - 0.02 +|+##################################################*#**#*-+| - AKG0.015 +|+##################################################*#**#*-+| - 0.01 +|+##################################################*#**#*-+| - #|##################################################*##**##* | - 0.005 +|-----------------------------------------------------------| - 0 ***********************************************###***##*##+** + 0.02 +|+ + + + + + * *F-+| + +| + + + + + ** ** +| + 0.015 +|+###################################################**#**-+| + #|###################################################*#*#** | + AKG 0.01 +|+##################################################*#*#**-+| + #|###################################################*#**##* | + 0.005 +|+##################################################*#**#+*+| + +|-----------------------------------------------------------| + 0 *****####*************************###****************###*#+** 0 2 4 6 8 10 12 x line 0: warning: iconv failed to convert degree sign @@ -5911,25 +5151,25 @@ | n = 5 + 75 = 80. 20 +|+ - 15 +|+ ####### ##%%%%%%## - 10 +|+###############%%&&&&&&&%%###%&&&&&&&&&&&%############## - 5 +|+&&&&&&&&&&&&&&&&&&#####&&&&&&&&#==========&&%########### - z G|*****G*******G**************G**************G**&&%######## - 0 +|+=&&&&&&&&&&&========####======&&&##&&&&&&&&&****&####### - -5 +|+%%%###########%&&&&======%####%%%&&&%%%#####%&=**GGG##GG*G + 15 +|+ ##### ####### + 10 +|+##%%%%%%%%######################%%&&&&&&%############### + 5 +|+&&&&&&&&&&&&&&%%%%############%&==========&&############ + z &|&====********G**&&&&&%%#####%&====*********G**&%######### + 0 +|+*****####&&&==*******&&&===*******###&&&&&&&***&######## + -5 +|+&&&&&&&&&&%%#%&&&&&=*G*****G&&&&&&&&&&%%####%&*GGGGG##GG=G -10 +|------------------------------------------------------------ - -15 +-+#######+#########+#########+#########+#########+###G##GG + + -15 +-+#######+#########+#########+#########+#########+#G#G##GG + 0 2 4 6 8 10 12 |-----------------------------------------------------------| - 0.014 +|+ + + + + + F *+-+| - 0.012 +|+ + + + + + * **-+| + 0.03 +|+ + + + + + +-+| + 0.025 +|+ + + + + + +-+| + #|####################################################F##** | + 0.02 +|+###################################################**#**-+| + AKG0.015 +|+##################################################*#*#**-+| 0.01 +|+##################################################*#*#**-+| - 0.008 +|+##################################################*#*#**-+| - AKG #|###################################################*#**#* | - 0.006 +|+##################################################*#**#*-+| - 0.004 +|+##################################################*#**#*-+| - 0.002 +|-----------------------------------------------------------| - 0 *****************************************************###*#+** + #|###################################################*#**##* | + 0.005 +|-----------------------------------------------------------| + 0 ******##***************************#*****************###*#+** 0 2 4 6 8 10 12 x line 0: warning: iconv failed to convert degree sign @@ -5941,25 +5181,25 @@ | n = 5 + 80 = 85. 20 +|+ - 15 +|+ ####### ##%%%%%%## - 10 +|+###############%%&&&&&&&%%###%&&&&&&&&&&&%############## - 5 +|+&&&&&&&&&&&&&&&&&&#####&&&&&&&&#==========&&%########### - z G|*****G*******G**************G**************G**&&%######## - 0 +|+=&&&&&&&&&&&========####======&&&&#&&&&&&&&&****&####### - -5 +|+%%%###########%&&&&======%####%%%&&&%%%#####%&=**GGG##GG*G + 15 +|+ #### ####### + 10 +|+##%%%%%%%%######################%%&&&&&&%############### + 5 +|+&&&&&&&&&&&&&%%%%%############%&==========&&############ + z &|&====********G**&&&&&%%#####%&====*********G*=&%######### + 0 +|+*****####&&&==*******&&&===*******###&&&&&&&***&######## + -5 +|+&&&&&&&&&&%%#%&&&&&=*G*****G&&&&&&&&&&%%####%&*GGGGG##GG=G -10 +|------------------------------------------------------------ - -15 +-+#######+#########+#########+#########+#########+###G##GG + + -15 +-+#######+#########+#########+#########+#########+#G#G##GG + 0 2 4 6 8 10 12 |-----------------------------------------------------------| - 0.006 +|+ + + + + + +-+| - 0.005 +|+ + + + + + F +-+| - #|####################################################**#*# | - 0.004 +|+###################################################**#**-+| - AKG0.003 +|+###################################################**#**-+| - 0.002 +|+##################################################*#*#**-+| - #|###################################################*#**#* | - 0.001 +|-----------------------------------------------------------| - 0 **********************##******************************##*#+** + 0.03 +|+ + + + + + +-+| + 0.025 +|+ + + + + + * F*-+| + #|####################################################**#** | + 0.02 +|+##################################################*#*#**-+| + AKG0.015 +|+##################################################*#*#**-+| + 0.01 +|+##################################################*#**#*-+| + #|###################################################*#**##* | + 0.005 +|-----------------------------------------------------------| + 0 ******##***************************#*************#***###*#+-* 0 2 4 6 8 10 12 x line 0: warning: iconv failed to convert degree sign @@ -5971,25 +5211,25 @@ | n = 5 + 85 = 90. 20 +|+ - 15 +|+ ####### ##%%%%%%## - 10 +|+###############%%&&&&&&&%%###%&&&&&&&&&&&%############## - 5 +|+&&&&&&&&&&&&&&&&&&#####&&&&&&&&#==========&&%########### - z G|*****G*******G**************G**************G**&&%######## - 0 +|+=&&&&&&&&&&&========####======&&&&#&&&&&&&&&****&####### - -5 +|+%%%###########%&&&&======%####%%%&&&%%%#####%&=**GGG##GG*G + 15 +|+ #### ####### + 10 +|+##%%%%%%%%######################%%&&&&&&%############### + 5 +|+&&&&&&&&&&&&&%%%%%############%&==========&&############ + z &|&====********G**&&&&&%%#####%&====*********G*=&%######### + 0 +|+*****####&&&==*******&&&===*******###&&&&&&&***&######## + -5 +|+&&&&&&&&&&%%#%&&&&&=*G*****G&&&&&&&&&&%%####%&*GGGGG##GG*G -10 +|------------------------------------------------------------ - -15 +-+#######+#########+#########+#########+#########+###G##GG + + -15 +-+#######+#########+#########+#########+#########+#G#G##GG + 0 2 4 6 8 10 12 |-----------------------------------------------------------| - 0.012 +|+ + + + + + +-+| - 0.01 +|+ + + + + + F+-+| - #|####################################################*##** | - 0.008 +|+###################################################*##**-+| - AKG0.006 +|+##################################################*#*#**-+| - 0.004 +|+##################################################*#**#*-+| - #|###################################################*#**#* | - 0.002 +|-----------------------------------------------------------| - 0 *****************************************************###*#*** + 0.02 +|+ + + + + + +-+| + +| + + + + + F ** +| + 0.015 +|+###################################################**#**-+| + #|####################################################**#** | + AKG 0.01 +|+##################################################*#*#**-+| + #|###################################################*#*#** | + 0.005 +|+##################################################*#**#*-+| + +|-----------------------------------------------------------| + 0 ******###*************************###****************###*#+** 0 2 4 6 8 10 12 x line 0: warning: iconv failed to convert degree sign @@ -6001,132 +5241,805 @@ | n = 5 + 90 = 95. 20 +|+ - | ######### ##%%%%%%%## - 10 +|+##############%&&&&&&&&&&&%%%&&&&&&====&&&%############# - &|&&&&&&&&&&&&&&&&&#########**G**************G=&&%######### - z 0 +|+****G*******G************&=====#######&&&&&****&%####### - &|&&&&%%%%%%%%%%%&&===========#%%&&&&&&&&%%%##%&&***GGG##G#&G - -10 +|+#################%%%%%%########################&=*GGGGGG*G - +|------------------------------------------------------------ - -20 +-+#######+#########+#########+#########+#########+######## + + 15 +|+ ##### ####### + 10 +|+##%%%%%%%%######################%%&&&&&&%############### + 5 +|+&&&&&&&&&&&&&&%%%%############%&==========&&############ + z &|&====********G**&&&&&%%#####%&====*********G**&%######### + 0 +|+*****####&&&==*******&&&===*******###&&&&&&&***&######## + -5 +|+&&&&&&&&&&%%#%&&&&&=*G*****G&&&&&&&&&&%%####%&*GGGGG##GG*G + -10 +|------------------------------------------------------------ + -15 +-+#######+#########+#########+#########+#########+#G#G##GG + 0 2 4 6 8 10 12 |-----------------------------------------------------------| - 0.01 +|+ + + + + + +-+| - +| + + + + + F * +| - 0.008 +|+###################################################*##**-+| - 0.006 +|+##################################################*#*#**-+| - AKG #|###################################################*#*#** | - 0.004 +|+##################################################*#**#*-+| - 0.002 +|+##################################################*#**#*-+| + 0.02 +|+ + + + + + +-+| + +| + + + + + +| + 0.015 +|+###################################################*##F*-+| + #|####################################################**#** | + AKG 0.01 +|+###################################################**#**-+| + #|###################################################*#*#** | + 0.005 +|+##################################################*#**#*-+| +|-----------------------------------------------------------| - 0 *****************************************************###*#*** + 0 ******###**************************##****************##**#+** 0 2 4 6 8 10 12 x : x z - init001 : 0.00000 0.5484 - init002 : 3.00000 1.9649 - init003 : 6.00000 3.0136 - init004 : 9.00000 3.4349 - init005 : 12.00000 -8.6857 - xg(184) : 11.03518 -11.2092 - xg(173) : 10.37186 -6.2458 - xg(200) : 12.00000 -5.0842 - xg(176) : 10.55276 -5.2554 - xg(200) : 12.00000 -6.8465 - xg(177) : 10.61307 -10.0173 - xg(193) : 11.57789 -11.4792 - xg(200) : 12.00000 -6.9298 - xg(176) : 10.55276 -8.6049 - xg(200) : 12.00000 -6.5111 - xg(190) : 11.39698 -9.5603 - xg(178) : 10.67337 -12.1041 - xg(188) : 11.27638 -11.0494 - xg(194) : 11.63819 -10.2538 - xg(178) : 10.67337 -8.5191 - xg(194) : 11.63819 -8.3992 - xg(178) : 10.67337 -9.7431 - xg(194) : 11.63819 -8.0127 - xg(179) : 10.73367 -11.9718 - xg(194) : 11.63819 -9.3090 - xg(194) : 11.63819 -11.1428 - xg(179) : 10.73367 -7.3605 - xg(193) : 11.57789 -7.7274 - xg(179) : 10.73367 -11.9981 - xg(193) : 11.57789 -11.4272 - xg(179) : 10.73367 -13.2679 - xg(193) : 11.57789 -12.4169 - xg(179) : 10.73367 -12.4928 - xg(193) : 11.57789 -13.2588 - xg(179) : 10.73367 -13.6053 - xg(180) : 10.79397 -11.4488 - xg(193) : 11.57789 -10.8874 - xg(180) : 10.79397 -14.5846 - xg(186) : 11.15578 -8.8826 - xg(191) : 11.45729 -10.2553 - xg(191) : 11.45729 -8.2455 - xg(191) : 11.45729 -12.2902 - xg(191) : 11.45729 -11.0573 - xg(191) : 11.45729 -9.7269 - xg(179) : 10.73367 -11.3575 - xg(191) : 11.45729 -9.1964 - xg(179) : 10.73367 -12.6146 - xg(025) : 1.44724 1.6717 - xg(190) : 11.39698 -12.3627 - xg(179) : 10.73367 -7.3129 - xg(191) : 11.45729 -10.1194 - xg(180) : 10.79397 -9.2031 - xg(191) : 11.45729 -10.6663 - xg(180) : 10.79397 -9.9393 - xg(191) : 11.45729 -11.2262 - xg(179) : 10.73367 -10.2185 - xg(191) : 11.45729 -9.6146 - xg(179) : 10.73367 -10.4957 - xg(191) : 11.45729 -11.4647 - xg(179) : 10.73367 -9.4778 - xg(191) : 11.45729 -10.4168 - xg(179) : 10.73367 -8.8854 - xg(191) : 11.45729 -11.8798 - xg(179) : 10.73367 -10.9678 - xg(191) : 11.45729 -11.8016 - xg(179) : 10.73367 -8.2906 - xg(191) : 11.45729 -10.6644 - xg(180) : 10.79397 -11.5444 - xg(191) : 11.45729 -9.4468 - xg(191) : 11.45729 -12.0125 - xg(180) : 10.79397 -10.4192 - xg(180) : 10.79397 -9.2760 - xg(191) : 11.45729 -10.6270 - xg(180) : 10.79397 -13.9788 - xg(191) : 11.45729 -7.4218 - xg(191) : 11.45729 -10.0387 - xg(191) : 11.45729 -14.0420 - xg(180) : 10.79397 -9.9256 - xg(191) : 11.45729 -10.7883 - xg(180) : 10.79397 -9.1374 - xg(180) : 10.79397 -10.0047 - xg(191) : 11.45729 -14.6172 - xg(180) : 10.79397 -10.3353 - xg(180) : 10.79397 -9.4433 - xg(180) : 10.79397 -9.1736 - xg(180) : 10.79397 -9.3100 - xg(181) : 10.85427 -12.9166 - xg(191) : 11.45729 -10.2392 - xg(191) : 11.45729 -8.9293 - xg(191) : 11.45729 -7.4804 - xg(191) : 11.45729 -7.4172 - xg(191) : 11.45729 -10.9470 - xg(191) : 11.45729 -8.2296 - xg(191) : 11.45729 -15.8118 - xg(180) : 10.79397 -10.3479 - xg(180) : 10.79397 -12.0320 - xg(191) : 11.45729 -9.1392 - xg(191) : 11.45729 -13.3139 - xg(180) : 10.79397 -8.4979 - xg(180) : 10.79397 -9.6365 + init001 : 0.00000 -1.4468 + init002 : 3.00000 1.9112 + init003 : 6.00000 -4.2617 + init004 : 9.00000 3.9566 + init005 : 12.00000 -9.3103 + xg(187) : 11.21608 -9.8963 + xg(181) : 10.85427 -9.7341 + xg(200) : 12.00000 -4.4734 + xg(174) : 10.43216 -14.5375 + xg(168) : 10.07035 -5.4545 + xg(193) : 11.57789 -8.0128 + xg(081) : 4.82412 -5.3041 + xg(169) : 10.13065 -6.0234 + xg(194) : 11.63819 -6.9138 + xg(175) : 10.49246 -11.6642 + xg(185) : 11.09548 -9.6839 + xg(185) : 11.09548 -11.7506 + xg(177) : 10.61307 -6.5585 + xg(173) : 10.37186 -11.1018 + xg(185) : 11.09548 -11.5844 + xg(173) : 10.37186 -7.0913 + xg(188) : 11.27638 -10.7143 + xg(177) : 10.61307 -11.3446 + xg(188) : 11.27638 -12.5528 + xg(177) : 10.61307 -5.1831 + xg(190) : 11.39698 -8.3195 + xg(190) : 11.39698 -12.1548 + xg(177) : 10.61307 -8.6920 + xg(190) : 11.39698 -11.1410 + xg(177) : 10.61307 -9.1164 + xg(191) : 11.45729 -10.0261 + xg(177) : 10.61307 -10.4450 + xg(177) : 10.61307 -8.2044 + xg(191) : 11.45729 -11.3539 + xg(178) : 10.67337 -9.1567 + xg(191) : 11.45729 -12.8655 + xg(180) : 10.79397 -10.3049 + xg(192) : 11.51759 -9.3988 + xg(180) : 10.79397 -11.2716 + xg(192) : 11.51759 -9.8260 + xg(179) : 10.73367 -10.1100 + xg(192) : 11.51759 -9.7243 + xg(180) : 10.79397 -13.2266 + xg(191) : 11.45729 -10.9110 + xg(179) : 10.73367 -9.9842 + xg(191) : 11.45729 -11.3480 + xg(180) : 10.79397 -10.3580 + xg(180) : 10.79397 -8.0752 + xg(192) : 11.51759 -10.9169 + xg(180) : 10.79397 -8.2015 + xg(180) : 10.79397 -10.4209 + xg(192) : 11.51759 -12.6691 + xg(181) : 10.85427 -9.7916 + xg(192) : 11.51759 -10.7731 + xg(181) : 10.85427 -9.6433 + xg(181) : 10.85427 -14.3497 + xg(192) : 11.51759 -8.6267 + xg(180) : 10.79397 -10.1003 + xg(192) : 11.51759 -11.2744 + xg(181) : 10.85427 -10.9284 + xg(192) : 11.51759 -11.3874 + xg(181) : 10.85427 -11.4260 + xg(192) : 11.51759 -7.5750 + xg(181) : 10.85427 -11.7333 + xg(192) : 11.51759 -12.2850 + xg(180) : 10.79397 -10.8379 + xg(192) : 11.51759 -12.1280 + xg(181) : 10.85427 -8.2933 + xg(192) : 11.51759 -10.0249 + xg(181) : 10.85427 -12.9116 + xg(192) : 11.51759 -13.2349 + xg(181) : 10.85427 -9.9808 + xg(181) : 10.85427 -14.2858 + xg(192) : 11.51759 -12.4436 + xg(181) : 10.85427 -14.0646 + xg(192) : 11.51759 -11.6047 + xg(192) : 11.51759 -10.2733 + xg(181) : 10.85427 -10.5289 + xg(181) : 10.85427 -11.1484 + xg(191) : 11.45729 -10.9650 + xg(181) : 10.85427 -12.0037 + xg(191) : 11.45729 -7.7164 + xg(191) : 11.45729 -10.9477 + xg(181) : 10.85427 -6.0321 + xg(181) : 10.85427 -9.7057 + xg(191) : 11.45729 -14.2052 + xg(181) : 10.85427 -12.0079 + xg(181) : 10.85427 -13.3773 + xg(191) : 11.45729 -9.4230 + xg(191) : 11.45729 -9.0969 + xg(181) : 10.85427 -10.7139 + xg(191) : 11.45729 -12.4928 + xg(181) : 10.85427 -13.4392 + xg(191) : 11.45729 -9.9735 + xg(181) : 10.85427 -10.5168 + xg(191) : 11.45729 -8.2141 + xg(191) : 11.45729 -13.9578 + xg(181) : 10.85427 -11.6777 + xg(181) : 10.85427 -7.7264 + xg(191) : 11.45729 -14.1073 Number of evaluations: 5 + 95 = 100. 1 test, 1 passed, 0 known failure, 0 skipped +[inst/examples/02_design_of_experiments/stk_example_doe03.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/examples/02_design_of_experiments/stk_example_doe03.m +***** test stk_example_doe03; close all; + +#=========================# +# stk_example_doe03 # +#=========================# + +'stk_example_doe03' is a script from the file /build/reproducible-path/octave-stk-2.8.1/debian/octave-stk/usr/share/octave/packages/stk-2.8.1/examples/02_design_of_experiments/stk_example_doe03.m + + STK_EXAMPLE_DOE03 A simple illustration of 1D Bayesian optimization + + Our goal here is to optimize (maximize) the one-dimensional function + + x |--> x * sin (x) + + over the interval [0; 4 * pi]. + + A Matern 5/2 prior with known parameters is used. + + Evaluations points are chosen sequentially using the Expected Improvement (EI) + criterion, starting from an initial design of N0 = 3 points. + + +Additional help for built-in functions and operators is +available in the online version of the manual. Use the command +'doc ' to search the manual index. + +Help and information about Octave is also available on the WWW +at https://www.octave.org and via the help@octave.org +mailing list. + line 0: warning: iconv failed to convert degree sign + + | + 15 +|+ + 10 +|+ ####%%%%%%%%%%%##### ################ + 5 +|+%&&&&&&&&&&&&&&&&&&&&&&%#######%===========&&&&&%%%##### + 0 +|+*====F========########&&&&&#====&#########===##&&&&&&%%# + z &|&***************************G***********************##&&&& + -5 +|+&&&&&&##############====&&###&&&&&&############===*******G + -10 +|+###%%&&&&&&&&&&&&&&&&%%#########%%&&&&&&&&&&&&&&&=======# + -15 +|------------------------------------------------------------ + -20 +-+#######+#########+#########+#########+#########+######## + + 0 2 4 6 8 10 12 + |-----------------------------------------------------------| + 1 +|+ + + + + + +-+| + +| ***F******** + + + + +| + 0.8 +|+#**##########******####################################+-+| + 0.6 +|+*##################***############***********##########+-+| + EI #|*#####################**#########***#########***######### | + 0.4 +|*######################**#######**#############***######+-+| + 0.2 +|+#######################**#####**################**#####+-+| + *|-----------------------------------------------------------| + 0 *-+#######+#########+#######*****#######+#########+####****** + 0 2 4 6 8 10 12 + x + line 0: warning: iconv failed to convert degree sign + + | + 15 +|+ + 10 +|+ ##%%%%%%%%#### #####%%%%%%###### + 5 +|+%&&&%##%&&&&&&&&&&&&&&&%#######%===========&&&&&&%%%#### + 0 +|+*****G******F*########&&&&&#====&#########===###&&&&&&%# + z &|&&&&&&##&&&&##**************G************************#&&&& + -5 +|+#########%&&&&&&&&&&====&&###&&&&&&############===#******G + -10 +|+############%%%%%%%%%%%#########%%&&&&&&&&&&&&&&&=======# + -15 +|------------------------------------------------------------ + -20 +-+#######+#########+#########+#########+#########+######## + + 0 2 4 6 8 10 12 + |-----------------------------------------------------------| + 0.8 +|+ + + + + + +-+| + 0.7 +|+ + **F* + + + + +-+| + 0.6 +|+#########**##****######################################+-+| + 0.5 +|+########**######***####################################+-+| + EI 0.4 +|+#****##**##########**###############********###########+-+| + 0.3 +|+**##*##*############**############***######****########+-+| + 0.2 +|**####**##############**#########**############***######+-+| + 0.1 +|-----------------------------------------------------------| + 0 ***#####**+#########+######*******######+#########+##******** + 0 2 4 6 8 10 12 + x + line 0: warning: iconv failed to convert degree sign + + | + 15 +|+ + 10 +|+ #### #####%%%%%%###### + 5 +|+%%%%###########%&&&&&&&%#######%=======F===&&&&&&%%%#### + 0 +|+*****G******G***&#####&&&&&#====&#########===###&&&&&&%# + z &|&&&&&&##%&&&&&==************G************************#&&&& + -5 +|+###############%&&&&====&&###&&&&&&############===#******G + -10 +|+################################%%&&&&&&&&&&&&&&&=======# + -15 +|------------------------------------------------------------ + -20 +-+#######+#########+#########+#########+#########+######## + + 0 2 4 6 8 10 12 + |-----------------------------------------------------------| + 0.5 +|+ + + + + + +-+| + +| + + + + + +| + 0.4 +|+#***###############################****F****###########+-+| + 0.3 +|+#*#**###*########****#############**#######***#########+-+| + EI #|#*###*##***######**##**###########**##########***######## | + 0.2 +|+*###****#*#####**####**#########**#############**######+-+| + 0.1 +|**####**###*###**######**#######**###############**#####+-+| + +|-----------------------------------------------------------| + 0 ***#####*#+###***###+######*******######+#########+###******* + 0 2 4 6 8 10 12 + x + line 0: warning: iconv failed to convert degree sign + + | + 15 +|+ ### + 10 +|+ #%%%%%# #%&&&&%%%## + #|#################%%%%%%#########&&===***G***##&&&&&%%#### + 5 +|+&&&&&&&&&&&&#&&&&&&&&&&&&%###&==*****&&%&=F****##&&&&%## + z 0 +|+*****G******G***********&&*G*****#&&&%####&===#****#&&&% + -5 +|+&&&%#########%&========****=&&&&&&%%########%===##******&% + #|################%%&&&&&&&&%####################%===&&&&&**G + -10 +|------------------------------------------------------------ + -15 +-+#######+#########+#########+#########+#########+######## + + 0 2 4 6 8 10 12 + |-----------------------------------------------------------| + 0.4 +|+ + + + + + +-+| + 0.35 +|+ + + + + F + +-+| + 0.3 +|+#########################################***###########+-+| + 0.25 +|+####################################***#**#**##########+-+| + EI 0.2 +|+###################################**#*#*###**#########+-+| + 0.15 +|+###################################*###**####**########+-+| + 0.1 +|+##################################*####**#####**#######+-+| + 0.05 +|-----------------------------------------------------------| + 0 ************************************####+#*#######+#********* + 0 2 4 6 8 10 12 + x + line 0: warning: iconv failed to convert degree sign + + | + 15 +|+ + 10 +|+ #%&&&&% + #|#################%%%%%%########%&&==**F*G*=############## + 5 +|+&&&&&&&&&&&&#&&&&&&&&&&&%%###&=****&&&%#&*G*&&&&&&&%%### + z 0 +|+*****G******G*********##&&&G****&&&&#######*****###&&&&# + -5 +|+&&&%#########%&======******=&&&&&%##########%===*******&&% + #|################%%&&&&&&&&%####################%===&###***G + -10 +|------------------------------------------------------------ + -15 +-+#######+#########+#########+#########+#########+######## + + 0 2 4 6 8 10 12 + |-----------------------------------------------------------| + 0.8 +|+ + + + + + +-+| + 0.7 +|+ + + + F + +-+| + 0.6 +|+####################################***################+-+| + 0.5 +|+###################################**#*################+-+| + EI 0.4 +|+###################################*###*###############+-+| + 0.3 +|+##################################**###*###############+-+| + 0.2 +|+##################################*####*###############+-+| + 0.1 +|-----------------------------------------------------------| + 0 ************************************####+#******************* + 0 2 4 6 8 10 12 + x + line 0: warning: iconv failed to convert degree sign + + | + 10 +|+ ##%&&& + | #### #%%%%%%## %&&=**FG*G** ####### + 5 +|+&&&&&&&&&&&%#%&&&&&&&&&&%####&=***&&####%*G*&&&&&&&%%### + 0 +|+*****G******G*****#####&&&&%****&&%########****###&&&&%# + z #|&&&&&####%%%##&===**********G*&&&%###########&==*****#&&&% + -5 +|+##############%&&&&======&&##################%===##******G + -10 +|+#################%%&&&&%%######################%====&&==== + +|------------------------------------------------------------ + -15 +-+#######+#########+#########+#########+#########+######## + + 0 2 4 6 8 10 12 + |-----------------------------------------------------------| + 0.06 +|+ + + + + + +-+| + 0.05 +|+ + + + + + +-+| + #|####################################*F################### | + 0.04 +|+##################################***##################+-+| + EI 0.03 +|+##################################*##*#################+-+| + 0.02 +|+##################################*##**################+-+| + #|##################################*###**################# | + 0.01 +|-----------------------------------------------------------| + 0 ************************************####********************* + 0 2 4 6 8 10 12 + x + line 0: warning: iconv failed to convert degree sign + + | + 10 +|+ + | #### #%%%%%%## %&&***GF*G** ####### + 5 +|+&&&&&&&&&&&%#%&&&&&&&&&&%####&=***&######*G*&&&&&&&%%### + 0 +|+*****G******G*****#####&&&&%****&##########****###&&&&%# + z #|&&&&&####%%%##&===**********G*&&%############&=******#&&&% + -5 +|+##############%&&&&======&&##################%===##******G + -10 +|+################%%&&&&&&%######################%====&&==== + +|------------------------------------------------------------ + -15 +-+#######+#########+#########+#########+#########+######## + + 0 2 4 6 8 10 12 + |-----------------------------------------------------------| + 0.03 +|+ + + + + + +-+| + 0.025 +|+ + + + + + +-+| + #|######################################F################## | + 0.02 +|+#####################################*#################+-+| + EI 0.015 +|+####################################**#################+-+| + 0.01 +|+####################################**#################+-+| + #|#####################################**################## | + 0.005 +|-----------------------------------------------------------| + 0 ************************************************************* + 0 2 4 6 8 10 12 + x + line 0: warning: iconv failed to convert degree sign + + | + 10 +|+ + | #### #%%%%%%## #&&***GF*G** ####### + 5 +|+&&&&&&&&&&&%#%&&&&&&&&&%%####&=***&######*G*&&&&&&&%%### + 0 +|+*****G******G*****#####&&&&%***&&##########****###&&&&%# + z #|&&&&&####%%%##&===**********G*&&%############&=******#&&&% + -5 +|+##############%&&&&======&&##################%===##******G + -10 +|+################%%&&&&&&%######################%====&&==== + +|------------------------------------------------------------ + -15 +-+#######+#########+#########+#########+#########+######## + + 0 2 4 6 8 10 12 + |-----------------------------------------------------------| + 0.006 +|+ + + + + + +-+| + 0.005 +|+ + + + F + +-+| + #|######################################*################## | + 0.004 +|+#####################################*#################+-+| + EI 0.003 +|+#####################################*#################+-+| + 0.002 +|+#####################################*#################+-+| + #|######################################*################## | + 0.001 +|-----------------------------------------------------------| + 0 *********************##************************************** + 0 2 4 6 8 10 12 + x + line 0: warning: iconv failed to convert degree sign + + | + 10 +|+ + | #### #%%%%%%## #&&***GG*G** ####### + 5 +|+&&&&&&&&&&&%#%&&&&&&&&&%%####&=***&######*G*&&&&&&&%%### + 0 +|+*****G******G*****#####&&&&%***&&##########****###&&&&%# + z #|&&&&&####%%%##&===**F*******G*&&#############&=******#&&&% + -5 +|+##############%&&&&======&&##################%===##******G + -10 +|+################%%&&&&&&%######################%====&&==== + +|------------------------------------------------------------ + -15 +-+#######+#########+#########+#########+#########+######## + + 0 2 4 6 8 10 12 + |-----------------------------------------------------------| + 0.0007 +|+ + + + + + +-+| + 0.0006 +|+ + + + + + +-+| + 0.0005 +|+##################*F###################################+-+| + 0.0004 +|+##################***##################################+-+| +EI #|##################*##*################################### | + 0.0003 +|+#################*##*##################################+-+| + 0.0002 +|+#################*###*#################################+-+| + 0.0001 +|-----------------------------------------------------------| + 0 ********************+####***********#************************ + 0 2 4 6 8 10 12 + x + line 0: warning: iconv failed to convert degree sign + + | + 10 +|+ + | #### #&&F**GG*G** ####### + 5 +|+&&&&&&&&&&&&#################&****&######*G*&&&&&&&%%### + 0 +|+*****G******G**&&%####%%%%%&***&&##########****###&&&&%# + z #|&&&&&%########&*****G&&&****G*&%#############&=******#&&&% + -5 +|+###############&&&&*****=&&##################%===##******G + -10 +|+#####################%%%%######################%====&&==== + +|------------------------------------------------------------ + -15 +-+#######+#########+#########+#########+#########+######## + + 0 2 4 6 8 10 12 + |-----------------------------------------------------------| + 0.00016 +|+ + + + + + +-+| + 0.00014 +|+ + + + + + +-+| + 0.00012 +|+################################*F#####################+-+| + 0.0001 +|+################################**#####################+-+| + 8e-05 +|+################################*#*####################+-+| + 6e-05 +|+################################*#*####################+-+| + 4e-05 +|+################################*#*#############**#####+-+| + 2e-05 +|-----------------------------------------------------------| + 0 ***********************************##**************###******* + 0 2 4 6 8 10 12 + x + : x z + x0(001) : 0.00000 0.00000 + x0(002) : 6.00000 -1.67649 + x0(003) : 12.00000 -6.43888 + xg(057) : 1.68421 1.67339 + xg(099) : 2.94737 0.56886 + xg(282) : 8.45113 6.98861 + xg(299) : 8.96241 3.99788 + xg(268) : 8.03008 7.90589 + xg(258) : 7.72932 7.66935 + xg(265) : 7.93985 7.91060 + xg(266) : 7.96992 7.91642 + xg(145) : 4.33083 -4.01937 + +Number of evaluations: 3 + 9 = 12. + +1 test, 1 passed, 0 known failure, 0 skipped +[inst/examples/02_design_of_experiments/stk_example_doe02.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/examples/02_design_of_experiments/stk_example_doe02.m +***** test stk_example_doe02; close all; + +#=========================# +# stk_example_doe02 # +#=========================# + +'stk_example_doe02' is a script from the file /build/reproducible-path/octave-stk-2.8.1/debian/octave-stk/usr/share/octave/packages/stk-2.8.1/examples/02_design_of_experiments/stk_example_doe02.m + + STK_EXAMPLE_DOE02 "Sequential Maximin" design + + In this example, a two-dimensional space-filling design is progressively + enriched with new points using a "sequential maximin" approach. More + precisely, the k-th point X(k, :) is selected to maximize the distance to the + set of all previously selected points X(1, :), X(2, :), ..., X(k-1, :). + + NOTES: + + * The resulting design is NOT optimal with respect to the maximin criterion + (separation distance). + + * This procedure is not truly a *sequential* design procedure, since the + choice of the k-th point X(k, :) does NOT depend on the response at the + previously selected locations X(i, :), i < k. + + REFERENCE + + [1] Emmanuel Vazquez and Julien Bect, "Sequential search based on kriging: + convergence analysis of some algorithms", In: ISI - 58th World + Statistics Congress of the International Statistical Institute (ISI'11), + Dublin, Ireland, August 21-26, 2011. + + +Additional help for built-in functions and operators is +available in the online version of the manual. Use the command +'doc ' to search the manual index. + +Help and information about Octave is also available on the WWW +at https://www.octave.org and via the help@octave.org +mailing list. + line 0: warning: iconv failed to convert degree sign + +gnuplot> " font ":Bold,10" textcolor rgb " + ^ + line 0: invalid command + + + + |----------------------n = 10, fd = 3.72e-01-------------------------| + 1 +|+ + + + F + +-F| + +| + + + + +| + #|################################################################### | + #|##########F######################################################## | + 0.8 +|+#################################################################+-+| + #|################################################F################## | + #|################################F################################## | + 0.6 +|+#################################################################+-+| + #|################################################################### | + F|################################################################### | + #|#################################################################F# | + 0.4 +|+#############F###################################################+-+| + #|################################################################### | + #|#####################################F############################# | + 0.2 +|+#################################################################+-+| + #|################################################################### | + #|####################F############################################## | + +|---------------------------------------------------------------------| + 0 +-+###########+#############+#############+#############+###########+-+ + 0 0.2 0.4 0.6 0.8 1 + + line 0: warning: iconv failed to convert degree sign + +gnuplot> " font ":Bold,10" textcolor rgb " + ^ + line 0: invalid command + + + + |----------------------n = 11, fd = 3.32e-01-------------------------| + 1 +|+ + + + F + +-F| + +| + + + + +| + #|################################################################### | + #|##########F######################################################## | + 0.8 +|+#################################################################+-+| + #|################################################F################## | + #|################################F################################## | + 0.6 +|+#################################################################+-+| + #|################################################################### | + F|################################################################### | + #|#################################################################F# | + 0.4 +|+#############F###################################################+-+| + #|################################################################### | + #|#####################################F############################# | + 0.2 +|+#################################################################+-+| + #|################################################################### | + #|####################F############################################## | + +|---------------------------------------------------------------------| + 0 F-+###########+#############+#############+#############+###########+-+ + 0 0.2 0.4 0.6 0.8 1 + + line 0: warning: iconv failed to convert degree sign + +gnuplot> " font ":Bold,10" textcolor rgb " + ^ + line 0: invalid command + + + + |----------------------n = 12, fd = 2.76e-01-------------------------| + 1 +|+ + + + F + +-F| + +| + + + + +| + #|################################################################### | + #|##########F######################################################## | + 0.8 +|+#################################################################+-+| + #|################################################F################## F| + #|################################F################################## | + 0.6 +|+#################################################################+-+| + #|################################################################### | + F|################################################################### | + #|#################################################################F# | + 0.4 +|+#############F###################################################+-+| + #|################################################################### | + #|#####################################F############################# | + 0.2 +|+#################################################################+-+| + #|################################################################### | + #|####################F############################################## | + +|---------------------------------------------------------------------| + 0 F-+###########+#############+#############+#############+###########+-+ + 0 0.2 0.4 0.6 0.8 1 + + line 0: warning: iconv failed to convert degree sign + +gnuplot> " font ":Bold,10" textcolor rgb " + ^ + line 0: invalid command + + + + |----------------------n = 13, fd = 2.73e-01-------------------------| + 1 +|+ + + + F + +-F| + +| + + + + +| + #|################################################################### | + #|##########F######################################################## | + 0.8 +|+#################################################################+-+| + #|################################################F################## F| + #|################################F################################## | + 0.6 +|+#################################################################+-+| + #|################################################################### | + F|################################################################### | + #|#################################################################F# | + 0.4 +|+#############F###################################################+-+| + #|################################################################### | + #|#####################################F############################# | + 0.2 +|+#################################################################+-+| + #|################################################################### | + #|####################F############################################## | + +|---------------------------------------------------------------------| + 0 F-+###########+#############+#############F#############+###########+-+ + 0 0.2 0.4 0.6 0.8 1 + + line 0: warning: iconv failed to convert degree sign + +gnuplot> " font ":Bold,10" textcolor rgb " + ^ + line 0: invalid command + + + + |----------------------n = 14, fd = 2.63e-01-------------------------| + 1 +|+ + F + + F + +-F| + +| + + + + +| + #|################################################################### | + #|##########F######################################################## | + 0.8 +|+#################################################################+-+| + #|################################################F################## F| + #|################################F################################## | + 0.6 +|+#################################################################+-+| + #|################################################################### | + F|################################################################### | + #|#################################################################F# | + 0.4 +|+#############F###################################################+-+| + #|################################################################### | + #|#####################################F############################# | + 0.2 +|+#################################################################+-+| + #|################################################################### | + #|####################F############################################## | + +|---------------------------------------------------------------------| + 0 F-+###########+#############+#############F#############+###########+-+ + 0 0.2 0.4 0.6 0.8 1 + + line 0: warning: iconv failed to convert degree sign + +gnuplot> " font ":Bold,10" textcolor rgb " + ^ + line 0: invalid command + + + + |----------------------n = 15, fd = 2.60e-01-------------------------| + 1 +|+ + F + + F + +-F| + +| + + + + +| + #|################################################################### | + #|##########F######################################################## | + 0.8 +|+#################################################################+-+| + #|################################################F################## F| + #|################################F################################## | + 0.6 +|+#################################################################+-+| + #|################################################################### | + F|###############################################F################### | + #|#################################################################F# | + 0.4 +|+#############F###################################################+-+| + #|################################################################### | + #|#####################################F############################# | + 0.2 +|+#################################################################+-+| + #|################################################################### | + #|####################F############################################## | + +|---------------------------------------------------------------------| + 0 F-+###########+#############+#############F#############+###########+-+ + 0 0.2 0.4 0.6 0.8 1 + + line 0: warning: iconv failed to convert degree sign + +gnuplot> " font ":Bold,10" textcolor rgb " + ^ + line 0: invalid command + + + + |----------------------n = 16, fd = 2.54e-01-------------------------| + 1 F|+ + F + + F + +-F| + +| + + + + +| + #|################################################################### | + #|##########F######################################################## | + 0.8 +|+#################################################################+-+| + #|################################################F################## F| + #|################################F################################## | + 0.6 +|+#################################################################+-+| + #|################################################################### | + F|###############################################F################### | + #|#################################################################F# | + 0.4 +|+#############F###################################################+-+| + #|################################################################### | + #|#####################################F############################# | + 0.2 +|+#################################################################+-+| + #|################################################################### | + #|####################F############################################## | + +|---------------------------------------------------------------------| + 0 F-+###########+#############+#############F#############+###########+-+ + 0 0.2 0.4 0.6 0.8 1 + + line 0: warning: iconv failed to convert degree sign + +gnuplot> " font ":Bold,10" textcolor rgb " + ^ + line 0: invalid command + + + + |----------------------n = 17, fd = 2.51e-01-------------------------| + 1 F|+ + F + + F + +-F| + +| + + + + +| + #|################################################################### | + #|##########F######################################################## | + 0.8 +|+#################################################################+-+| + #|################################################F################## F| + #|################################F################################## | + 0.6 +|+#################################################################+-+| + #|################################################################### | + F|###############################################F################### | + #|#################################################################F# | + 0.4 +|+#############F###################################################+-+| + #|################################################################### | + F|#####################################F############################# | + 0.2 +|+#################################################################+-+| + #|################################################################### | + #|####################F############################################## | + +|---------------------------------------------------------------------| + 0 F-+###########+#############+#############F#############+###########+-+ + 0 0.2 0.4 0.6 0.8 1 + + line 0: warning: iconv failed to convert degree sign + +gnuplot> " font ":Bold,10" textcolor rgb " + ^ + line 0: invalid command + + + + |----------------------n = 18, fd = 2.36e-01-------------------------| + 1 F|+ + F + + F + +-F| + +| + + + + +| + #|################################################################### | + #|##########F######################################################## | + 0.8 +|+#################################################################+-+| + #|################################################F################## F| + #|################################F################################## | + 0.6 +|+###############F#################################################+-+| + #|################################################################### | + F|###############################################F################### | + #|#################################################################F# | + 0.4 +|+#############F###################################################+-+| + #|################################################################### | + F|#####################################F############################# | + 0.2 +|+#################################################################+-+| + #|################################################################### | + #|####################F############################################## | + +|---------------------------------------------------------------------| + 0 F-+###########+#############+#############F#############+###########+-+ + 0 0.2 0.4 0.6 0.8 1 + + line 0: warning: iconv failed to convert degree sign + +gnuplot> " font ":Bold,10" textcolor rgb " + ^ + line 0: invalid command + + + + |----------------------n = 19, fd = 2.34e-01-------------------------| + 1 F|+ + F + + F + +-F| + +| + + + + +| + #|################################################################### | + #|##########F######################################################## | + 0.8 +|+#################################################################+-+| + #|################################################F################## F| + #|################################F################################## | + 0.6 +|+###############F#################################################+-+| + #|################################################################### | + F|###############################################F################### | + #|#################################################################F# | + 0.4 +|+#############F###################################################+-+| + #|################################################################### | + F|#####################################F################F############ | + 0.2 +|+#################################################################+-+| + #|################################################################### | + #|####################F############################################## | + +|---------------------------------------------------------------------| + 0 F-+###########+#############+#############F#############+###########+-+ + 0 0.2 0.4 0.6 0.8 1 + +1 test, 1 passed, 0 known failure, 0 skipped +[inst/examples/02_design_of_experiments/stk_example_doe04.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/examples/02_design_of_experiments/stk_example_doe04.m +***** test stk_example_doe04; close all; + +#=========================# +# stk_example_doe04 # +#=========================# + +'stk_example_doe04' is a script from the file /build/reproducible-path/octave-stk-2.8.1/debian/octave-stk/usr/share/octave/packages/stk-2.8.1/examples/02_design_of_experiments/stk_example_doe04.m + + STK_EXAMPLE_DOE04 Probability of misclassification + + The upper panel shows posterior means and variances as usual, and the + threshold of interest, which is at T = 0.85 (dashed line). + + The lower panel shows the probability of misclassification as a function of x + (blue curve), i.e., the probability that the actual value of the function is + not on the same side of the threshold as the prediction (posterior mean). + + We also plot the expected future probability of misclassification (magenta + curve), should a new evaluation be made at x = 3. + + Note that both probabilities are obtained using stk_pmisclass. + + +Additional help for built-in functions and operators is +available in the online version of the manual. Use the command +'doc ' to search the manual index. + +Help and information about Octave is also available on the WWW +at https://www.octave.org and via the help@octave.org +mailing list. +1 test, 1 passed, 0 known failure, 0 skipped [inst/examples/02_design_of_experiments/stk_example_doe06.m] >>>>> /build/reproducible-path/octave-stk-2.8.1/inst/examples/02_design_of_experiments/stk_example_doe06.m ***** test stk_example_doe06; close all; @@ -6172,7 +6085,7 @@ Help and information about Octave is also available on the WWW at https://www.octave.org and via the help@octave.org mailing list. -Volume (reference value): 20.24% +Volume (reference value): 19.89% data_init = <4x2 stk_dataframe array> @@ -6209,8 +6122,8 @@ Iteration #1 | Current sample size: n = 4 -| Volume estimate (plugin): 0.00000 [ref: 0.20240] -| Upper-bound on posterior std: 4.1117e-01 [target: 5.000e-04] +| Volume estimate (plugin): 0.00000 [ref: 0.19890] +| Upper-bound on posterior std: 4.1010e-01 [target: 5.000e-04] line 0: warning: iconv failed to convert degree sign | @@ -6238,8 +6151,8 @@ x Iteration #2 | Current sample size: n = 5 -| Volume estimate (plugin): 0.00000 [ref: 0.20240] -| Upper-bound on posterior std: 3.0415e-01 [target: 5.000e-04] +| Volume estimate (plugin): 0.00000 [ref: 0.19890] +| Upper-bound on posterior std: 3.0418e-01 [target: 5.000e-04] line 0: warning: iconv failed to convert degree sign | @@ -6256,19 +6169,19 @@ |-----------------------------------------------------------| 0.25 +|+ + + **F* + + +-+| +| + + *** *** + + | - 0.2 +|+######################**######**#######################+-+| + 0.2 +|+######################**######***######################+-+| 0.15 +|+########*****########**#########*###########*****######+-+| #|########**###**#######*##########**########***###***##### | 0.1 +|**#####**#####*######**###########**######**#######**###+-+| 0.05 +|***####*######**#####*#############*#####**#########**##+-+| +|-----------------------------------------------------------| - 0 **+#*****###+#####*****#+###########+#******####+########**** + 0 **+##****###+#####*****#+###########+#******####+########**** 0 0.2 0.4 0.6 0.8 x Iteration #3 | Current sample size: n = 6 -| Volume estimate (plugin): 0.10850 [ref: 0.20240] -| Upper-bound on posterior std: 2.8251e-01 [target: 5.000e-04] +| Volume estimate (plugin): 0.10320 [ref: 0.19890] +| Upper-bound on posterior std: 2.8320e-01 [target: 5.000e-04] line 0: warning: iconv failed to convert degree sign | @@ -6296,14 +6209,14 @@ x Iteration #4 | Current sample size: n = 7 -| Volume estimate (plugin): 0.11690 [ref: 0.20240] -| Upper-bound on posterior std: 2.1250e-01 [target: 5.000e-04] +| Volume estimate (plugin): 0.10920 [ref: 0.19890] +| Upper-bound on posterior std: 2.1442e-01 [target: 5.000e-04] line 0: warning: iconv failed to convert degree sign | 2 +|+ ####### 1 +|+ #%%%%%%%%%%# - 0 +|+######################F################################### + 0 +|+#############################F############################ -1 +|+&&&&*************G**=&#######%==*****G*****#######====&&&& z #|########%&&&&&&&#######################&&&&***************G -2 +|+########################################%&&&&&######&&&&# @@ -6312,7 +6225,7 @@ -5 +-+#########+###########+###########+###########+########## 0 0.2 0.4 0.6 0.8 |-----------------------------------------------------------| - 0.5 +|+ + +F * + + +-+| + 0.5 +|+ + +* F + + +-+| +| + +* * + + | 0.4 +|+######################*#####**#########################+-+| 0.3 +|+######################*#####***########################+-+| @@ -6325,37 +6238,37 @@ x Iteration #5 | Current sample size: n = 8 -| Volume estimate (plugin): 0.09700 [ref: 0.20240] -| Upper-bound on posterior std: 1.8558e-01 [target: 5.000e-04] +| Volume estimate (plugin): 0.08600 [ref: 0.19890] +| Upper-bound on posterior std: 1.9273e-01 [target: 5.000e-04] line 0: warning: iconv failed to convert degree sign | - 4 +|+ - | - 2 +|+###########################################%%%%%%%%%%### - 0 +|+############################F############################# - z #|%%%##%&&&&&*******G*=##########&==****G*******************G - -2 +|+########################################&&&&&&&###&&&&&&& - -4 +|+############################################%%%&&&&%%%## - +|------------------------------------------------------------ - -6 +-+#########+###########+###########+###########+########## + 3 +|+ + 2 +|+ ######## + 1 +|+##########################################%%%&&&&&&%%### + 0 +|+#######################F################################## + z &|&&**G*************G****&######********G**************==&&&# + -1 +|+#######&&&&&&&&%##################%%##%&&&&&#######******G + -2 +|+#########################################%%&&&&&&&&&&&&&% + -3 +|------------------------------------------------------------ + -4 +-+#########+###########+###########+###########+########## 0 0.2 0.4 0.6 0.8 |-----------------------------------------------------------| - 0.5 +|+ + + * F + + +-+| + 0.5 +|+ + + F * + + +-+| +| + + * * + + | - 0.4 +|+#######################*####*##########################+-+| - 0.3 +|+#######################*####**#########################+-+| -criterion #|########################*####**########################## | - 0.2 +|+#######################*####**#########################+-+| - 0.1 +|+#######################*####***########################+-+| + 0.4 +|+######################**####*##########################+-+| + 0.3 +|+######################**####*##########################+-+| +criterion #|#######################**####*########################### | + 0.2 +|+######################**####*#################**#######+-+| + 0.1 +|**#####################**####*##############*********###+-+| +|-----------------------------------------------------------| - 0 **+#******##+#******************###***********##+######****** + 0 **+#******##+#***********#*******************###+#######***** 0 0.2 0.4 0.6 0.8 x Iteration #6 | Current sample size: n = 9 -| Volume estimate (plugin): 0.08750 [ref: 0.20240] -| Upper-bound on posterior std: 1.7262e-01 [target: 5.000e-04] +| Volume estimate (plugin): 0.08370 [ref: 0.19890] +| Upper-bound on posterior std: 1.7664e-01 [target: 5.000e-04] line 0: warning: iconv failed to convert degree sign | @@ -6363,15 +6276,15 @@ 2 +|+ ######## 1 +|+###########################################%%&&&&&&%%### 0 +|+#######################F################################## - z &|&&**G*************G****#######********G*************===&&&# - -1 +|+#######%&&&&&&%###################%%##&&&&&#######*******G - -2 +|+#########################################%&&&&&&&&&&&&&&% + z &|&&**G*************G****#######********G**************==&&&# + -1 +|+#######%&&&&&&%###################%%##%&&&&&#######******G + -2 +|+#########################################%%&&&&&&&&&&&&&% -3 +|------------------------------------------------------------ -4 +-+#########+###########+###########+###########+########## 0 0.2 0.4 0.6 0.8 |-----------------------------------------------------------| - 0.5 +|+ + + F + + +-+| - +| + + * + + | + 0.5 +|+ + + F * + + +-+| + +| + + * * + + | 0.4 +|+#######################*####*##########################+-+| 0.3 +|+#######################*####*##########################+-+| criterion #|########################*####*########################### | @@ -6383,8 +6296,8 @@ x Iteration #7 | Current sample size: n = 10 -| Volume estimate (plugin): 0.08870 [ref: 0.20240] -| Upper-bound on posterior std: 1.7204e-01 [target: 5.000e-04] +| Volume estimate (plugin): 0.08380 [ref: 0.19890] +| Upper-bound on posterior std: 1.7900e-01 [target: 5.000e-04] line 0: warning: iconv failed to convert degree sign | @@ -6392,9 +6305,9 @@ 2 +|+ ######## 1 +|+###########################################%%&&&&&&%%### 0 +|+############################F############################# - z &|&&**G*************G****#######********G*************===&&&# - -1 +|+#######%&&&&&&%###################%%##&&&&&#######*******G - -2 +|+#########################################%&&&&&&&&&&&&&&% + z &|&&**G*************G****#######********G**************==&&&# + -1 +|+#######%&&&&&&%###################%%##%&&&&&#######******G + -2 +|+#########################################%%&&&&&&&&&&&&&% -3 +|------------------------------------------------------------ -4 +-+#########+###########+###########+###########+########## 0 0.2 0.4 0.6 0.8 @@ -6412,17 +6325,17 @@ x Iteration #8 | Current sample size: n = 11 -| Volume estimate (plugin): 0.08920 [ref: 0.20240] -| Upper-bound on posterior std: 1.7896e-01 [target: 5.000e-04] +| Volume estimate (plugin): 0.08420 [ref: 0.19890] +| Upper-bound on posterior std: 1.8450e-01 [target: 5.000e-04] line 0: warning: iconv failed to convert degree sign | 3 +|+ 2 +|+ ######## - 1 +|+##########################################%%%&&&&&&%%### + 1 +|+##########################################%%&&&&&&&%%### 0 +|+########################################################## - z &|&&**G*************G****#######********G*********F****==&&&# - -1 +|+#######%&&&&&&%###################%%##%&&&&&#######******G + z &|&&**G*************G****#######********G*********F*****=&&&# + -1 +|+#######%&&&&&&%###################%%##%&&&&&########*****G -2 +|+##########################################%&&&&&&&&&&&&&# -3 +|------------------------------------------------------------ -4 +-+#########+###########+###########+###########+########## @@ -6430,37 +6343,37 @@ |-----------------------------------------------------------| 0.25 +|+ + + + + +-+| +| + + + + | - 0.2 +|+#######################################################+-+| - 0.15 +|+############################################***F**#####+-+| - #|############################################**####**##### | - 0.1 +|**#########################################**######***##+-+| - 0.05 +|***#####*****##############################*#########*##+-+| + 0.2 +|+##############################################*F#######+-+| + 0.15 +|+############################################******#####+-+| + #|############################################**####***#### | + 0.1 +|**#########################################**#######**##+-+| + 0.05 +|***#####****##############################**#########**#+-+| +|-----------------------------------------------------------| 0 **+#*****###+##******************************###+########**** 0 0.2 0.4 0.6 0.8 x Iteration #9 | Current sample size: n = 12 -| Volume estimate (plugin): 0.21110 [ref: 0.20240] -| Upper-bound on posterior std: 2.1524e-01 [target: 5.000e-04] +| Volume estimate (plugin): 0.21130 [ref: 0.19890] +| Upper-bound on posterior std: 2.1315e-01 [target: 5.000e-04] line 0: warning: iconv failed to convert degree sign | 1.5 +|+ 1 +|+ #### - #|###########################################%&&&%%&&&&&%## + #|###########################################%&&&%&&&&&&%## 0.5 +|+&&###%&&&&&&%%#########*G**G*###########%==****G***#&&%# - z 0 +|+###################################################F###### - -0.5 +|+&&&&&************G***%########***&&&%%****&&%####%==***&% + z 0 +|+###########################################F############## + -0.5 +|+&&&&&************G***&########***&&&%%****&&%####%==***&& #|######%&&&####&&&&##############&*****G*&&&%########===***# -1 +|------------------------------------------------------------ -1.5 +-+#########+###########+###########+###########+########### 0 0.2 0.4 0.6 0.8 |-----------------------------------------------------------| - 0.5 +|+ + + + * + *F +-+| - +| + + + **+ ** | - 0.4 +|+###########################################**#####**###+-+| - 0.3 +|+##########################################***#####***##+-+| + 0.5 +|+ + + + F + ** +-+| + +| + + + * + ** | + 0.4 +|+##########################################***#####**###+-+| + 0.3 +|+##########################################*#*#####***##+-+| criterion #|###########################################*#*####**#*### | 0.2 +|+##########################################*#*####*##*##+-+| 0.1 +|+#########################################**#**###*##**#+-+| @@ -6470,194 +6383,194 @@ x Iteration #10 | Current sample size: n = 13 -| Volume estimate (plugin): 0.19830 [ref: 0.20240] -| Upper-bound on posterior std: 1.4742e-01 [target: 5.000e-04] +| Volume estimate (plugin): 0.21170 [ref: 0.19890] +| Upper-bound on posterior std: 1.5459e-01 [target: 5.000e-04] line 0: warning: iconv failed to convert degree sign | - 1 +|+ #### - | ###### %&&*** - 0.5 +|+&%###%%&&&&&%##########*G**G############&&***&*G*####### - 0 +|+################################################F######### - z %|&&&*G********#====&****#######***&%####&**&&######**##### - -0.5 +|+#####&&&###******G*&###########***&&&G**&%#########G*&## - -1 +|+######%&&&&&&&&&################&=***=#############%***&& - +|------------------------------------------------------------ - -1.5 +-+#########+###########+###########+###########+########%%% + 1 +|+ + 0.5 +|+ #%%%%%# #G***G%%### + #|##########################################F################ + 0 +|+***G*****##=====%#&****#####*G**######%***######&****&&% + z -0.5 +|+&&%#&&&#*********G**&#########&***&&%G**&########%==***&% + -1 +|+######&&&&&&&&&&################&*****#############&==***& + #|#########%%%%%%######################################%===*G + -1.5 +|------------------------------------------------------------ + -2 +-+#########+###########+###########+###########+########## 0 0.2 0.4 0.6 0.8 |-----------------------------------------------------------| - 0.5 +|+ + + + * + F +-+| - +| + + + ** + * | - 0.4 +|+#########################################**#####*######+-+| - 0.3 +|+#########################################**#####*######+-+| -criterion #|##########################################**#####*####### | - 0.2 +|+#########################################**#####*######+-+| - 0.1 +|+########################################****####*######+-+| + 0.5 +|+ + + + F + * +-+| + +| + + + * + * | + 0.4 +|+#########################################*#######*#####+-+| + 0.3 +|+#########################################*#######*#####+-+| +criterion #|##########################################*######***##### | + 0.2 +|+#########################################*######*#*####+-+| + 0.1 +|+#########################################*######*#*####+-+| +|-----------------------------------------------------------| - 0 **+#******##+#******************************##*************** + 0 **+#******##+#**************************************##******* 0 0.2 0.4 0.6 0.8 x Iteration #11 | Current sample size: n = 14 -| Volume estimate (plugin): 0.19690 [ref: 0.20240] -| Upper-bound on posterior std: 1.3374e-01 [target: 5.000e-04] +| Volume estimate (plugin): 0.20880 [ref: 0.19890] +| Upper-bound on posterior std: 1.3704e-01 [target: 5.000e-04] line 0: warning: iconv failed to convert degree sign | 1 +|+ - | ###### #&&=*= - 0.5 +|+&%###%%&&&&&%##########*G**G############%&*****G*####### - 0 +|+##########################################F############### - z %|&&&*G********#====&****#######***&%####&**&&######**##### - -0.5 +|+#####&&&###******G*&###########****&&G**&##########G*%## - -1 +|+######%&&&&&&&&&################&=***=##############***&% - +|------------------------------------------------------------ - -1.5 +-+#########+###########+###########+###########+#########%% + 0.5 +|+ #%%%%%# G***G#### + #|##################################################F######## + 0 +|+***G*****##=====%#&****#####*G**#######***######&***&&&# + z -0.5 +|+&&%#&&&#*********G**&#########&***&&%G**#########%=****&% + -1 +|+######&&&&&&&&&&################&*****#############&==***& + #|#########%%%%%%######################################%===*G + -1.5 +|------------------------------------------------------------ + -2 +-+#########+###########+###########+###########+########## 0 0.2 0.4 0.6 0.8 |-----------------------------------------------------------| - 0.5 +|+ + + + *F + +-+| - +| + + + ** + | - 0.4 +|+#########################################**############+-+| - 0.3 +|+#########################################**############+-+| -criterion #|##########################################**############# | - 0.2 +|+#########################################**############+-+| - 0.1 +|+#########################################**############+-+| + 0.5 +|+ + + + * + F +-+| + +| + + + * + * | + 0.4 +|+#########################################*#######*#####+-+| + 0.3 +|+#########################################*######**#####+-+| +criterion #|##########################################*######**###### | + 0.2 +|+#########################################*######***####+-+| + 0.1 +|+#########################################*######*#*####+-+| +|-----------------------------------------------------------| - 0 **+#******##+#******************************##*************** + 0 **+#******##+#**************************************##******* 0 0.2 0.4 0.6 0.8 x Iteration #12 | Current sample size: n = 15 -| Volume estimate (plugin): 0.20240 [ref: 0.20240] -| Upper-bound on posterior std: 9.7503e-02 [target: 5.000e-04] +| Volume estimate (plugin): 0.19870 [ref: 0.19890] +| Upper-bound on posterior std: 9.7511e-02 [target: 5.000e-04] line 0: warning: iconv failed to convert degree sign | 1 +|+ - | ###### &*** - 0.5 +|+&%###%%&&&&&%##########*G**G##############***&*G*####### + | ###### *** + 0.5 +|+&%####%&&&&&%##########*G**G##############*G*&*G*####### 0 +|+#########################################F################ - z %|&&&*G********#====&****#######***&#####&**########**##### - -0.5 +|+#####&&&###******G*&###########***&&&G**###########G*### - -1 +|+######%&&&&&&&&&################&*****##############***&% + z %|&&&*G********#====&****#######***&#####&**########***&### + -0.5 +|+#####&&&###******G=&###########***&&&G**##########&**&&% + -1 +|+######%&&&&&&&&&################&*****#############&****& +|------------------------------------------------------------ - -1.5 +-+#########+###########+###########+###########+#########%% + -1.5 +-+#########+###########+###########+###########+########%%% 0 0.2 0.4 0.6 0.8 |-----------------------------------------------------------| - 0.5 +|+ + + + F + +-+| - +| + + + * + | - 0.4 +|+#########################################*#############+-+| - 0.3 +|+#########################################*#############+-+| -criterion #|##########################################*############## | - 0.2 +|+#########################################*#############+-+| - 0.1 +|+#########################################*#############+-+| + 0.5 +|+ + + + F + * +-+| + +| + + + * + * | + 0.4 +|+#########################################*######*######+-+| + 0.3 +|+#########################################*######*######+-+| +criterion #|##########################################*######*####### | + 0.2 +|+#########################################*######*######+-+| + 0.1 +|+#########################################*######*######+-+| +|-----------------------------------------------------------| 0 **+#******##+#*********************************************** 0 0.2 0.4 0.6 0.8 x Iteration #13 | Current sample size: n = 16 -| Volume estimate (plugin): 0.20240 [ref: 0.20240] -| Upper-bound on posterior std: 9.4405e-02 [target: 5.000e-04] +| Volume estimate (plugin): 0.19870 [ref: 0.19890] +| Upper-bound on posterior std: 9.6739e-02 [target: 5.000e-04] line 0: warning: iconv failed to convert degree sign | 1 +|+ - | ###### &*** - 0.5 +|+&%###%%&&&&&%##########*G**G##############***&*G*####### - 0 +|+F######################################################### - z %|&&&*G********#====&****#######***&#####&**########**##### - -0.5 +|+#####&&&###******G*&###########***&&&G**###########G*### - -1 +|+######%&&&&&&&&&################&*****##############***&% + | ###### *** + 0.5 +|+&%####%&&&&&%##########*G**G##############*G*&*G*####### + 0 +|+################################################F######### + z %|&&&*G********#====&****#######***&#####&**########***&### + -0.5 +|+#####&&&###******G=&###########***&&&G**##########&**&&% + -1 +|+######%&&&&&&&&&################&*****#############&****& +|------------------------------------------------------------ - -1.5 +-+#########+###########+###########+###########+#########%% + -1.5 +-+#########+###########+###########+###########+########%%% 0 0.2 0.4 0.6 0.8 |-----------------------------------------------------------| - 0.08 +|*F + + + + +-+| - +|** *** + + + | - 0.06 +|***#####*#**############################################+-+| - #|*#*####**##**############################################ | - 0.04 +|+#*####*####*####################################*######+-+| - #|##*####*####**###################################*####### | - 0.02 +|+#*###**#####*###################################*######+-+| + 0.5 +|+ + + + + +-+| + +| + + + + F | + 0.4 +|+################################################*######+-+| + 0.3 +|+################################################*######+-+| +criterion #|#################################################*####### | + 0.2 +|+################################################*######+-+| + 0.1 +|+################################################*######+-+| +|-----------------------------------------------------------| - 0 **+##****###+###********************************************* + 0 **+#******##+#*********************************************** 0 0.2 0.4 0.6 0.8 x Iteration #14 | Current sample size: n = 17 -| Volume estimate (plugin): 0.20240 [ref: 0.20240] -| Upper-bound on posterior std: 3.6803e-02 [target: 5.000e-04] +| Volume estimate (plugin): 0.19890 [ref: 0.19890] +| Upper-bound on posterior std: 9.4506e-02 [target: 5.000e-04] line 0: warning: iconv failed to convert degree sign | 1 +|+ - | &*** - 0.5 +|+########%%%%###########*G**G##############***&*G*####### - 0 +|+################################################F######### - z #|##&=G******###====&****#######***&#####&**########**##### - -0.5 +|+#####&&&#********G=&###########***&&&G**###########G*### - -1 +|+######%&&&&&&&&&################&*****##############***&% + | ###### *** + 0.5 +|+&%####%&&&&&%##########*G**G##############*G*&*G*####### + 0 +|+F######################################################### + z %|&&&*G********#====&****#######***&#####&**########***#### + -0.5 +|+#####&&&###******G=&###########***&&&G**##########&**&%# + -1 +|+######%&&&&&&&&&################&*****#############&***&& +|------------------------------------------------------------ - -1.5 +-+#########+###########+###########+###########+#########%% + -1.5 +-+#########+###########+###########+###########+########%%% 0 0.2 0.4 0.6 0.8 |-----------------------------------------------------------| - 0.06 +|+ + + + + +-+| - 0.05 +|+ + + + + +-+| - #|#################################################F####### | - 0.04 +|+################################################*######+-+| - 0.03 +|+################################################*######+-+| - 0.02 +|+#########**#####################################*######+-+| - #|########*****###########*########################*####### | - 0.01 +|-----------------------------------------------------------| - 0 ***********#+##********************************************** + 0.08 +|*F + + + + +-+| + +|** ** + + + | + 0.06 +|***#####****############################################+-+| + #|*#*#####*##**############################################ | + 0.04 +|+#*####**###*###########################################+-+| + #|##*####*####**########################################### | + 0.02 +|+#*###**#####*##########################################+-+| + +|-----------------------------------------------------------| + 0 **+##****###+###********************************************* 0 0.2 0.4 0.6 0.8 x Iteration #15 | Current sample size: n = 18 -| Volume estimate (plugin): 0.20240 [ref: 0.20240] -| Upper-bound on posterior std: 3.6690e-02 [target: 5.000e-04] +| Volume estimate (plugin): 0.19890 [ref: 0.19890] +| Upper-bound on posterior std: 3.6236e-02 [target: 5.000e-04] line 0: warning: iconv failed to convert degree sign | 1 +|+ - | &*** - 0.5 +|+########%%%%###########*G**G##############***&*G*####### + | *** + 0.5 +|+########%%%%###########*G**G##############*G*&*G*####### 0 +|+########################################################## - z #|##&=G******###====&****#######***&#####&**########**##### - -0.5 +|+#####&&&#F*******G=&###########***&&&G**###########G*### - -1 +|+######%&&&&&&&&&################&*****##############***&% + z #|##&=G******###====&****#######***&#####&**########***#### + -0.5 +|+#####&&&#F*******G=&###########***&&&G**##########&**&%# + -1 +|+######%&&&&&&&&&################&*****#############&***&& +|------------------------------------------------------------ - -1.5 +-+#########+###########+###########+###########+#########%% + -1.5 +-+#########+###########+###########+###########+########%%% 0 0.2 0.4 0.6 0.8 |-----------------------------------------------------------| - 0.03 +|+ + + + + +-+| - 0.025 +|+ + + + + +-+| - #|######################################################### | - 0.02 +|+########*F*############################################+-+| + 0.02 +|+ F* + + + +-+| + +| *** + + + | 0.015 +|+########*#**###########################################+-+| - 0.01 +|+#######**##**##########*###############################+-+| - #|########*####*##########*####*########################### | - 0.005 +|-----------------------------------------------------------| + #|#########*##*############################################ | + 0.01 +|+#######**##**##########################################+-+| + #|########*####*########################################### | + 0.005 +|+#######*####*##########################################+-+| + +|-----------------------------------------------------------| 0 **********##+###********************************************* 0 0.2 0.4 0.6 0.8 x Iteration #16 | Current sample size: n = 19 -| Volume estimate (plugin): 0.20240 [ref: 0.20240] -| Upper-bound on posterior std: 1.2041e-01 [target: 5.000e-04] +| Volume estimate (plugin): 0.19890 [ref: 0.19890] +| Upper-bound on posterior std: 1.2099e-01 [target: 5.000e-04] line 0: warning: iconv failed to convert degree sign | 1 +|+ - | &*** - 0.5 +|+#######%%#%%%##########*G**G##############***&*G*####### + | *** + 0.5 +|+#######%%#%%%##########*G**G##############*G*&*G*####### 0 +|+##########F############################################### - z #|##&*G**&&###&&****&****#######***&#####&**########**##### - -0.5 +|+#############%&&*G*&###########***&&&G**###########G*### - -1 +|+################################&*****##############***&% + z #|##&*G**&&###&&****&****#######***&#####&**########***#### + -0.5 +|+#############%&&*G*&###########***&&&G**##########&**&%# + -1 +|+################################&*****#############&***&& +|------------------------------------------------------------ - -1.5 +-+#########+###########+###########+###########+#########%% + -1.5 +-+#########+###########+###########+###########+########%%% 0 0.2 0.4 0.6 0.8 |-----------------------------------------------------------| 0.3 +|+ + + + + +-+| @@ -6665,168 +6578,133 @@ #|#########****############################################ | 0.2 +|+########****###########################################+-+| 0.15 +|+########****###########################################+-+| - 0.1 +|+#######*****###########################################+-+| - #|########*#*#**########################################### | + 0.1 +|+#######***#*###########################################+-+| + #|########*#*##*########################################### | 0.05 +|-----------------------------------------------------------| - 0 **********##*##********************************************** + 0 **********##*###********************************************* 0 0.2 0.4 0.6 0.8 x Iteration #17 | Current sample size: n = 20 -| Volume estimate (plugin): 0.20240 [ref: 0.20240] -| Upper-bound on posterior std: 1.3799e-02 [target: 5.000e-04] +| Volume estimate (plugin): 0.19890 [ref: 0.19890] +| Upper-bound on posterior std: 1.3107e-02 [target: 5.000e-04] line 0: warning: iconv failed to convert degree sign | 1 +|+ - | &*** - 0.5 +|+#######################*G**G##############***&*G*####### - 0 +|+#######################F################################## - z #|##&*G**&%####&****&****#######***&#####&**########**##### - -0.5 +|+##############%&*G*&###########***&&&G**###########G*### - -1 +|+################################&*****##############***&% - +|------------------------------------------------------------ - -1.5 +-+#########+###########+###########+###########+#########%% - 0 0.2 0.4 0.6 0.8 - |-----------------------------------------------------------| - 0.02 +|+ + + F + + +-+| - +| + + * + + | - 0.015 +|+#######################*###############################+-+| - #|########################*################################ | - 0.01 +|+########*##############*###############################+-+| - #|#########**#############*####*########################### | - 0.005 +|+#######***#############*####*##########################+-+| - +|-----------------------------------------------------------| - 0 ***********#************************************************* - 0 0.2 0.4 0.6 0.8 - x -Iteration #18 -| Current sample size: n = 21 -| Volume estimate (plugin): 0.20240 [ref: 0.20240] -| Upper-bound on posterior std: 1.3711e-02 [target: 5.000e-04] - line 0: warning: iconv failed to convert degree sign - - | - 1 +|+ - | &*** - 0.5 +|+#######################*G**G##############***&*G*####### + | *** + 0.5 +|+#######################*G**G##############*G*&*G*####### 0 +|+########F################################################# - z #|##&*G**&%####&****&****#######***&#####&**########**##### - -0.5 +|+##############%&*G*&###########***&&&G**###########G*### - -1 +|+################################&*****##############***&% + z #|##&*G**&%####&****&****#######***&#####&**########***#### + -0.5 +|+##############%&*G*&###########***&&&G**##########&**&%# + -1 +|+################################&*****#############&***&& +|------------------------------------------------------------ - -1.5 +-+#########+###########+###########+###########+#########%% + -1.5 +-+#########+###########+###########+###########+########%%% 0 0.2 0.4 0.6 0.8 |-----------------------------------------------------------| 0.01 +|+ + + + + +-+| +| F* + + + | - 0.008 +|+########**##################*##########################+-+| - 0.006 +|+########**##################*##########################+-+| - #|#########**##################*########################### | - 0.004 +|+#######***##################*##########################+-+| - 0.002 +|+#######*#*##################*##########################+-+| + 0.008 +|+########**#############################################+-+| + 0.006 +|+########**#############################################+-+| + #|#########**############################################## | + 0.004 +|+#######***#############################################+-+| + 0.002 +|+#######*#*#############################################+-+| +|-----------------------------------------------------------| 0 ***********#************************************************* 0 0.2 0.4 0.6 0.8 x -Iteration #19 -| Current sample size: n = 22 -| Volume estimate (plugin): 0.20240 [ref: 0.20240] -| Upper-bound on posterior std: 9.5912e-04 [target: 5.000e-04] - line 0: warning: iconv failed to convert degree sign - - | - 1 +|+ - | &*** - 0.5 +|+#######################*G**G##############***&*G*####### - 0 +|+############################F############################# - z #|##&*G**&#####&****&****#######***&#####&**########**##### - -0.5 +|+##############%&*G*&###########***&&&G**###########G*### - -1 +|+################################&*****##############***&% - +|------------------------------------------------------------ - -1.5 +-+#########+###########+###########+###########+#########%% - 0 0.2 0.4 0.6 0.8 - |-----------------------------------------------------------| - 0.008 +|+ + + F + + +-+| - +| + + * + + | - 0.006 +|+############################*##########################+-+| - #|#############################*########################### | - 0.004 +|+############################*##########################+-+| - #|#############################*########################### | - 0.002 +|+############################*##########################+-+| - +|-----------------------------------------------------------| - 0 ************************************************************* - 0 0.2 0.4 0.6 0.8 - x -Iteration #20 -| Current sample size: n = 23 -| Volume estimate (plugin): 0.20240 [ref: 0.20240] -| Upper-bound on posterior std: 4.0624e-04 [target: 5.000e-04] +Iteration #18 +| Current sample size: n = 21 +| Volume estimate (plugin): 0.19890 [ref: 0.19890] +| Upper-bound on posterior std: 4.2678e-04 [target: 5.000e-04] -history = <23x5 stk_dataframe array> +history = <21x5 stk_dataframe array> : x z vol_estim vol_err nmisclass initial design #1 : 0.000000 0.00000 NaN NaN NaN initial design #2 : 0.333333 -0.43063 NaN NaN NaN initial design #3 : 0.666667 -0.66886 NaN NaN NaN - initial design #4 : 1.000000 -1.20558 0.0000 -0.2024 2024 - MC point #06227 : 0.104171 -0.13302 0.0000 -0.2024 2024 - MC point #04745 : 0.497603 0.26504 0.1085 -0.0939 1663 - MC point #06577 : 0.446733 0.26148 0.1169 -0.0855 1409 - MC point #04277 : 0.419495 0.07488 0.0970 -0.1054 1216 - MC point #09590 : 0.520361 0.10047 0.0875 -0.1149 1149 - MC point #01773 : 0.429386 0.15232 0.0887 -0.1137 1137 - MC point #08018 : 0.514496 0.15113 0.0892 -0.1132 1132 - MC point #05841 : 0.828174 0.42922 0.2111 0.0087 703 - MC point #05293 : 0.892372 -0.41874 0.1983 -0.0041 41 - MC point #01402 : 0.853433 0.16161 0.1969 -0.0055 55 - MC point #09402 : 0.742499 0.21790 0.2024 0.0000 0 - MC point #08288 : 0.736596 0.14936 0.2024 0.0000 0 - MC point #05845 : 0.042004 0.00872 0.2024 0.0000 0 - MC point #00018 : 0.854257 0.15092 0.2024 0.0000 0 - MC point #06180 : 0.205726 0.14334 0.2024 0.0000 0 - MC point #01878 : 0.214859 0.13913 0.2024 0.0000 0 - MC point #03285 : 0.429058 0.14989 0.2024 0.0000 0 - MC point #05377 : 0.188702 0.11827 0.2024 0.0000 0 - MC point #03153 : 0.514629 0.15004 0.2024 0.0000 0 + initial design #4 : 1.000000 -1.20558 0.0000 -0.1989 1989 + MC point #02644 : 0.104201 -0.13304 0.0000 -0.1989 1989 + MC point #05075 : 0.497628 0.26491 0.1032 -0.0957 1695 + MC point #01432 : 0.446741 0.26152 0.1092 -0.0897 1397 + MC point #07514 : 0.530425 0.00296 0.0860 -0.1129 1173 + MC point #01532 : 0.426580 0.13121 0.0837 -0.1152 1152 + MC point #04330 : 0.429169 0.15071 0.0838 -0.1151 1151 + MC point #00085 : 0.514041 0.15484 0.0842 -0.1147 1147 + MC point #04712 : 0.826747 0.44031 0.2113 0.0124 632 + MC point #00777 : 0.767369 0.45014 0.2117 0.0128 128 + MC point #07813 : 0.735270 0.13345 0.2088 0.0099 99 + MC point #03057 : 0.863056 0.03063 0.1987 -0.0002 2 + MC point #03927 : 0.736659 0.15010 0.1987 -0.0002 2 + MC point #05576 : 0.853902 0.15554 0.1989 0.0000 0 + MC point #03320 : 0.041969 0.00877 0.1989 0.0000 0 + MC point #00386 : 0.205709 0.14334 0.1989 0.0000 0 + MC point #01422 : 0.214908 0.13907 0.1989 0.0000 0 + MC point #09515 : 0.188853 0.11866 0.1989 0.0000 0 Final result: -| Number of evaluations: 4 + 19 = 23. -| Volume estimate (plugin): 20.2400% [ref: 20.2400%] +| Number of evaluations: 4 + 17 = 21. +| Volume estimate (plugin): 19.8900% [ref: 19.8900%] 1 test, 1 passed, 0 known failure, 0 skipped -[inst/examples/02_design_of_experiments/stk_example_doe02.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/examples/02_design_of_experiments/stk_example_doe02.m -***** test stk_example_doe02; close all; +[inst/examples/02_design_of_experiments/stk_example_doe01.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/examples/02_design_of_experiments/stk_example_doe01.m +***** test stk_example_doe01; close all; #=========================# -# stk_example_doe02 # +# stk_example_doe01 # #=========================# -'stk_example_doe02' is a script from the file /build/reproducible-path/octave-stk-2.8.1/debian/octave-stk/usr/share/octave/packages/stk-2.8.1/examples/02_design_of_experiments/stk_example_doe02.m +'stk_example_doe01' is a script from the file /build/reproducible-path/octave-stk-2.8.1/debian/octave-stk/usr/share/octave/packages/stk-2.8.1/examples/02_design_of_experiments/stk_example_doe01.m - STK_EXAMPLE_DOE02 "Sequential Maximin" design + STK_EXAMPLE_DOE01 Examples of two-dimensional designs - In this example, a two-dimensional space-filling design is progressively - enriched with new points using a "sequential maximin" approach. More - precisely, the k-th point X(k, :) is selected to maximize the distance to the - set of all previously selected points X(1, :), X(2, :), ..., X(k-1, :). + All designs are constructed on the hyper-rectangle BOX = [0; 2] x [0; 4]. - NOTES: + Examples of the following designs are shown: + a) Regular grid --> stk_sampling_regulargrid, + b) "Maximin" latin hypercube sample --> stk_sampling_maximinlhs, + c) RR2-scrambled Halton sequence --> stk_sampling_halton_rr2, + d) Uniformly distributed random sample --> stk_sampling_randunif. - * The resulting design is NOT optimal with respect to the maximin criterion - (separation distance). - * This procedure is not truly a *sequential* design procedure, since the - choice of the k-th point X(k, :) does NOT depend on the response at the - previously selected locations X(i, :), i < k. +Additional help for built-in functions and operators is +available in the online version of the manual. Use the command +'doc ' to search the manual index. - REFERENCE +Help and information about Octave is also available on the WWW +at https://www.octave.org and via the help@octave.org +mailing list. +1 test, 1 passed, 0 known failure, 0 skipped +[inst/examples/01_kriging_basics/stk_example_kb05.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/examples/01_kriging_basics/stk_example_kb05.m +***** test stk_example_kb05; close all; - [1] Emmanuel Vazquez and Julien Bect, "Sequential search based on kriging: - convergence analysis of some algorithms", In: ISI - 58th World - Statistics Congress of the International Statistical Institute (ISI'11), - Dublin, Ireland, August 21-26, 2011. +#========================# +# stk_example_kb05 # +#========================# + +'stk_example_kb05' is a script from the file /build/reproducible-path/octave-stk-2.8.1/debian/octave-stk/usr/share/octave/packages/stk-2.8.1/examples/01_kriging_basics/stk_example_kb05.m + + STK_EXAMPLE_KB05 Generation of conditioned sample paths + + A Matern Gaussian process model is used, with constant but unknown mean + (ordinary kriging) and known covariance parameters. + + Given noiseless observations from the unknown function, a batch of conditioned + sample paths is drawn using the "conditioning by kriging" technique. In short, + this means that unconditioned sample path are simulated first (using + stk_generate_samplepaths), and then conditioned on the observations by kriging + (using stk_conditioning). + + Note: in this example, for pedagogical purposes, conditioned samplepaths are + simulated in two steps: first, unconditioned samplepaths are simulated; + second, conditioned samplepaths are obtained using conditioning by kriging. + In practice, these two steps can be carried out all at once using + stk_generate_samplepath (see, e.g., stk_example_kb09). + + See also: stk_generate_samplepaths, stk_conditioning, stk_example_kb09 Additional help for built-in functions and operators is @@ -6836,330 +6714,289 @@ Help and information about Octave is also available on the WWW at https://www.octave.org and via the help@octave.org mailing list. - line 0: warning: iconv failed to convert degree sign +1 test, 1 passed, 0 known failure, 0 skipped +[inst/examples/01_kriging_basics/stk_example_kb02n.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/examples/01_kriging_basics/stk_example_kb02n.m +***** test stk_example_kb02n; close all; -gnuplot> " font ":Bold,10" textcolor rgb " - ^ - line 0: invalid command +#=========================# +# stk_example_kb02n # +#=========================# - - - |----------------------n = 10, fd = 3.98e-01-------------------------| - 1 +|+ +F + + + +-+| - +| + + + + +| - #|################################################################### | - #|#######################################F########################### | - 0.8 +|+#########################################################F#######+-+| - #|################################################################### | - #|###########F####################################################### | - 0.6 +|+#################################################################+-+| - #|###########################################F####################### | - #|################################################################### | - #|################################################################### | - 0.4 +|F#################################################################+-+| - #|###############################F################################### | - #|################################################F################## | - 0.2 +|+#################################################################+-+| - #|################################################################### F| - #|################################################################### | - +|---------------------------------------------------------------------| - 0 F-+###########+#############+#############+#############+###########+-+ - 0 0.2 0.4 0.6 0.8 1 - - line 0: warning: iconv failed to convert degree sign +'stk_example_kb02n' is a script from the file /build/reproducible-path/octave-stk-2.8.1/debian/octave-stk/usr/share/octave/packages/stk-2.8.1/examples/01_kriging_basics/stk_example_kb02n.m -gnuplot> " font ":Bold,10" textcolor rgb " - ^ - line 0: invalid command + STK_EXAMPLE_KB02N Noisy ordinary kriging in 1D with parameter estimation - - - |----------------------n = 11, fd = 3.12e-01-------------------------| - 1 +|+ +F + + + +-+| - +| + + + + +| - #|################################################################### | - #|#######################################F########################### | - 0.8 +|+#########################################################F#######+-+| - #|################################################################### | - #|###########F####################################################### | - 0.6 +|+#################################################################+-+| - #|###########################################F####################### | - #|################################################################### F| - #|################################################################### | - 0.4 +|F#################################################################+-+| - #|###############################F################################### | - #|################################################F################## | - 0.2 +|+#################################################################+-+| - #|################################################################### F| - #|################################################################### | - +|---------------------------------------------------------------------| - 0 F-+###########+#############+#############+#############+###########+-+ - 0 0.2 0.4 0.6 0.8 1 - - line 0: warning: iconv failed to convert degree sign + This example shows how to estimate covariance parameters and compute + ordinary kriging predictions on a one-dimensional noisy dataset. -gnuplot> " font ":Bold,10" textcolor rgb " - ^ - line 0: invalid command + The model and data are the same as in stk_example_kb02, but this time the + parameters of the covariance function and the variance of the noise are + jointly estimated using the Restricted Maximum Likelihood (ReML) method. - - - |----------------------n = 12, fd = 2.93e-01-------------------------| - 1 +|+ +F + + + +-+| - +| + + + + +| - #|################################################################### | - #|#######################################F########################### | - 0.8 +|+#########################################################F#######+-+| - #|################################################################### | - #|###########F####################################################### | - 0.6 +|+#################################################################+-+| - #|###########################################F####################### | - #|################################################################### F| - #|################################################################### | - 0.4 +|F#################################################################+-+| - #|###############################F################################### | - #|################################################F################## | - 0.2 +|+#################################################################+-+| - #|################################################################### F| - #|################################################################### | - +|---------------------------------------------------------------------| - 0 F-+###########+#############+#############+##########F##+###########+-+ - 0 0.2 0.4 0.6 0.8 1 - - line 0: warning: iconv failed to convert degree sign + See also: stk_example_kb01n, stk_example_kb02 -gnuplot> " font ":Bold,10" textcolor rgb " - ^ - line 0: invalid command - - - |----------------------n = 13, fd = 2.78e-01-------------------------| - 1 +|+ +F + + + +-F| - +| + + + + +| - #|################################################################### | - #|#######################################F########################### | - 0.8 +|+#########################################################F#######+-+| - #|################################################################### | - #|###########F####################################################### | - 0.6 +|+#################################################################+-+| - #|###########################################F####################### | - #|################################################################### F| - #|################################################################### | - 0.4 +|F#################################################################+-+| - #|###############################F################################### | - #|################################################F################## | - 0.2 +|+#################################################################+-+| - #|################################################################### F| - #|################################################################### | - +|---------------------------------------------------------------------| - 0 F-+###########+#############+#############+##########F##+###########+-+ - 0 0.2 0.4 0.6 0.8 1 - - line 0: warning: iconv failed to convert degree sign +Additional help for built-in functions and operators is +available in the online version of the manual. Use the command +'doc ' to search the manual index. -gnuplot> " font ":Bold,10" textcolor rgb " - ^ - line 0: invalid command +Help and information about Octave is also available on the WWW +at https://www.octave.org and via the help@octave.org +mailing list. +model = - - - |----------------------n = 14, fd = 2.65e-01-------------------------| - 1 +|+ +F + + + +-F| - +| + + + + +| - #|################################################################### | - #|#######################################F########################### | - 0.8 +|+#########################################################F#######+-+| - #|################################################################### | - #|###########F####################################################### | - 0.6 +|+#################################################################+-+| - #|###########################################F####################### | - #|################################################################### F| - #|################################################################### | - 0.4 +|F#################################################################+-+| - #|###############################F################################### | - #|################################################F################## | - 0.2 +|+#################################################################+-+| - #|###########F####################################################### F| - #|################################################################### | - +|---------------------------------------------------------------------| - 0 F-+###########+#############+#############+##########F##+###########+-+ - 0 0.2 0.4 0.6 0.8 1 - - line 0: warning: iconv failed to convert degree sign + scalar structure containing the fields: -gnuplot> " font ":Bold,10" textcolor rgb " - ^ - line 0: invalid command + covariance_type = @stk_materncov_iso + lm = - - - |----------------------n = 15, fd = 2.54e-01-------------------------| - 1 +|+ +F + + + +-F| - +| + + + + +| - #|################################################################### | - F|#######################################F########################### | - 0.8 +|+#########################################################F#######+-+| - #|################################################################### | - #|###########F####################################################### | - 0.6 +|+#################################################################+-+| - #|###########################################F####################### | - #|################################################################### F| - #|################################################################### | - 0.4 +|F#################################################################+-+| - #|###############################F################################### | - #|################################################F################## | - 0.2 +|+#################################################################+-+| - #|###########F####################################################### F| - #|################################################################### | - +|---------------------------------------------------------------------| - 0 F-+###########+#############+#############+##########F##+###########+-+ - 0 0.2 0.4 0.6 0.8 1 - - line 0: warning: iconv failed to convert degree sign + -gnuplot> " font ":Bold,10" textcolor rgb " - ^ - line 0: invalid command + dim = 1 + param = - - - |----------------------n = 16, fd = 2.39e-01-------------------------| - 1 +|+ +F + + F + +-F| - +| + + + + +| - #|################################################################### | - F|#######################################F########################### | - 0.8 +|+#########################################################F#######+-+| - #|################################################################### | - #|###########F####################################################### | - 0.6 +|+#################################################################+-+| - #|###########################################F####################### | - #|################################################################### F| - #|################################################################### | - 0.4 +|F#################################################################+-+| - #|###############################F################################### | - #|################################################F################## | - 0.2 +|+#################################################################+-+| - #|###########F####################################################### F| - #|################################################################### | - +|---------------------------------------------------------------------| - 0 F-+###########+#############+#############+##########F##+###########+-+ - 0 0.2 0.4 0.6 0.8 1 - - line 0: warning: iconv failed to convert degree sign + -0.098610 + 2.302585 + 0.613435 -gnuplot> " font ":Bold,10" textcolor rgb " - ^ - line 0: invalid command + lognoisevariance = -3.0915 +True noise variance = 0.0400 +Estimated noise variance = 0.0454 + + line 0: warning: iconv failed to convert degree sign - |----------------------n = 17, fd = 2.39e-01-------------------------| - 1 +|+ +F + + F + +-F| - +| + + + + +| - #|################################################################### | - F|#######################################F########################### | - 0.8 +|+#########################################################F#######+-+| - #|################################################################### | - #|###########F################F###################################### | - 0.6 +|+#################################################################+-+| - #|###########################################F####################### | - #|################################################################### F| - #|################################################################### | - 0.4 +|F#################################################################+-+| - #|###############################F################################### | - #|################################################F################## | - 0.2 +|+#################################################################+-+| - #|###########F####################################################### F| - #|################################################################### | - +|---------------------------------------------------------------------| - 0 F-+###########+#############+#############+##########F##+###########+-+ - 0 0.2 0.4 0.6 0.8 1 + | True function and noisy observed data + 1.5 +|+ + | G ***** +--------------------+ + #|#######***##G##G**########################|***?***True function| + 1 +|+####G**#########**G######################+---G---Observations-+ + #|####**#############***######################################### + #|###**################**######################################## + 0.5 +|+#**##################G*##########################G#***######## + G|#**####################**########################****#G**G*##G# + #|*G######################**#####################***########***## + F1 0 *|+########################**###################**############*** + *|##########################**#################**G##############**G + #|###########################**G##############**#################** + -0.5 +|+#########################G#**#############**################## + #|#############################**###########*G################### + #|##############################***G######**##################### + -1 +|+###############################**#####*G###################### + #|#################################***G**######################## + +|------------------------------------------------------------------ + -1.5 +-+##############+###############+################+############## + + -1 -0.5 0 0.5 1 - line 0: warning: iconv failed to convert degree sign +1 test, 1 passed, 0 known failure, 0 skipped +[inst/examples/01_kriging_basics/stk_example_kb02.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/examples/01_kriging_basics/stk_example_kb02.m +***** test stk_example_kb02; close all; -gnuplot> " font ":Bold,10" textcolor rgb " - ^ - line 0: invalid command +#========================# +# stk_example_kb02 # +#========================# + +'stk_example_kb02' is a script from the file /build/reproducible-path/octave-stk-2.8.1/debian/octave-stk/usr/share/octave/packages/stk-2.8.1/examples/01_kriging_basics/stk_example_kb02.m + + STK_EXAMPLE_KB02 Ordinary kriging in 1D with parameter estimation + + This example shows how to estimate covariance parameters and compute + ordinary kriging predictions on a one-dimensional noiseless dataset. + + The model and data are the same as in stk_example_kb01, but this time the + parameters of the covariance function are estimated using the Restricted + Maximum Likelihood (ReML) method. + + See also: stk_example_kb01, stk_example_kb02n + + +Additional help for built-in functions and operators is +available in the online version of the manual. Use the command +'doc ' to search the manual index. +Help and information about Octave is also available on the WWW +at https://www.octave.org and via the help@octave.org +mailing list. +model = + + scalar structure containing the fields: + + covariance_type = @stk_materncov_iso + lm = + + + + dim = 1 + param = + + -0.2108 + 2.3026 + 0.7562 + + lognoisevariance = -Inf + + line 0: warning: iconv failed to convert degree sign - |----------------------n = 18, fd = 2.31e-01-------------------------| - 1 +|+ +F + + F + +-F| - +| + + + + +| - #|################################################################### | - F|#######################################F########################### | - 0.8 +|+#########################################################F#######+-+| - #|################################################################### | - #|###########F################F###################################### | - 0.6 +|+#################################################################+-+| - #|###########################################F####################### | - #|################################################################### F| - #|################F################################################## | - 0.4 +|F#################################################################+-+| - #|###############################F################################### | - #|################################################F################## | - 0.2 +|+#################################################################+-+| - #|###########F####################################################### F| - #|################################################################### | - +|---------------------------------------------------------------------| - 0 F-+###########+#############+#############+##########F##+###########+-+ - 0 0.2 0.4 0.6 0.8 1 + | True function and observed data + 1.5 +|+ + | ***G* +--------------------+ + #|#######***#####***########################|***?***True function| + 1 +|+#####**#########***######################+---G---Observations-+ + #|####**#############***######################################### + #|###**################**######################################## + 0.5 +|+#**##################**############################***######## + #|#G*####################**########################****##*G**#### + #|**######################**#####################G**########***## + F1 0 *|+########################**###################**############*** + G|##########################**#################**###############** + #|###########################**###############**#################** + -0.5 +|+###########################**#############**################## + #|#############################**###########*#################### + #|##############################*G*#######**##################### + -1 +|+###############################**#####**###################### + #|#################################******######################## + +|------------------------------------------------------------------ + -1.5 +-+##############+###############+################+############## + + -1 -0.5 0 0.5 1 - line 0: warning: iconv failed to convert degree sign +1 test, 1 passed, 0 known failure, 0 skipped +[inst/examples/01_kriging_basics/stk_example_kb06.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/examples/01_kriging_basics/stk_example_kb06.m +***** test stk_example_kb06; close all; -gnuplot> " font ":Bold,10" textcolor rgb " - ^ - line 0: invalid command +#========================# +# stk_example_kb06 # +#========================# +'stk_example_kb06' is a script from the file /build/reproducible-path/octave-stk-2.8.1/debian/octave-stk/usr/share/octave/packages/stk-2.8.1/examples/01_kriging_basics/stk_example_kb06.m + + STK_EXAMPLE_KB06 Ordinary kriging VS kriging with a linear trend + + The same dataset is analyzed using two variants of kriging. + + The left panel shows the result of ordinary kriging, in other words, Gaussian + process interpolation assuming a constant (but unknown) mean. The right panel + shows the result of adding a linear trend in the mean of the Gaussian process. + + The difference with the left plot is clear in extrapolation: the first predic- + tor exhibits a "mean reverting" behaviour, while the second one captures an + increasing trend in the data. + + +Additional help for built-in functions and operators is +available in the online version of the manual. Use the command +'doc ' to search the manual index. + +Help and information about Octave is also available on the WWW +at https://www.octave.org and via the help@octave.org +mailing list. +1 test, 1 passed, 0 known failure, 0 skipped +[inst/examples/01_kriging_basics/stk_example_kb07.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/examples/01_kriging_basics/stk_example_kb07.m +***** test stk_example_kb07; close all; + +#========================# +# stk_example_kb07 # +#========================# + +'stk_example_kb07' is a script from the file /build/reproducible-path/octave-stk-2.8.1/debian/octave-stk/usr/share/octave/packages/stk-2.8.1/examples/01_kriging_basics/stk_example_kb07.m + + STK_EXAMPLE_KB07 Simulation of sample paths from a Matern process + + +Additional help for built-in functions and operators is +available in the online version of the manual. Use the command +'doc ' to search the manual index. + +Help and information about Octave is also available on the WWW +at https://www.octave.org and via the help@octave.org +mailing list. + line 0: warning: iconv failed to convert degree sign - - |----------------------n = 19, fd = 2.27e-01-------------------------| - 1 +|+ +F + F + F + +-F| - +| + + + + +| - #|################################################################### | - F|#######################################F########################### | - 0.8 +|+#########################################################F#######+-+| - #|################################################################### | - #|###########F################F###################################### | - 0.6 +|+#################################################################+-+| - #|###########################################F####################### | - #|################################################################### F| - #|################F################################################## | - 0.4 +|F#################################################################+-+| - #|###############################F################################### | - #|################################################F################## | - 0.2 +|+#################################################################+-+| - #|###########F####################################################### F| - #|################################################################### | - +|---------------------------------------------------------------------| - 0 F-+###########+#############+#############+##########F##+###########+-+ - 0 0.2 0.4 0.6 0.8 1 - + |--Matern, nu = 0.5------| |--Matern, nu = 1.5------| + 4 +|+ + + + +-+| 3 +|+ %% + + +-+| + +| #+ @ + + +| 2 +|*****%% + + +==| + 2 *|********=@@#******#@$*&&| *|%%##**%%%%###@@@##&&&== | + #|************#########***| 1 *|***@@**####%@@#@===*####| +response z#|#########*####=*######*response z&|&####=##*=###*****##=#&&| + =|&#*##%######*****&***###| -1 =|###*###*****#######$$$**| + -2 +|%$$$%%%**$******#####**+| #|#====#***####**##******$| + +|------------------------| -2 +|------------------------| + -4 +-+###+######+#####+###+-+ -3 +-+###+######+#####+###+-+ + -1 -0.5 0 0.5 1 -1 -0.5 0 0.5 1 + |--Matern, nu = 2.5------| |--Matern, nu = 10.0-----| + 3 +|+ + *** + +-+| 3 +|+ + + + +-+| + 2 #|+#### **+** + +-*| 2 +|****** **** + *****| + #|#############********#**| @|#####****######$&&**&# *| + 1 #|*****#########@**%%%****| 1 &|&&&&***&@##@@@##&**=====| +response z*|%%%@*******###&===***==response z#|##########&&&&&##*==$$##| + -1 *|*&=**========###**@#####| -1 =|*****************##%%##*| + &|==**%%%%%%%#==*####### | %|#######$$#*******#####*%| + -2 *|------------------------| -2 +|------------------------| + -3 +-+###+######+#####+&&&&&+ -3 +-+###+######+#####+###+-+ + -1 -0.5 0 0.5 1 -1 -0.5 0 0.5 1 + input variable x input variable x 1 test, 1 passed, 0 known failure, 0 skipped -[inst/examples/02_design_of_experiments/stk_example_doe04.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/examples/02_design_of_experiments/stk_example_doe04.m -***** test stk_example_doe04; close all; +[inst/examples/01_kriging_basics/stk_example_kb03.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/examples/01_kriging_basics/stk_example_kb03.m +***** test stk_example_kb03; close all; -#=========================# -# stk_example_doe04 # -#=========================# +#========================# +# stk_example_kb03 # +#========================# -'stk_example_doe04' is a script from the file /build/reproducible-path/octave-stk-2.8.1/debian/octave-stk/usr/share/octave/packages/stk-2.8.1/examples/02_design_of_experiments/stk_example_doe04.m +'stk_example_kb03' is a script from the file /build/reproducible-path/octave-stk-2.8.1/debian/octave-stk/usr/share/octave/packages/stk-2.8.1/examples/01_kriging_basics/stk_example_kb03.m - STK_EXAMPLE_DOE04 Probability of misclassification + STK_EXAMPLE_KB03 Ordinary kriging in 2D - The upper panel shows posterior means and variances as usual, and the - threshold of interest, which is at T = 0.85 (dashed line). + An anisotropic Matern covariance function is used for the Gaussian Process + (GP) prior. The parameters of this covariance function (variance, regularity + and ranges) are estimated using the Restricted Maximum Likelihood (ReML) + method. - The lower panel shows the probability of misclassification as a function of x - (blue curve), i.e., the probability that the actual value of the function is - not on the same side of the threshold as the prediction (posterior mean). + The mean function of the GP prior is assumed to be constant and unknown. This + default choice can be overridden by means of the model.lm property. - We also plot the expected future probability of misclassification (magenta - curve), should a new evaluation be made at x = 3. + The function is sampled on a space-filling Latin Hypercube design, and the + data is assumed to be noiseless. - Note that both probabilities are obtained using stk_pmisclass. + +Additional help for built-in functions and operators is +available in the online version of the manual. Use the command +'doc ' to search the manual index. + +Help and information about Octave is also available on the WWW +at https://www.octave.org and via the help@octave.org +mailing list. + +BOX = 2-dimensional hyper-rectangle (stk_hrect object): + + : x_1 x_2 + lower_bounds : -5 0 + upper_bounds : 10 15 + +1 test, 1 passed, 0 known failure, 0 skipped +[inst/examples/01_kriging_basics/stk_example_kb08.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/examples/01_kriging_basics/stk_example_kb08.m +***** test stk_example_kb08; close all; + +#========================# +# stk_example_kb08 # +#========================# + +'stk_example_kb08' is a script from the file /build/reproducible-path/octave-stk-2.8.1/debian/octave-stk/usr/share/octave/packages/stk-2.8.1/examples/01_kriging_basics/stk_example_kb08.m + + STK_EXAMPLE_KB08 Generation of conditioned sample paths made easy + + It has been demonstrated, in stk_example_kb05, how to generate conditioned + sample paths using unconditioned sample paths and conditioning by kriging. + + This example shows how to do the same in a more concise way, letting STK + take care of the details. Additional help for built-in functions and operators is @@ -7170,28 +7007,32 @@ at https://www.octave.org and via the help@octave.org mailing list. 1 test, 1 passed, 0 known failure, 0 skipped -[inst/examples/02_design_of_experiments/stk_example_doe03.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/examples/02_design_of_experiments/stk_example_doe03.m -***** test stk_example_doe03; close all; +[inst/examples/01_kriging_basics/stk_example_kb01.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/examples/01_kriging_basics/stk_example_kb01.m +***** test stk_example_kb01; close all; -#=========================# -# stk_example_doe03 # -#=========================# +#========================# +# stk_example_kb01 # +#========================# -'stk_example_doe03' is a script from the file /build/reproducible-path/octave-stk-2.8.1/debian/octave-stk/usr/share/octave/packages/stk-2.8.1/examples/02_design_of_experiments/stk_example_doe03.m +'stk_example_kb01' is a script from the file /build/reproducible-path/octave-stk-2.8.1/debian/octave-stk/usr/share/octave/packages/stk-2.8.1/examples/01_kriging_basics/stk_example_kb01.m - STK_EXAMPLE_DOE03 A simple illustration of 1D Bayesian optimization + STK_EXAMPLE_KB01 Ordinary kriging in 1D, with noiseless data - Our goal here is to optimize (maximize) the one-dimensional function + This example shows how to compute ordinary kriging predictions on a + one-dimensional noiseless dataset. - x |--> x * sin (x) + The word 'ordinary' indicates that the mean function of the GP prior is + assumed to be constant and unknown. - over the interval [0; 4 * pi]. + A Matern covariance function is used for the Gaussian Process (GP) prior. + The parameters of this covariance function are assumed to be known (i.e., + no parameter estimation is performed here). - A Matern 5/2 prior with known parameters is used. + Note that the kriging predictor, which is the posterior mean of the GP, + interpolates the data in this noiseless example. - Evaluations points are chosen sequentially using the Expected Improvement (EI) - criterion, starting from an initial design of N0 = 3 points. + See also: stk_example_kb01n, stk_example_kb02 Additional help for built-in functions and operators is @@ -7201,273 +7042,453 @@ Help and information about Octave is also available on the WWW at https://www.octave.org and via the help@octave.org mailing list. +model = + + scalar structure containing the fields: + + covariance_type = @stk_materncov_iso + lm = + + + + dim = 1 + param = + + -0.6931 + 1.3863 + 0.9163 + + lognoisevariance = -Inf + line 0: warning: iconv failed to convert degree sign - | - 15 +|+ - 10 +|+ ####%%%%%%%%%%%##### ################ - 5 +|+%&&&&&&&&&&&&&&&&&&&&&&%#######%===========&&&&&%%%##### - 0 +|+*====F========########&&&&&#====&#########===##&&&&&&%%# - z &|&***************************G***********************##&&&& - -5 +|+&&&&&&##############====&&###&&&&&&############===*******G - -10 +|+###%%&&&&&&&&&&&&&&&&%%#########%%&&&&&&&&&&&&&&&=======# - -15 +|------------------------------------------------------------ - -20 +-+#######+#########+#########+#########+#########+######## + - 0 2 4 6 8 10 12 - |-----------------------------------------------------------| - 1 +|+ + + + + + +-+| - +| ***F******** + + + + +| - 0.8 +|+#**##########******####################################+-+| - 0.6 +|+*##################***############***********##########+-+| - EI #|*#####################**#########***#########***######### | - 0.4 +|*######################**#######**#############***######+-+| - 0.2 +|+#######################**#####**################**#####+-+| - *|-----------------------------------------------------------| - 0 *-+#######+#########+#######*****#######+#########+####****** - 0 2 4 6 8 10 12 - x - line 0: warning: iconv failed to convert degree sign - - | - 15 +|+ - 10 +|+ ##%%%%%%%%#### #####%%%%%%###### - 5 +|+%&&&%##%&&&&&&&&&&&&&&&%#######%===========&&&&&&%%%#### - 0 +|+*****G******F*########&&&&&#====&#########===###&&&&&&%# - z &|&&&&&&##&&&&##**************G************************#&&&& - -5 +|+#########%&&&&&&&&&&====&&###&&&&&&############===#******G - -10 +|+############%%%%%%%%%%%#########%%&&&&&&&&&&&&&&&=======# - -15 +|------------------------------------------------------------ - -20 +-+#######+#########+#########+#########+#########+######## + - 0 2 4 6 8 10 12 - |-----------------------------------------------------------| - 0.8 +|+ + + + + + +-+| - 0.7 +|+ + **F* + + + + +-+| - 0.6 +|+#########**##****######################################+-+| - 0.5 +|+########**######***####################################+-+| - EI 0.4 +|+#****##**##########**###############********###########+-+| - 0.3 +|+**##*##*############**############***######****########+-+| - 0.2 +|**####**##############**#########**############***######+-+| - 0.1 +|-----------------------------------------------------------| - 0 ***#####**+#########+######*******######+#########+##******** - 0 2 4 6 8 10 12 - x - line 0: warning: iconv failed to convert degree sign - - | - 15 +|+ - 10 +|+ #### #####%%%%%%###### - 5 +|+%%%%###########%&&&&&&&%#######%=======F===&&&&&&%%%#### - 0 +|+*****G******G***&#####&&&&&#====&#########===###&&&&&&%# - z &|&&&&&&##%&&&&&==************G************************#&&&& - -5 +|+###############%&&&&====&&###&&&&&&############===#******G - -10 +|+################################%%&&&&&&&&&&&&&&&=======# - -15 +|------------------------------------------------------------ - -20 +-+#######+#########+#########+#########+#########+######## + - 0 2 4 6 8 10 12 - |-----------------------------------------------------------| - 0.5 +|+ + + + + + +-+| - +| + + + + + +| - 0.4 +|+#***###############################****F****###########+-+| - 0.3 +|+#*#**###*########****#############**#######***#########+-+| - EI #|#*###*##***######**##**###########**##########***######## | - 0.2 +|+*###****#*#####**####**#########**#############**######+-+| - 0.1 +|**####**###*###**######**#######**###############**#####+-+| - +|-----------------------------------------------------------| - 0 ***#####*#+###***###+######*******######+#########+###******* - 0 2 4 6 8 10 12 - x - line 0: warning: iconv failed to convert degree sign - | - 15 +|+ ### - 10 +|+ #%%%%%# #%&&&&%%%## - #|#################%%%%%%#########&&===***G***##&&&&&%%#### - 5 +|+&&&&&&&&&&&&#&&&&&&&&&&&&%###&==*****&&%&=F****##&&&&%## - z 0 +|+*****G******G***********&&*G*****#&&&%####&===#****#&&&% - -5 +|+&&&%#########%&========****=&&&&&&%%########%===##******&% - #|################%%&&&&&&&&%####################%===&&&&&**G - -10 +|------------------------------------------------------------ - -15 +-+#######+#########+#########+#########+#########+######## + - 0 2 4 6 8 10 12 - |-----------------------------------------------------------| - 0.4 +|+ + + + + + +-+| - 0.35 +|+ + + + + F + +-+| - 0.3 +|+#########################################***###########+-+| - 0.25 +|+####################################***#**#**##########+-+| - EI 0.2 +|+###################################**#*#*###**#########+-+| - 0.15 +|+###################################*###**####**########+-+| - 0.1 +|+##################################*####**#####**#######+-+| - 0.05 +|-----------------------------------------------------------| - 0 ************************************####+#*#######+#********* - 0 2 4 6 8 10 12 - x - line 0: warning: iconv failed to convert degree sign + | True function and observed data + 1.5 +|+ + | ****G** +--------------------+ + #|#######***#####****#######################|***?***True function| + 1 +|+####***##########***#####################+---G---Observations-+ + #|####**##############**######################################### + #|###**################**######################################## + 0.5 +|+#**##################**###########################*****G###### + #|*G######################**######################***######***### + 0 +|*########################**####################G*##########***# + G|##########################**#################***#############*** + #|###########################**###############**#################** + -0.5 +|+###########################**#############**################## * + #|#############################**###########**################### + #|##############################*G#########**#################### + -1 +|+##############################***#####**###################### + #|#################################*******####################### + +|------------------------------------------------------------------ + -1.5 +-+##############+###############+################+############## + + -1 -0.5 0 0.5 1 + input variable x - | - 15 +|+ - 10 +|+ #%&&&&% - #|#################%%%%%%########%&&==**F*G*=############## - 5 +|+&&&&&&&&&&&&#&&&&&&&&&&&%%###&=****&&&%#&*G*&&&&&&&%%### - z 0 +|+*****G******G*********##&&&G****&&&&#######*****###&&&&# - -5 +|+&&&%#########%&======******=&&&&&%##########%===*******&&% - #|################%%&&&&&&&&%####################%===&###***G - -10 +|------------------------------------------------------------ - -15 +-+#######+#########+#########+#########+#########+######## + - 0 2 4 6 8 10 12 - |-----------------------------------------------------------| - 0.8 +|+ + + + + + +-+| - 0.7 +|+ + + + F + +-+| - 0.6 +|+####################################***################+-+| - 0.5 +|+###################################**#*################+-+| - EI 0.4 +|+###################################*###*###############+-+| - 0.3 +|+##################################**###*###############+-+| - 0.2 +|+##################################*####*###############+-+| - 0.1 +|-----------------------------------------------------------| - 0 ************************************####+#******************* - 0 2 4 6 8 10 12 - x +1 test, 1 passed, 0 known failure, 0 skipped +[inst/examples/01_kriging_basics/stk_example_kb09.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/examples/01_kriging_basics/stk_example_kb09.m +***** test stk_example_kb09; close all; + +#========================# +# stk_example_kb09 # +#========================# + +'stk_example_kb09' is a script from the file /build/reproducible-path/octave-stk-2.8.1/debian/octave-stk/usr/share/octave/packages/stk-2.8.1/examples/01_kriging_basics/stk_example_kb09.m + + STK_EXAMPLE_KB09 Generation of sample paths conditioned on noisy observations + + A Matern Gaussian process model is used, with constant but unknown mean + (ordinary kriging) and known covariance parameters. + + Given noisy observations from the unknown function, a batch of conditioned + sample paths is drawn using the "conditioning by kriging" technique + (stk_generate_samplepaths function). + + See also: stk_generate_samplepaths, stk_conditioning, stk_example_kb05 + + +Additional help for built-in functions and operators is +available in the online version of the manual. Use the command +'doc ' to search the manual index. + +Help and information about Octave is also available on the WWW +at https://www.octave.org and via the help@octave.org +mailing list. +1 test, 1 passed, 0 known failure, 0 skipped +[inst/examples/01_kriging_basics/stk_example_kb01n.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/examples/01_kriging_basics/stk_example_kb01n.m +***** test stk_example_kb01n; close all; + +#=========================# +# stk_example_kb01n # +#=========================# + +'stk_example_kb01n' is a script from the file /build/reproducible-path/octave-stk-2.8.1/debian/octave-stk/usr/share/octave/packages/stk-2.8.1/examples/01_kriging_basics/stk_example_kb01n.m + + STK_EXAMPLE_KB01N Ordinary kriging in 1D, with noisy data + + This example shows how to compute ordinary kriging predictions on a + one-dimensional noisy dataset. + + The Gaussian Process (GP) prior is the same as in stk_example_kb01. + + The observation noise is Gaussian and homoscedastic (constant variance). + Its variance is assumed to be known. + + Note that the kriging predictor, which is the posterior mean of the GP, + does NOT interpolate the data in this noisy example. + + See also: stk_example_kb01, stk_example_kb02n + + +Additional help for built-in functions and operators is +available in the online version of the manual. Use the command +'doc ' to search the manual index. + +Help and information about Octave is also available on the WWW +at https://www.octave.org and via the help@octave.org +mailing list. +model = + + scalar structure containing the fields: + + covariance_type = @stk_materncov_iso + lm = + + + + dim = 1 + param = + + -0.6931 + 1.3863 + 0.9163 + + lognoisevariance = -3.2189 + line 0: warning: iconv failed to convert degree sign - | - 10 +|+ ##%&&& - | #### #%%%%%%## %&&=**FG*G** ####### - 5 +|+&&&&&&&&&&&%#%&&&&&&&&&&%####&=***&&####%*G*&&&&&&&%%### - 0 +|+*****G******G*****#####&&&&%****&&%########****###&&&&%# - z #|&&&&&####%%%##&===**********G*&&&%###########&==*****#&&&% - -5 +|+##############%&&&&======&&##################%===##******G - -10 +|+#################%%&&&&%%######################%====&&==== - +|------------------------------------------------------------ - -15 +-+#######+#########+#########+#########+#########+######## + - 0 2 4 6 8 10 12 - |-----------------------------------------------------------| - 0.06 +|+ + + + + + +-+| - 0.05 +|+ + + + + + +-+| - #|####################################*F################### | - 0.04 +|+##################################***##################+-+| - EI 0.03 +|+##################################*##*#################+-+| - 0.02 +|+##################################*##**################+-+| - #|##################################*###**################# | - 0.01 +|-----------------------------------------------------------| - 0 ************************************####********************* - 0 2 4 6 8 10 12 - x - line 0: warning: iconv failed to convert degree sign - | - 10 +|+ - | #### #%%%%%%## %&&***GF*G** ####### - 5 +|+&&&&&&&&&&&%#%&&&&&&&&&&%####&=***&######*G*&&&&&&&%%### - 0 +|+*****G******G*****#####&&&&%****&##########****###&&&&%# - z #|&&&&&####%%%##&===**********G*&&%############&=******#&&&% - -5 +|+##############%&&&&======&&##################%===##******G - -10 +|+################%%&&&&&&%######################%====&&==== - +|------------------------------------------------------------ - -15 +-+#######+#########+#########+#########+#########+######## + - 0 2 4 6 8 10 12 - |-----------------------------------------------------------| - 0.03 +|+ + + + + + +-+| - 0.025 +|+ + + + + + +-+| - #|######################################F################## | - 0.02 +|+#####################################*#################+-+| - EI 0.015 +|+####################################**#################+-+| - 0.01 +|+####################################**#################+-+| - #|#####################################**################## | - 0.005 +|-----------------------------------------------------------| - 0 ************************************************************* - 0 2 4 6 8 10 12 - x - line 0: warning: iconv failed to convert degree sign + | True function and observed data + 1.5 +|+ + | G******* +--------------------+ + #|#######***##G##G***#######################|***?***True function| + 1 +|+####G**##########*G*#####################+---G---Observations-+ + #|####**##############**######################################### + #|###**################*G###########################G############ + 0.5 G|+#**##################**###########################******G###G# + #|*G######################**######################***###G##***### + 0 +|*########################**####################**##########***# + *|##########################**#################**G#############*** + #|###########################**###############**#################*G + -0.5 +|+#########################G#*G#############**################## * + #|#############################**###########*G################### + #|##############################**#G#######**#################### + -1 +|+##############################***#####*G###################### + #|#################################***G***####################### + +|------------------------------------------------------------------ + -1.5 +-+##############+###############+################+############## + + -1 -0.5 0 0.5 1 + input variable x - | - 10 +|+ - | #### #%%%%%%## #&&***GF*G** ####### - 5 +|+&&&&&&&&&&&%#%&&&&&&&&&%%####&=***&######*G*&&&&&&&%%### - 0 +|+*****G******G*****#####&&&&%***&&##########****###&&&&%# - z #|&&&&&####%%%##&===**********G*&&%############&=******#&&&% - -5 +|+##############%&&&&======&&##################%===##******G - -10 +|+################%%&&&&&&%######################%====&&==== - +|------------------------------------------------------------ - -15 +-+#######+#########+#########+#########+#########+######## + - 0 2 4 6 8 10 12 - |-----------------------------------------------------------| - 0.006 +|+ + + + + + +-+| - 0.005 +|+ + + + F + +-+| - #|######################################*################## | - 0.004 +|+#####################################*#################+-+| - EI 0.003 +|+#####################################*#################+-+| - 0.002 +|+#####################################*#################+-+| - #|######################################*################## | - 0.001 +|-----------------------------------------------------------| - 0 *********************##************************************** - 0 2 4 6 8 10 12 - x +1 test, 1 passed, 0 known failure, 0 skipped +[inst/examples/03_miscellaneous/stk_example_misc02.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/examples/03_miscellaneous/stk_example_misc02.m +***** test stk_example_misc02; close all; + +#==========================# +# stk_example_misc02 # +#==========================# + +'stk_example_misc02' is a script from the file /build/reproducible-path/octave-stk-2.8.1/debian/octave-stk/usr/share/octave/packages/stk-2.8.1/examples/03_miscellaneous/stk_example_misc02.m + + STK_EXAMPLE_MISC02 How to use priors on the covariance parameters + + A Matern covariance in dimension one is considered as an example. A Gaussian + prior is used for all three parameters: log-variance, log-regularity and log- + inverse-range. The corresponding parameter estimates are Maximum A Posteriori + (MAP) estimates or, more precisely, Restricted MAP (ReMAP) estimates. + + Several values for the variance of the prior are successively considered, to + illustrate the effect of this prior variance on the parameter estimates. When + the variance is small, the MAP estimate is close to the mode of the prior. On + the other hand, when the variance is large, the prior becomes "flat" and the + MAP estimate is close to the ReML estimate (see figure b). + + +Additional help for built-in functions and operators is +available in the online version of the manual. Use the command +'doc ' to search the manual index. + +Help and information about Octave is also available on the WWW +at https://www.octave.org and via the help@octave.org +mailing list. line 0: warning: iconv failed to convert degree sign - | - 10 +|+ - | #### #%%%%%%## #&&***GG*G** ####### - 5 +|+&&&&&&&&&&&%#%&&&&&&&&&%%####&=***&######*G*&&&&&&&%%### - 0 +|+*****G******G*****#####&&&&%***&&##########****###&&&&%# - z #|&&&&&####%%%##&===**F*******G*&&#############&=******#&&&% - -5 +|+##############%&&&&======&&##################%===##******G - -10 +|+################%%&&&&&&%######################%====&&==== - +|------------------------------------------------------------ - -15 +-+#######+#########+#########+#########+#########+######## + - 0 2 4 6 8 10 12 - |-----------------------------------------------------------| - 0.0007 +|+ + + + + + +-+| - 0.0006 +|+ + + + + + +-+| - 0.0005 +|+##################*F###################################+-+| - 0.0004 +|+##################***##################################+-+| -EI #|##################*##*################################### | - 0.0003 +|+#################*##*##################################+-+| - 0.0002 +|+#################*###*#################################+-+| - 0.0001 +|-----------------------------------------------------------| - 0 ********************+####***********#************************ - 0 2 4 6 8 10 12 - x + | prior std = 10.00 | prior std = 1.00 + 3 +|+ 4 +|+ #### + %|%## ####%%%% 3 +|+# ##%%%%% + 2 +|+&&&%&&&%######%&&&&&&&& 2 +|+&&%##%%%######%%&&&&&&& + 1 +|+#==GG==&&%###&&&######& 1 +|+#&&GG==&&%###&&&&#####& + =|===&&&&====G=G=====predicted outpu| z===&&====G=G========== + 0 +|+&&&##%&&&&&&&&&&######& 0 +|+&&&##%&&&&&&&&&&######& + -1 +|+%#############%&&&&&&&& -1 +|+%#############%&&&&&&&& + +|------------------------- -2 +|------------------------- + -2 +-+##+####+####+####+### + -3 +-+##+####+####+####+####+ + 0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1 + | prior std = 0.20 | prior std = 0.01 + 6 +|+ 6 +|+ + | ### | # + 4 +|+#################%%%%%% 4 +|+##################%%%%% + 2 +|+%####&&%######%&&&&&&&& 2 +|+#####%%########&&&&&&&& + &|&&==GG=====&&======predicted outpu| z&=GG=====#%=========== + 0 +|+==&###%&&=G=G&&&&#####& 0 +|+===####%&=G=G&&&&&&###& + -2 +|+&%#############%&&&&&&& -2 +|+&###############%%&&&&& + +|------------------------- +|------------------------- + -4 +-+##+####+####+####+### + -4 +-+##+####+####+####+### + + 0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1 + input x input x +1 test, 1 passed, 0 known failure, 0 skipped +[inst/examples/03_miscellaneous/stk_example_misc04.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/examples/03_miscellaneous/stk_example_misc04.m +***** test stk_example_misc04; close all; + +#==========================# +# stk_example_misc04 # +#==========================# + +'stk_example_misc04' is a script from the file /build/reproducible-path/octave-stk-2.8.1/debian/octave-stk/usr/share/octave/packages/stk-2.8.1/examples/03_miscellaneous/stk_example_misc04.m + + STK_EXAMPLE_MISC04 Pareto front simulation + + DESCRIPTION + + We consider a bi-objective optimization problem, where the objective + functions are modeled as a pair of independent stationary Gaussian + processes with a Matern 5/2 anisotropic covariance function. + + Figure (a): represent unconditional realizations of the Pareto front and + and estimate of the probability of being non-dominated at each point + of the objective space. + + Figure (b): represent conditional realizations of the Pareto front and + and estimate of the posteriorior probability of being non-dominated + at each point of the objective space. + + EXPERIMENTAL FUNCTION WARNING + + This script uses the stk_plot_probdom2d function, which is currently + considered an experimental function. Read the help for more information. + + REFERENCE + + [1] Michael Binois, David Ginsbourger and Olivier Roustant, Quantifying + uncertainty on Pareto fronts with Gaussian Process conditional simu- + lations, European J. of Operational Research, 2043(2):386-394, 2015. + + See also: stk_plot_probdom2d + + +Additional help for built-in functions and operators is +available in the online version of the manual. Use the command +'doc ' to search the manual index. + +Help and information about Octave is also available on the WWW +at https://www.octave.org and via the help@octave.org +mailing list. line 0: warning: iconv failed to convert degree sign - - | - 10 +|+ - | #### #&&F**GG*G** ####### - 5 +|+&&&&&&&&&&&&#################&****&######*G*&&&&&&&%%### - 0 +|+*****G******G**&&%####%%%%%&***&&##########****###&&&&%# - z #|&&&&&%########&*****G&&&****G*&%#############&=******#&&&% - -5 +|+###############&&&&*****=&&##################%===##******G - -10 +|+#####################%%%%######################%====&&==== - +|------------------------------------------------------------ - -15 +-+#######+#########+#########+#########+#########+######## + - 0 2 4 6 8 10 12 - |-----------------------------------------------------------| - 0.00016 +|+ + + + + + +-+| - 0.00014 +|+ + + + + + +-+| - 0.00012 +|+################################*F#####################+-+| - 0.0001 +|+################################**#####################+-+| - 8e-05 +|+################################*#*####################+-+| - 6e-05 +|+################################*#*####################+-+| - 4e-05 +|+################################*#*#############**#####+-+| - 2e-05 +|-----------------------------------------------------------| - 0 ***********************************##**************###******* - 0 2 4 6 8 10 12 - x - : x z - x0(001) : 0.00000 0.00000 - x0(002) : 6.00000 -1.67649 - x0(003) : 12.00000 -6.43888 - xg(057) : 1.68421 1.67339 - xg(099) : 2.94737 0.56886 - xg(282) : 8.45113 6.98861 - xg(299) : 8.96241 3.99788 - xg(268) : 8.03008 7.90589 - xg(258) : 7.72932 7.66935 - xg(265) : 7.93985 7.91060 - xg(266) : 7.96992 7.91642 - xg(145) : 4.33083 -4.01937 -Number of evaluations: 3 + 9 = 12. +multiplot> set style increment default; + ^ + line 0: warning: deprecated command + Proba. of being dominated + simulated Pareto fronts--| || + 600 +|$ # @$*%=%=$#&* + +-+| 600 +---+-+--+--+--+---+ ++||00% + |$ # @$*%=%=$#&* + + | ||#|##|##|##|##|##|| || + #|$####@$*%=%=$#&*###### | +|#+##+##+##+##+##+| || + 400 +|$####@$*%=%=$#&*&&&&&&&&| 400 +---+##########+---+ || + #|$####@$*%=%=$##*###### | |#################| || + 200 +|$####@$*%=%=$##*########| 200 +---+##########+---+ ++||5% + #|$####@$$%$$$$$$$$$$$$$$$| |#################| || + #|$####@**%***************| |#################| || + 0 +|$####@#@%=%=###*########| 0 +---+##########+---+ || + #|$#######%%%%%%%%%%%%second objective#################| ++||0% + -200 +|$######@##%%===*========| +---+##########+---+ || + #|$######@#######*********| |#################| || + #|$$$$$$$@$$$$$$$$$$$$$$$$| -400 |#################| || + -400 +|+######@@@@@@@@@@@@@@@@@| +---+##########+---+ || + #|###################### | -600 |#################| ++||5% + #|###################### | +---+##########+---+ || + -600 +|+####################+-+| |#################| || + #|###################### | -800 +|#+##+##+##+##+##+| || + -800 +|------------------------| +---+-|--|--|--+---+ || + #+###+##+###+###+##+###+ -30-20-100+1002003000 ++-0% + -300-20-1000 0 10020003000 + first objective first objective +1 test, 1 passed, 0 known failure, 0 skipped +[inst/examples/03_miscellaneous/stk_example_misc05.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/examples/03_miscellaneous/stk_example_misc05.m +***** test + stk_example_misc05; close all; + assert (isa (model.lognoisevariance, 'stk_gaussiannoise_het0')); + +#==========================# +# stk_example_misc05 # +#==========================# + +'stk_example_misc05' is a script from the file /build/reproducible-path/octave-stk-2.8.1/debian/octave-stk/usr/share/octave/packages/stk-2.8.1/examples/03_miscellaneous/stk_example_misc05.m + + STK_EXAMPLE_MISC05 Parameter estimation for heteroscedastic noise variance + + DESCRIPTION + + We consider a 1d prediction problem with noisy data, where the variance of + the noise depends on the input location. + + A simple heteroscedastic model is used, where the only parameter to be + estimated is a dispersion parameter (the square of a scale parameter). + More preciesely, the variance of the noise is assumed to be of the form + + tau^2(x) = phi * (x + 1) ^ 2, + + and the dispersion parameter phi is estimated together with the parameters + of the covariance function. + + EXPERIMENTAL FEATURE WARNING + + This script demonstrates an experimental feature of STK (namely, gaussian + noise model objects). STK users that wish to experiment with it are + welcome to do so, but should be aware that API-breaking changes are likely + to happen in future releases. We invite them to direct any questions, + remarks or comments about this experimental feature to the STK mailing + list. + + See also: stk_example_kb09 + + +Additional help for built-in functions and operators is +available in the online version of the manual. Use the command +'doc ' to search the manual index. + +Help and information about Octave is also available on the WWW +at https://www.octave.org and via the help@octave.org +mailing list. +model = + + scalar structure containing the fields: + + covariance_type = @stk_materncov52_iso + lm = + + + + dim = 1 + param = + + 0.066833 + 0.707310 + + lognoisevariance = + + + + + +gn = +| +| Heteroscedastic variance model: tau^2(x) = dispersion * variance_function(x) +| +| dispersion: 2.4169 [log_dispersion = 0.8825] +| variance_function: @(x) (x + 1) .^ 2 +| + +1 test, 1 passed, 0 known failure, 0 skipped +[inst/examples/03_miscellaneous/stk_example_misc03.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/examples/03_miscellaneous/stk_example_misc03.m +***** test stk_example_misc03; close all; + +#==========================# +# stk_example_misc03 # +#==========================# + +'stk_example_misc03' is a script from the file /build/reproducible-path/octave-stk-2.8.1/debian/octave-stk/usr/share/octave/packages/stk-2.8.1/examples/03_miscellaneous/stk_example_misc03.m + + STK_EXAMPLE_MISC03 How to deal with (known) seasonality + + +Additional help for built-in functions and operators is +available in the online version of the manual. Use the command +'doc ' to search the manual index. + +Help and information about Octave is also available on the WWW +at https://www.octave.org and via the help@octave.org +mailing list. +model = + + scalar structure containing the fields: + + covariance_type = @stk_materncov52_iso + lm = + + + + dim = 1 + param = + + 2.0662 + -1.8942 + + lognoisevariance = -4.6612 + +model2 = + + scalar structure containing the fields: + + covariance_type = @stk_materncov52_iso + lm = + +@(t) [ones(length (t), 1), sin(2 * pi * t / T0), cos(2 * pi * t / T0)] + + dim = 1 + param = + + -8.3427 + -1.3726 + + lognoisevariance = -4.6826 1 test, 1 passed, 0 known failure, 0 skipped +[inst/examples/03_miscellaneous/stk_example_misc01.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/examples/03_miscellaneous/stk_example_misc01.m +***** test stk_example_misc01; close all; + +#==========================# +# stk_example_misc01 # +#==========================# + +'stk_example_misc01' is a script from the file /build/reproducible-path/octave-stk-2.8.1/debian/octave-stk/usr/share/octave/packages/stk-2.8.1/examples/03_miscellaneous/stk_example_misc01.m + + STK_EXAMPLE_MISC01 Several correlation functions from the Matern family + + The Matern 1/2 correlation function is also known as the "exponential correla- + tion function". This is the correlation function of an Ornstein-Ulhenbeck pro- + cess. + + The Matern covariance function tends to the Gaussian correlation function when + its regularity (smoothness) parameter tends to infinity. + + See also: stk_materncov_iso, stk_materncov_aniso + + +Additional help for built-in functions and operators is +available in the online version of the manual. Use the command +'doc ' to search the manual index. + +Help and information about Octave is also available on the WWW +at https://www.octave.org and via the help@octave.org +mailing list. +1 test, 1 passed, 0 known failure, 0 skipped [inst/examples/test_functions/stk_testfun_hartman6.m] >>>>> /build/reproducible-path/octave-stk-2.8.1/inst/examples/test_functions/stk_testfun_hartman6.m ***** test @@ -7480,6 +7501,22 @@ y = stk_testfun_hartman6 ([x1; x2]); assert (stk_isequal_tolabs (y, [y1; y2], 1e-15)) 1 test, 1 passed, 0 known failure, 0 skipped +[inst/examples/test_functions/stk_testfun_hartman4.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/examples/test_functions/stk_testfun_hartman4.m +***** test + x = [0.1873 0.1906 0.5566 0.2647 ; + 0.18744768 0.19414868 0.558005333 0.26476409]; + y = stk_testfun_hartman4 (x); + assert (stk_isequal_tolabs (y, ... + [-3.729722308557300; -3.729840440436292], 1e-15)); +1 test, 1 passed, 0 known failure, 0 skipped +[inst/examples/test_functions/stk_testfun_goldsteinprice.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/examples/test_functions/stk_testfun_goldsteinprice.m +***** test % Use with nargin == 0 for visualisation + stk_testfun_goldsteinprice (); close all; +***** assert (stk_isequal_tolabs ... + (stk_testfun_goldsteinprice ([0, -1]), 3.0, 1e-12)) +2 tests, 2 passed, 0 known failure, 0 skipped [inst/examples/test_functions/stk_testfun_hartman3.m] >>>>> /build/reproducible-path/octave-stk-2.8.1/inst/examples/test_functions/stk_testfun_hartman3.m ***** test @@ -7492,13 +7529,6 @@ y = stk_testfun_hartman3 ([x1; x2]); assert (stk_isequal_tolabs (y, [y1; y2], 1e-15)) 1 test, 1 passed, 0 known failure, 0 skipped -[inst/examples/test_functions/stk_testfun_goldsteinprice.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/examples/test_functions/stk_testfun_goldsteinprice.m -***** test % Use with nargin == 0 for visualisation - stk_testfun_goldsteinprice (); close all; -***** assert (stk_isequal_tolabs ... - (stk_testfun_goldsteinprice ([0, -1]), 3.0, 1e-12)) -2 tests, 2 passed, 0 known failure, 0 skipped [inst/examples/test_functions/stk_testcase_truss3.m] >>>>> /build/reproducible-path/octave-stk-2.8.1/inst/examples/test_functions/stk_testcase_truss3.m ***** shared tc, xd, n @@ -7519,1181 +7549,379 @@ assert (isequal (size (v), [n 1])); assert (isequal (size (z), [n 5])); 2 tests, 2 passed, 0 known failure, 0 skipped -[inst/examples/test_functions/stk_testfun_hartman4.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/examples/test_functions/stk_testfun_hartman4.m -***** test - x = [0.1873 0.1906 0.5566 0.2647 ; - 0.18744768 0.19414868 0.558005333 0.26476409]; - y = stk_testfun_hartman4 (x); - assert (stk_isequal_tolabs (y, ... - [-3.729722308557300; -3.729840440436292], 1e-15)); -1 test, 1 passed, 0 known failure, 0 skipped -[inst/lm/@stk_lm_constant/stk_lm_constant.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/lm/@stk_lm_constant/stk_lm_constant.m -***** test stk_test_class ('stk_lm_constant') -1 test, 1 passed, 0 known failure, 0 skipped -[inst/lm/@stk_lm_constant/feval.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/lm/@stk_lm_constant/feval.m -***** test - n = 15; d = 4; - x = stk_sampling_randunif (n, d); - P = feval (stk_lm_constant (), x); - assert (isequal (size (P), [n, 1])); -1 test, 1 passed, 0 known failure, 0 skipped -[inst/lm/stk_lm_polynomial.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/lm/stk_lm_polynomial.m -***** error lm = stk_lm_polynomial (); -***** test - lm = stk_lm_polynomial (-1); - assert (isa (lm, 'stk_lm_null')); -***** test - lm = stk_lm_polynomial (0); - assert (isa (lm, 'stk_lm_constant')); +[inst/arrays/@stk_hrect/stk_boundingbox.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_hrect/stk_boundingbox.m +***** shared x, y + lb = rand (1, 5); + ub = lb + 1; + cn = {'a', 'b', 'c', 'd', 'e'}; + x = stk_hrect ([lb; ub], cn); +***** error y = stk_boundingbox (); +***** test y = stk_boundingbox (x); +***** assert (isequal (y, x)); +3 tests, 3 passed, 0 known failure, 0 skipped +[inst/arrays/@stk_hrect/vertcat.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_hrect/vertcat.m +***** shared d, x, y + d = 10; + x = stk_hrect (d); + y = double (x); ***** test - lm = stk_lm_polynomial (1); - assert (isa (lm, 'stk_lm_affine')); + z = vertcat (x, x); + assert (isequal (size (z), [4 d])); + assert (strcmp (class (z), 'stk_dataframe')); ***** test - lm = stk_lm_polynomial (2); - assert (isa (lm, 'stk_lm_quadratic')); + z = vertcat (x, y); + assert (isequal (size (z), [4 d])); + assert (strcmp (class (z), 'stk_dataframe')); ***** test - lm = stk_lm_polynomial (3); - assert (isa (lm, 'stk_lm_cubic')); -6 tests, 6 passed, 0 known failure, 0 skipped -[inst/lm/@stk_lm_cubic/feval.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/lm/@stk_lm_cubic/feval.m + z = vertcat (y, x); + assert (isequal (size (z), [4 d])); + assert (strcmp (class (z), 'stk_dataframe')); +3 tests, 3 passed, 0 known failure, 0 skipped +[inst/arrays/@stk_hrect/stk_hrect.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_hrect/stk_hrect.m +***** test stk_test_class ('stk_hrect') +***** shared dom +***** test dom = stk_hrect ([-1; 1], {'x'}); +***** assert (isequal (dom.colnames, {'x'})) +***** assert (isequal (dom.rownames, {'lower_bounds'; 'upper_bounds'})) +***** assert (isequal (dom.data, [-1; 1])) +5 tests, 5 passed, 0 known failure, 0 skipped +[inst/arrays/@stk_hrect/horzcat.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_hrect/horzcat.m +***** shared d, x1, x2, x3 + d = 10; + x1 = stk_hrect (d); + x2 = double (x1); + x3 = [1:d; 0:(d-1)]; % illegal bounds ***** test - n = 15; d = 4; - x = stk_sampling_randunif (n, d); - P = feval (stk_lm_cubic (), x); - assert (isequal (size (P), [n, 1 + d * (11 + d * (6 + d)) / 6])) -1 test, 1 passed, 0 known failure, 0 skipped -[inst/lm/@stk_lm_cubic/stk_lm_cubic.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/lm/@stk_lm_cubic/stk_lm_cubic.m -***** test stk_test_class ('stk_lm_cubic') -1 test, 1 passed, 0 known failure, 0 skipped -[inst/lm/@stk_lm_quadratic/feval.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/lm/@stk_lm_quadratic/feval.m + y1 = horzcat (x1, x1); + assert (isequal (size (y1), [2 2*d])); + assert (strcmp (class (y1), 'stk_hrect')); ***** test - n = 15; d = 4; - x = stk_sampling_randunif (n, d); - P = feval (stk_lm_quadratic (), x); - assert (isequal (size (P), [n, 1 + d * (d + 3) / 2])); -1 test, 1 passed, 0 known failure, 0 skipped -[inst/lm/@stk_lm_quadratic/stk_lm_quadratic.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/lm/@stk_lm_quadratic/stk_lm_quadratic.m -***** test stk_test_class ('stk_lm_quadratic') -1 test, 1 passed, 0 known failure, 0 skipped -[inst/lm/@stk_lm_matrix/stk_lm_matrix.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/lm/@stk_lm_matrix/stk_lm_matrix.m -***** test stk_test_class ('stk_lm_matrix') -***** test %%% dim 1 - data = rand (10, 1); idx = 3:7; - lm = stk_lm_matrix (data); - assert (isa (lm, 'stk_lm_matrix')); - assert (isequal (data(idx, :), feval (lm, idx))); -***** test %%% dim 3 - data = rand (10, 3); idx = 3:7; - lm = stk_lm_matrix (data); - assert (isa (lm, 'stk_lm_matrix')); - assert (isequal (data(idx, :), feval (lm, idx))); -3 tests, 3 passed, 0 known failure, 0 skipped -[inst/lm/@stk_lm_null/stk_lm_null.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/lm/@stk_lm_null/stk_lm_null.m -***** test stk_test_class ('stk_lm_null') -1 test, 1 passed, 0 known failure, 0 skipped -[inst/lm/@stk_lm_null/feval.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/lm/@stk_lm_null/feval.m + y2 = horzcat (x1, x2); + assert (isequal (size (y2), [2 2*d])); + assert (strcmp (class (y2), 'stk_hrect')); ***** test - n = 15; d = 4; - x = stk_sampling_randunif (n, d); - P = feval (stk_lm_null (), x); - assert (isequal (size (P), [n, 0])); -1 test, 1 passed, 0 known failure, 0 skipped -[inst/lm/@stk_lm_affine/stk_lm_affine.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/lm/@stk_lm_affine/stk_lm_affine.m -***** test stk_test_class ('stk_lm_affine') -1 test, 1 passed, 0 known failure, 0 skipped -[inst/lm/@stk_lm_affine/feval.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/lm/@stk_lm_affine/feval.m + y3 = horzcat (x2, x1); + assert (isequal (size (y3), [2 2*d])); + assert (strcmp (class (y3), 'stk_hrect')); ***** test - n = 15; d = 4; - x = stk_sampling_randunif (n, d); - P = feval (stk_lm_affine (), x); - assert (isequal (size (P), [n, d + 1])); -1 test, 1 passed, 0 known failure, 0 skipped -[inst/model/@stk_model_gpposterior/stk_predict_.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/model/@stk_model_gpposterior/stk_predict_.m -***** shared n, m, M_post, M_prior, x0, x_obs, z_obs, x_prd, y_prd, idx_obs, idx_prd - - n = 10; % number of observations - m = n + 1; % number of predictions - d = 1; % dimension of the input space - - x0 = (linspace (0, pi, n + m))'; - - idx_obs = (2:2:(n+m-1))'; - idx_prd = (1:2:(n+m))'; - - x_obs = x0(idx_obs); - z_obs = sin (x_obs); - x_prd = x0(idx_prd); - - M_prior = stk_model (@stk_materncov32_iso); - M_prior.param = log ([1.0; 2.1]); - - M_post = stk_model_gpposterior (M_prior, x_obs, z_obs); -***** error y_prd = stk_predict (M_post); -***** test y_prd = stk_predict (M_post, x_prd); -***** error y_prd = stk_predict (M_post, [x_prd x_prd]); -***** test % nargout = 2 - [y_prd1, lambda] = stk_predict (M_post, x_prd); - assert (stk_isequal_tolrel (y_prd, y_prd1)); - assert (isequal (size (lambda), [n m])); -***** test % nargout = 3 - [y_prd1, lambda, mu] = stk_predict (M_post, x_prd); - assert (stk_isequal_tolrel (y_prd, y_prd1)); - assert (isequal (size (lambda), [n m])); - assert (isequal (size (mu), [1 m])); % ordinary kriging -***** test % nargout = 4 - [y_prd1, lambda, mu, K] = stk_predict (M_post, x_prd); - assert (stk_isequal_tolrel (y_prd, y_prd1)); - assert (isequal (size (lambda), [n m])); - assert (isequal (size (mu), [1 m])); % ordinary kriging - assert (isequal (size (K), [m m])); -***** test % nargout = 2, compute only variances - M_post1 = stk_model_gpposterior (M_prior, x_obs, []); - [y_prd_nan, lambda] = stk_predict (M_post1, x_prd); - assert (isequal (size (lambda), [n m])); - assert (all (isnan (y_prd_nan.mean))); -***** test % discrete model (prediction indices provided) - M_prior1 = stk_model (@stk_discretecov, M_prior, x0); - M_post1 = stk_model_gpposterior (M_prior1, idx_obs, z_obs); - y_prd1 = stk_predict (M_post1, idx_prd); - assert (stk_isequal_tolrel (y_prd, y_prd1)); -***** test % discrete model (prediction indices *not* provided) - M_prior1 = stk_model (@stk_discretecov, M_prior, x0); - M_post1 = stk_model_gpposterior (M_prior1, idx_obs, z_obs); - y_prd1 = stk_predict (M_post1, []); % predict them all! - assert (stk_isequal_tolrel (y_prd, y_prd1(idx_prd, :))); -9 tests, 9 passed, 0 known failure, 0 skipped -[inst/model/@stk_model_gpposterior/set.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/model/@stk_model_gpposterior/set.m -***** shared M_post - x_obs = (linspace (0, pi, 15))'; - z_obs = sin (x_obs); - M_prior = stk_model (@stk_materncov32_iso); - M_prior.param = log ([1.0; 2.1]); - M_post = stk_model_gpposterior (M_prior, x_obs, z_obs); -***** error value = get (M_post, 1.33); -***** error value = get (M_post, 'dudule'); -***** test value = get (M_post, 'prior_model'); -3 tests, 3 passed, 0 known failure, 0 skipped -[inst/model/@stk_model_gpposterior/stk_predict_leaveoneout.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/model/@stk_model_gpposterior/stk_predict_leaveoneout.m -***** test % Check virtual Leave-One-Out formula - - n = 20; d = 1; - x_obs = stk_sampling_regulargrid (n, d, [0; 2*pi]); - z_obs = stk_feval (@sin, x_obs); - - lm_list = {stk_lm_null, stk_lm_constant, stk_lm_affine}; - - for j = 0:2 - for k = 1:(length (lm_list)) - - model = stk_model (@stk_materncov32_iso, d); - model.lm = lm_list{k}; - model.param = log ([1; 5]); - - switch j % test various scenarios for lognoisevariance - case 0 - model.lognoisevariance = -inf; - case 1 - model.lognoisevariance = 0; - case 2 - model.lognoisevariance = (1 + rand (n, 1)) * 1e-3; - end - - M_post = stk_model_gpposterior (model, x_obs, z_obs); - - [loo_pred, loo_res] = stk_predict_leaveoneout (M_post); - [direct_pred, direct_res] = stk_predict_leaveoneout_direct (M_post); - - assert (stk_isequal_tolrel (loo_pred, direct_pred)); - assert (stk_isequal_tolrel (loo_res, direct_res)); - - end - end -1 test, 1 passed, 0 known failure, 0 skipped -[inst/model/@stk_model_gpposterior/get.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/model/@stk_model_gpposterior/get.m -***** shared M_post - x_obs = (linspace (0, pi, 15))'; - z_obs = sin (x_obs); - M_prior = stk_model (@stk_materncov32_iso); - M_prior.param = log ([1.0; 2.1]); - M_post = stk_model_gpposterior (M_prior, x_obs, z_obs); -***** error value = get (M_post, 1.33); -***** error value = get (M_post, 'dudule'); -***** test value = get (M_post, 'prior_model'); -3 tests, 3 passed, 0 known failure, 0 skipped -[inst/model/@stk_model_gpposterior/stk_model_gpposterior.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/model/@stk_model_gpposterior/stk_model_gpposterior.m -***** test stk_test_class ('stk_model_gpposterior') -***** shared M_prior, x_obs, z_obs - x_obs = (linspace (0, pi, 15))'; - z_obs = sin (x_obs); + lastwarn ('') + y4 = horzcat (x1, x3); + assert (isequal (size (y4), [2 2*d])); + assert (strcmp (class (y4), 'stk_dataframe')); + [warn_msg, warn_id] = lastwarn (); + assert (strcmp (warn_id, 'STK:stk_hrect:horzcat:IllegalBounds')) +warning: Illegal bounds, the result is not an stk_hrect object. +warning: called from + horzcat at line 47 column 9 + __test__ at line 4 column 5 + test at line 682 column 11 + /tmp/tmp.U7Xx8aDcQp at line 590 column 31 - M_prior = stk_model (@stk_materncov32_iso); - M_prior.param = log ([1.0; 2.1]); -***** test M_post = stk_model_gpposterior (); -***** test M_post = stk_model_gpposterior (M_prior, x_obs, z_obs); -***** error M_post = stk_model_gpposterior (M_prior, x_obs, [z_obs; z_obs]); -***** error M_post = stk_model_gpposterior (M_prior, x_obs, [z_obs; z_obs], 3.441); -***** test % hidden feature - kreq = stk_kreq_qr (M_prior, x_obs); - M_post = stk_model_gpposterior (M_prior, {x_obs, kreq}, z_obs); -***** test % NaNs in prior_model.param - DIM = 1; M = stk_model (@stk_materncov52_aniso, DIM); - M.param = nan (2, 1); % this is currently the default - x = stk_sampling_regulargrid (20, DIM, [0; 1]); - y = sin (double (x)); - zp = stk_predict (M, x, y, x); -7 tests, 7 passed, 0 known failure, 0 skipped -[inst/model/@stk_model_gpposterior/stk_model_update.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/model/@stk_model_gpposterior/stk_model_update.m -***** shared x_obs, z_obs, ref, M_prior, x_new, z_new, lnv_new - [x_obs, z_obs, ref] = stk_dataset_twobumps ('noisy2'); - M_prior = stk_model (@stk_materncov52_iso); - M_prior.param = [-0.15; 0.38]; - M_prior.lognoisevariance = 2 * log (ref.noise_std); - x_new = [-0.79; -0.79]; - z_new = [-0.69; -0.85]; - lnv_new = ref.noise_std_func (x_new); -***** test % heteroscedastic - M_prior.lognoisevariance = 2 * log (ref.noise_std); - M_post = stk_model_gpposterior (M_prior, x_obs, z_obs); - M_post = stk_model_update (M_post, x_new, z_new, lnv_new); -***** error % using lnv_new / homoscedastic - M_prior.lognoisevariance = 0; - M_post = stk_model_gpposterior (M_prior, x_obs, z_obs); - M_post = stk_model_update (M_post, x_new, z_new, lnv_new); % NOT OK -***** error % using lnv_new / noiseless - M_prior.lognoisevariance = -inf; - M_post = stk_model_gpposterior (M_prior, x_obs, z_obs) - M_post = stk_model_update (M_post, x_new, z_new, lnv_new); % NOT OK -***** error % not using lnv_new / heteroscedastic - M_prior.lognoisevariance = 2 * log (ref.noise_std); - M_post = stk_model_gpposterior (M_prior, x_obs, z_obs); - M_post = stk_model_update (M_post, x_new, z_new); 4 tests, 4 passed, 0 known failure, 0 skipped -[inst/model/noise/@stk_gaussiannoise_het0/set.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/model/noise/@stk_gaussiannoise_het0/set.m -***** shared M_post - x_obs = (linspace (0, pi, 15))'; - z_obs = sin (x_obs); - M_prior = stk_model (@stk_materncov32_iso); - M_prior.param = log ([1.0; 2.1]); - M_post = stk_model_gpposterior (M_prior, x_obs, z_obs); -***** error value = get (M_post, 1.33); -***** error value = get (M_post, 'dudule'); -***** test value = get (M_post, 'prior_model'); -3 tests, 3 passed, 0 known failure, 0 skipped -[inst/model/prior_struct/stk_ortho_func.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/model/prior_struct/stk_ortho_func.m -***** shared model, x, n, d - n = 15; d = 4; - model = stk_model (@stk_materncov_aniso, d); - x = stk_sampling_randunif (n, d); - model = rmfield (model, 'lm'); % Test the old .order approach -***** error P = stk_ortho_func (); -***** error P = stk_ortho_func (model); -***** test P = stk_ortho_func (model, x); -***** test - model.order = -1; P = stk_ortho_func (model, x); - assert (isequal (size (P), [n, 0])); -***** test - model.order = 0; P = stk_ortho_func (model, x); - assert (isequal (size (P), [n, 1])); -***** test - model.order = 1; P = stk_ortho_func (model, x); - assert (isequal (size (P), [n, d + 1])); -***** test - model.order = 2; P = stk_ortho_func (model, x); - assert (isequal (size (P), [n, 1 + d * (d + 3) / 2])); -***** test - model.order = 3; P = stk_ortho_func (model, x); - assert (isequal (size (P), [n, 1 + d * (11 + d * (6 + d)) / 6])); -***** error - model.order = 4; P = stk_ortho_func (model, x); - % model.order > 3 is not allowed -9 tests, 9 passed, 0 known failure, 0 skipped -[inst/model/prior_struct/stk_covmat_noise.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/model/prior_struct/stk_covmat_noise.m -***** shared model, model2, x1, x2, n1, n2, d, Ka, Kb, Kc, Pa, Pb, Pc, P1, P2, P3, K1, K2, K3 - n1 = 20; n2 = 10; d = 4; - model = stk_model (@stk_materncov52_aniso, d); - model.lm = stk_lm_affine; - model.param = log ([1.0; 2.1; 2.2; 2.3; 2.4]); - model2 = model; model2.lognoisevariance = log(0.01); - x1 = stk_sampling_randunif (n1, d); - x2 = stk_sampling_randunif (n2, d); -***** error [KK, PP] = stk_covmat_noise (); -***** error [KK, PP] = stk_covmat_noise (model); -***** test [Ka, Pa] = stk_covmat_noise (model, x1); % (1) -***** test [K1, P1] = stk_covmat_noise (model, x1, []); -***** test [K2, P2] = stk_covmat_noise (model, x1, [], -1); -***** test [K3, P3] = stk_covmat_noise (model, x1, [], -1, false); -***** assert (isequal (size (Ka), [n1 n1])); -***** assert (isequal (size (Pa), [n1 0])); -***** assert (isequal (P1, Pa) && (isequal (K1, Ka))) -***** assert (isequal (P2, Pa) && (isequal (K2, Ka))) -***** assert (isequal (P3, Pa) && (isequal (K3, Ka))) -***** test [Kb, Pb] = stk_covmat_noise (model, x1, x1); % (2) -***** test [K1, P1] = stk_covmat_noise (model, x1, x1, -1); -***** test [K2, P2] = stk_covmat_noise (model, x1, x1, -1, false); -***** assert (isequal (size (Kb), [n1 n1])); -***** assert (isequal (size (Pb), [n1 0])); -***** assert (isequal (P1, Pb) && (isequal (K1, Kb))) -***** assert (isequal (P2, Pb) && (isequal (K2, Kb))) -***** test [Kc, Pc] = stk_covmat_noise (model, x1, x2); % (3) -***** test [K1, P1] = stk_covmat_noise (model, x1, x2, -1); -***** test [K2, P2] = stk_covmat_noise (model, x1, x2, -1, false); -***** assert (isequal (size (Kc), [n1 n2])); -***** assert (isequal (size (Pc), [n1 0])); -***** assert (isequal (P1, Pc) && (isequal (K1, Kc))) -***** assert (isequal (P2, Pc) && (isequal (K2, Kc))) -***** assert (isequal (Kb, Ka)); -***** test [Ka, Pa] = stk_covmat_noise (model2, x1); % (1') -***** test [Kb, Pb] = stk_covmat_noise (model2, x1, x1); % (2') -***** error assert (isequal (Kb, Ka)); -***** assert (isequal (Pa, Pb)); -***** assert (isequal (Pa, Pc)); -31 tests, 31 passed, 0 known failure, 0 skipped -[inst/model/prior_struct/stk_model.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/model/prior_struct/stk_model.m -***** test model = stk_model (); -***** test model = stk_model (@stk_expcov_iso); -***** test model = stk_model (@stk_expcov_iso, 1); -***** test model = stk_model (@stk_expcov_iso, 3); -***** test model = stk_model (@stk_expcov_aniso); -***** test model = stk_model (@stk_expcov_aniso, 1); -***** test model = stk_model (@stk_expcov_aniso, 3); -***** test model = stk_model (@stk_materncov_iso); -***** test model = stk_model (@stk_materncov_iso, 1); -***** test model = stk_model (@stk_materncov_iso, 3); -***** test model = stk_model (@stk_materncov_aniso); -***** test model = stk_model (@stk_materncov_aniso, 1); -***** test model = stk_model (@stk_materncov_aniso, 3); -***** test model = stk_model (@stk_materncov32_iso); -***** test model = stk_model (@stk_materncov32_iso, 1); -***** test model = stk_model (@stk_materncov32_iso, 3); -***** test model = stk_model (@stk_materncov32_aniso); -***** test model = stk_model (@stk_materncov32_aniso, 1); -***** test model = stk_model (@stk_materncov32_aniso, 3); -***** test model = stk_model (@stk_materncov52_iso); -***** test model = stk_model (@stk_materncov52_iso, 1); -***** test model = stk_model (@stk_materncov52_iso, 3); -***** test model = stk_model (@stk_materncov52_aniso); -***** test model = stk_model (@stk_materncov52_aniso, 1); -***** test model = stk_model (@stk_materncov52_aniso, 3); -***** test model = stk_model (@stk_gausscov_iso); -***** test model = stk_model (@stk_gausscov_iso, 1); -***** test model = stk_model (@stk_gausscov_iso, 3); -***** test model = stk_model (@stk_gausscov_aniso); -***** test model = stk_model (@stk_gausscov_aniso, 1); -***** test model = stk_model (@stk_gausscov_aniso, 3); -***** test model = stk_model (@stk_sphcov_iso); -***** test model = stk_model (@stk_sphcov_iso, 1); -***** test model = stk_model (@stk_sphcov_iso, 3); -***** test model = stk_model (@stk_sphcov_aniso); -***** test model = stk_model (@stk_sphcov_aniso, 1); -***** test model = stk_model (@stk_sphcov_aniso, 3); -37 tests, 37 passed, 0 known failure, 0 skipped -[inst/sampling/stk_sampcrit_ehvi_eval.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/sampling/stk_sampcrit_ehvi_eval.m -***** shared zr, zi - zr = [1 1]; - zi = [0.25 0.75; 0.5 0.5; 0.75 0.25]; -***** test % no improvement (1 computation) - zp_mean = [0.6 0.6]; zp_std = [0 0]; - EHVI = stk_sampcrit_ehvi_eval (zp_mean, zp_std, zi, zr); - assert (stk_isequal_tolabs (EHVI, 0, 1e-12)); -***** test % guaranteed improvement (1 computation) - zp_mean = [0 0]; zp_std = [0 0]; - EHVI = stk_sampcrit_ehvi_eval (zp_mean, zp_std, zi, zr); - assert (stk_isequal_tolabs (EHVI, 10 * 0.25 ^ 2)); -***** test % no improvement again (2 computations) - zp_mean = [0.5 0.5; 0.6 0.6]; zp_std = [0 0; 0 0]; - EHVI = stk_sampcrit_ehvi_eval (zp_mean, zp_std, zi, zr); - assert (stk_isequal_tolabs (EHVI, [0; 0], 1e-12)); -***** test % no observation -> EHVI wrt zr - zp_mean = [0.6 0.6]; zp_std = 0.01 * [1 1]; zi = []; - EHVI = stk_sampcrit_ehvi_eval (zp_mean, zp_std, zi, zr); - assert (stk_isequal_tolabs (EHVI, (1 - 0.6)^2, 1e-12)); -***** test % no observation below zr -> EHVI wrt zr - zp_mean = [0.6 0.6]; zp_std = 0.01 * [1 1]; zi = [2 2]; - EHVI = stk_sampcrit_ehvi_eval (zp_mean, zp_std, zi, zr); - assert (stk_isequal_tolabs (EHVI, (1 - 0.6)^2, 1e-12)); +[inst/arrays/@stk_hrect/stk_normalize.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_hrect/stk_normalize.m +***** shared x, box, y1, y2, y3, y4 + n = 5; box = stk_hrect ([2; 3]); + x = 2 + rand (n, 1); +***** error y1 = stk_normalize (); +***** test y2 = stk_normalize (x); +***** test y3 = stk_normalize (x, box); +***** test assert (~ any ((y2 < -10 * eps) | (y2 > 1 + 10 * eps))); +***** test assert (~ any ((y3 < -10 * eps) | (y3 > 1 + 10 * eps))); 5 tests, 5 passed, 0 known failure, 0 skipped -[inst/sampling/stk_sampling_randomlhs.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/sampling/stk_sampling_randomlhs.m -***** shared x, n, dim, box - n = 10; dim = 2; box = [0, 0; 1, 1]; -***** error x = stk_sampling_randomlhs (); -***** test x = stk_sampling_randomlhs (n); -***** test x = stk_sampling_randomlhs (n, dim); -***** test x = stk_sampling_randomlhs (n, dim, box); -***** assert (isa(x, 'stk_dataframe')); -***** assert (isequal (x.colnames, {})); -***** test - cn = {'W', 'H'}; box = stk_hrect (box, cn); - x = stk_sampling_randomlhs (n, dim, box); - assert (isequal (x.colnames, cn)); -***** test - for dim = 1:5, - x = stk_sampling_randomlhs(n, dim); - assert(isequal(size(x), [n dim])); - u = double(x); u = u(:); - assert(~any(isnan(u) | isinf(u))); - assert((min(u) >= 0) && (max(u) <= 1)); - assert(stk_is_lhs(x, n, dim)); - end -8 tests, 8 passed, 0 known failure, 0 skipped -[inst/sampling/@stk_sampcrit_eqi/stk_sampcrit_eqi.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/sampling/@stk_sampcrit_eqi/stk_sampcrit_eqi.m -***** shared F, M, EQI - M = stk_model_gpposterior (stk_model, [1 2 3]', [1.234 3 2]'); -warning: Something went wrong during the optimization -crit0 = 2.594852, crit_opt = 2.594852: crit0 < crit_opt -***** test F = stk_sampcrit_eqi () % ending ";" omitted on purpose, to test disp - -F = -| -| model: -- (not instantiated) -| quantile_order: 0.5 -| point_batch_size: 1 -| current_minimum: Inf -| - -***** assert (isempty (F.model)) -***** assert (isempty (get (F, 'model'))) -***** assert (F.quantile_order == 0.5) -***** assert (get (F, 'quantile_order') == 0.5) -***** assert (F.current_minimum == +inf) -***** assert (get (F, 'current_minimum') == +inf) -***** error F.toto -***** error get (F, 'toto') -***** error F.current_min = 1.234; % read-only -***** error F = set (F, 'current_min', 1.234); % read-only -***** error F.toto = 1.234; % field does not exist -***** error F = set (F, 'toto', 1.234); % field does not exist -***** test F.quantile_order = 0.9; assert (F.quantile_order == 0.9) -***** test F = set (F, 'quantile_order', 0.8); assert (F.quantile_order == 0.8) -***** error F.quantile_order = 1.1; -***** error F.quantile_order = -0.1; -***** error F.quantile_order = [1 2]; -***** error F.current_minimum = 3.333; % read-only -***** error F.quantile_value = 2.222; % read-only -***** error EQI = feval (F, 1.0); -***** test F = stk_sampcrit_eqi (); F.model = M; - assert (~ isempty (F.model)); -***** test F = stk_sampcrit_eqi (); F = set (F, 'model', M); - assert (~ isempty (F.model)); -***** test F.model = []; % remove model - assert (isempty (F.model)); - assert (F.current_minimum == +inf); -***** test F = stk_sampcrit_eqi (M) % ending ";" omitted on purpose, to test disp - -F = -| -| model: -| quantile_order: 0.5 -| point_batch_size: 1 -| current_minimum: 1.234 -| - -***** assert (isequal (F.model, M)) -***** assert (stk_isequal_tolrel (F.current_minimum, 1.234, 10 * eps)); -***** test EQI = feval (F, [1.0; 1.1; 1.2]); -***** assert (isequal (size (EQI), [3 1])) -***** assert (all (EQI >= 0)) -***** test F.quantile_order = 0.9; assert (F.quantile_order == 0.9) -***** shared F, M, EQI - prior_model = stk_model (); - prior_model.lognoisevariance = 0.678; - M = stk_model_gpposterior (prior_model, [1 2 3]', [1.234 3 2]'); -***** test F = stk_sampcrit_eqi (M); -***** assert (isequal (F.model, M)) -***** assert (stk_isequal_tolrel (F.current_minimum, 2.077997, 1e-5)); -***** test EQI = feval (F, [1.0; 1.1; 1.2]); -***** assert (isequal (size (EQI), [3 1])) -***** assert (all (EQI >= 0)) -***** test F.quantile_order = 0.9; assert (F.quantile_order == 0.9) -***** shared F -***** test F = stk_sampcrit_eqi (stk_model ()); -***** assert (F.current_minimum == +inf); -***** error feval (F, 1.0); -***** shared F, M - M = stk_model_gpposterior (stk_model (), [1 2 3]', [1.234 3 2]'); -warning: Something went wrong during the optimization -crit0 = 2.594852, crit_opt = 2.594852: crit0 < crit_opt -***** error F = stk_sampcrit_eqi (M, [], 0); -***** error F = stk_sampcrit_eqi (M, [], 1.5); -***** error F = stk_sampcrit_eqi (M, [], nan); -***** error F = stk_sampcrit_eqi (M, [], [10 20]); -***** test F = stk_sampcrit_eqi (M, [], 10); -***** assert (isequal (F.quantile_order, 0.5)); -***** assert (isequal (F.point_batch_size, 10)); -***** error F = stk_sampcrit_eqi (M, 0.8, 0); -***** error F = stk_sampcrit_eqi (M, 0.8, 1.5); -***** error F = stk_sampcrit_eqi (M, 0.8, nan); -***** error F = stk_sampcrit_eqi (M, 0.8, [10 20]); -***** test F = stk_sampcrit_eqi (M, 0.8, 5); -***** assert (isequal (F.quantile_order, 0.8)); -***** assert (isequal (F.point_batch_size, 5)); -***** shared F, M, EQI - prior_model = stk_model (); - prior_model.lognoisevariance = 0.678; - M = stk_model_gpposterior (prior_model, [1 2 3]', [1.234 3 2]'); - F = stk_sampcrit_eqi (M); -***** test F.point_batch_size = 10; % numeric -***** assert (isequal (F.point_batch_size, 10)) -***** test EQI = feval (F, [1.0; 1.1; 1.2]); -***** test F.point_batch_size = @(x, n) 100 - n; % function handle -***** assert (isa (F.point_batch_size, 'function_handle')) -***** test EQI = feval (F, [1.0; 1.1; 1.2]); -***** test F.point_batch_size = 'sin'; % char -***** assert (isa (F.point_batch_size, 'function_handle')) -63 tests, 63 passed, 0 known failure, 0 skipped -[inst/sampling/@stk_sampcrit_ei/stk_sampcrit_ei.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/sampling/@stk_sampcrit_ei/stk_sampcrit_ei.m -***** shared F, M, EI - M = stk_model_gpposterior (stk_model, [1 2 3]', [1.234 3 2]'); -warning: Something went wrong during the optimization -crit0 = 2.594852, crit_opt = 2.594852: crit0 < crit_opt -***** test F = stk_sampcrit_ei () % ending ";" omitted on purpose, to test disp - -F = -| -| model: -- (not instantiated) -| current_minimum: Inf -| - -***** assert (isempty (F.model)) -***** assert (isempty (get (F, 'model'))) -***** assert (F.current_minimum == +inf) -***** assert (get (F, 'current_minimum') == +inf) -***** error F.toto -***** error get (F, 'toto') -***** error F.current_min = 1.234; % read-only -***** error F = set (F, 'current_min', 1.234); % read-only -***** error F.toto = 1.234; % field does not exist -***** error F = set (F, 'toto', 1.234); % field does not exist -***** error EI = feval (F, 1.0); -***** test F = stk_sampcrit_ei (); F.model = M; - assert (~ isempty (F.model)); -***** test F = stk_sampcrit_ei (); F = set (F, 'model', M); - assert (~ isempty (F.model)); -***** test F.model = []; % remove model - assert (isempty (F.model)); - assert (F.current_minimum == +inf); -***** test F = stk_sampcrit_ei (M) % ending ";" omitted on purpose, to test disp - -F = -| -| model: -| current_minimum: 1.234 -| - -***** assert (isequal (F.model, M)) -***** assert (F.current_minimum == 1.234); -***** test EI = feval (F, [1.0; 1.1; 1.2]); -***** assert (isequal (size (EI), [3 1])) -***** assert (all (EI >= 0)) -***** shared F -***** test F = stk_sampcrit_ei (stk_model ()); -***** assert (F.current_minimum == +inf); -***** error feval (F, 1.0); -24 tests, 24 passed, 0 known failure, 0 skipped -[inst/sampling/stk_halfpintl.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/sampling/stk_halfpintl.m -***** test % case #1 - a = 1; - b = 1; - [a_out, b_out, z_out] = stk_halfpintl (a, b); - assert (a_out == 1) - assert (b_out == 1) - assert (isempty (z_out)) -***** test % case #2: two lines, slopes not equal, already sorted - a = [1; -1]; - b = [0; 2]; - [a_out, b_out, z_out] = stk_halfpintl (a, b); - assert (isequal (a_out, [1; -1])) - assert (isequal (b_out, [0; 2])) - assert (z_out == 1) -***** test % case #3: same as #2, but not sorted - a = [-1; 1]; - b = [ 2; 0]; - [a_out, b_out, z_out] = stk_halfpintl (a, b); - assert (isequal (a_out, [1; -1])) - assert (isequal (b_out, [0; 2])) - assert (z_out == 1) -***** test % case #4: two lines, equal slopes, already sorted - a = [0; 0]; - b = [1; 2]; - [a_out, b_out, z_out] = stk_halfpintl (a, b); - assert (a_out == 0) - assert (b_out == 1) - assert (isempty (z_out)) -***** test % case #5: same as #4, but not sorted - a = [0; 0]; - b = [2; 1]; - [a_out, b_out, z_out] = stk_halfpintl (a, b); - assert (a_out == 0) - assert (b_out == 1) - assert (isempty (z_out)) -***** test % case #6: add a dominated line to #2 (the result does not change) - a = [1; -1; 0]; - b = [0; 2; 1]; - [a_out, b_out, z_out] = stk_halfpintl (a, b); - assert (isequal (a_out, [1; -1])) - assert (isequal (b_out, [0; 2])) - assert (z_out == 1) -***** test % case #7: permutation of #6 - a = [1; 0; -1]; - b = [0; 1; 2]; - [a_out, b_out, z_out] = stk_halfpintl (a, b); - assert (isequal (a_out, [1; -1])) - assert (isequal (b_out, [0; 2])) - assert (z_out == 1) -***** test % case #8: another permutation of #6 - a = [0; 1; -1]; - b = [1; 0; 2]; - [a_out, b_out, z_out] = stk_halfpintl (a, b); - assert (isequal (a_out, [1; -1])) - assert (isequal (b_out, [0; 2])) - assert (z_out == 1) -***** test % case #9: same as #8, with some duplicated lines added - a = [0; 1; 0; -1; 0; -1; 1]; - b = [1; 0; 1; 2; 1; 2; 0]; - [a_out, b_out, z_out] = stk_halfpintl (a, b); - assert (isequal (a_out, [1; -1])) - assert (isequal (b_out, [0; 2])) - assert (z_out == 1) -9 tests, 9 passed, 0 known failure, 0 skipped -[inst/sampling/stk_sampling_maximinlhs.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/sampling/stk_sampling_maximinlhs.m -***** shared x, n, dim, box, niter - n = 20; dim = 2; box = [0, 0; 1, 1]; niter = 1; -***** error x = stk_sampling_maximinlhs (); -***** test x = stk_sampling_maximinlhs (n); -***** test x = stk_sampling_maximinlhs (n, dim); -***** test x = stk_sampling_maximinlhs (n, dim, box); -***** test x = stk_sampling_maximinlhs (n, dim, box, niter); -***** assert (isa (x, 'stk_dataframe')); -***** assert (isequal (x.colnames, {})); -***** test - cn = {'W', 'H'}; box = stk_hrect (box, cn); - x = stk_sampling_maximinlhs (n, dim, box); - assert (isequal (x.colnames, cn)); -***** test - for dim = 1:5, - x = stk_sampling_randomlhs (n, dim); - assert (isequal (size (x), [n dim])); - u = double (x); u = u(:); - assert (~ any (isnan (u) | isinf (u))); - assert ((min (u) >= 0) && (max (u) <= 1)); - assert (stk_is_lhs (x, n, dim)); - end -9 tests, 9 passed, 0 known failure, 0 skipped -[inst/sampling/stk_sampling_nestedlhs.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/sampling/stk_sampling_nestedlhs.m -***** shared x, n, dim, box, niter, levels - n = [48; 12; 4; 2]; dim = 2; box = [0, 0; 4, 4]; niter = 10; - levels = [10.1; 15.2; -9.3; 2.4; 17.5]; -***** error x = stk_sampling_nestedlhs (); -***** test x = stk_sampling_nestedlhs (n); -***** test x = stk_sampling_nestedlhs (n, dim); -***** test x = stk_sampling_nestedlhs (n, dim, box); -***** test x = stk_sampling_nestedlhs (n, dim, box, niter); -***** test x = stk_sampling_nestedlhs (n, dim, box, niter, levels); -***** assert ( isequal(size(x), [sum(n), dim + 1]) ); -***** assert ( isa(x, 'stk_dataframe') ); - cn = [0; cumsum(n)]; - for lev = 1:length(n), - y = x( (cn(lev) + 1):(cn(lev + 1)), 1:dim ); - assert (isequal (size (y), [n(lev) dim])); - assert (stk_is_lhs (y, n(lev), dim, box)); - if lev > 1 - assert ( isequal(z((end - n(lev) + 1):end, :), y) ); - end - z = y; - end -***** assert (isequal (x.colnames{dim + 1}, 'Level')); - levels = stk_dataframe(levels, {'t'}); - box = stk_hrect(box, {'x1', 'x2', 'x3', 'x4'}); -***** test x = stk_sampling_nestedlhs (n, [], box, [], levels); -***** assert (isequal(x.colnames, {'x1', 'x2', 'x3', 'x4', 't'}) ); -11 tests, 11 passed, 0 known failure, 0 skipped -[inst/sampling/stk_sampling_regulargrid.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/sampling/stk_sampling_regulargrid.m -***** shared x, n, dim, box - n = 9; dim = 2; box = [0, 0; 1, 1]; -***** error x = stk_sampling_regulargrid (); -***** test x = stk_sampling_regulargrid (n); -***** test x = stk_sampling_regulargrid (n, dim); -***** test x = stk_sampling_regulargrid (n, dim, box); -***** assert (isa (x, 'stk_dataframe')); -***** assert (isa (x, 'stk_factorialdesign')); -***** assert (isequal (x.colnames, {})); -***** test - cn = {'W', 'H'}; box = stk_hrect (box, cn); - x = stk_sampling_regulargrid (n, dim, box); - assert (isequal (x.colnames, cn)); -***** test - for dim = 1:3, - n = 3^dim; - x = stk_sampling_regulargrid(n, dim); - assert(isequal(size(x), [n dim])); - u = double(x); u = u(:); - assert(~any(isnan(u) | isinf(u))); - assert((min(u) >= 0) && (max(u) <= 1)); - end -***** test - nn = [3 4 5]; - for dim = 1:3, - x = stk_sampling_regulargrid(nn(1:dim), dim); - assert(isequal(size(x), [prod(nn(1:dim)) dim])); - u = double(x); u = u(:); - assert(~any(isnan(u) | isinf(u))); - assert((min(u) >= 0) && (max(u) <= 1)); - end -10 tests, 10 passed, 0 known failure, 0 skipped -[inst/sampling/stk_sampling_halton_rr2.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/sampling/stk_sampling_halton_rr2.m -***** error stk_sampling_halton_rr2 () % nargin < 1 -***** test - n = 300; d = 25; - x = stk_sampling_halton_rr2 (n, d); - assert (isequal (size (x), [n d])) +[inst/arrays/@stk_hrect/stk_dataframe.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_hrect/stk_dataframe.m +***** shared x, cn, rn, y, cn2, rn2 + cn = {'x' 'y'}; + rn = {'lower_bounds'; 'upper_bounds'}; + x = stk_hrect ([0 0; 1 1], cn); + cn2 = {'xx' 'yy'}; + rn2 = {'aa'; 'bb'}; +***** test y = stk_dataframe (x); +***** assert (strcmp (class (y), 'stk_dataframe')) +***** assert (isequal (y.colnames, cn)) +***** assert (isequal (y.rownames, rn)) +***** test y = stk_dataframe (x, cn2); +***** assert (strcmp (class (y), 'stk_dataframe')) +***** assert (isequal (y.colnames, cn2)) +***** assert (isequal (y.rownames, rn)) +***** test y = stk_dataframe (x, cn2, rn2); +***** assert (strcmp (class (y), 'stk_dataframe')) +***** assert (isequal (y.colnames, cn2)) +***** assert (isequal (y.rownames, rn2)) +***** test y = stk_dataframe (x, [], rn2); +***** assert (strcmp (class (y), 'stk_dataframe')) +***** assert (isequal (y.colnames, cn)) +***** assert (isequal (y.rownames, rn2)) +***** test y = stk_dataframe (x, {}, rn2); +***** assert (strcmp (class (y), 'stk_dataframe')) +***** assert (isequal (y.colnames, {})) +***** assert (isequal (y.rownames, rn2)) +20 tests, 20 passed, 0 known failure, 0 skipped +[inst/arrays/@stk_hrect/subsref.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_hrect/subsref.m ***** test - x = stk_sampling_halton_rr2 (1000, 3); - y = double (x(end, :)); - yref = [0.9052734375 0.028349336991312 0.74848]; - assert (stk_isequal_tolrel (y, yref, 1e-13)); + B = stk_hrect ([0 0 0 0; 1 2 3 4]); + B = B(:, [1 3 4]); + assert (strcmp (class (B), 'stk_hrect')); + assert (isequal (double (B), [0 0 0; 1 3 4])); ***** test - dim = 2; box = stk_hrect (dim); - x = stk_sampling_halton_rr2 (5, dim, box); - assert (isequal (x.colnames, {})); + B = stk_hrect ([0 0 0 0; 1 2 3 4]); + B = B(1, :); + assert (strcmp (class (B), 'stk_dataframe')); + assert (isequal (double (B), [0 0 0 0])); +2 tests, 2 passed, 0 known failure, 0 skipped +[inst/arrays/@stk_hrect/stk_rescale.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_hrect/stk_rescale.m +***** shared x + x = rand (10, 4); + y = stk_rescale (x, [], []); + assert (stk_isequal_tolabs (x, y)); ***** test - dim = 2; cn = {'W', 'H'}; box = stk_hrect (dim, cn); - x = stk_sampling_halton_rr2 (5, dim, box); - assert (isequal (x.colnames, cn)); -5 tests, 5 passed, 0 known failure, 0 skipped -[inst/sampling/stk_sampling_olhs.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/sampling/stk_sampling_olhs.m -***** shared x, n, d, box, permut - n = 5; d = 2; box = [0 0; 1, 1]; permut = 1:2; -***** error x = stk_sampling_olhs(); -***** test x = stk_sampling_olhs(n); -***** test x = stk_sampling_olhs(n, d); -***** test x = stk_sampling_olhs(n, d, box); -***** test x = stk_sampling_olhs(n, d, box, permut); -***** error x = stk_sampling_olhs(n, d, box, permut, pi); -***** assert (isa (x, 'stk_dataframe')); -***** assert (isequal (x.colnames, {})); + y = stk_rescale(0.5, [], [0; 2]); + assert (stk_isequal_tolabs (y, 1.0)); ***** test - cn = {'W', 'H'}; box = stk_hrect (box, cn); - x = stk_sampling_olhs (n, d, box); - assert (isequal (x.colnames, cn)); + y = stk_rescale (0.5, [0; 1], [0; 2]); + assert (stk_isequal_tolabs (y, 1.0)); ***** test - for r = 1:5 - - n = 2 ^ (r + 1) + 1; d = 2 * r; - x = stk_sampling_olhs (n, d); - - assert (isequal (size (x), [n d])); - - box = repmat ([-1; 1], 1, d); - assert (stk_is_lhs (x, n, d, box)); - - x = double (x); w = x' * x; - assert (stk_isequal_tolabs (w / w(1,1), eye (d))); - - end -10 tests, 10 passed, 0 known failure, 0 skipped -[inst/sampling/stk_sampling_vdc_rr2.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/sampling/stk_sampling_vdc_rr2.m -***** error __stk_sampling_vdc_rr2__() % two inputs required -***** error __stk_sampling_vdc_rr2__(10) % two inputs required -***** error __stk_sampling_vdc_rr2__(10, 3, -1) % two inputs required -***** test - n = 300; j = 25; - x = __stk_sampling_vdc_rr2__(n, j); - assert(isequal(size(x), [n 1])) + y = stk_rescale (0.5, [0; 2], []); + assert (stk_isequal_tolabs (y, 0.25)); ***** test - x = __stk_sampling_vdc_rr2__(2000, 7); - y = double (x(1998:2000, :)); - yref = [0.849786281294525; 0.085080398941584; 0.555668634235701]; - assert(stk_isequal_tolrel(y, yref, 1e-13)); -5 tests, 5 passed, 0 known failure, 0 skipped -[inst/sampling/stk_sampcrit_akg_eval.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/sampling/stk_sampcrit_akg_eval.m -***** shared zc_mean, zc_std, zr_mean, zr_std, zcr_cov, AKG, nc - xi = [0; 0.2; 0.7; 0.9]; - zi = [1; 0.9; 0.6; 0.1] - 10; - ni = 4; - - M_prior = stk_model (@stk_materncov32_iso); - M_prior.param = log ([1.0; 2.1]); - M_prior.lognoisevariance = 0.678; - - nc = 20; - xc = stk_sampling_regulargrid (nc, 1, [0; 1]); - [zp, ~, ~, K] = stk_predict (M_prior, xi, zi, [xi; xc]); - - ir = 1:ni; ic = ni + (1:nc); - - zc_mean = zp.mean(ic); - zc_std = sqrt (zp.var(ic)); - - % reference grid: current evaluation points ("KGCP") - zr_mean = zp.mean(ir); - zr_std = sqrt (zp.var(ir)); - - zcr_cov = K(ic, ir); -***** test AKG = stk_sampcrit_akg_eval (zc_mean, zc_std, zr_mean, zr_std, zcr_cov); -***** assert (isequal (size (AKG), [nc 1])) -***** assert (all (AKG >= 0)) -***** error AKG = stk_sampcrit_akg_eval (zc_mean, zc_std, zr_mean, zr_std); -4 tests, 4 passed, 0 known failure, 0 skipped -[inst/sampling/stk_sampcrit_ei_eval.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/sampling/stk_sampcrit_ei_eval.m -***** error EI = stk_sampcrit_ei_eval () % not enough args -***** error EI = stk_sampcrit_ei_eval (0) % not enough args -***** shared xi, zi, M_prior, xt, zp, EIref, EI1, EI2, EI3 - xi = [0; 0.2; 0.7; 0.9]; - zi = [1; 0.9; 0.6; 0.1]; - M_prior = stk_model (@stk_materncov32_iso); - M_prior.param = log ([1.0; 2.1]); - xt = stk_sampling_regulargrid (20, 1, [0; 1]); - zp = stk_predict (M_prior, xi, zi, xt); - EIref = stk_distrib_normal_ei (min (zi), zp.mean, sqrt (zp.var), true); -***** test % Current syntax (STK 2.4.1 and later) - EI1 = stk_sampcrit_ei_eval (zp.mean, sqrt (zp.var), min (zi)); -***** assert (isequal (EI1, EIref)) + y = stk_rescale (0.5, [0; 2], [0; 1]); + assert (stk_isequal_tolabs (y, 0.25)); 4 tests, 4 passed, 0 known failure, 0 skipped -[inst/sampling/stk_sampling_randunif.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/sampling/stk_sampling_randunif.m -***** shared x, n, dim, box - n = 10; dim = 2; box = [0, 0; 2, 2]; -***** error x = stk_sampling_randunif (); -***** test x = stk_sampling_randunif (n); -***** test x = stk_sampling_randunif (n, dim); -***** test x = stk_sampling_randunif (n, dim, box); -***** assert (isa(x, 'stk_dataframe')); -***** assert (isequal (x.colnames, {})); -***** test - cn = {'W', 'H'}; box = stk_hrect (box, cn); - x = stk_sampling_randunif (n, dim, box); - assert (isequal (x.colnames, cn)); +[inst/arrays/@stk_hrect/ismember.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_hrect/ismember.m +***** shared n, box + n = 5; + box = stk_hrect (n); +***** assert (ismember (box(1, :), box)) +***** assert (ismember (box(2, :), box)) +***** assert (ismember (.5 * ones (1, 5), box)) +***** assert (~ ismember (box(1, :) - 1, box)) +***** assert (~ ismember (box(2, :) + 1, box)) ***** test - for dim = 1:5, - x = stk_sampling_randunif(n, dim); - assert(isequal(size(x), [n dim])); - u = double(x); u = u(:); - assert(~any(isnan(u) | isinf(u))); - assert((min(u) >= 0) && (max(u) <= 1)); - end -8 tests, 8 passed, 0 known failure, 0 skipped -[inst/sampling/@stk_function/stk_function.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/sampling/@stk_function/stk_function.m -***** shared F -***** test F = stk_function () % ending ";" omitted on purpose, to test disp - -F = - -***** error [F F]; % arrays of sampling criterion objects are not supported -***** error [F; F]; % idem -***** error get (F, 'toto'); % field does not exist -***** error y = feval (F, 1.0); % not implemented for "pure" function objects -***** error dummy = F{2}; % illegal indexing -***** error dummy = F(1.0); % feval not implemented -***** error dummy = F.toto; % field does not exist -***** error F{2} = 1.234; % illegal indexing -***** error F(5) = 1.234; % illegal indexing -***** error F.toto = 1.234; % field does not exist -11 tests, 11 passed, 0 known failure, 0 skipped -[inst/sampling/stk_sampling_nesteddesign.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/sampling/stk_sampling_nesteddesign.m -***** shared x, n, dim, box, niter, levels - n = [23; 14; 5; 2]; dim = 2; box = [0, 0; 4, 4]; niter = 10; - levels = [10.1; 15.2; -9.3; 2.4; 17.5]; -***** error x = stk_sampling_nesteddesign (); -***** test x = stk_sampling_nesteddesign (n); -***** test x = stk_sampling_nesteddesign (n, dim); -***** test x = stk_sampling_nesteddesign (n, dim, box); -***** test x = stk_sampling_nesteddesign (n, dim, box, niter); -***** test x = stk_sampling_nesteddesign (n, dim, box, niter, levels); -***** assert ( isequal(size(x), [sum(n), dim + 1]) ); -***** assert ( isa(x, 'stk_dataframe') ); - cn = [0; cumsum(n)]; - for lev = 1:length(n), - y = x( (cn(lev) + 1):(cn(lev + 1)), 1:dim ); - assert (isequal (size (y), [n(lev) dim])); - if lev > 1 - assert ( isequal(z((end - n(lev) + 1):end, :), y) ); - end - if lev == length(n) - assert (stk_is_lhs (y, n(lev), dim, box)); - end - z = y; - end -***** assert (isequal (x.colnames{dim + 1}, 'Level')); - levels = stk_dataframe(levels, {'t'}); - box = stk_hrect(box, {'x1', 'x2', 'x3', 'x4'}); -***** test x = stk_sampling_nesteddesign (n, [], box, [], levels); -***** assert (isequal(x.colnames, {'x1', 'x2', 'x3', 'x4', 't'}) ); -11 tests, 11 passed, 0 known failure, 0 skipped -[inst/sampling/@stk_sampcrit_akg/stk_sampcrit_akg.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/sampling/@stk_sampcrit_akg/stk_sampcrit_akg.m -***** shared F, M, AKG - M = stk_model_gpposterior (stk_model, [1 2 3]', [1.234 3 2]'); -warning: Something went wrong during the optimization -crit0 = 2.594852, crit_opt = 2.594852: crit0 < crit_opt -***** test F = stk_sampcrit_akg () % ending ";" omitted on purpose, to test disp - -F = -| -| model: -- (not instantiated) -| reference_grid: -- (use current evaluation points) -| - -***** assert (isempty (F.model)) -***** assert (isempty (get (F, 'model'))) -***** assert (isempty (F.reference_grid)) -***** assert (isempty (get (F, 'reference_grid'))) -***** error F.toto -***** error get (F, 'toto') -***** error F.toto = 1.234; % field does not exist -***** error F = set (F, 'toto', 1.234); % field does not exist -***** error AKG = feval (F, 1.0); -***** test F = stk_sampcrit_akg (); F.model = M; - assert (isequal (F.model, M)); -***** test F = stk_sampcrit_akg (); F = set (F, 'model', M); - assert (isequal (F.model, M)); - assert (isequal (size (F.zr_mean), [3 1])) % n x 1 - assert (isequal (size (F.zr_std), [3 1])) % n x 1 - assert (isequal (size (F.zr_lambdamu), [4 3])) % (n+1) x n (constant mean) -***** test F.model = []; % remove model - assert (isempty (F.model)); - assert (isempty (F.zr_mean)) - assert (isempty (F.zr_std)) - assert (isempty (F.zr_lambdamu)) -***** test xr = [1 1.5 2 2.5 3]'; - F.reference_grid = xr % ending ";" omitted on purpose, to test disp - assert (isequal (F.reference_grid, xr)) - assert (isempty (F.zr_mean)) - assert (isempty (F.zr_std)) - assert (isempty (F.zr_lambdamu)) - -F = -| -| model: -- (not instantiated) -| reference_grid: <5x1 double array> -| - -***** test F.reference_grid = []; - assert (isempty (F.reference_grid)) -***** test F = stk_sampcrit_akg (); F.model = M; - assert (isequal (F.model, M)); - xr = [1 1.5 2 2.5 3]'; - F.reference_grid = xr % ending ";" omitted on purpose, to test disp - assert (isequal (F.reference_grid, xr)) - assert (isequal (size (F.zr_mean), [5 1])) % nr x 1 - assert (isequal (size (F.zr_std), [5 1])) % nr x 1 - assert (isequal (size (F.zr_lambdamu), [4 5])) % (n+1) x nr (constant mean) - -F = -| -| model: -| reference_grid: <5x1 double array> -| - -***** test F.reference_grid = []; - assert (isempty (F.reference_grid)) -***** test F = stk_sampcrit_akg (M) % ending ";" omitted on purpose, to test disp - -F = -| -| model: -| reference_grid: -- (use current evaluation points) -| - -***** assert (isequal (F.model, M)) -***** test AKG = feval (F, [1.0; 1.1; 1.2]); -***** assert (isequal (size (AKG), [3 1])) -***** assert (all (AKG >= 0)) -***** test [AKG2, zp] = feval (F, [1.0; 1.1; 1.2]); - assert (isequal (AKG2, AKG)); - assert (isa (zp, 'stk_dataframe') && isequal (size (zp), [3 2])) -***** shared F, xr - xr = [1 1.5 2 2.5 3]'; -***** test F = stk_sampcrit_akg (stk_model ()); -***** assert (isempty (F.reference_grid)) -***** test F.reference_grid = xr; -***** assert (isequal (F.reference_grid, xr)) -***** assert (isempty (F.zr_mean)) -***** assert (isempty (F.zr_std)) -***** assert (isempty (F.zr_lambdamu)) -***** error AKG = feval (F, 1.0); -***** shared F, M, xr - xr = [1 1.5 2 2.5 3]'; - M = stk_model_gpposterior (stk_model, [1 2 3]', [1.234 3 2]'); -warning: Something went wrong during the optimization -crit0 = 2.594852, crit_opt = 2.594852: crit0 < crit_opt -***** test F = stk_sampcrit_akg (M, xr); -***** assert (isequal (F.model, M)) -***** assert (isequal (F.reference_grid, xr)) -***** assert (isequal (size (F.zr_mean), [5 1])) % nr x 1 -***** assert (isequal (size (F.zr_std), [5 1])) % nr x 1 -***** assert (isequal (size (F.zr_lambdamu), [4 5])) % (n+1) x nr (constant mean) -37 tests, 37 passed, 0 known failure, 0 skipped -[inst/arrays/@stk_dataframe/stk_dataframe.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/stk_dataframe.m -***** test stk_test_class ('stk_dataframe') -***** test % default constructor - x = stk_dataframe (); - assert (isa (x, 'stk_dataframe') && isequal (size (x), [0 0])) + y = double (box); y = [y; y + 2]; + assert (isequal (ismember (y, box), [1; 1; 0; 0])) +6 tests, 6 passed, 0 known failure, 0 skipped +[inst/arrays/@stk_dataframe/stk_get_sample_size.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/stk_get_sample_size.m ***** test - y = stk_dataframe (rand (3, 2)); - assert (isa (y, 'stk_dataframe') && isequal (size (y), [3 2])) + x = stk_dataframe ([1 2; 3 4; 5 6]); + assert (isequal (stk_get_sample_size (x), 3)); +1 test, 1 passed, 0 known failure, 0 skipped +[inst/arrays/@stk_dataframe/cosd.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/cosd.m ***** test - y = stk_dataframe (rand (3, 2), {'x', 'y'}); - assert (isa (y, 'stk_dataframe') && isequal (size(y), [3 2])) - assert (isequal (y.colnames, {'x' 'y'})) + u = rand (4, 3); x = stk_dataframe (u); v = cosd (x); + assert (strcmp (class (v), class (u)) && isequal (v, cosd (u))) +1 test, 1 passed, 0 known failure, 0 skipped +[inst/arrays/@stk_dataframe/log1p.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/log1p.m ***** test - y = stk_dataframe (rand (3, 2), {'x', 'y'}, {'a', 'b', 'c'}); - assert (isa (y, 'stk_dataframe') && isequal (size (y), [3 2])) - assert (isequal (y.colnames, {'x' 'y'})) - assert (isequal (y.rownames, {'a'; 'b'; 'c'})) + u = rand (4, 3); x = stk_dataframe (u); v = log1p (x); + assert (strcmp (class (v), class (u)) && isequal (v, log1p (u))) +1 test, 1 passed, 0 known failure, 0 skipped +[inst/arrays/@stk_dataframe/stk_boundingbox.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/stk_boundingbox.m +***** shared x, y, cn + cn = {'a', 'b', 'c'}; + x = stk_dataframe ([0 3 2; 1 4 1; 7 0 2], cn); +***** error y = stk_boundingbox (); +***** test y = stk_boundingbox (x); +***** assert (isequal (y, stk_hrect ([0 0 1; 7 4 2], cn))); +3 tests, 3 passed, 0 known failure, 0 skipped +[inst/arrays/@stk_dataframe/atanh.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/atanh.m ***** test - x = stk_dataframe (rand (3, 2)); - y = stk_dataframe (x); - assert (isa (y, 'stk_dataframe') && isequal (size (y), [3 2])) -***** error - x = stk_dataframe (rand (3, 2)); - y = stk_dataframe (x, pi); -***** error - x = stk_dataframe (rand (3, 2)); - y = stk_dataframe (x, {}, pi); + u = rand (4, 3); x = stk_dataframe (u); v = atanh (x); + assert (strcmp (class (v), class (u)) && isequal (v, atanh (u))) +1 test, 1 passed, 0 known failure, 0 skipped +[inst/arrays/@stk_dataframe/unique.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/unique.m +***** test + cn = {'u' 'v' 'w'}; x = stk_dataframe (rand (4, 3), cn); + y = [x; x]; z = unique (y, 'rows'); + assert (isequal (z.colnames, cn)); + assert (isequal (z.data, unique (x.data, 'rows'))); +1 test, 1 passed, 0 known failure, 0 skipped +[inst/arrays/@stk_dataframe/tand.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/tand.m ***** test - x = stk_dataframe (rand (3, 2)); - y = stk_dataframe (x, {'x' 'y'}); - assert (isa (y, 'stk_dataframe') && isequal (size(y), [3 2])) - assert (isequal (y.colnames, {'x' 'y'})) + u = rand (4, 3); x = stk_dataframe (u); v = tand (x); + assert (strcmp (class (v), class (u)) && isequal (v, tand (u))) +1 test, 1 passed, 0 known failure, 0 skipped +[inst/arrays/@stk_dataframe/atan.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/atan.m ***** test - x = stk_dataframe (rand (3, 2)); - y = stk_dataframe (x, {'x' 'y'}, {'a', 'b', 'c'}); - assert (isa (y, 'stk_dataframe') && isequal (size(y), [3 2])) - assert (isequal (y.colnames, {'x' 'y'})) - assert (isequal (y.rownames, {'a'; 'b'; 'c'})) + u = rand (4, 3); x = stk_dataframe (u); v = atan (x); + assert (strcmp (class (v), class (u)) && isequal (v, atan (u))) +1 test, 1 passed, 0 known failure, 0 skipped +[inst/arrays/@stk_dataframe/log2.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/log2.m ***** test - x = stk_dataframe (rand (3, 2), {'x' 'y'}); - y = stk_dataframe (x, [], {'a', 'b', 'c'}); - assert (isa (y, 'stk_dataframe') && isequal (size(y), [3 2])) - assert (isequal (y.colnames, {'x' 'y'})) - assert (isequal (y.rownames, {'a'; 'b'; 'c'})) + u = rand (4, 3); x = stk_dataframe (u); v = log2 (x); + assert (strcmp (class (v), class (u)) && isequal (v, log2 (u))) +1 test, 1 passed, 0 known failure, 0 skipped +[inst/arrays/@stk_dataframe/size.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/size.m +***** shared x + x = stk_dataframe([1 2; 3 4; 5 6]); +***** assert (isequal (size(x), [3 2])) +***** assert (numel(x) == 1) +***** assert (ndims(x) == 2) +***** test size(x); % force exploration of branch nargout == 0 +4 tests, 4 passed, 0 known failure, 0 skipped +[inst/arrays/@stk_dataframe/isnan.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/isnan.m ***** test - x = stk_dataframe (rand (3, 2), {'x' 'y'}); - y = stk_dataframe (x, {}, {'a', 'b', 'c'}); - assert (isa (y, 'stk_dataframe') && isequal (size(y), [3 2])) - assert (isequal (y.colnames, {})) - assert (isequal (y.rownames, {'a'; 'b'; 'c'})) + u = [pi, NaN, Inf, -Inf]; x = stk_dataframe (u); v = isnan (x); + assert (islogical (v) && isequal (v, isnan (u))) +1 test, 1 passed, 0 known failure, 0 skipped +[inst/arrays/@stk_dataframe/bsxfun.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/bsxfun.m +***** shared x1, x2, data1, data2 + x1 = rand (3, 2); data1 = stk_dataframe (x1); + x2 = rand (3, 2); data2 = stk_dataframe (x2); ***** test - x = stk_factorialdesign ({1:3, 1:2}, {'x' 'y'}); - y = stk_dataframe (x, [], {'a' 'b' 'c' 'd' 'e' 'f'}); - assert (isa (y, 'stk_dataframe') && isequal (size (y), [6 2])) - assert (isequal (y.colnames, {'x' 'y'})) - assert (isequal (y.rownames, {'a'; 'b'; 'c'; 'd'; 'e'; 'f'})) + z = bsxfun (@plus, data1, x2); + assert (isa (z, 'stk_dataframe') && isequal (double (z), x1 + x2)) ***** test - x = stk_factorialdesign ({1:3, 1:2}, {}, {'a' 'b' 'c' 'd' 'e' 'f'}); - y = stk_dataframe (x, {'x' 'y'}); - assert (isa (y, 'stk_dataframe') && isequal (size (y), [6 2])) - assert (isequal (y.colnames, {'x' 'y'})) - assert (isequal (y.rownames, {'a'; 'b'; 'c'; 'd'; 'e'; 'f'})) + z = bsxfun (@plus, x1, data2); + assert (isa (z, 'stk_dataframe') && isequal (double (z), x1 + x2)) ***** test - x = stk_factorialdesign ({1:3, 1:2}, {}, {'a' 'b' 'c' 'd' 'e' 'f'}); - y = stk_dataframe (x, {'x' 'y'}, []); - assert (isa (y, 'stk_dataframe') && isequal (size (y), [6 2])) - assert (isequal (y.colnames, {'x' 'y'})) - assert (isequal (y.rownames, {'a'; 'b'; 'c'; 'd'; 'e'; 'f'})) + z = bsxfun (@plus, data1, data2); + assert (isa (z, 'stk_dataframe') && isequal (double (z), x1 + x2)) +***** shared x, y + x = stk_dataframe (randn (2), {'x1', 'x2'}, {'a'; 'b'}); + y = stk_dataframe (randn (2), {'y1', 'y2'}, {'c'; 'd'}); +***** test z = x + y; + assert (isequal (z.colnames, x.colnames)); + assert (isequal (z.rownames, x.rownames)); +***** test z = y + x; + assert (isequal (z.colnames, y.colnames)); + assert (isequal (z.rownames, y.rownames)); +5 tests, 5 passed, 0 known failure, 0 skipped +[inst/arrays/@stk_dataframe/acosd.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/acosd.m ***** test - x = stk_factorialdesign ({1:3, 1:2}, {'x' 'y'}, {'a' 'b' 'c' 'd' 'e' 'f'}); - y = stk_dataframe (x); - assert (isa (y, 'stk_dataframe') && isequal (size (y), [6 2])) - assert (isequal (y.colnames, {'x' 'y'})) - assert (isequal (y.rownames, {'a'; 'b'; 'c'; 'd'; 'e'; 'f'})) -***** error - x = stk_factorialdesign ({1:3, 1:2}); - y = stk_dataframe (x, pi); -***** error - x = stk_factorialdesign ({1:3, 1:2}); - y = stk_dataframe (x, {}, pi); + u = rand (4, 3); x = stk_dataframe (u); v = acosd (x); + assert (strcmp (class (v), class (u)) && isequal (v, acosd (u))) +1 test, 1 passed, 0 known failure, 0 skipped +[inst/arrays/@stk_dataframe/times.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/times.m +***** test stk_test_dfbinaryop(@times, rand(7, 2), rand(7, 2)); +***** test stk_test_dfbinaryop(@times, rand(7, 2), pi); +***** error stk_test_dfbinaryop(@times, rand(7, 2), rand(7, 3)); +3 tests, 3 passed, 0 known failure, 0 skipped +[inst/arrays/@stk_dataframe/isfinite.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/isfinite.m ***** test - x = stk_dataframe ([], {'a', 'b'}); - assert (isequal (size (x), [0 2])) - assert (isequal (x.colnames, {'a' 'b'})); - assert (isequal (x.rownames, {})); + u = [pi, NaN, Inf, -Inf]; x = stk_dataframe (u); v = isfinite (x); + assert (islogical (v) && isequal (v, isfinite (u))) +1 test, 1 passed, 0 known failure, 0 skipped +[inst/arrays/@stk_dataframe/log10.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/log10.m ***** test - x = stk_dataframe ([], {'a', 'b'}, {'toto'}); - assert (isequal (size (x), [1 2])) - assert (isequal (x.colnames, {'a' 'b'})); - assert (isequal (x.rownames, {'toto'})); -***** shared x + u = rand (4, 3); x = stk_dataframe (u); v = log10 (x); + assert (strcmp (class (v), class (u)) && isequal (v, log10 (u))) +1 test, 1 passed, 0 known failure, 0 skipped +[inst/arrays/@stk_dataframe/mldivide.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/mldivide.m ***** test - x = stk_dataframe (randn (10, 1), 'NOx'); - assert (isequal (x.colnames, {'NOx'})); + x1_data = [57 7; 2 0]; + x1 = stk_dataframe (x1_data, {'x' 'y'}, {'a'; 'b'}); + x2_data = [8 7; 2 0]; + x2 = stk_dataframe (x2_data, {'w' 'z'}, {'a'; 'b'}); + y = x2 \ x1; + assert (stk_isequal_tolabs (y, ... + stk_dataframe ([1 0; 7 1], {'x'; 'y'}, {'w'; 'z'}))); +***** shared x_data, x, y_data, y + x_data = [3 3; 6 3; 9 12]; + y_data = [1 1; 2 1; 3 4]; + x = stk_dataframe (x_data, {'x' 'y'}, {'a'; 'b'; 'c'}); +***** test y = 3 \ x; +***** assert (isequal (y, stk_dataframe (y_data, {'x' 'y'}, {'a'; 'b'; 'c'}))); +***** error y = x \ 3; +4 tests, 4 passed, 0 known failure, 0 skipped +[inst/arrays/@stk_dataframe/isinf.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/isinf.m ***** test - y = stk_dataframe (x, 'toto'); - assert (isequal (y.colnames, {'toto'})); + u = [pi, NaN, Inf, -Inf]; x = stk_dataframe (u); v = isinf (x); + assert (islogical (v) && isequal (v, isinf (u))) +1 test, 1 passed, 0 known failure, 0 skipped +[inst/arrays/@stk_dataframe/vertcat.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/vertcat.m +***** shared u, v + u = rand (3, 2); + v = rand (3, 2); ***** test - x = stk_dataframe (randn (1, 2), {}, 'aaa'); - assert (isequal (x.rownames, {'aaa'})); + x = stk_dataframe (u); + y = stk_dataframe (v); + z = vertcat (x, y); + assert (isa (z, 'stk_dataframe') && isequal (double (z), [u; v])); +***** test % the same, with row names this time + x = stk_dataframe (u, {}, {'a'; 'b'; 'c'}); + y = stk_dataframe (v, {}, {'d'; 'e'; 'f'}); + z = vertcat (x, y); + assert (isa (z, 'stk_dataframe') && isequal (double (z), [u; v])); + assert (all (strcmp (z.rownames, {'a'; 'b'; 'c'; 'd'; 'e'; 'f'}))); +***** test % the same, with row names only for the first argument + x = stk_dataframe (u, {}, {'a'; 'b'; 'c'}); + y = stk_dataframe (v); + z = vertcat (x, y); + assert (isa (z, 'stk_dataframe') && isequal (double (z), [u; v])); +***** test % incompatible variable names + u = rand (3, 1); x = stk_dataframe (u, {'x'}); + v = rand (3, 1); y = stk_dataframe (v, {'y'}); + z = vertcat (x, y); + assert (isequal (z.colnames, {})); +warning: Incompatible column names ! +The output of vertcat will have no column names. +warning: called from + vertcat at line 82 column 9 + __test__ at line 5 column 4 + test at line 682 column 11 + /tmp/tmp.U7Xx8aDcQp at line 782 column 31 + ***** test - y = stk_dataframe (x, {}, 'tata'); - assert (isequal (y.rownames, {'tata'})); -24 tests, 24 passed, 0 known failure, 0 skipped -[inst/arrays/@stk_dataframe/abs.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/abs.m + x = stk_dataframe (u); + z = vertcat (x, v); + assert (isa (z, 'stk_dataframe') && isequal (double (z), [u; v])); +***** test % the same, with row names for the first argument + x = stk_dataframe (u, {}, {'a'; 'b'; 'c'}); + z = vertcat (x, v); + assert (isa (z, 'stk_dataframe') && isequal (double (z), [u; v])); ***** test - u = rand (4, 3); x = stk_dataframe (u); v = abs (x); - assert (strcmp (class (v), class (u)) && isequal (v, abs (u))) -1 test, 1 passed, 0 known failure, 0 skipped -[inst/arrays/@stk_dataframe/min.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/min.m -***** test stk_test_dfbinaryop ('min', rand(7, 2), rand(7, 2)); -***** test stk_test_dfbinaryop ('min', rand(7, 2), pi); -***** error stk_test_dfbinaryop ('min', rand(7, 2), rand(7, 3)); -***** shared x1, df1 - x1 = rand(9, 3); - df1 = stk_dataframe(x1, {'a', 'b', 'c'}); -***** assert (isequal (min(df1), min(x1))) -***** assert (isequal (min(df1, [], 1), min(x1))) -***** assert (isequal (min(df1, [], 2), min(x1, [], 2))) -***** error (min(df1, df1, 2)) + y = stk_dataframe (v); + z = vertcat (u, y); + assert (isa (z, 'stk_dataframe') && (isequal (double (z), [u; v]))); ***** test - x = stk_dataframe ([5; 2; 4]); - [M, k] = min (x); - assert ((M == 2) && (k == 2)); -8 tests, 8 passed, 0 known failure, 0 skipped -[inst/arrays/@stk_dataframe/asinh.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/asinh.m + x = stk_dataframe (u); + y = stk_dataframe (v); + z = vertcat (x, y, u, v); + assert (isa (z, 'stk_dataframe') && isequal (double (z), [u; v; u; v])); +***** shared x, y + x = stk_dataframe (rand (2, 3), {'a', 'b', 'c'}); + y = stk_dataframe (rand (3, 2), {'a', 'b'}); + y = horzcat (y, rand(3, 1)); % last column name is missing ***** test - u = rand (4, 3); x = stk_dataframe (u); v = asinh (x); - assert (strcmp (class (v), class (u)) && isequal (v, asinh (u))) -1 test, 1 passed, 0 known failure, 0 skipped + z = vertcat (x, y); + assert (isequal (z.colnames, {'a' 'b' 'c'})) +***** test + z = vertcat (y, x); + assert (isequal (z.colnames, {'a' 'b' 'c'})) +10 tests, 10 passed, 0 known failure, 0 skipped +[inst/arrays/@stk_dataframe/plus.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/plus.m +***** test stk_test_dfbinaryop(@plus, rand(7, 2), rand(7, 2)); +***** test stk_test_dfbinaryop(@plus, rand(7, 2), pi); +***** error stk_test_dfbinaryop(@plus, rand(7, 2), rand(7, 3)); +3 tests, 3 passed, 0 known failure, 0 skipped [inst/arrays/@stk_dataframe/subsasgn.m] >>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/subsasgn.m ***** shared x, s, t, data @@ -8834,50 +8062,23 @@ ***** test x.rownames{2} = 'b'; ***** assert (isequal (x.rownames, {''; 'b'; ''})); 37 tests, 37 passed, 0 known failure, 0 skipped -[inst/arrays/@stk_dataframe/quantile.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/quantile.m -***** shared x1, df1, p - x1 = rand (9, 3); - df1 = stk_dataframe (x1, {'a', 'b', 'c'}); - p = 0.95; -***** assert (isequal (quantile (df1, p), quantile (x1, p))) -***** assert (isequal (quantile (df1, p, 1), quantile (x1, p))) -***** assert (isequal (quantile (df1, p, 2), quantile (x1, p, 2))) -3 tests, 3 passed, 0 known failure, 0 skipped -[inst/arrays/@stk_dataframe/median.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/median.m -***** shared x1, df1 - x1 = rand(9, 3); - df1 = stk_dataframe(x1, {'a', 'b', 'c'}); -***** assert (isequal (median(df1), median(x1))) -***** assert (isequal (median(df1, 1), median(x1))) -***** assert (isequal (median(df1, 2), median(x1, 2))) -3 tests, 3 passed, 0 known failure, 0 skipped -[inst/arrays/@stk_dataframe/stk_rescale.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/stk_rescale.m +[inst/arrays/@stk_dataframe/asinh.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/asinh.m ***** test - u = rand(5, 1) * 2; - x = stk_dataframe(u); - y = stk_rescale(x, [0; 2], [0; 3]); - assert (isa (y, 'stk_dataframe') && isequal(double(y), u * 3/2)) + u = rand (4, 3); x = stk_dataframe (u); v = asinh (x); + assert (strcmp (class (v), class (u)) && isequal (v, asinh (u))) 1 test, 1 passed, 0 known failure, 0 skipped -[inst/arrays/@stk_dataframe/display.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/display.m -***** test display (stk_dataframe (rand (3, 2))); - - = <3x2 stk_dataframe array> - - : -------- -------- - * : 0.877430 0.243373 - * : 0.083893 0.636020 - * : 0.643046 0.867705 - +[inst/arrays/@stk_dataframe/tan.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/tan.m +***** test + u = rand (4, 3); x = stk_dataframe (u); v = tan (x); + assert (strcmp (class (v), class (u)) && isequal (v, tan (u))) 1 test, 1 passed, 0 known failure, 0 skipped -[inst/arrays/@stk_dataframe/sin.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/sin.m +[inst/arrays/@stk_dataframe/acosh.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/acosh.m ***** test - u = rand (4, 3); x = stk_dataframe (u); v = sin (x); - assert (strcmp (class (v), class (u)) && isequal (v, sin (u))) + u = rand (4, 3); x = stk_dataframe (u); v = acosh (x); + assert (strcmp (class (v), class (u)) && isequal (v, acosh (u))) 1 test, 1 passed, 0 known failure, 0 skipped [inst/arrays/@stk_dataframe/sum.m] >>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/sum.m @@ -8895,125 +8096,164 @@ x = stk_dataframe (rand (3, 2)); ***** test format rat; disp (x); : -------- -------- - * : 0.266987 0.720480 - * : 0.808167 0.094626 - * : 0.473210 0.491272 + * : 0.381442 0.992953 + * : 0.648513 0.418236 + * : 0.745045 0.120929 ***** test format long; disp (x); : ---------------- ---------------- - * : 0.26698691761559 0.72047985508218 - * : 0.80816667789149 0.09462616941766 - * : 0.47321037523026 0.49127157916805 + * : 0.38144193937990 0.99295346604531 + * : 0.64851337082620 0.41823609680677 + * : 0.74504514565567 0.12092870683988 ***** test format short; disp (x); format (fmt); : -------- -------- - * : 0.266987 0.720480 - * : 0.808167 0.094626 - * : 0.473210 0.491272 + * : 0.381442 0.992953 + * : 0.648513 0.418236 + * : 0.745045 0.120929 ***** test disp (stk_dataframe (zeros (0, 1))) Empty data frame with 0 rows and 0 columns ***** test disp (stk_dataframe (zeros (0, 2))) Empty data frame with 0 rows and 0 columns 5 tests, 5 passed, 0 known failure, 0 skipped -[inst/arrays/@stk_dataframe/asin.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/asin.m +[inst/arrays/@stk_dataframe/exp.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/exp.m ***** test - u = rand (4, 3); x = stk_dataframe (u); v = asin (x); - assert (strcmp (class (v), class (u)) && isequal (v, asin (u))) + u = rand (4, 3); x = stk_dataframe (u); v = exp (x); + assert (strcmp (class (v), class (u)) && isequal (v, exp (u))) 1 test, 1 passed, 0 known failure, 0 skipped -[inst/arrays/@stk_dataframe/apply.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/apply.m -***** shared x, t, u - t = rand (3, 2); - x = stk_dataframe (t); -***** test u = apply (x, 1, @sum); -***** assert (isequal (u, sum (t, 1))) -***** test u = apply (x, 2, @sum); -***** assert (isequal (u, sum (t, 2))) -***** error u = apply (x, 3, @sum); -***** test u = apply (x, 1, @min, []); -***** assert (isequal (u, min (t, [], 1))) -***** test u = apply (x, 2, @min, []); -***** assert (isequal (u, min (t, [], 2))) -***** error u = apply (x, 3, @min, []); -***** test - t = [1; 3; 2]; - x = stk_dataframe (t); - [M, k] = apply (x, 1, @max, []); - assert ((M == 3) && (k == 2)); -11 tests, 11 passed, 0 known failure, 0 skipped -[inst/arrays/@stk_dataframe/atan.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/atan.m +[inst/arrays/@stk_dataframe/prod.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/prod.m +***** shared x1, df1 + x1 = rand(9, 3); + df1 = stk_dataframe(x1, {'a', 'b', 'c'}); +***** assert (isequal (prod(df1), prod(x1))) +***** assert (isequal (prod(df1, 1), prod(x1))) +***** assert (isequal (prod(df1, 2), prod(x1, 2))) +3 tests, 3 passed, 0 known failure, 0 skipped +[inst/arrays/@stk_dataframe/var.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/var.m +***** shared x1, df1 + x1 = rand(9, 3); + df1 = stk_dataframe(x1, {'a', 'b', 'c'}); +***** assert (isequal (var(df1), var(x1))) +***** assert (isequal (var(df1, 0, 1), var(x1))) +***** assert (isequal (var(df1, 0, 2), var(x1, 0, 2))) +***** assert (isequal (var(df1, 1), var(x1, 1))) +***** assert (isequal (var(df1, 1, 1), var(x1, 1))) +***** assert (isequal (var(df1, 1, 2), var(x1, 1, 2))) +6 tests, 6 passed, 0 known failure, 0 skipped +[inst/arrays/@stk_dataframe/realpow.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/realpow.m +***** test stk_test_dfbinaryop(@realpow, rand(7, 2), .1 + rand(7, 2)); +***** test stk_test_dfbinaryop(@realpow, rand(7, 2), .1); +***** error stk_test_dfbinaryop(@realpow, rand(7, 2), .1 + rand(7, 3)); +3 tests, 3 passed, 0 known failure, 0 skipped +[inst/arrays/@stk_dataframe/horzcat.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/horzcat.m +***** shared u, v + u = rand(3, 2); + v = rand(3, 2); ***** test - u = rand (4, 3); x = stk_dataframe (u); v = atan (x); - assert (strcmp (class (v), class (u)) && isequal (v, atan (u))) -1 test, 1 passed, 0 known failure, 0 skipped -[inst/arrays/@stk_dataframe/atand.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/atand.m + x = stk_dataframe(u, {'x1' 'x2'}); + y = stk_dataframe(v, {'y1' 'y2'}); + z = horzcat (x, y); + assert(isa(z, 'stk_dataframe') && isequal(double(z), [u v])); + assert(all(strcmp(z.colnames, {'x1' 'x2' 'y1' 'y2'}))); ***** test - u = rand (4, 3); x = stk_dataframe (u); v = atand (x); - assert (strcmp (class (v), class (u)) && isequal (v, atand (u))) -1 test, 1 passed, 0 known failure, 0 skipped -[inst/arrays/@stk_dataframe/vertcat.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/vertcat.m -***** shared u, v - u = rand (3, 2); - v = rand (3, 2); + x = stk_dataframe(u, {'x1' 'x2'}, {'a'; 'b'; 'c'}); + y = stk_dataframe(v, {'y1' 'y2'}); + z = horzcat (x, y); + assert(isa(z, 'stk_dataframe') && isequal(double(z), [u v])); + assert(all(strcmp(z.colnames, {'x1' 'x2' 'y1' 'y2'}))); + assert(all(strcmp(z.rownames, {'a'; 'b'; 'c'}))); ***** test - x = stk_dataframe (u); - y = stk_dataframe (v); - z = vertcat (x, y); - assert (isa (z, 'stk_dataframe') && isequal (double (z), [u; v])); -***** test % the same, with row names this time - x = stk_dataframe (u, {}, {'a'; 'b'; 'c'}); - y = stk_dataframe (v, {}, {'d'; 'e'; 'f'}); - z = vertcat (x, y); - assert (isa (z, 'stk_dataframe') && isequal (double (z), [u; v])); - assert (all (strcmp (z.rownames, {'a'; 'b'; 'c'; 'd'; 'e'; 'f'}))); -***** test % the same, with row names only for the first argument - x = stk_dataframe (u, {}, {'a'; 'b'; 'c'}); - y = stk_dataframe (v); - z = vertcat (x, y); - assert (isa (z, 'stk_dataframe') && isequal (double (z), [u; v])); -***** test % incompatible variable names - u = rand (3, 1); x = stk_dataframe (u, {'x'}); - v = rand (3, 1); y = stk_dataframe (v, {'y'}); - z = vertcat (x, y); - assert (isequal (z.colnames, {})); -warning: Incompatible column names ! -The output of vertcat will have no column names. + x = stk_dataframe(u, {'x1' 'x2'}); + y = stk_dataframe(v, {'y1' 'y2'}, {'a'; 'b'; 'c'}); + z = horzcat (x, y); + assert(isa(z, 'stk_dataframe') && isequal(double(z), [u v])); + assert(all(strcmp(z.colnames, {'x1' 'x2' 'y1' 'y2'}))); + assert(all(strcmp(z.rownames, {'a'; 'b'; 'c'}))); +***** test % incompatible row names + x = stk_dataframe (u, {'x1' 'x2'}, {'a'; 'b'; 'c'}); + y = stk_dataframe (v, {'y1' 'y2'}, {'a'; 'b'; 'd'}); + z = horzcat (x, y); + assert (isequal (z.rownames, {})); +warning: Incompatible row names ! +The output of horzcat will have no row names. warning: called from - vertcat at line 82 column 9 + horzcat at line 73 column 9 __test__ at line 5 column 4 test at line 682 column 11 - /tmp/tmp.leWC69aW4i at line 1038 column 31 + /tmp/tmp.U7Xx8aDcQp at line 878 column 31 ***** test x = stk_dataframe (u); - z = vertcat (x, v); - assert (isa (z, 'stk_dataframe') && isequal (double (z), [u; v])); -***** test % the same, with row names for the first argument - x = stk_dataframe (u, {}, {'a'; 'b'; 'c'}); - z = vertcat (x, v); - assert (isa (z, 'stk_dataframe') && isequal (double (z), [u; v])); + z = horzcat (x, v); + assert (isa (z, 'stk_dataframe') && isequal (double (z), [u v])); ***** test y = stk_dataframe (v); - z = vertcat (u, y); - assert (isa (z, 'stk_dataframe') && (isequal (double (z), [u; v]))); + z = horzcat (u, y); + assert (isa (z, 'stk_dataframe') && isequal (double (z), [u v])); ***** test - x = stk_dataframe (u); - y = stk_dataframe (v); - z = vertcat (x, y, u, v); - assert (isa (z, 'stk_dataframe') && isequal (double (z), [u; v; u; v])); + x = stk_dataframe(u, {'x1' 'x2'}); + y = stk_dataframe(v, {'y1' 'y2'}); + z = horzcat (x, y, u, v); + assert(isa(z, 'stk_dataframe') && isequal(double(z), [u v u v])); +7 tests, 7 passed, 0 known failure, 0 skipped +[inst/arrays/@stk_dataframe/power.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/power.m +***** test stk_test_dfbinaryop(@power, rand(7, 2), .1 + rand(7, 2)); +***** test stk_test_dfbinaryop(@power, rand(7, 2), .1); +***** error stk_test_dfbinaryop(@power, rand(7, 2), .1 + rand(7, 3)); +3 tests, 3 passed, 0 known failure, 0 skipped +[inst/arrays/@stk_dataframe/mtimes.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/mtimes.m +***** shared x, y, z, w + + u = [1 3 4; 2 7 6]; % 2 x 3 + v = [6 2; 1 7; 9 4]; % 3 x 2 + w = [45 39; 73 77]; % u * v + + x = stk_dataframe (u, {}, {'a'; 'b'}); + y = stk_dataframe (v, {'c' 'd'}); + z = x * y; +***** assert (isa (z, 'stk_dataframe')); +***** assert (isequal (z.data, w)); +***** assert (isequal (z.rownames, x.rownames)); +***** assert (isequal (z.colnames, y.colnames)); ***** shared x, y - x = stk_dataframe (rand (2, 3), {'a', 'b', 'c'}); - y = stk_dataframe (rand (3, 2), {'a', 'b'}); - y = horzcat (y, rand(3, 1)); % last column name is missing + x = stk_dataframe (rand (3, 2), {'x' 'y'}, {'a'; 'b'; 'c'}); +***** test y = 3 * x; +***** assert (isequal (y, stk_dataframe (3 * x.data, {'x' 'y'}, {'a'; 'b'; 'c'}))); +***** test y = x * 3; +***** assert (isequal (y, stk_dataframe (3 * x.data, {'x' 'y'}, {'a'; 'b'; 'c'}))); +8 tests, 8 passed, 0 known failure, 0 skipped +[inst/arrays/@stk_dataframe/stk_normalize.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/stk_normalize.m ***** test - z = vertcat (x, y); - assert (isequal (z.colnames, {'a' 'b' 'c'})) + u = rand (6, 2) * 2; + x = stk_dataframe (u); + y = stk_normalize (x); + assert (isa (y, 'stk_dataframe') ... + && stk_isequal_tolabs (double (y), stk_normalize (u))) +1 test, 1 passed, 0 known failure, 0 skipped +[inst/arrays/@stk_dataframe/mrdivide.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/mrdivide.m ***** test - z = vertcat (y, x); - assert (isequal (z.colnames, {'a' 'b' 'c'})) -10 tests, 10 passed, 0 known failure, 0 skipped + x1_data = [8 7; 58 49]; + x1 = stk_dataframe (x1_data, {'x' 'y'}, {'a'; 'b'}); + x2_data = [8 7; 2 0]; + x2 = stk_dataframe (x2_data, {'x' 'y'}, {'u'; 'v'}); + y = x1 / x2; + assert (stk_isequal_tolabs (y, ... + stk_dataframe ([1 0; 7 1], {'u'; 'v'}, {'a'; 'b'}))); +***** shared x_data, x, y_data, y + x_data = [3 3; 6 3; 9 12]; + y_data = [1 1; 2 1; 3 4]; + x = stk_dataframe (x_data, {'x' 'y'}, {'a'; 'b'; 'c'}); +***** test y = x / 3; +***** assert (isequal (y, stk_dataframe ([1 1; 2 1; 3 4], {'x' 'y'}, {'a'; 'b'; 'c'}))); +***** error y = 3 / x; +4 tests, 4 passed, 0 known failure, 0 skipped [inst/arrays/@stk_dataframe/fieldnames.m] >>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/fieldnames.m ***** test @@ -9028,146 +8268,92 @@ {'toto'; 'aa'; 'bb'; 'data'; 'info'; ... 'rownames'; 'colnames'; 'sample_size'})); 2 tests, 2 passed, 0 known failure, 0 skipped -[inst/arrays/@stk_dataframe/cos.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/cos.m -***** test - u = rand (4, 3); x = stk_dataframe (u); v = cos (x); - assert (strcmp (class (v), class (u)) && isequal (v, cos (u))) -1 test, 1 passed, 0 known failure, 0 skipped -[inst/arrays/@stk_dataframe/ldivide.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/ldivide.m -***** test stk_test_dfbinaryop(@ldivide, 1 + rand(7, 2), rand(7, 2)); -***** test stk_test_dfbinaryop(@ldivide, 1 + rand(7, 2), pi); -***** error stk_test_dfbinaryop(@ldivide, 1 + rand(7, 2), rand(7, 3)); +[inst/arrays/@stk_dataframe/plot.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/plot.m +***** test % plot with x as a vector and z as a (univariate) dataframe + x = linspace(0, 2*pi, 30)'; + z = stk_dataframe(sin(x)); + figure; plot(x, z); close(gcf); +***** test % plot with x as a vector and z as a (multivariate) dataframe + x = linspace(0, 2*pi, 30)'; + z = stk_dataframe([sin(x) cos(x)], {'sin' 'cos'}); + figure; plot(x, z); close(gcf); +***** test % plot with x as a dataframe and z as a vector + x = stk_dataframe(linspace(0, 2*pi, 30)'); + z = sin(double(x)); + figure; plot(x, z); close(gcf); 3 tests, 3 passed, 0 known failure, 0 skipped -[inst/arrays/@stk_dataframe/logical.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/logical.m -***** test - u = rand (4, 3); - x = stk_dataframe (u); - v = logical (x); - assert (strcmp (class(v), 'logical') && isequal (v, logical (u))) -***** test - u = (rand (4, 3) < 0.5); - x = stk_dataframe (u); - v = logical (x); - assert (strcmp (class (v), 'logical') && isequal (v, u)) +[inst/arrays/@stk_dataframe/apply.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/apply.m +***** shared x, t, u + t = rand (3, 2); + x = stk_dataframe (t); +***** test u = apply (x, 1, @sum); +***** assert (isequal (u, sum (t, 1))) +***** test u = apply (x, 2, @sum); +***** assert (isequal (u, sum (t, 2))) +***** error u = apply (x, 3, @sum); +***** test u = apply (x, 1, @min, []); +***** assert (isequal (u, min (t, [], 1))) +***** test u = apply (x, 2, @min, []); +***** assert (isequal (u, min (t, [], 2))) +***** error u = apply (x, 3, @min, []); ***** test - u = uint8 (rand (4, 3) * 5); - x = stk_dataframe (u); - v = logical (x); - assert (strcmp (class (v), 'logical') && isequal (v, logical (u))) -3 tests, 3 passed, 0 known failure, 0 skipped -[inst/arrays/@stk_dataframe/sqrt.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/sqrt.m + t = [1; 3; 2]; + x = stk_dataframe (t); + [M, k] = apply (x, 1, @max, []); + assert ((M == 3) && (k == 2)); +11 tests, 11 passed, 0 known failure, 0 skipped +[inst/arrays/@stk_dataframe/max.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/max.m +***** test stk_test_dfbinaryop ('max', rand(7, 2), rand(7, 2)); +***** test stk_test_dfbinaryop ('max', rand(7, 2), pi); +***** error stk_test_dfbinaryop ('max', rand(7, 2), rand(7, 3)); +***** shared x1, df1 + x1 = rand(9, 3); + df1 = stk_dataframe(x1, {'a', 'b', 'c'}); +***** assert (isequal (max(df1), max(x1))) +***** assert (isequal (max(df1, [], 1), max(x1))) +***** assert (isequal (max(df1, [], 2), max(x1, [], 2))) +***** error (max(df1, df1, 2)) ***** test - u = rand (4, 3); x = stk_dataframe (u); v = sqrt (x); - assert (strcmp (class (v), class (u)) && isequal (v, sqrt (u))) -1 test, 1 passed, 0 known failure, 0 skipped -[inst/arrays/@stk_dataframe/end.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/end.m -***** shared x - x = stk_dataframe ([1; 2; 3]); -***** assert (isequal (double (x(2:end, :)), [2; 3])) -***** assert (isequal (double (x(2:end)), [2; 3])) -***** assert (isequal (double (x(2, 1:end)), 2)) -***** assert (isequal (double (x(end)), 3)) -***** shared x - x = stk_dataframe ([1 2; 3 4; 5 6]); -***** assert (isequal (x(2:end, :), x(2:3, :))) -***** assert (isequal (x(2, 1:end), x(2, :))) -***** assert (isequal (x(2:end, 2:end), x(2:3, 2))) -***** error x(1:end, 1:end, 1:end) + x = stk_dataframe ([1; 3; 2]); + [M, k] = max (x); + assert ((M == 3) && (k == 2)); 8 tests, 8 passed, 0 known failure, 0 skipped +[inst/arrays/@stk_dataframe/sort.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/sort.m +***** shared x, y + x = stk_dataframe ([3; 2; 1], {}, {'a', 'b', 'c'}); + y = sort (x); +***** assert (strcmp (class (y), 'stk_dataframe')) +***** assert (isequal (y.data, [1; 2; 3])) +***** assert (isequal (y.rownames, {'c'; 'b'; 'a'})) +***** error y = sort (x, []); +***** assert (isequal (sort (x, 1), y)) +***** assert (isequal (sort (x, 2), x)) +***** error sort (x, 3) +***** error y = sort (x, [], 'ascend'); +***** assert (isequal (sort (x, 1, 'ascend'), y)) +***** assert (isequal (sort (x, 2, 'ascend'), x)) +***** error y = sort (x, 3, 'ascend'); +***** error y = sort (x, [], 'descend'); +***** assert (isequal (sort (x, 1, 'descend'), x)) +***** assert (isequal (sort (x, 2, 'descend'), x)) +***** error sort (x, 3, 'descend') +15 tests, 15 passed, 0 known failure, 0 skipped [inst/arrays/@stk_dataframe/stk_length.m] >>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/stk_length.m ***** test x = stk_dataframe ([1 2; 3 4; 5 6]); assert (isequal (stk_length (x), 3)); 1 test, 1 passed, 0 known failure, 0 skipped -[inst/arrays/@stk_dataframe/isfinite.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/isfinite.m -***** test - u = [pi, NaN, Inf, -Inf]; x = stk_dataframe (u); v = isfinite (x); - assert (islogical (v) && isequal (v, isfinite (u))) -1 test, 1 passed, 0 known failure, 0 skipped [inst/arrays/@stk_dataframe/minus.m] >>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/minus.m ***** test stk_test_dfbinaryop(@minus, rand(7, 2), rand(7, 2)); ***** test stk_test_dfbinaryop(@minus, rand(7, 2), pi); ***** error stk_test_dfbinaryop(@minus, rand(7, 2), rand(7, 3)); 3 tests, 3 passed, 0 known failure, 0 skipped -[inst/arrays/@stk_dataframe/sinh.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/sinh.m -***** test - u = rand (4, 3); x = stk_dataframe (u); v = sinh (x); - assert (strcmp (class (v), class (u)) && isequal (v, sinh (u))) -1 test, 1 passed, 0 known failure, 0 skipped -[inst/arrays/@stk_dataframe/acos.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/acos.m -***** test - u = rand (4, 3); x = stk_dataframe (u); v = acos (x); - assert (strcmp (class (v), class (u)) && isequal (v, acos (u))) -1 test, 1 passed, 0 known failure, 0 skipped -[inst/arrays/@stk_dataframe/asind.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/asind.m -***** test - u = rand (4, 3); x = stk_dataframe (u); v = asind (x); - assert (strcmp (class (v), class (u)) && isequal (v, asind (u))) -1 test, 1 passed, 0 known failure, 0 skipped -[inst/arrays/@stk_dataframe/size.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/size.m -***** shared x - x = stk_dataframe([1 2; 3 4; 5 6]); -***** assert (isequal (size(x), [3 2])) -***** assert (numel(x) == 1) -***** assert (ndims(x) == 2) -***** test size(x); % force exploration of branch nargout == 0 -4 tests, 4 passed, 0 known failure, 0 skipped -[inst/arrays/@stk_dataframe/unique.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/unique.m -***** test - cn = {'u' 'v' 'w'}; x = stk_dataframe (rand (4, 3), cn); - y = [x; x]; z = unique (y, 'rows'); - assert (isequal (z.colnames, cn)); - assert (isequal (z.data, unique (x.data, 'rows'))); -1 test, 1 passed, 0 known failure, 0 skipped -[inst/arrays/@stk_dataframe/bsxfun.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/bsxfun.m -***** shared x1, x2, data1, data2 - x1 = rand (3, 2); data1 = stk_dataframe (x1); - x2 = rand (3, 2); data2 = stk_dataframe (x2); -***** test - z = bsxfun (@plus, data1, x2); - assert (isa (z, 'stk_dataframe') && isequal (double (z), x1 + x2)) -***** test - z = bsxfun (@plus, x1, data2); - assert (isa (z, 'stk_dataframe') && isequal (double (z), x1 + x2)) -***** test - z = bsxfun (@plus, data1, data2); - assert (isa (z, 'stk_dataframe') && isequal (double (z), x1 + x2)) -***** shared x, y - x = stk_dataframe (randn (2), {'x1', 'x2'}, {'a'; 'b'}); - y = stk_dataframe (randn (2), {'y1', 'y2'}, {'c'; 'd'}); -***** test z = x + y; - assert (isequal (z.colnames, x.colnames)); - assert (isequal (z.rownames, x.rownames)); -***** test z = y + x; - assert (isequal (z.colnames, y.colnames)); - assert (isequal (z.rownames, y.rownames)); -5 tests, 5 passed, 0 known failure, 0 skipped -[inst/arrays/@stk_dataframe/realpow.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/realpow.m -***** test stk_test_dfbinaryop(@realpow, rand(7, 2), .1 + rand(7, 2)); -***** test stk_test_dfbinaryop(@realpow, rand(7, 2), .1); -***** error stk_test_dfbinaryop(@realpow, rand(7, 2), .1 + rand(7, 3)); -3 tests, 3 passed, 0 known failure, 0 skipped -[inst/arrays/@stk_dataframe/power.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/power.m -***** test stk_test_dfbinaryop(@power, rand(7, 2), .1 + rand(7, 2)); -***** test stk_test_dfbinaryop(@power, rand(7, 2), .1); -***** error stk_test_dfbinaryop(@power, rand(7, 2), .1 + rand(7, 3)); -3 tests, 3 passed, 0 known failure, 0 skipped [inst/arrays/@stk_dataframe/cat.m] >>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/cat.m ***** shared u, v, x, y @@ -9187,12 +8373,168 @@ assert(isequal(double(z), [u v])); assert(all(strcmp(z.colnames, {'' '' 'y1' 'y2'}))); 3 tests, 3 passed, 0 known failure, 0 skipped -[inst/arrays/@stk_dataframe/times.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/times.m -***** test stk_test_dfbinaryop(@times, rand(7, 2), rand(7, 2)); -***** test stk_test_dfbinaryop(@times, rand(7, 2), pi); -***** error stk_test_dfbinaryop(@times, rand(7, 2), rand(7, 3)); +[inst/arrays/@stk_dataframe/sind.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/sind.m +***** test + u = rand (4, 3); x = stk_dataframe (u); v = sind (x); + assert (strcmp (class (v), class (u)) && isequal (v, sind (u))) +1 test, 1 passed, 0 known failure, 0 skipped +[inst/arrays/@stk_dataframe/sqrt.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/sqrt.m +***** test + u = rand (4, 3); x = stk_dataframe (u); v = sqrt (x); + assert (strcmp (class (v), class (u)) && isequal (v, sqrt (u))) +1 test, 1 passed, 0 known failure, 0 skipped +[inst/arrays/@stk_dataframe/mean.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/mean.m +***** shared x1, df1 + x1 = rand(9, 3); + df1 = stk_dataframe(x1, {'a', 'b', 'c'}); +***** assert (isequal (mean(df1), mean(x1))) +***** assert (isequal (mean(df1, 1), mean(x1))) +***** assert (isequal (mean(df1, 2), mean(x1, 2))) 3 tests, 3 passed, 0 known failure, 0 skipped +[inst/arrays/@stk_dataframe/stk_dataframe.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/stk_dataframe.m +***** test stk_test_class ('stk_dataframe') +***** test % default constructor + x = stk_dataframe (); + assert (isa (x, 'stk_dataframe') && isequal (size (x), [0 0])) +***** test + y = stk_dataframe (rand (3, 2)); + assert (isa (y, 'stk_dataframe') && isequal (size (y), [3 2])) +***** test + y = stk_dataframe (rand (3, 2), {'x', 'y'}); + assert (isa (y, 'stk_dataframe') && isequal (size(y), [3 2])) + assert (isequal (y.colnames, {'x' 'y'})) +***** test + y = stk_dataframe (rand (3, 2), {'x', 'y'}, {'a', 'b', 'c'}); + assert (isa (y, 'stk_dataframe') && isequal (size (y), [3 2])) + assert (isequal (y.colnames, {'x' 'y'})) + assert (isequal (y.rownames, {'a'; 'b'; 'c'})) +***** test + x = stk_dataframe (rand (3, 2)); + y = stk_dataframe (x); + assert (isa (y, 'stk_dataframe') && isequal (size (y), [3 2])) +***** error + x = stk_dataframe (rand (3, 2)); + y = stk_dataframe (x, pi); +***** error + x = stk_dataframe (rand (3, 2)); + y = stk_dataframe (x, {}, pi); +***** test + x = stk_dataframe (rand (3, 2)); + y = stk_dataframe (x, {'x' 'y'}); + assert (isa (y, 'stk_dataframe') && isequal (size(y), [3 2])) + assert (isequal (y.colnames, {'x' 'y'})) +***** test + x = stk_dataframe (rand (3, 2)); + y = stk_dataframe (x, {'x' 'y'}, {'a', 'b', 'c'}); + assert (isa (y, 'stk_dataframe') && isequal (size(y), [3 2])) + assert (isequal (y.colnames, {'x' 'y'})) + assert (isequal (y.rownames, {'a'; 'b'; 'c'})) +***** test + x = stk_dataframe (rand (3, 2), {'x' 'y'}); + y = stk_dataframe (x, [], {'a', 'b', 'c'}); + assert (isa (y, 'stk_dataframe') && isequal (size(y), [3 2])) + assert (isequal (y.colnames, {'x' 'y'})) + assert (isequal (y.rownames, {'a'; 'b'; 'c'})) +***** test + x = stk_dataframe (rand (3, 2), {'x' 'y'}); + y = stk_dataframe (x, {}, {'a', 'b', 'c'}); + assert (isa (y, 'stk_dataframe') && isequal (size(y), [3 2])) + assert (isequal (y.colnames, {})) + assert (isequal (y.rownames, {'a'; 'b'; 'c'})) +***** test + x = stk_factorialdesign ({1:3, 1:2}, {'x' 'y'}); + y = stk_dataframe (x, [], {'a' 'b' 'c' 'd' 'e' 'f'}); + assert (isa (y, 'stk_dataframe') && isequal (size (y), [6 2])) + assert (isequal (y.colnames, {'x' 'y'})) + assert (isequal (y.rownames, {'a'; 'b'; 'c'; 'd'; 'e'; 'f'})) +***** test + x = stk_factorialdesign ({1:3, 1:2}, {}, {'a' 'b' 'c' 'd' 'e' 'f'}); + y = stk_dataframe (x, {'x' 'y'}); + assert (isa (y, 'stk_dataframe') && isequal (size (y), [6 2])) + assert (isequal (y.colnames, {'x' 'y'})) + assert (isequal (y.rownames, {'a'; 'b'; 'c'; 'd'; 'e'; 'f'})) +***** test + x = stk_factorialdesign ({1:3, 1:2}, {}, {'a' 'b' 'c' 'd' 'e' 'f'}); + y = stk_dataframe (x, {'x' 'y'}, []); + assert (isa (y, 'stk_dataframe') && isequal (size (y), [6 2])) + assert (isequal (y.colnames, {'x' 'y'})) + assert (isequal (y.rownames, {'a'; 'b'; 'c'; 'd'; 'e'; 'f'})) +***** test + x = stk_factorialdesign ({1:3, 1:2}, {'x' 'y'}, {'a' 'b' 'c' 'd' 'e' 'f'}); + y = stk_dataframe (x); + assert (isa (y, 'stk_dataframe') && isequal (size (y), [6 2])) + assert (isequal (y.colnames, {'x' 'y'})) + assert (isequal (y.rownames, {'a'; 'b'; 'c'; 'd'; 'e'; 'f'})) +***** error + x = stk_factorialdesign ({1:3, 1:2}); + y = stk_dataframe (x, pi); +***** error + x = stk_factorialdesign ({1:3, 1:2}); + y = stk_dataframe (x, {}, pi); +***** test + x = stk_dataframe ([], {'a', 'b'}); + assert (isequal (size (x), [0 2])) + assert (isequal (x.colnames, {'a' 'b'})); + assert (isequal (x.rownames, {})); +***** test + x = stk_dataframe ([], {'a', 'b'}, {'toto'}); + assert (isequal (size (x), [1 2])) + assert (isequal (x.colnames, {'a' 'b'})); + assert (isequal (x.rownames, {'toto'})); +***** shared x +***** test + x = stk_dataframe (randn (10, 1), 'NOx'); + assert (isequal (x.colnames, {'NOx'})); +***** test + y = stk_dataframe (x, 'toto'); + assert (isequal (y.colnames, {'toto'})); +***** test + x = stk_dataframe (randn (1, 2), {}, 'aaa'); + assert (isequal (x.rownames, {'aaa'})); +***** test + y = stk_dataframe (x, {}, 'tata'); + assert (isequal (y.rownames, {'tata'})); +24 tests, 24 passed, 0 known failure, 0 skipped +[inst/arrays/@stk_dataframe/atand.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/atand.m +***** test + u = rand (4, 3); x = stk_dataframe (u); v = atand (x); + assert (strcmp (class (v), class (u)) && isequal (v, atand (u))) +1 test, 1 passed, 0 known failure, 0 skipped +[inst/arrays/@stk_dataframe/asin.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/asin.m +***** test + u = rand (4, 3); x = stk_dataframe (u); v = asin (x); + assert (strcmp (class (v), class (u)) && isequal (v, asin (u))) +1 test, 1 passed, 0 known failure, 0 skipped +[inst/arrays/@stk_dataframe/acos.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/acos.m +***** test + u = rand (4, 3); x = stk_dataframe (u); v = acos (x); + assert (strcmp (class (v), class (u)) && isequal (v, acos (u))) +1 test, 1 passed, 0 known failure, 0 skipped +[inst/arrays/@stk_dataframe/sin.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/sin.m +***** test + u = rand (4, 3); x = stk_dataframe (u); v = sin (x); + assert (strcmp (class (v), class (u)) && isequal (v, sin (u))) +1 test, 1 passed, 0 known failure, 0 skipped +[inst/arrays/@stk_dataframe/abs.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/abs.m +***** test + u = rand (4, 3); x = stk_dataframe (u); v = abs (x); + assert (strcmp (class (v), class (u)) && isequal (v, abs (u))) +1 test, 1 passed, 0 known failure, 0 skipped +[inst/arrays/@stk_dataframe/tanh.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/tanh.m +***** test + u = rand (4, 3); x = stk_dataframe (u); v = tanh (x); + assert (strcmp (class (v), class (u)) && isequal (v, tanh (u))) +1 test, 1 passed, 0 known failure, 0 skipped [inst/arrays/@stk_dataframe/subsref.m] >>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/subsref.m ***** shared x, s, t, data @@ -9240,16 +8582,45 @@ assert (isequal (size (y), [2 0])); assert (isequal (y.rownames, {'a'; 'b'})); 16 tests, 16 passed, 0 known failure, 0 skipped -[inst/arrays/@stk_dataframe/transpose.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/transpose.m +[inst/arrays/@stk_dataframe/cosh.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/cosh.m ***** test - u = rand(3, 2) + 1i * rand(3, 2); - data = stk_dataframe(u, {'x' 'y'}, {'obs1'; 'obs2'; 'obs3'}); - data = data.'; - assert (isa(data, 'stk_dataframe') && isequal(double(data), u.')); - assert (isequal(data.rownames, {'x'; 'y'})); - assert (isequal(data.colnames, {'obs1' 'obs2' 'obs3'})); + u = rand (4, 3); x = stk_dataframe (u); v = cosh (x); + assert (strcmp (class (v), class (u)) && isequal (v, cosh (u))) +1 test, 1 passed, 0 known failure, 0 skipped +[inst/arrays/@stk_dataframe/sinh.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/sinh.m +***** test + u = rand (4, 3); x = stk_dataframe (u); v = sinh (x); + assert (strcmp (class (v), class (u)) && isequal (v, sinh (u))) +1 test, 1 passed, 0 known failure, 0 skipped +[inst/arrays/@stk_dataframe/expm1.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/expm1.m +***** test + u = rand (4, 3); x = stk_dataframe (u); v = expm1 (x); + assert (strcmp (class (v), class (u)) && isequal (v, expm1 (u))) +1 test, 1 passed, 0 known failure, 0 skipped +[inst/arrays/@stk_dataframe/median.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/median.m +***** shared x1, df1 + x1 = rand(9, 3); + df1 = stk_dataframe(x1, {'a', 'b', 'c'}); +***** assert (isequal (median(df1), median(x1))) +***** assert (isequal (median(df1, 1), median(x1))) +***** assert (isequal (median(df1, 2), median(x1, 2))) +3 tests, 3 passed, 0 known failure, 0 skipped +[inst/arrays/@stk_dataframe/cos.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/cos.m +***** test + u = rand (4, 3); x = stk_dataframe (u); v = cos (x); + assert (strcmp (class (v), class (u)) && isequal (v, cos (u))) 1 test, 1 passed, 0 known failure, 0 skipped +[inst/arrays/@stk_dataframe/rdivide.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/rdivide.m +***** test stk_test_dfbinaryop(@rdivide, rand(7, 2), 1 + rand(7, 2)); +***** test stk_test_dfbinaryop(@rdivide, rand(7, 2), pi); +***** error stk_test_dfbinaryop(@rdivide, rand(7, 2), 1 + rand(7, 3)); +3 tests, 3 passed, 0 known failure, 0 skipped [inst/arrays/@stk_dataframe/double.m] >>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/double.m ***** test @@ -9268,57 +8639,88 @@ v = double(x); assert (strcmp(class(v), 'double') && isequal(v, double(u))) 3 tests, 3 passed, 0 known failure, 0 skipped -[inst/arrays/@stk_dataframe/prod.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/prod.m -***** shared x1, df1 - x1 = rand(9, 3); - df1 = stk_dataframe(x1, {'a', 'b', 'c'}); -***** assert (isequal (prod(df1), prod(x1))) -***** assert (isequal (prod(df1, 1), prod(x1))) -***** assert (isequal (prod(df1, 2), prod(x1, 2))) +[inst/arrays/@stk_dataframe/disp.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/disp.m +***** shared x, fmt + fmt = stk_disp_getformat (); + x = stk_dataframe (rand (3, 2)); +***** test format rat; disp (x); + : -------- -------- + * : 0.918662 0.236405 + * : 0.946705 0.671416 + * : 0.241832 0.637182 +***** test format long; disp (x); + : ---------------- ---------------- + * : 0.91866249487992 0.23640532047229 + * : 0.94670450385224 0.67141578969362 + * : 0.24183150372931 0.63718168016569 +***** test format short; disp (x); format (fmt); + : -------- -------- + * : 0.918662 0.236405 + * : 0.946705 0.671416 + * : 0.241832 0.637182 +***** test disp (stk_dataframe (zeros (0, 1))) + Empty data frame with 0 rows and 0 columns +***** test disp (stk_dataframe (zeros (0, 2))) + Empty data frame with 0 rows and 0 columns +5 tests, 5 passed, 0 known failure, 0 skipped +[inst/arrays/@stk_dataframe/reshape.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/reshape.m +***** test + x = stk_dataframe (randn (10, 3)); + y = reshape (x, 5, 6); + assert (isa (y, 'stk_dataframe') && isequal (size (y), [5 6])) +1 test, 1 passed, 0 known failure, 0 skipped +[inst/arrays/@stk_dataframe/quantile.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/quantile.m +***** shared x1, df1, p + x1 = rand (9, 3); + df1 = stk_dataframe (x1, {'a', 'b', 'c'}); + p = 0.95; +***** assert (isequal (quantile (df1, p), quantile (x1, p))) +***** assert (isequal (quantile (df1, p, 1), quantile (x1, p))) +***** assert (isequal (quantile (df1, p, 2), quantile (x1, p, 2))) 3 tests, 3 passed, 0 known failure, 0 skipped -[inst/arrays/@stk_dataframe/mldivide.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/mldivide.m +[inst/arrays/@stk_dataframe/asind.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/asind.m ***** test - x1_data = [57 7; 2 0]; - x1 = stk_dataframe (x1_data, {'x' 'y'}, {'a'; 'b'}); - x2_data = [8 7; 2 0]; - x2 = stk_dataframe (x2_data, {'w' 'z'}, {'a'; 'b'}); - y = x2 \ x1; - assert (stk_isequal_tolabs (y, ... - stk_dataframe ([1 0; 7 1], {'x'; 'y'}, {'w'; 'z'}))); -***** shared x_data, x, y_data, y - x_data = [3 3; 6 3; 9 12]; - y_data = [1 1; 2 1; 3 4]; - x = stk_dataframe (x_data, {'x' 'y'}, {'a'; 'b'; 'c'}); -***** test y = 3 \ x; -***** assert (isequal (y, stk_dataframe (y_data, {'x' 'y'}, {'a'; 'b'; 'c'}))); -***** error y = x \ 3; -4 tests, 4 passed, 0 known failure, 0 skipped -[inst/arrays/@stk_dataframe/tan.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/tan.m + u = rand (4, 3); x = stk_dataframe (u); v = asind (x); + assert (strcmp (class (v), class (u)) && isequal (v, asind (u))) +1 test, 1 passed, 0 known failure, 0 skipped +[inst/arrays/@stk_dataframe/stk_rescale.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/stk_rescale.m ***** test - u = rand (4, 3); x = stk_dataframe (u); v = tan (x); - assert (strcmp (class (v), class (u)) && isequal (v, tan (u))) + u = rand(5, 1) * 2; + x = stk_dataframe(u); + y = stk_rescale(x, [0; 2], [0; 3]); + assert (isa (y, 'stk_dataframe') && isequal(double(y), u * 3/2)) 1 test, 1 passed, 0 known failure, 0 skipped -[inst/arrays/@stk_dataframe/stk_boundingbox.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/stk_boundingbox.m -***** shared x, y, cn - cn = {'a', 'b', 'c'}; - x = stk_dataframe ([0 3 2; 1 4 1; 7 0 2], cn); -***** error y = stk_boundingbox (); -***** test y = stk_boundingbox (x); -***** assert (isequal (y, stk_hrect ([0 0 1; 7 4 2], cn))); +[inst/arrays/@stk_dataframe/mode.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/mode.m +***** shared x1, df1 + x1 = floor(3 * rand(9, 3)); + df1 = stk_dataframe(x1, {'a', 'b', 'c'}); +***** assert (isequal (mode(df1), mode(x1))) +***** assert (isequal (mode(df1, 1), mode(x1))) +***** assert (isequal (mode(df1, 2), mode(x1, 2))) 3 tests, 3 passed, 0 known failure, 0 skipped -[inst/arrays/@stk_dataframe/length.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/length.m -***** error length (stk_dataframe ([1 2; 3 4; 5 6])) +[inst/arrays/@stk_dataframe/display.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/display.m +***** test display (stk_dataframe (rand (3, 2))); + + = <3x2 stk_dataframe array> + + : -------- -------- + * : 0.270827 0.647072 + * : 0.901453 0.743783 + * : 0.060412 0.024897 + 1 test, 1 passed, 0 known failure, 0 skipped -[inst/arrays/@stk_dataframe/acosh.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/acosh.m +[inst/arrays/@stk_dataframe/log.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/log.m ***** test - u = rand (4, 3); x = stk_dataframe (u); v = acosh (x); - assert (strcmp (class (v), class (u)) && isequal (v, acosh (u))) + u = rand (4, 3); x = stk_dataframe (u); v = log (x); + assert (strcmp (class (v), class (u)) && isequal (v, log (u))) 1 test, 1 passed, 0 known failure, 0 skipped [inst/arrays/@stk_dataframe/std.m] >>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/std.m @@ -9332,173 +8734,76 @@ ***** assert (isequal (std(df1, 1, 1), std(x1, 1))) ***** assert (isequal (std(df1, 1, 2), std(x1, 1, 2))) 6 tests, 6 passed, 0 known failure, 0 skipped -[inst/arrays/@stk_dataframe/isinf.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/isinf.m -***** test - u = [pi, NaN, Inf, -Inf]; x = stk_dataframe (u); v = isinf (x); - assert (islogical (v) && isequal (v, isinf (u))) -1 test, 1 passed, 0 known failure, 0 skipped -[inst/arrays/@stk_dataframe/sind.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/sind.m -***** test - u = rand (4, 3); x = stk_dataframe (u); v = sind (x); - assert (strcmp (class (v), class (u)) && isequal (v, sind (u))) -1 test, 1 passed, 0 known failure, 0 skipped -[inst/arrays/@stk_dataframe/acosd.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/acosd.m -***** test - u = rand (4, 3); x = stk_dataframe (u); v = acosd (x); - assert (strcmp (class (v), class (u)) && isequal (v, acosd (u))) -1 test, 1 passed, 0 known failure, 0 skipped -[inst/arrays/@stk_dataframe/horzcat.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/horzcat.m -***** shared u, v - u = rand(3, 2); - v = rand(3, 2); -***** test - x = stk_dataframe(u, {'x1' 'x2'}); - y = stk_dataframe(v, {'y1' 'y2'}); - z = horzcat (x, y); - assert(isa(z, 'stk_dataframe') && isequal(double(z), [u v])); - assert(all(strcmp(z.colnames, {'x1' 'x2' 'y1' 'y2'}))); -***** test - x = stk_dataframe(u, {'x1' 'x2'}, {'a'; 'b'; 'c'}); - y = stk_dataframe(v, {'y1' 'y2'}); - z = horzcat (x, y); - assert(isa(z, 'stk_dataframe') && isequal(double(z), [u v])); - assert(all(strcmp(z.colnames, {'x1' 'x2' 'y1' 'y2'}))); - assert(all(strcmp(z.rownames, {'a'; 'b'; 'c'}))); -***** test - x = stk_dataframe(u, {'x1' 'x2'}); - y = stk_dataframe(v, {'y1' 'y2'}, {'a'; 'b'; 'c'}); - z = horzcat (x, y); - assert(isa(z, 'stk_dataframe') && isequal(double(z), [u v])); - assert(all(strcmp(z.colnames, {'x1' 'x2' 'y1' 'y2'}))); - assert(all(strcmp(z.rownames, {'a'; 'b'; 'c'}))); -***** test % incompatible row names - x = stk_dataframe (u, {'x1' 'x2'}, {'a'; 'b'; 'c'}); - y = stk_dataframe (v, {'y1' 'y2'}, {'a'; 'b'; 'd'}); - z = horzcat (x, y); - assert (isequal (z.rownames, {})); -warning: Incompatible row names ! -The output of horzcat will have no row names. -warning: called from - horzcat at line 73 column 9 - __test__ at line 5 column 4 - test at line 682 column 11 - /tmp/tmp.leWC69aW4i at line 1302 column 31 - -***** test - x = stk_dataframe (u); - z = horzcat (x, v); - assert (isa (z, 'stk_dataframe') && isequal (double (z), [u v])); -***** test - y = stk_dataframe (v); - z = horzcat (u, y); - assert (isa (z, 'stk_dataframe') && isequal (double (z), [u v])); -***** test - x = stk_dataframe(u, {'x1' 'x2'}); - y = stk_dataframe(v, {'y1' 'y2'}); - z = horzcat (x, y, u, v); - assert(isa(z, 'stk_dataframe') && isequal(double(z), [u v u v])); -7 tests, 7 passed, 0 known failure, 0 skipped -[inst/arrays/@stk_dataframe/log10.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/log10.m -***** test - u = rand (4, 3); x = stk_dataframe (u); v = log10 (x); - assert (strcmp (class (v), class (u)) && isequal (v, log10 (u))) -1 test, 1 passed, 0 known failure, 0 skipped -[inst/arrays/@stk_dataframe/cosd.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/cosd.m -***** test - u = rand (4, 3); x = stk_dataframe (u); v = cosd (x); - assert (strcmp (class (v), class (u)) && isequal (v, cosd (u))) -1 test, 1 passed, 0 known failure, 0 skipped -[inst/arrays/@stk_dataframe/plot.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/plot.m -***** test % plot with x as a vector and z as a (univariate) dataframe - x = linspace(0, 2*pi, 30)'; - z = stk_dataframe(sin(x)); - figure; plot(x, z); close(gcf); -***** test % plot with x as a vector and z as a (multivariate) dataframe - x = linspace(0, 2*pi, 30)'; - z = stk_dataframe([sin(x) cos(x)], {'sin' 'cos'}); - figure; plot(x, z); close(gcf); -***** test % plot with x as a dataframe and z as a vector - x = stk_dataframe(linspace(0, 2*pi, 30)'); - z = sin(double(x)); - figure; plot(x, z); close(gcf); +[inst/arrays/@stk_dataframe/ldivide.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/ldivide.m +***** test stk_test_dfbinaryop(@ldivide, 1 + rand(7, 2), rand(7, 2)); +***** test stk_test_dfbinaryop(@ldivide, 1 + rand(7, 2), pi); +***** error stk_test_dfbinaryop(@ldivide, 1 + rand(7, 2), rand(7, 3)); 3 tests, 3 passed, 0 known failure, 0 skipped -[inst/arrays/@stk_dataframe/cosh.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/cosh.m +[inst/arrays/@stk_dataframe/end.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/end.m +***** shared x + x = stk_dataframe ([1; 2; 3]); +***** assert (isequal (double (x(2:end, :)), [2; 3])) +***** assert (isequal (double (x(2:end)), [2; 3])) +***** assert (isequal (double (x(2, 1:end)), 2)) +***** assert (isequal (double (x(end)), 3)) +***** shared x + x = stk_dataframe ([1 2; 3 4; 5 6]); +***** assert (isequal (x(2:end, :), x(2:3, :))) +***** assert (isequal (x(2, 1:end), x(2, :))) +***** assert (isequal (x(2:end, 2:end), x(2:3, 2))) +***** error x(1:end, 1:end, 1:end) +8 tests, 8 passed, 0 known failure, 0 skipped +[inst/arrays/@stk_dataframe/min.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/min.m +***** test stk_test_dfbinaryop ('min', rand(7, 2), rand(7, 2)); +***** test stk_test_dfbinaryop ('min', rand(7, 2), pi); +***** error stk_test_dfbinaryop ('min', rand(7, 2), rand(7, 3)); +***** shared x1, df1 + x1 = rand(9, 3); + df1 = stk_dataframe(x1, {'a', 'b', 'c'}); +***** assert (isequal (min(df1), min(x1))) +***** assert (isequal (min(df1, [], 1), min(x1))) +***** assert (isequal (min(df1, [], 2), min(x1, [], 2))) +***** error (min(df1, df1, 2)) ***** test - u = rand (4, 3); x = stk_dataframe (u); v = cosh (x); - assert (strcmp (class (v), class (u)) && isequal (v, cosh (u))) + x = stk_dataframe ([5; 2; 4]); + [M, k] = min (x); + assert ((M == 2) && (k == 2)); +8 tests, 8 passed, 0 known failure, 0 skipped +[inst/arrays/@stk_dataframe/length.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/length.m +***** error length (stk_dataframe ([1 2; 3 4; 5 6])) 1 test, 1 passed, 0 known failure, 0 skipped -[inst/arrays/@stk_dataframe/plus.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/plus.m -***** test stk_test_dfbinaryop(@plus, rand(7, 2), rand(7, 2)); -***** test stk_test_dfbinaryop(@plus, rand(7, 2), pi); -***** error stk_test_dfbinaryop(@plus, rand(7, 2), rand(7, 3)); -3 tests, 3 passed, 0 known failure, 0 skipped -[inst/arrays/@stk_dataframe/expm1.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/expm1.m +[inst/arrays/@stk_dataframe/transpose.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/transpose.m ***** test - u = rand (4, 3); x = stk_dataframe (u); v = expm1 (x); - assert (strcmp (class (v), class (u)) && isequal (v, expm1 (u))) + u = rand(3, 2) + 1i * rand(3, 2); + data = stk_dataframe(u, {'x' 'y'}, {'obs1'; 'obs2'; 'obs3'}); + data = data.'; + assert (isa(data, 'stk_dataframe') && isequal(double(data), u.')); + assert (isequal(data.rownames, {'x'; 'y'})); + assert (isequal(data.colnames, {'obs1' 'obs2' 'obs3'})); 1 test, 1 passed, 0 known failure, 0 skipped -[inst/arrays/@stk_dataframe/tanh.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/tanh.m +[inst/arrays/@stk_dataframe/logical.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/logical.m ***** test - u = rand (4, 3); x = stk_dataframe (u); v = tanh (x); - assert (strcmp (class (v), class (u)) && isequal (v, tanh (u))) -1 test, 1 passed, 0 known failure, 0 skipped -[inst/arrays/@stk_dataframe/sort.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/sort.m -***** shared x, y - x = stk_dataframe ([3; 2; 1], {}, {'a', 'b', 'c'}); - y = sort (x); -***** assert (strcmp (class (y), 'stk_dataframe')) -***** assert (isequal (y.data, [1; 2; 3])) -***** assert (isequal (y.rownames, {'c'; 'b'; 'a'})) -***** error y = sort (x, []); -***** assert (isequal (sort (x, 1), y)) -***** assert (isequal (sort (x, 2), x)) -***** error sort (x, 3) -***** error y = sort (x, [], 'ascend'); -***** assert (isequal (sort (x, 1, 'ascend'), y)) -***** assert (isequal (sort (x, 2, 'ascend'), x)) -***** error y = sort (x, 3, 'ascend'); -***** error y = sort (x, [], 'descend'); -***** assert (isequal (sort (x, 1, 'descend'), x)) -***** assert (isequal (sort (x, 2, 'descend'), x)) -***** error sort (x, 3, 'descend') -15 tests, 15 passed, 0 known failure, 0 skipped -[inst/arrays/@stk_dataframe/tand.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/tand.m + u = rand (4, 3); + x = stk_dataframe (u); + v = logical (x); + assert (strcmp (class(v), 'logical') && isequal (v, logical (u))) ***** test - u = rand (4, 3); x = stk_dataframe (u); v = tand (x); - assert (strcmp (class (v), class (u)) && isequal (v, tand (u))) -1 test, 1 passed, 0 known failure, 0 skipped -[inst/arrays/@stk_dataframe/atanh.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/atanh.m + u = (rand (4, 3) < 0.5); + x = stk_dataframe (u); + v = logical (x); + assert (strcmp (class (v), 'logical') && isequal (v, u)) ***** test - u = rand (4, 3); x = stk_dataframe (u); v = atanh (x); - assert (strcmp (class (v), class (u)) && isequal (v, atanh (u))) -1 test, 1 passed, 0 known failure, 0 skipped -[inst/arrays/@stk_dataframe/rdivide.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/rdivide.m -***** test stk_test_dfbinaryop(@rdivide, rand(7, 2), 1 + rand(7, 2)); -***** test stk_test_dfbinaryop(@rdivide, rand(7, 2), pi); -***** error stk_test_dfbinaryop(@rdivide, rand(7, 2), 1 + rand(7, 3)); + u = uint8 (rand (4, 3) * 5); + x = stk_dataframe (u); + v = logical (x); + assert (strcmp (class (v), 'logical') && isequal (v, logical (u))) 3 tests, 3 passed, 0 known failure, 0 skipped -[inst/arrays/@stk_dataframe/reshape.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/reshape.m -***** test - x = stk_dataframe (randn (10, 3)); - y = reshape (x, 5, 6); - assert (isa (y, 'stk_dataframe') && isequal (size (y), [5 6])) -1 test, 1 passed, 0 known failure, 0 skipped [inst/arrays/@stk_dataframe/ctranspose.m] >>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/ctranspose.m ***** test @@ -9509,88 +8814,6 @@ assert (isequal(data.rownames, {'x'; 'y'})); assert (isequal(data.colnames, {'obs1' 'obs2' 'obs3'})); 1 test, 1 passed, 0 known failure, 0 skipped -[inst/arrays/@stk_dataframe/stk_get_sample_size.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/stk_get_sample_size.m -***** test - x = stk_dataframe ([1 2; 3 4; 5 6]); - assert (isequal (stk_get_sample_size (x), 3)); -1 test, 1 passed, 0 known failure, 0 skipped -[inst/arrays/@stk_dataframe/exp.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/exp.m -***** test - u = rand (4, 3); x = stk_dataframe (u); v = exp (x); - assert (strcmp (class (v), class (u)) && isequal (v, exp (u))) -1 test, 1 passed, 0 known failure, 0 skipped -[inst/arrays/@stk_dataframe/mode.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/mode.m -***** shared x1, df1 - x1 = floor(3 * rand(9, 3)); - df1 = stk_dataframe(x1, {'a', 'b', 'c'}); -***** assert (isequal (mode(df1), mode(x1))) -***** assert (isequal (mode(df1, 1), mode(x1))) -***** assert (isequal (mode(df1, 2), mode(x1, 2))) -3 tests, 3 passed, 0 known failure, 0 skipped -[inst/arrays/@stk_dataframe/mtimes.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/mtimes.m -***** shared x, y, z, w - - u = [1 3 4; 2 7 6]; % 2 x 3 - v = [6 2; 1 7; 9 4]; % 3 x 2 - w = [45 39; 73 77]; % u * v - - x = stk_dataframe (u, {}, {'a'; 'b'}); - y = stk_dataframe (v, {'c' 'd'}); - z = x * y; -***** assert (isa (z, 'stk_dataframe')); -***** assert (isequal (z.data, w)); -***** assert (isequal (z.rownames, x.rownames)); -***** assert (isequal (z.colnames, y.colnames)); -***** shared x, y - x = stk_dataframe (rand (3, 2), {'x' 'y'}, {'a'; 'b'; 'c'}); -***** test y = 3 * x; -***** assert (isequal (y, stk_dataframe (3 * x.data, {'x' 'y'}, {'a'; 'b'; 'c'}))); -***** test y = x * 3; -***** assert (isequal (y, stk_dataframe (3 * x.data, {'x' 'y'}, {'a'; 'b'; 'c'}))); -8 tests, 8 passed, 0 known failure, 0 skipped -[inst/arrays/@stk_dataframe/var.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/var.m -***** shared x1, df1 - x1 = rand(9, 3); - df1 = stk_dataframe(x1, {'a', 'b', 'c'}); -***** assert (isequal (var(df1), var(x1))) -***** assert (isequal (var(df1, 0, 1), var(x1))) -***** assert (isequal (var(df1, 0, 2), var(x1, 0, 2))) -***** assert (isequal (var(df1, 1), var(x1, 1))) -***** assert (isequal (var(df1, 1, 1), var(x1, 1))) -***** assert (isequal (var(df1, 1, 2), var(x1, 1, 2))) -6 tests, 6 passed, 0 known failure, 0 skipped -[inst/arrays/@stk_dataframe/log.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/log.m -***** test - u = rand (4, 3); x = stk_dataframe (u); v = log (x); - assert (strcmp (class (v), class (u)) && isequal (v, log (u))) -1 test, 1 passed, 0 known failure, 0 skipped -[inst/arrays/@stk_dataframe/mean.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/mean.m -***** shared x1, df1 - x1 = rand(9, 3); - df1 = stk_dataframe(x1, {'a', 'b', 'c'}); -***** assert (isequal (mean(df1), mean(x1))) -***** assert (isequal (mean(df1, 1), mean(x1))) -***** assert (isequal (mean(df1, 2), mean(x1, 2))) -3 tests, 3 passed, 0 known failure, 0 skipped -[inst/arrays/@stk_dataframe/log2.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/log2.m -***** test - u = rand (4, 3); x = stk_dataframe (u); v = log2 (x); - assert (strcmp (class (v), class (u)) && isequal (v, log2 (u))) -1 test, 1 passed, 0 known failure, 0 skipped -[inst/arrays/@stk_dataframe/isnan.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/isnan.m -***** test - u = [pi, NaN, Inf, -Inf]; x = stk_dataframe (u); v = isnan (x); - assert (islogical (v) && isequal (v, isnan (u))) -1 test, 1 passed, 0 known failure, 0 skipped [inst/arrays/@stk_dataframe/ismember.m] >>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/ismember.m ***** shared u, x, u1, x1, u2, x2 @@ -9611,81 +8834,55 @@ assert (isequal (b, [false; true; true])); assert (isequal (idx, [0; 1; 1])) 7 tests, 7 passed, 0 known failure, 0 skipped -[inst/arrays/@stk_dataframe/log1p.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/log1p.m +[inst/arrays/@stk_factorialdesign/stk_boundingbox.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_factorialdesign/stk_boundingbox.m +***** shared x, y, cn + cn = {'a', 'b', 'c'}; + x = stk_factorialdesign ({[1 2], [3 4 5], [0 2 8]}, cn); +***** error y = stk_boundingbox (); +***** test y = stk_boundingbox (x); +***** assert (isequal (y, stk_hrect ([1 3 0; 2 5 8], cn))); +3 tests, 3 passed, 0 known failure, 0 skipped +[inst/arrays/@stk_factorialdesign/ndgrid.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_factorialdesign/ndgrid.m +***** shared data + data = stk_factorialdesign ({[0 1], [5 6 7]}); +***** test % nargout = 0 + ndgrid (data); + assert (isequal (ans, [0 0 0; 1 1 1])); +***** test % nargout = 1 + x = ndgrid (data); + assert (isequal (x, [0 0 0; 1 1 1])); +***** test % nargout = 2 + [x, y] = ndgrid (data); + assert (isequal ({x, y}, {[0 0 0; 1 1 1], [5 6 7; 5 6 7]})); +***** error % nargout = 3 + [x, y, z] = ndgrid (data); ***** test - u = rand (4, 3); x = stk_dataframe (u); v = log1p (x); - assert (strcmp (class (v), class (u)) && isequal (v, log1p (u))) -1 test, 1 passed, 0 known failure, 0 skipped -[inst/arrays/@stk_dataframe/disp.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/disp.m -***** shared x, fmt - fmt = stk_disp_getformat (); - x = stk_dataframe (rand (3, 2)); -***** test format rat; disp (x); - : -------- -------- - * : 0.853235 0.624107 - * : 0.179877 0.958882 - * : 0.597320 0.473864 -***** test format long; disp (x); - : ---------------- ---------------- - * : 0.85323522187557 0.62410731361615 - * : 0.17987712292438 0.95888152250988 - * : 0.59731980033780 0.47386421587590 -***** test format short; disp (x); format (fmt); - : -------- -------- - * : 0.853235 0.624107 - * : 0.179877 0.958882 - * : 0.597320 0.473864 -***** test disp (stk_dataframe (zeros (0, 1))) - Empty data frame with 0 rows and 0 columns -***** test disp (stk_dataframe (zeros (0, 2))) - Empty data frame with 0 rows and 0 columns -5 tests, 5 passed, 0 known failure, 0 skipped -[inst/arrays/@stk_dataframe/stk_normalize.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/stk_normalize.m + data = stk_factorialdesign ({[], []}); + [x, y] = ndgrid (data); + assert (isequal ({x, y}, {[], []})); ***** test - u = rand (6, 2) * 2; - x = stk_dataframe (u); - y = stk_normalize (x); - assert (isa (y, 'stk_dataframe') ... - && stk_isequal_tolabs (double (y), stk_normalize (u))) -1 test, 1 passed, 0 known failure, 0 skipped -[inst/arrays/@stk_dataframe/max.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/max.m -***** test stk_test_dfbinaryop ('max', rand(7, 2), rand(7, 2)); -***** test stk_test_dfbinaryop ('max', rand(7, 2), pi); -***** error stk_test_dfbinaryop ('max', rand(7, 2), rand(7, 3)); -***** shared x1, df1 - x1 = rand(9, 3); - df1 = stk_dataframe(x1, {'a', 'b', 'c'}); -***** assert (isequal (max(df1), max(x1))) -***** assert (isequal (max(df1, [], 1), max(x1))) -***** assert (isequal (max(df1, [], 2), max(x1, [], 2))) -***** error (max(df1, df1, 2)) + data = stk_factorialdesign ({[1:3]}); + x = ndgrid (data); + assert (isequal (x, [1; 2; 3])); +6 tests, 6 passed, 0 known failure, 0 skipped +[inst/arrays/@stk_factorialdesign/stk_normalize.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_factorialdesign/stk_normalize.m ***** test - x = stk_dataframe ([1; 3; 2]); - [M, k] = max (x); - assert ((M == 3) && (k == 2)); -8 tests, 8 passed, 0 known failure, 0 skipped -[inst/arrays/@stk_dataframe/mrdivide.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_dataframe/mrdivide.m + x = stk_factorialdesign ({[1 2], [5 6]}); + y = stk_factorialdesign ({[0 1], [0 1]}); + assert (stk_isequal_tolabs (stk_normalize (x), y)) +1 test, 1 passed, 0 known failure, 0 skipped +[inst/arrays/@stk_factorialdesign/fieldnames.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_factorialdesign/fieldnames.m ***** test - x1_data = [8 7; 58 49]; - x1 = stk_dataframe (x1_data, {'x' 'y'}, {'a'; 'b'}); - x2_data = [8 7; 2 0]; - x2 = stk_dataframe (x2_data, {'x' 'y'}, {'u'; 'v'}); - y = x1 / x2; - assert (stk_isequal_tolabs (y, ... - stk_dataframe ([1 0; 7 1], {'u'; 'v'}, {'a'; 'b'}))); -***** shared x_data, x, y_data, y - x_data = [3 3; 6 3; 9 12]; - y_data = [1 1; 2 1; 3 4]; - x = stk_dataframe (x_data, {'x' 'y'}, {'a'; 'b'; 'c'}); -***** test y = x / 3; -***** assert (isequal (y, stk_dataframe ([1 1; 2 1; 3 4], {'x' 'y'}, {'a'; 'b'; 'c'}))); -***** error y = 3 / x; -4 tests, 4 passed, 0 known failure, 0 skipped + x = stk_factorialdesign ({0:1, 3:5}, {'u' 'v'}); + fn1 = sort (fieldnames (x)); + fn2 = {'colnames'; 'data'; 'info'; 'levels'; ... + 'rownames'; 'sample_size'; 'stk_dataframe'; 'u'; 'v'}; + assert (isequal (fn1, fn2)); +1 test, 1 passed, 0 known failure, 0 skipped [inst/arrays/@stk_factorialdesign/stk_dataframe.m] >>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_factorialdesign/stk_dataframe.m ***** shared x, cn, rn, y, cn2, rn2 @@ -9715,23 +8912,6 @@ ***** assert (isequal (y.colnames, {})) ***** assert (isequal (y.rownames, rn2)) 20 tests, 20 passed, 0 known failure, 0 skipped -[inst/arrays/@stk_factorialdesign/stk_rescale.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_factorialdesign/stk_rescale.m -***** test - x = stk_factorialdesign ({[1 2], [5 6]}); - y = stk_factorialdesign ({[0 3], [0 3]}); - z = stk_rescale (x, [1 5; 2 6], [0 0; 3 3]); - assert (stk_isequal_tolabs (y, z)) -1 test, 1 passed, 0 known failure, 0 skipped -[inst/arrays/@stk_factorialdesign/fieldnames.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_factorialdesign/fieldnames.m -***** test - x = stk_factorialdesign ({0:1, 3:5}, {'u' 'v'}); - fn1 = sort (fieldnames (x)); - fn2 = {'colnames'; 'data'; 'info'; 'levels'; ... - 'rownames'; 'sample_size'; 'stk_dataframe'; 'u'; 'v'}; - assert (isequal (fn1, fn2)); -1 test, 1 passed, 0 known failure, 0 skipped [inst/arrays/@stk_factorialdesign/stk_factorialdesign.m] >>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_factorialdesign/stk_factorialdesign.m ***** test stk_test_class ('stk_factorialdesign') @@ -9879,39 +9059,14 @@ ***** assert (strcmp (class (x'), 'stk_dataframe')) ***** assert (strcmp (class (x.'), 'stk_dataframe')) 60 tests, 60 passed, 0 known failure, 0 skipped -[inst/arrays/@stk_factorialdesign/stk_boundingbox.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_factorialdesign/stk_boundingbox.m -***** shared x, y, cn - cn = {'a', 'b', 'c'}; - x = stk_factorialdesign ({[1 2], [3 4 5], [0 2 8]}, cn); -***** error y = stk_boundingbox (); -***** test y = stk_boundingbox (x); -***** assert (isequal (y, stk_hrect ([1 3 0; 2 5 8], cn))); -3 tests, 3 passed, 0 known failure, 0 skipped -[inst/arrays/@stk_factorialdesign/ndgrid.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_factorialdesign/ndgrid.m -***** shared data - data = stk_factorialdesign ({[0 1], [5 6 7]}); -***** test % nargout = 0 - ndgrid (data); - assert (isequal (ans, [0 0 0; 1 1 1])); -***** test % nargout = 1 - x = ndgrid (data); - assert (isequal (x, [0 0 0; 1 1 1])); -***** test % nargout = 2 - [x, y] = ndgrid (data); - assert (isequal ({x, y}, {[0 0 0; 1 1 1], [5 6 7; 5 6 7]})); -***** error % nargout = 3 - [x, y, z] = ndgrid (data); -***** test - data = stk_factorialdesign ({[], []}); - [x, y] = ndgrid (data); - assert (isequal ({x, y}, {[], []})); +[inst/arrays/@stk_factorialdesign/stk_rescale.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_factorialdesign/stk_rescale.m ***** test - data = stk_factorialdesign ({[1:3]}); - x = ndgrid (data); - assert (isequal (x, [1; 2; 3])); -6 tests, 6 passed, 0 known failure, 0 skipped + x = stk_factorialdesign ({[1 2], [5 6]}); + y = stk_factorialdesign ({[0 3], [0 3]}); + z = stk_rescale (x, [1 5; 2 6], [0 0; 3 3]); + assert (stk_isequal_tolabs (y, z)) +1 test, 1 passed, 0 known failure, 0 skipped [inst/arrays/@stk_factorialdesign/uminus.m] >>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_factorialdesign/uminus.m ***** test @@ -9937,191 +9092,33 @@ ***** test b = ismember (A, B, 'rows'); ***** assert (isequal (b, ismember (A, BB, 'rows'))); 4 tests, 4 passed, 0 known failure, 0 skipped -[inst/arrays/@stk_factorialdesign/stk_normalize.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_factorialdesign/stk_normalize.m -***** test - x = stk_factorialdesign ({[1 2], [5 6]}); - y = stk_factorialdesign ({[0 1], [0 1]}); - assert (stk_isequal_tolabs (stk_normalize (x), y)) +[inst/arrays/generic/stk_get_sample_size.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/generic/stk_get_sample_size.m +***** assert (stk_get_sample_size ([1 2; 3 4; 5 6]) == 3); 1 test, 1 passed, 0 known failure, 0 skipped -[inst/arrays/@stk_hrect/stk_dataframe.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_hrect/stk_dataframe.m -***** shared x, cn, rn, y, cn2, rn2 - cn = {'x' 'y'}; - rn = {'lower_bounds'; 'upper_bounds'}; - x = stk_hrect ([0 0; 1 1], cn); - cn2 = {'xx' 'yy'}; - rn2 = {'aa'; 'bb'}; -***** test y = stk_dataframe (x); -***** assert (strcmp (class (y), 'stk_dataframe')) -***** assert (isequal (y.colnames, cn)) -***** assert (isequal (y.rownames, rn)) -***** test y = stk_dataframe (x, cn2); -***** assert (strcmp (class (y), 'stk_dataframe')) -***** assert (isequal (y.colnames, cn2)) -***** assert (isequal (y.rownames, rn)) -***** test y = stk_dataframe (x, cn2, rn2); -***** assert (strcmp (class (y), 'stk_dataframe')) -***** assert (isequal (y.colnames, cn2)) -***** assert (isequal (y.rownames, rn2)) -***** test y = stk_dataframe (x, [], rn2); -***** assert (strcmp (class (y), 'stk_dataframe')) -***** assert (isequal (y.colnames, cn)) -***** assert (isequal (y.rownames, rn2)) -***** test y = stk_dataframe (x, {}, rn2); -***** assert (strcmp (class (y), 'stk_dataframe')) -***** assert (isequal (y.colnames, {})) -***** assert (isequal (y.rownames, rn2)) -20 tests, 20 passed, 0 known failure, 0 skipped -[inst/arrays/@stk_hrect/stk_rescale.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_hrect/stk_rescale.m -***** shared x - x = rand (10, 4); - y = stk_rescale (x, [], []); - assert (stk_isequal_tolabs (x, y)); -***** test - y = stk_rescale(0.5, [], [0; 2]); - assert (stk_isequal_tolabs (y, 1.0)); -***** test - y = stk_rescale (0.5, [0; 1], [0; 2]); - assert (stk_isequal_tolabs (y, 1.0)); -***** test - y = stk_rescale (0.5, [0; 2], []); - assert (stk_isequal_tolabs (y, 0.25)); -***** test - y = stk_rescale (0.5, [0; 2], [0; 1]); - assert (stk_isequal_tolabs (y, 0.25)); -4 tests, 4 passed, 0 known failure, 0 skipped -[inst/arrays/@stk_hrect/vertcat.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_hrect/vertcat.m -***** shared d, x, y - d = 10; - x = stk_hrect (d); - y = double (x); -***** test - z = vertcat (x, x); - assert (isequal (size (z), [4 d])); - assert (strcmp (class (z), 'stk_dataframe')); -***** test - z = vertcat (x, y); - assert (isequal (size (z), [4 d])); - assert (strcmp (class (z), 'stk_dataframe')); -***** test - z = vertcat (y, x); - assert (isequal (size (z), [4 d])); - assert (strcmp (class (z), 'stk_dataframe')); -3 tests, 3 passed, 0 known failure, 0 skipped -[inst/arrays/@stk_hrect/subsref.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_hrect/subsref.m -***** test - B = stk_hrect ([0 0 0 0; 1 2 3 4]); - B = B(:, [1 3 4]); - assert (strcmp (class (B), 'stk_hrect')); - assert (isequal (double (B), [0 0 0; 1 3 4])); -***** test - B = stk_hrect ([0 0 0 0; 1 2 3 4]); - B = B(1, :); - assert (strcmp (class (B), 'stk_dataframe')); - assert (isequal (double (B), [0 0 0 0])); -2 tests, 2 passed, 0 known failure, 0 skipped -[inst/arrays/@stk_hrect/stk_boundingbox.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_hrect/stk_boundingbox.m -***** shared x, y - lb = rand (1, 5); - ub = lb + 1; - cn = {'a', 'b', 'c', 'd', 'e'}; - x = stk_hrect ([lb; ub], cn); +[inst/arrays/generic/stk_boundingbox.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/generic/stk_boundingbox.m +***** shared x, y, cn + cn = {'a', 'b', 'c'}; + x = [0 3 2; 1 4 1; 7 0 2]; ***** error y = stk_boundingbox (); ***** test y = stk_boundingbox (x); -***** assert (isequal (y, x)); +***** assert (isequal (y.data, [0 0 1; 7 4 2])); 3 tests, 3 passed, 0 known failure, 0 skipped -[inst/arrays/@stk_hrect/horzcat.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_hrect/horzcat.m -***** shared d, x1, x2, x3 - d = 10; - x1 = stk_hrect (d); - x2 = double (x1); - x3 = [1:d; 0:(d-1)]; % illegal bounds -***** test - y1 = horzcat (x1, x1); - assert (isequal (size (y1), [2 2*d])); - assert (strcmp (class (y1), 'stk_hrect')); -***** test - y2 = horzcat (x1, x2); - assert (isequal (size (y2), [2 2*d])); - assert (strcmp (class (y2), 'stk_hrect')); -***** test - y3 = horzcat (x2, x1); - assert (isequal (size (y3), [2 2*d])); - assert (strcmp (class (y3), 'stk_hrect')); -***** test - lastwarn ('') - y4 = horzcat (x1, x3); - assert (isequal (size (y4), [2 2*d])); - assert (strcmp (class (y4), 'stk_dataframe')); - [warn_msg, warn_id] = lastwarn (); - assert (strcmp (warn_id, 'STK:stk_hrect:horzcat:IllegalBounds')) -warning: Illegal bounds, the result is not an stk_hrect object. -warning: called from - horzcat at line 47 column 9 - __test__ at line 4 column 5 - test at line 682 column 11 - /tmp/tmp.leWC69aW4i at line 1646 column 31 - -4 tests, 4 passed, 0 known failure, 0 skipped -[inst/arrays/@stk_hrect/stk_hrect.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_hrect/stk_hrect.m -***** test stk_test_class ('stk_hrect') -***** shared dom -***** test dom = stk_hrect ([-1; 1], {'x'}); -***** assert (isequal (dom.colnames, {'x'})) -***** assert (isequal (dom.rownames, {'lower_bounds'; 'upper_bounds'})) -***** assert (isequal (dom.data, [-1; 1])) -5 tests, 5 passed, 0 known failure, 0 skipped -[inst/arrays/@stk_hrect/ismember.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_hrect/ismember.m -***** shared n, box - n = 5; - box = stk_hrect (n); -***** assert (ismember (box(1, :), box)) -***** assert (ismember (box(2, :), box)) -***** assert (ismember (.5 * ones (1, 5), box)) -***** assert (~ ismember (box(1, :) - 1, box)) -***** assert (~ ismember (box(2, :) + 1, box)) -***** test - y = double (box); y = [y; y + 2]; - assert (isequal (ismember (y, box), [1; 1; 0; 0])) -6 tests, 6 passed, 0 known failure, 0 skipped -[inst/arrays/@stk_hrect/stk_normalize.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/@stk_hrect/stk_normalize.m +[inst/arrays/generic/stk_normalize.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/generic/stk_normalize.m ***** shared x, box, y1, y2, y3, y4 - n = 5; box = stk_hrect ([2; 3]); - x = 2 + rand (n, 1); + n = 5; box = [2; 3]; x = box(1) + diff (box) * rand (n, 1); ***** error y1 = stk_normalize (); ***** test y2 = stk_normalize (x); ***** test y3 = stk_normalize (x, box); ***** test assert (~ any ((y2 < -10 * eps) | (y2 > 1 + 10 * eps))); ***** test assert (~ any ((y3 < -10 * eps) | (y3 > 1 + 10 * eps))); 5 tests, 5 passed, 0 known failure, 0 skipped -[inst/arrays/generic/stk_rescale.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/generic/stk_rescale.m -***** shared x - x = rand (10, 4); - y = stk_rescale (x, [], []); - assert (stk_isequal_tolabs (x, y)); -***** test - y = stk_rescale(0.5, [], [0; 2]); - assert (stk_isequal_tolabs (y, 1.0)); -***** test - y = stk_rescale (0.5, [0; 1], [0; 2]); - assert (stk_isequal_tolabs (y, 1.0)); -***** test - y = stk_rescale (0.5, [0; 2], []); - assert (stk_isequal_tolabs (y, 0.25)); -***** test - y = stk_rescale (0.5, [0; 2], [0; 1]); - assert (stk_isequal_tolabs (y, 0.25)); -4 tests, 4 passed, 0 known failure, 0 skipped +[inst/arrays/generic/stk_length.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/generic/stk_length.m +***** assert (isequal (stk_length ([1 2; 3 4; 5 6]), 3)); +1 test, 1 passed, 0 known failure, 0 skipped [inst/arrays/generic/stk_feval.m] >>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/generic/stk_feval.m ***** shared f, xt @@ -10173,876 +9170,1855 @@ z = stk_feval ({@sin, @cos, G, F, 'tan'}, t, [], [], false); assert (isequal (z.colnames, {'sin' 'cos' 'F3' 'F4_1' 'F4_2' 'tan'})); 13 tests, 13 passed, 0 known failure, 0 skipped -[inst/arrays/generic/stk_length.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/generic/stk_length.m -***** assert (isequal (stk_length ([1 2; 3 4; 5 6]), 3)); +[inst/arrays/generic/stk_rescale.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/generic/stk_rescale.m +***** shared x + x = rand (10, 4); + y = stk_rescale (x, [], []); + assert (stk_isequal_tolabs (x, y)); +***** test + y = stk_rescale(0.5, [], [0; 2]); + assert (stk_isequal_tolabs (y, 1.0)); +***** test + y = stk_rescale (0.5, [0; 1], [0; 2]); + assert (stk_isequal_tolabs (y, 1.0)); +***** test + y = stk_rescale (0.5, [0; 2], []); + assert (stk_isequal_tolabs (y, 0.25)); +***** test + y = stk_rescale (0.5, [0; 2], [0; 1]); + assert (stk_isequal_tolabs (y, 0.25)); +4 tests, 4 passed, 0 known failure, 0 skipped +[inst/model/@stk_model_gpposterior/stk_model_gpposterior.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/model/@stk_model_gpposterior/stk_model_gpposterior.m +***** test stk_test_class ('stk_model_gpposterior') +***** shared M_prior, x_obs, z_obs + x_obs = (linspace (0, pi, 15))'; + z_obs = sin (x_obs); + + M_prior = stk_model (@stk_materncov32_iso); + M_prior.param = log ([1.0; 2.1]); +***** test M_post = stk_model_gpposterior (); +***** test M_post = stk_model_gpposterior (M_prior, x_obs, z_obs); +***** error M_post = stk_model_gpposterior (M_prior, x_obs, [z_obs; z_obs]); +***** error M_post = stk_model_gpposterior (M_prior, x_obs, [z_obs; z_obs], 3.441); +***** test % hidden feature + kreq = stk_kreq_qr (M_prior, x_obs); + M_post = stk_model_gpposterior (M_prior, {x_obs, kreq}, z_obs); +***** test % NaNs in prior_model.param + DIM = 1; M = stk_model (@stk_materncov52_aniso, DIM); + M.param = nan (2, 1); % this is currently the default + x = stk_sampling_regulargrid (20, DIM, [0; 1]); + y = sin (double (x)); + zp = stk_predict (M, x, y, x); +7 tests, 7 passed, 0 known failure, 0 skipped +[inst/model/@stk_model_gpposterior/get.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/model/@stk_model_gpposterior/get.m +***** shared M_post + x_obs = (linspace (0, pi, 15))'; + z_obs = sin (x_obs); + M_prior = stk_model (@stk_materncov32_iso); + M_prior.param = log ([1.0; 2.1]); + M_post = stk_model_gpposterior (M_prior, x_obs, z_obs); +***** error value = get (M_post, 1.33); +***** error value = get (M_post, 'dudule'); +***** test value = get (M_post, 'prior_model'); +3 tests, 3 passed, 0 known failure, 0 skipped +[inst/model/@stk_model_gpposterior/set.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/model/@stk_model_gpposterior/set.m +***** shared M_post + x_obs = (linspace (0, pi, 15))'; + z_obs = sin (x_obs); + M_prior = stk_model (@stk_materncov32_iso); + M_prior.param = log ([1.0; 2.1]); + M_post = stk_model_gpposterior (M_prior, x_obs, z_obs); +***** error value = get (M_post, 1.33); +***** error value = get (M_post, 'dudule'); +***** test value = get (M_post, 'prior_model'); +3 tests, 3 passed, 0 known failure, 0 skipped +[inst/model/@stk_model_gpposterior/stk_predict_leaveoneout.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/model/@stk_model_gpposterior/stk_predict_leaveoneout.m +***** test % Check virtual Leave-One-Out formula + + n = 20; d = 1; + x_obs = stk_sampling_regulargrid (n, d, [0; 2*pi]); + z_obs = stk_feval (@sin, x_obs); + + lm_list = {stk_lm_null, stk_lm_constant, stk_lm_affine}; + + for j = 0:2 + for k = 1:(length (lm_list)) + + model = stk_model (@stk_materncov32_iso, d); + model.lm = lm_list{k}; + model.param = log ([1; 5]); + + switch j % test various scenarios for lognoisevariance + case 0 + model.lognoisevariance = -inf; + case 1 + model.lognoisevariance = 0; + case 2 + model.lognoisevariance = (1 + rand (n, 1)) * 1e-3; + end + + M_post = stk_model_gpposterior (model, x_obs, z_obs); + + [loo_pred, loo_res] = stk_predict_leaveoneout (M_post); + [direct_pred, direct_res] = stk_predict_leaveoneout_direct (M_post); + + assert (stk_isequal_tolrel (loo_pred, direct_pred)); + assert (stk_isequal_tolrel (loo_res, direct_res)); + + end + end 1 test, 1 passed, 0 known failure, 0 skipped -[inst/arrays/generic/stk_boundingbox.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/generic/stk_boundingbox.m -***** shared x, y, cn - cn = {'a', 'b', 'c'}; - x = [0 3 2; 1 4 1; 7 0 2]; -***** error y = stk_boundingbox (); -***** test y = stk_boundingbox (x); -***** assert (isequal (y.data, [0 0 1; 7 4 2])); +[inst/model/@stk_model_gpposterior/stk_model_update.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/model/@stk_model_gpposterior/stk_model_update.m +***** shared x_obs, z_obs, ref, M_prior, x_new, z_new, lnv_new + [x_obs, z_obs, ref] = stk_dataset_twobumps ('noisy2'); + M_prior = stk_model (@stk_materncov52_iso); + M_prior.param = [-0.15; 0.38]; + M_prior.lognoisevariance = 2 * log (ref.noise_std); + x_new = [-0.79; -0.79]; + z_new = [-0.69; -0.85]; + lnv_new = ref.noise_std_func (x_new); +***** test % heteroscedastic + M_prior.lognoisevariance = 2 * log (ref.noise_std); + M_post = stk_model_gpposterior (M_prior, x_obs, z_obs); + M_post = stk_model_update (M_post, x_new, z_new, lnv_new); +***** error % using lnv_new / homoscedastic + M_prior.lognoisevariance = 0; + M_post = stk_model_gpposterior (M_prior, x_obs, z_obs); + M_post = stk_model_update (M_post, x_new, z_new, lnv_new); % NOT OK +***** error % using lnv_new / noiseless + M_prior.lognoisevariance = -inf; + M_post = stk_model_gpposterior (M_prior, x_obs, z_obs) + M_post = stk_model_update (M_post, x_new, z_new, lnv_new); % NOT OK +***** error % not using lnv_new / heteroscedastic + M_prior.lognoisevariance = 2 * log (ref.noise_std); + M_post = stk_model_gpposterior (M_prior, x_obs, z_obs); + M_post = stk_model_update (M_post, x_new, z_new); +4 tests, 4 passed, 0 known failure, 0 skipped +[inst/model/@stk_model_gpposterior/stk_predict_.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/model/@stk_model_gpposterior/stk_predict_.m +***** shared n, m, M_post, M_prior, x0, x_obs, z_obs, x_prd, y_prd, idx_obs, idx_prd + + n = 10; % number of observations + m = n + 1; % number of predictions + d = 1; % dimension of the input space + + x0 = (linspace (0, pi, n + m))'; + + idx_obs = (2:2:(n+m-1))'; + idx_prd = (1:2:(n+m))'; + + x_obs = x0(idx_obs); + z_obs = sin (x_obs); + x_prd = x0(idx_prd); + + M_prior = stk_model (@stk_materncov32_iso); + M_prior.param = log ([1.0; 2.1]); + + M_post = stk_model_gpposterior (M_prior, x_obs, z_obs); +***** error y_prd = stk_predict (M_post); +***** test y_prd = stk_predict (M_post, x_prd); +***** error y_prd = stk_predict (M_post, [x_prd x_prd]); +***** test % nargout = 2 + [y_prd1, lambda] = stk_predict (M_post, x_prd); + assert (stk_isequal_tolrel (y_prd, y_prd1)); + assert (isequal (size (lambda), [n m])); +***** test % nargout = 3 + [y_prd1, lambda, mu] = stk_predict (M_post, x_prd); + assert (stk_isequal_tolrel (y_prd, y_prd1)); + assert (isequal (size (lambda), [n m])); + assert (isequal (size (mu), [1 m])); % ordinary kriging +***** test % nargout = 4 + [y_prd1, lambda, mu, K] = stk_predict (M_post, x_prd); + assert (stk_isequal_tolrel (y_prd, y_prd1)); + assert (isequal (size (lambda), [n m])); + assert (isequal (size (mu), [1 m])); % ordinary kriging + assert (isequal (size (K), [m m])); +***** test % nargout = 2, compute only variances + M_post1 = stk_model_gpposterior (M_prior, x_obs, []); + [y_prd_nan, lambda] = stk_predict (M_post1, x_prd); + assert (isequal (size (lambda), [n m])); + assert (all (isnan (y_prd_nan.mean))); +***** test % discrete model (prediction indices provided) + M_prior1 = stk_model (@stk_discretecov, M_prior, x0); + M_post1 = stk_model_gpposterior (M_prior1, idx_obs, z_obs); + y_prd1 = stk_predict (M_post1, idx_prd); + assert (stk_isequal_tolrel (y_prd, y_prd1)); +***** test % discrete model (prediction indices *not* provided) + M_prior1 = stk_model (@stk_discretecov, M_prior, x0); + M_post1 = stk_model_gpposterior (M_prior1, idx_obs, z_obs); + y_prd1 = stk_predict (M_post1, []); % predict them all! + assert (stk_isequal_tolrel (y_prd, y_prd1(idx_prd, :))); +9 tests, 9 passed, 0 known failure, 0 skipped +[inst/model/noise/@stk_gaussiannoise_het0/set.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/model/noise/@stk_gaussiannoise_het0/set.m +***** shared M_post + x_obs = (linspace (0, pi, 15))'; + z_obs = sin (x_obs); + M_prior = stk_model (@stk_materncov32_iso); + M_prior.param = log ([1.0; 2.1]); + M_post = stk_model_gpposterior (M_prior, x_obs, z_obs); +***** error value = get (M_post, 1.33); +***** error value = get (M_post, 'dudule'); +***** test value = get (M_post, 'prior_model'); 3 tests, 3 passed, 0 known failure, 0 skipped -[inst/arrays/generic/stk_get_sample_size.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/generic/stk_get_sample_size.m -***** assert (stk_get_sample_size ([1 2; 3 4; 5 6]) == 3); +[inst/model/prior_struct/stk_model.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/model/prior_struct/stk_model.m +***** test model = stk_model (); +***** test model = stk_model (@stk_expcov_iso); +***** test model = stk_model (@stk_expcov_iso, 1); +***** test model = stk_model (@stk_expcov_iso, 3); +***** test model = stk_model (@stk_expcov_aniso); +***** test model = stk_model (@stk_expcov_aniso, 1); +***** test model = stk_model (@stk_expcov_aniso, 3); +***** test model = stk_model (@stk_materncov_iso); +***** test model = stk_model (@stk_materncov_iso, 1); +***** test model = stk_model (@stk_materncov_iso, 3); +***** test model = stk_model (@stk_materncov_aniso); +***** test model = stk_model (@stk_materncov_aniso, 1); +***** test model = stk_model (@stk_materncov_aniso, 3); +***** test model = stk_model (@stk_materncov32_iso); +***** test model = stk_model (@stk_materncov32_iso, 1); +***** test model = stk_model (@stk_materncov32_iso, 3); +***** test model = stk_model (@stk_materncov32_aniso); +***** test model = stk_model (@stk_materncov32_aniso, 1); +***** test model = stk_model (@stk_materncov32_aniso, 3); +***** test model = stk_model (@stk_materncov52_iso); +***** test model = stk_model (@stk_materncov52_iso, 1); +***** test model = stk_model (@stk_materncov52_iso, 3); +***** test model = stk_model (@stk_materncov52_aniso); +***** test model = stk_model (@stk_materncov52_aniso, 1); +***** test model = stk_model (@stk_materncov52_aniso, 3); +***** test model = stk_model (@stk_gausscov_iso); +***** test model = stk_model (@stk_gausscov_iso, 1); +***** test model = stk_model (@stk_gausscov_iso, 3); +***** test model = stk_model (@stk_gausscov_aniso); +***** test model = stk_model (@stk_gausscov_aniso, 1); +***** test model = stk_model (@stk_gausscov_aniso, 3); +***** test model = stk_model (@stk_sphcov_iso); +***** test model = stk_model (@stk_sphcov_iso, 1); +***** test model = stk_model (@stk_sphcov_iso, 3); +***** test model = stk_model (@stk_sphcov_aniso); +***** test model = stk_model (@stk_sphcov_aniso, 1); +***** test model = stk_model (@stk_sphcov_aniso, 3); +37 tests, 37 passed, 0 known failure, 0 skipped +[inst/model/prior_struct/stk_ortho_func.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/model/prior_struct/stk_ortho_func.m +***** shared model, x, n, d + n = 15; d = 4; + model = stk_model (@stk_materncov_aniso, d); + x = stk_sampling_randunif (n, d); + model = rmfield (model, 'lm'); % Test the old .order approach +***** error P = stk_ortho_func (); +***** error P = stk_ortho_func (model); +***** test P = stk_ortho_func (model, x); +***** test + model.order = -1; P = stk_ortho_func (model, x); + assert (isequal (size (P), [n, 0])); +***** test + model.order = 0; P = stk_ortho_func (model, x); + assert (isequal (size (P), [n, 1])); +***** test + model.order = 1; P = stk_ortho_func (model, x); + assert (isequal (size (P), [n, d + 1])); +***** test + model.order = 2; P = stk_ortho_func (model, x); + assert (isequal (size (P), [n, 1 + d * (d + 3) / 2])); +***** test + model.order = 3; P = stk_ortho_func (model, x); + assert (isequal (size (P), [n, 1 + d * (11 + d * (6 + d)) / 6])); +***** error + model.order = 4; P = stk_ortho_func (model, x); + % model.order > 3 is not allowed +9 tests, 9 passed, 0 known failure, 0 skipped +[inst/model/prior_struct/stk_covmat_noise.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/model/prior_struct/stk_covmat_noise.m +***** shared model, model2, x1, x2, n1, n2, d, Ka, Kb, Kc, Pa, Pb, Pc, P1, P2, P3, K1, K2, K3 + n1 = 20; n2 = 10; d = 4; + model = stk_model (@stk_materncov52_aniso, d); + model.lm = stk_lm_affine; + model.param = log ([1.0; 2.1; 2.2; 2.3; 2.4]); + model2 = model; model2.lognoisevariance = log(0.01); + x1 = stk_sampling_randunif (n1, d); + x2 = stk_sampling_randunif (n2, d); +***** error [KK, PP] = stk_covmat_noise (); +***** error [KK, PP] = stk_covmat_noise (model); +***** test [Ka, Pa] = stk_covmat_noise (model, x1); % (1) +***** test [K1, P1] = stk_covmat_noise (model, x1, []); +***** test [K2, P2] = stk_covmat_noise (model, x1, [], -1); +***** test [K3, P3] = stk_covmat_noise (model, x1, [], -1, false); +***** assert (isequal (size (Ka), [n1 n1])); +***** assert (isequal (size (Pa), [n1 0])); +***** assert (isequal (P1, Pa) && (isequal (K1, Ka))) +***** assert (isequal (P2, Pa) && (isequal (K2, Ka))) +***** assert (isequal (P3, Pa) && (isequal (K3, Ka))) +***** test [Kb, Pb] = stk_covmat_noise (model, x1, x1); % (2) +***** test [K1, P1] = stk_covmat_noise (model, x1, x1, -1); +***** test [K2, P2] = stk_covmat_noise (model, x1, x1, -1, false); +***** assert (isequal (size (Kb), [n1 n1])); +***** assert (isequal (size (Pb), [n1 0])); +***** assert (isequal (P1, Pb) && (isequal (K1, Kb))) +***** assert (isequal (P2, Pb) && (isequal (K2, Kb))) +***** test [Kc, Pc] = stk_covmat_noise (model, x1, x2); % (3) +***** test [K1, P1] = stk_covmat_noise (model, x1, x2, -1); +***** test [K2, P2] = stk_covmat_noise (model, x1, x2, -1, false); +***** assert (isequal (size (Kc), [n1 n2])); +***** assert (isequal (size (Pc), [n1 0])); +***** assert (isequal (P1, Pc) && (isequal (K1, Kc))) +***** assert (isequal (P2, Pc) && (isequal (K2, Kc))) +***** assert (isequal (Kb, Ka)); +***** test [Ka, Pa] = stk_covmat_noise (model2, x1); % (1') +***** test [Kb, Pb] = stk_covmat_noise (model2, x1, x1); % (2') +***** error assert (isequal (Kb, Ka)); +***** assert (isequal (Pa, Pb)); +***** assert (isequal (Pa, Pc)); +31 tests, 31 passed, 0 known failure, 0 skipped +[inst/lm/@stk_lm_quadratic/stk_lm_quadratic.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/lm/@stk_lm_quadratic/stk_lm_quadratic.m +***** test stk_test_class ('stk_lm_quadratic') 1 test, 1 passed, 0 known failure, 0 skipped -[inst/arrays/generic/stk_normalize.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/arrays/generic/stk_normalize.m -***** shared x, box, y1, y2, y3, y4 - n = 5; box = [2; 3]; x = box(1) + diff (box) * rand (n, 1); -***** error y1 = stk_normalize (); -***** test y2 = stk_normalize (x); -***** test y3 = stk_normalize (x, box); -***** test assert (~ any ((y2 < -10 * eps) | (y2 > 1 + 10 * eps))); -***** test assert (~ any ((y3 < -10 * eps) | (y3 > 1 + 10 * eps))); -5 tests, 5 passed, 0 known failure, 0 skipped -[inst/covfcs/stk_materncov52_iso.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/covfcs/stk_materncov52_iso.m -***** shared param, x, y - dim = 1; - param = log ([1.0; 2.5]); - x = stk_sampling_randunif (5, dim); - y = stk_sampling_randunif (5, dim); -***** error K = stk_materncov52_iso ([param; 1.234], x, y); -***** error stk_materncov52_iso (); -***** error stk_materncov52_iso (param); -***** error stk_materncov52_iso (param, x); -***** test stk_materncov52_iso (param, x, y); -***** test stk_materncov52_iso (param, x, y, -1); -***** test stk_materncov52_iso (param, x, y, -1, false); -***** error stk_materncov52_iso (param, x, y, -2); -***** test stk_materncov52_iso (param, x, y, -1); -***** error stk_materncov52_iso (param, x, y, 0); -***** test stk_materncov52_iso (param, x, y, 1); -***** test stk_materncov52_iso (param, x, y, 2); -***** error stk_materncov52_iso (param, x, y, 3); -***** error stk_materncov52_iso (param, x, y, nan); -***** error stk_materncov52_iso (param, x, y, inf); -***** shared dim, param, x, y, nx, ny - dim = 3; - param = log ([1.0; 2.5]); - nx = 4; ny = 10; - x = stk_sampling_randunif (nx, dim); - y = stk_sampling_randunif (ny, dim); +[inst/lm/@stk_lm_quadratic/feval.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/lm/@stk_lm_quadratic/feval.m ***** test - K1 = stk_materncov52_iso (param, x, y); - K2 = stk_materncov52_iso (param, x, y, -1); - assert (isequal (size (K1), [nx ny])); - assert (stk_isequal_tolabs (K1, K2)); + n = 15; d = 4; + x = stk_sampling_randunif (n, d); + P = feval (stk_lm_quadratic (), x); + assert (isequal (size (P), [n, 1 + d * (d + 3) / 2])); +1 test, 1 passed, 0 known failure, 0 skipped +[inst/lm/@stk_lm_constant/feval.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/lm/@stk_lm_constant/feval.m ***** test - for i = 1:2, - dK = stk_materncov52_iso (param, x, y, i); - assert (isequal (size (dK), [nx ny])); - end + n = 15; d = 4; + x = stk_sampling_randunif (n, d); + P = feval (stk_lm_constant (), x); + assert (isequal (size (P), [n, 1])); +1 test, 1 passed, 0 known failure, 0 skipped +[inst/lm/@stk_lm_constant/stk_lm_constant.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/lm/@stk_lm_constant/stk_lm_constant.m +***** test stk_test_class ('stk_lm_constant') +1 test, 1 passed, 0 known failure, 0 skipped +[inst/lm/stk_lm_polynomial.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/lm/stk_lm_polynomial.m +***** error lm = stk_lm_polynomial (); ***** test - n = 7; - x = stk_sampling_randunif (n, dim); - y = stk_sampling_randunif (n, dim); + lm = stk_lm_polynomial (-1); + assert (isa (lm, 'stk_lm_null')); +***** test + lm = stk_lm_polynomial (0); + assert (isa (lm, 'stk_lm_constant')); +***** test + lm = stk_lm_polynomial (1); + assert (isa (lm, 'stk_lm_affine')); +***** test + lm = stk_lm_polynomial (2); + assert (isa (lm, 'stk_lm_quadratic')); +***** test + lm = stk_lm_polynomial (3); + assert (isa (lm, 'stk_lm_cubic')); +6 tests, 6 passed, 0 known failure, 0 skipped +[inst/lm/@stk_lm_affine/stk_lm_affine.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/lm/@stk_lm_affine/stk_lm_affine.m +***** test stk_test_class ('stk_lm_affine') +1 test, 1 passed, 0 known failure, 0 skipped +[inst/lm/@stk_lm_affine/feval.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/lm/@stk_lm_affine/feval.m +***** test + n = 15; d = 4; + x = stk_sampling_randunif (n, d); + P = feval (stk_lm_affine (), x); + assert (isequal (size (P), [n, d + 1])); +1 test, 1 passed, 0 known failure, 0 skipped +[inst/lm/@stk_lm_cubic/stk_lm_cubic.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/lm/@stk_lm_cubic/stk_lm_cubic.m +***** test stk_test_class ('stk_lm_cubic') +1 test, 1 passed, 0 known failure, 0 skipped +[inst/lm/@stk_lm_cubic/feval.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/lm/@stk_lm_cubic/feval.m +***** test + n = 15; d = 4; + x = stk_sampling_randunif (n, d); + P = feval (stk_lm_cubic (), x); + assert (isequal (size (P), [n, 1 + d * (11 + d * (6 + d)) / 6])) +1 test, 1 passed, 0 known failure, 0 skipped +[inst/lm/@stk_lm_matrix/stk_lm_matrix.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/lm/@stk_lm_matrix/stk_lm_matrix.m +***** test stk_test_class ('stk_lm_matrix') +***** test %%% dim 1 + data = rand (10, 1); idx = 3:7; + lm = stk_lm_matrix (data); + assert (isa (lm, 'stk_lm_matrix')); + assert (isequal (data(idx, :), feval (lm, idx))); +***** test %%% dim 3 + data = rand (10, 3); idx = 3:7; + lm = stk_lm_matrix (data); + assert (isa (lm, 'stk_lm_matrix')); + assert (isequal (data(idx, :), feval (lm, idx))); +3 tests, 3 passed, 0 known failure, 0 skipped +[inst/lm/@stk_lm_null/stk_lm_null.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/lm/@stk_lm_null/stk_lm_null.m +***** test stk_test_class ('stk_lm_null') +1 test, 1 passed, 0 known failure, 0 skipped +[inst/lm/@stk_lm_null/feval.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/lm/@stk_lm_null/feval.m +***** test + n = 15; d = 4; + x = stk_sampling_randunif (n, d); + P = feval (stk_lm_null (), x); + assert (isequal (size (P), [n, 0])); +1 test, 1 passed, 0 known failure, 0 skipped +[inst/param/estim/stk_param_init.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/param/estim/stk_param_init.m +***** test + xi = (1:10)'; zi = sin (xi); + model = stk_model (@stk_materncov52_iso); + model.param = stk_param_init (model, xi, zi, [1; 10], false); + xt = (1:9)' + 0.5; zt = sin (xt); + zp = stk_predict (model, xi, zi, xt); + assert (sum ((zt - zp.mean) .^ 2) < 1e-3); +***** test % check equivariance of parameter estimates + f = @(x) sin (x); + xi = stk_sampling_regulargrid (10, 1); zi = stk_feval (f, xi); + shift = 1000; scale = 0.01; + model = stk_model (@stk_materncov32_iso); + p1 = stk_param_init (model, xi, zi); + p2 = stk_param_init (model, xi, shift + scale .* zi); + assert (stk_isequal_tolabs (p2(1), p1(1) + log (scale^2), 1e-10)) + assert (stk_isequal_tolabs (p2(2), p1(2), eps)) +***** shared xi, zi, BOX, xt, zt - K1 = stk_materncov52_iso (param, x, y); - K2 = stk_materncov52_iso (param, x, y, -1, true); - assert (isequal (size (K1), [n n])); - assert (stk_isequal_tolabs (K2, diag (K1))); + f = @(x)(- (0.8 * x + sin (5 * x + 1) + 0.1 * sin (10 * x))); + DIM = 1; % Dimension of the factor space + BOX = [-1.0; 1.0]; % Factor space - for i = 1:2, - dK1 = stk_materncov52_iso (param, x, y, i); - dK2 = stk_materncov52_iso (param, x, y, i, true); - assert (isequal (size (dK1), [n n])); - assert (stk_isequal_tolabs (dK2, diag (dK1))); - end -18 tests, 18 passed, 0 known failure, 0 skipped -[inst/covfcs/stk_gausscov_iso.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/covfcs/stk_gausscov_iso.m -***** shared param, x, y - dim = 1; - param = log ([1.0; 2.5]); - x = stk_sampling_randunif (5, dim); - y = stk_sampling_randunif (5, dim); -***** error K = stk_gausscov_iso ([param; 1.234], x, y); -***** error stk_gausscov_iso (); -***** error stk_gausscov_iso (param); -***** error stk_gausscov_iso (param, x); -***** test stk_gausscov_iso (param, x, y); -***** test stk_gausscov_iso (param, x, y, -1); -***** test stk_gausscov_iso (param, x, y, -1, false); -***** error stk_gausscov_iso (param, x, y, -2); -***** test stk_gausscov_iso (param, x, y, -1); -***** error stk_gausscov_iso (param, x, y, 0); -***** test stk_gausscov_iso (param, x, y, 1); -***** test stk_gausscov_iso (param, x, y, 2); -***** error stk_gausscov_iso (param, x, y, 3); -***** error stk_gausscov_iso (param, x, y, nan); -***** error stk_gausscov_iso (param, x, y, inf); -***** shared dim, param, x, y, nx, ny - dim = 3; - param = log ([1.0; 2.5]); - nx = 4; ny = 10; - x = stk_sampling_randunif (nx, dim); - y = stk_sampling_randunif (ny, dim); + xi = stk_sampling_regulargrid (20, DIM, BOX); % Evaluation points + zi = stk_feval (f, xi); % Evaluation results + + NT = 400; % Number of points in the grid + xt = stk_sampling_regulargrid (NT, DIM, BOX); % Generate a regular grid + zt = stk_feval (f, xt); % Values of f on the grid +***** xtest % This test is known to fail in Debian buster i386 + % because of a known problem in Octave's sqp/qp functions + % http://savannah.gnu.org/bugs/?38875 + 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) ***** test - K1 = stk_gausscov_iso (param, x, y); - K2 = stk_gausscov_iso (param, x, y, -1); - assert (isequal (size (K1), [nx ny])); - assert (stk_isequal_tolabs (K1, K2)); + model = stk_model (@stk_materncov_aniso); + [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 441 column 9 + stk_minimize_boxconstrained at line 57 column 18 + 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 + /tmp/tmp.U7Xx8aDcQp at line 1558 column 31 + ***** test - for i = 1:2, - dK = stk_gausscov_iso (param, x, y, i); - assert (isequal (size (dK), [nx ny])); - end + model = stk_model (@stk_materncov32_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) ***** test - n = 7; - x = stk_sampling_randunif (n, dim); - y = stk_sampling_randunif (n, dim); + model = stk_model (@stk_materncov32_aniso); + [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) +***** test + model = stk_model (@stk_materncov52_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) +***** test + model = stk_model (@stk_materncov52_aniso); + [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) +***** test + model = stk_model (@stk_gausscov_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: matrix singular to machine precision, rcond = 3.84351e-18 +warning: called from + linsolve at line 113 column 7 + linsolve at line 42 column 3 + stk_set_righthandside at line 44 column 16 + stk_make_kreq at line 35 column 6 + stk_predict_ at line 112 column 10 + stk_predict at line 104 column 16 + __test__ at line 6 column 5 + test at line 682 column 11 + /tmp/tmp.U7Xx8aDcQp at line 1558 column 31 - K1 = stk_gausscov_iso (param, x, y); - K2 = stk_gausscov_iso (param, x, y, -1, true); - assert (isequal (size (K1), [n n])); - assert (stk_isequal_tolabs (K2, diag (K1))); +***** test + model = stk_model (@stk_gausscov_aniso); + [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: matrix singular to machine precision, rcond = 1.97535e-18 +warning: called from + linsolve at line 113 column 7 + linsolve at line 42 column 3 + stk_set_righthandside at line 44 column 16 + stk_make_kreq at line 35 column 6 + stk_predict_ at line 112 column 10 + stk_predict at line 104 column 16 + __test__ at line 6 column 5 + test at line 682 column 11 + /tmp/tmp.U7Xx8aDcQp at line 1558 column 31 - for i = 1:2, - dK1 = stk_gausscov_iso (param, x, y, i); - dK2 = stk_gausscov_iso (param, x, y, i, true); - assert (isequal (size (dK1), [n n])); - assert (stk_isequal_tolabs (dK2, diag (dK1))); - end -18 tests, 18 passed, 0 known failure, 0 skipped -[inst/covfcs/stk_gausscov_aniso.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/covfcs/stk_gausscov_aniso.m -***** shared param, x, y, K1, K2, K3 - dim = 1; - param = log ([1.0; 2.5]); - x = stk_sampling_randunif (5, dim); - y = stk_sampling_randunif (6, dim); -***** error K0 = stk_gausscov_aniso (); -***** error K0 = stk_gausscov_aniso (param); -***** error K0 = stk_gausscov_aniso (param, x); -***** test K1 = stk_gausscov_aniso (param, x, y); -***** test K2 = stk_gausscov_aniso (param, x, y, -1); -***** test K3 = stk_gausscov_aniso (param, x, y, -1, false); -***** assert (isequal (K1, K2)); -***** assert (isequal (K1, K3)); -***** test % df versus ordinary array - u = double (x); v = double (y); - K1 = stk_gausscov_aniso (param, u, v, -1); - K2 = stk_gausscov_aniso (param, stk_dataframe (u), stk_dataframe (v), -1); -***** error stk_gausscov_aniso (param, x, y, -2); -***** test stk_gausscov_aniso (param, x, y, -1); -***** error stk_gausscov_aniso (param, x, y, 0); -***** test stk_gausscov_aniso (param, x, y, 1); -***** test stk_gausscov_aniso (param, x, y, 2); -***** error stk_gausscov_aniso (param, x, y, 3); -***** error stk_gausscov_aniso (param, x, y, nan); -***** error stk_gausscov_aniso (param, x, y, inf); -***** shared dim, param, x, y, nx, ny - dim = 3; - param = log ([1.0; 2.5; 2.4; 2.6]); - nx = 4; ny = 10; - x = stk_sampling_randunif (nx, dim); - y = stk_sampling_randunif (ny, dim); +***** test % Homoscedastic case / do_estim_lnv = true + model = stk_model (@stk_materncov32_iso); + [model.param, model.lognoisevariance] = ... + stk_param_init (model, xi, zi, BOX, true); + [model.param, model.lognoisevariance] = ... + stk_param_estim (model, xi, zi); + zp = stk_predict (model, xi, zi, xt); + assert (model.lognoisevariance > -inf); + assert (max ((zp.mean - zt) .^ 2) < 1e-3) +warning: This way of setting do_estim_lnv is deprecated +warning: called from + stk_param_init>stk_param_init_ at line 250 column 5 + stk_param_init at line 87 column 18 + __test__ at line 4 column 40 + test at line 682 column 11 + /tmp/tmp.U7Xx8aDcQp at line 1558 column 31 + +***** error % Homoscedastic case / do_estim_lnv = false / model.lnv = nan + model = stk_model (@stk_materncov32_iso); + model.lognoisevariance = nan; % not compatible with do_estim_lnv == false + [model.param, model.lognoisevariance] = ... + stk_param_init (model, xi, zi, BOX, false); +***** test % Heteroscedastic case / known noise variance + model = stk_model (@stk_materncov32_iso); + lnv = log ((100 + rand (size (zi))) / 1e6); + model.lognoisevariance = lnv; % here we say that lnv is known + [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 (isequal (model.lognoisevariance, lnv)); % should be untouched + assert (max ((zp.mean - zt) .^ 2) < 1e-3) +***** shared model, x, z + model = stk_model (@stk_materncov52_iso); + n = 10; x = stk_sampling_regulargrid (n, 1, [0; 1]); z = ones (size (x)); +***** test % Constant response, noiseless model + [param, lnv] = stk_param_init (model, x, z); + assert ((all (isfinite (param))) && (length (param) == 2)); + assert (isequal (lnv, -inf)); +warning: Parameter estimation is impossible with constant-response data. +warning: called from + stk_param_init>paraminit_ at line 351 column 5 + stk_param_init>stk_param_init_ at line 323 column 14 + stk_param_init at line 87 column 18 + __test__ at line 3 column 15 + test at line 682 column 11 + /tmp/tmp.U7Xx8aDcQp at line 1558 column 31 + +***** test % Constant response, noisy model + model.lognoisevariance = nan; + [param, lnv] = stk_param_init (model, x, z); + assert ((all (isfinite (param))) && (length (param) == 2)); + assert (isscalar (lnv) && isfinite (lnv)); +warning: Parameter estimation is impossible with constant-response data. +warning: called from + stk_param_init>paraminit_ at line 351 column 5 + stk_param_init>stk_param_init_ at line 323 column 14 + stk_param_init at line 87 column 18 + __test__ at line 4 column 15 + test at line 682 column 11 + /tmp/tmp.U7Xx8aDcQp at line 1558 column 31 + +15 tests, 15 passed, 0 known failure, 0 skipped +[inst/param/estim/stk_param_estim.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/param/estim/stk_param_estim.m +***** shared f, xi, zi, NI, param0, param1, model + + f = @(x)(- (0.8 * x + sin (5 * x + 1) + 0.1 * sin (10 * x)) ); + DIM = 1; NI = 20; box = [-1.0; 1.0]; + xi = stk_sampling_regulargrid (NI, DIM, box); + + SIGMA2 = 1.0; % variance parameter + NU = 4.0; % regularity parameter + RHO1 = 0.4; % scale (range) parameter + param0 = log ([SIGMA2; NU; 1/RHO1]); + + model = stk_model (@stk_materncov_iso); +***** 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 441 column 9 + stk_minimize_boxconstrained at line 57 column 18 + 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 + /tmp/tmp.U7Xx8aDcQp at line 1566 column 31 + +***** test % same thing, with empty lnv0 (ok) + param2 = stk_param_estim (model, xi, zi, param0, []); + assert (stk_isequal_tolrel (param2, param1, 1e-2)) +warning: sqp: QP subproblem is non-convex and unbounded +warning: called from + sqp at line 441 column 9 + stk_minimize_boxconstrained at line 57 column 18 + stk_param_estim_optim at line 70 column 23 + stk_param_estim at line 139 column 15 + __test__ at line 3 column 9 + test at line 682 column 11 + /tmp/tmp.U7Xx8aDcQp at line 1566 column 31 + +***** error % same thing, with lnv0 == NaN (not ok as a starting point) + param2 = stk_param_estim (model, xi, zi, param0, nan); +***** error % same thing, with lnv0 == -inf (not ok as a starting point) + param2 = stk_param_estim (model, xi, zi, param0, -inf); +***** test % same thing, with explicit value for 'criterion' + param2 = stk_param_estim (model, xi, zi, param0, [], @stk_param_relik); + assert (stk_isequal_tolrel (param1, param2, 1e-2)) +warning: sqp: QP subproblem is non-convex and unbounded +warning: called from + sqp at line 441 column 9 + stk_minimize_boxconstrained at line 57 column 18 + stk_param_estim_optim at line 70 column 23 + stk_param_estim at line 139 column 15 + __test__ at line 3 column 9 + test at line 682 column 11 + /tmp/tmp.U7Xx8aDcQp at line 1566 column 31 + +***** 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)) +warning: sqp: QP subproblem is non-convex and unbounded +warning: called from + sqp at line 441 column 9 + stk_minimize_boxconstrained at line 57 column 18 + 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 + /tmp/tmp.U7Xx8aDcQp at line 1566 column 31 + +warning: sqp: QP subproblem is non-convex and unbounded +warning: called from + sqp at line 441 column 9 + stk_minimize_boxconstrained at line 57 column 18 + stk_param_estim_optim at line 70 column 23 + stk_param_estim at line 139 column 15 + __test__ at line 5 column 9 + test at line 682 column 11 + /tmp/tmp.U7Xx8aDcQp at line 1566 column 31 + +***** test % noisy + NOISE_STD_TRUE = 0.1; + NOISE_STD_INIT = 1e-5; + zi = zi + NOISE_STD_TRUE * randn(NI, 1); + model.lognoisevariance = 2 * log(NOISE_STD_INIT); + [param, lnv] = stk_param_estim ... + (model, xi, zi, param0, model.lognoisevariance); +***** error param = stk_param_estim () +***** error param = stk_param_estim (model); +***** error param = stk_param_estim (model, xi); +***** test % Constant response + model = stk_model (@stk_materncov52_iso); + n = 10; x = stk_sampling_regulargrid (n, 1, [0; 1]); z = ones (size (x)); + param = stk_param_estim (model, x, z); + assert ((all (isfinite (param))) && (length (param) == 2)); +warning: Constant-response data: the output of stk_param_estim is likely to be unreliable. +warning: called from + stk_param_estim at line 95 column 5 + __test__ at line 5 column 8 + test at line 682 column 11 + /tmp/tmp.U7Xx8aDcQp at line 1566 column 31 + +warning: Parameter estimation is impossible with constant-response data. +warning: called from + stk_param_init>paraminit_ at line 351 column 5 + stk_param_init>stk_param_init_ at line 323 column 14 + stk_param_init at line 87 column 18 + stk_param_estim>provide_starting_point at line 205 column 20 + stk_param_estim at line 110 column 30 + __test__ at line 5 column 8 + test at line 682 column 11 + /tmp/tmp.U7Xx8aDcQp at line 1566 column 31 + +warning: Something went wrong during the optimization +crit0 = -15.421654, crit_opt = -15.421654: crit0 < crit_opt +11 tests, 11 passed, 0 known failure, 0 skipped +[inst/param/estim/stk_param_gls.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/param/estim/stk_param_gls.m +***** shared xi, zi, model, beta, sigma2 + xi = (1:10)'; zi = sin (xi); + model = stk_model (@stk_materncov52_iso); + model.param = [0.0 0.0]; ***** test - K1 = stk_gausscov_aniso (param, x, y); - K2 = stk_gausscov_aniso (param, x, y, -1); - assert (isequal (size (K1), [nx ny])); - assert (stk_isequal_tolabs (K1, K2)); + model.lm = stk_lm_constant (); + [beta, sigma2] = stk_param_gls (model, xi, zi); +***** assert (stk_isequal_tolabs (beta, 0.1346064, 1e-6)) +***** assert (stk_isequal_tolabs (sigma2, 0.4295288, 1e-6)) ***** test - for i = 1:(dim + 1), - dK = stk_gausscov_aniso (param, x, y, i); - assert (isequal (size (dK), [nx ny])); - end + model.lm = stk_lm_affine (); + [beta, sigma2] = stk_param_gls (model, xi, zi); +***** assert (stk_isequal_tolabs (beta, [0.4728342; -0.0614960], 1e-6)) +***** assert (stk_isequal_tolabs (sigma2, 0.4559431, 1e-6)) ***** test - n = 7; - x = stk_sampling_randunif (n, dim); - y = stk_sampling_randunif (n, dim); + model.lm = stk_lm_null (); + [beta, sigma2] = stk_param_gls (model, xi, zi); +***** assert (isequal (beta, zeros (0, 1))) +***** assert (stk_isequal_tolabs (sigma2, 0.3977993, 1e-6)) +9 tests, 9 passed, 0 known failure, 0 skipped +[inst/param/estim/stk_param_init_lnv.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/param/estim/stk_param_init_lnv.m +***** test + f = @(x)(- (0.8 * x + sin (5 * x + 1) + 0.1 * sin (10 * x))); + ni = 20; + xi = (linspace (-1, 1, ni))' + 0.2 * (randn (ni, 1)); + zi = stk_feval (f, xi); - K1 = stk_gausscov_aniso (param, x, y); - K2 = stk_gausscov_aniso (param, x, y, -1, true); - assert (isequal (size (K1), [n n])); - assert (stk_isequal_tolabs (K2, diag (K1))); + model = stk_model (@stk_materncov_iso); + model.param = log ([1; 5/2; 1/0.4]); + model.lognoisevariance = nan; + lnv = stk_param_init_lnv (model, xi, zi); - for i = 1:(dim + 1), - dK1 = stk_gausscov_aniso (param, x, y, i); - dK2 = stk_gausscov_aniso (param, x, y, i, true); - assert (isequal (size (dK1), [n n])); - assert (stk_isequal_tolabs (dK2, diag (dK1))); - end -20 tests, 20 passed, 0 known failure, 0 skipped -[inst/covfcs/stk_expcov_aniso.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/covfcs/stk_expcov_aniso.m -***** shared param, x, y, K1, K2, K3 - dim = 1; - param = log ([1.0; 2.5]); - x = stk_sampling_randunif (5, dim); - y = stk_sampling_randunif (6, dim); -***** error K0 = stk_expcov_aniso (); -***** error K0 = stk_expcov_aniso (param); -***** error K0 = stk_expcov_aniso (param, x); -***** test K1 = stk_expcov_aniso (param, x, y); -***** test K2 = stk_expcov_aniso (param, x, y, -1); -***** test K3 = stk_expcov_aniso (param, x, y, -1, false); -***** assert (isequal (K1, K2)); -***** assert (isequal (K1, K3)); -***** test % df versus ordinary array - u = double (x); v = double (y); - K1 = stk_expcov_aniso (param, u, v, -1); - K2 = stk_expcov_aniso (param, stk_dataframe (u), stk_dataframe (v), -1); -***** error stk_expcov_aniso (param, x, y, -2); -***** test stk_expcov_aniso (param, x, y, -1); -***** error stk_expcov_aniso (param, x, y, 0); -***** test stk_expcov_aniso (param, x, y, 1); -***** test stk_expcov_aniso (param, x, y, 2); -***** error stk_expcov_aniso (param, x, y, 3); -***** error stk_expcov_aniso (param, x, y, nan); -***** error stk_expcov_aniso (param, x, y, inf); -***** shared dim, param, x, y, nx, ny - dim = 3; - param = log ([1.0; 2.5; 2.4; 2.6]); - nx = 4; ny = 10; - x = stk_sampling_randunif (nx, dim); - y = stk_sampling_randunif (ny, dim); -***** test - K1 = stk_expcov_aniso (param, x, y); - K2 = stk_expcov_aniso (param, x, y, -1); - assert (isequal (size(K1), [nx ny])); - assert (stk_isequal_tolabs (K1, K2)); + assert ((isscalar (lnv)) && (lnv > -30) && (lnv < 30)); +1 test, 1 passed, 0 known failure, 0 skipped +[inst/param/estim/stk_param_relik.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/param/estim/stk_param_relik.m +***** shared f, xi, zi, NI, model, C, dC1, dC2 + + f = @(x)(- (0.8 * x(:, 1) + sin (5 * x(:, 2) + 1) ... + + 0.1 * sin (10 * x(:, 3)))); + DIM = 3; NI = 20; box = repmat ([-1.0; 1.0], 1, DIM); + xi = stk_sampling_halton_rr2 (NI, DIM, box); + zi = stk_feval (f, xi); + + SIGMA2 = 1.0; % variance parameter + NU = 4.0; % regularity parameter + RHO1 = 0.4; % scale (range) parameter + + model = stk_model (@stk_materncov_aniso); + model.param = log ([SIGMA2; NU; 1/RHO1 * ones(DIM, 1)]); +***** error [C, dC1, dC2] = stk_param_relik (); +***** error [C, dC1, dC2] = stk_param_relik (model); +***** error [C, dC1, dC2] = stk_param_relik (model, xi); +***** test [C, dC1, dC2] = stk_param_relik (model, xi, zi); ***** test - for i = 1:(dim + 1), - dK = stk_expcov_aniso (param, x, y, i); - assert (isequal (size (dK), [nx ny])); + TOL_REL = 0.01; + assert (stk_isequal_tolrel (C, 21.6, TOL_REL)); + assert (stk_isequal_tolrel (dC1, [4.387 -0.1803 0.7917 0.1392 2.580]', TOL_REL)); + assert (isequal (dC2, [])); +***** shared xi, zi, model, TOL_REL + xi = [-1 -.6 -.2 .2 .6 1]'; + zi = [-0.11 1.30 0.23 -1.14 0.36 -0.37]'; + model = stk_model (@stk_materncov_iso); + model.param = log ([1.0 4.0 2.5]); + model.lognoisevariance = log (0.01); + TOL_REL = 0.01; +***** test % Another simple 1D check + [C, dC1, dC2] = stk_param_relik (model, xi, zi); + assert (stk_isequal_tolrel (C, 6.327, TOL_REL)); + assert (stk_isequal_tolrel (dC1, [0.268 0.0149 -0.636]', TOL_REL)); + assert (stk_isequal_tolrel (dC2, -1.581e-04, TOL_REL)); +***** test % Same 1D test with simple kriging + model.lm = stk_lm_null; + [C, dC1, dC2] = stk_param_relik (model, xi, zi); + assert (stk_isequal_tolrel (C, 7.475, TOL_REL)); + assert (stk_isequal_tolrel (dC1, [0.765 0.0238 -1.019]', TOL_REL)); + assert (stk_isequal_tolrel (dC2, 3.0517e-03, TOL_REL)); +***** test % Check the gradient on a 2D test case + + f = @stk_testfun_braninhoo; + DIM = 2; + BOX = [[-5; 10], [0; 15]]; + NI = 20; + TOL_REL = 1e-2; + DELTA = 1e-6; + + model = stk_model (@stk_materncov52_iso, DIM); + model.param = [1 1]; + + xi = stk_sampling_halton_rr2 (NI, DIM, BOX); + zi = stk_feval (f, xi); + + for range = [0.3 2 10] + model.param(2) = - log (range); + for diff = 1:2 + assert (stk_test_critgrad ... + (@stk_param_relik, model, xi, zi, diff, 1e-6)); + end end +8 tests, 8 passed, 0 known failure, 0 skipped +[inst/misc/distrib/stk_distrib_normal_ei.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/misc/distrib/stk_distrib_normal_ei.m +***** assert (stk_isequal_tolrel (stk_distrib_normal_ei (0.0), 1 / sqrt (2 * pi), eps)) +***** test % Decreasing as a function of z + ei = stk_distrib_normal_ei (linspace (-10, 10, 200)); + assert (all (diff (ei) < 0)) +***** shared M, mu, sigma, ei + M = randn (1, 10); + mu = randn (5, 1); + sigma = 1 + rand (1, 1, 7); + ei = stk_distrib_normal_ei (M, mu, sigma); +***** assert (isequal (size (ei), [5, 10, 7])) +***** assert (all (ei(:) >= 0)) +***** assert (isequal (ei, stk_distrib_normal_ei (M, mu, sigma, false))); +***** assert (isequal (ei, stk_distrib_normal_ei (-M, -mu, sigma, true))); +6 tests, 6 passed, 0 known failure, 0 skipped +[inst/misc/distrib/stk_distrib_normal_pdf.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/misc/distrib/stk_distrib_normal_pdf.m +***** assert (stk_isequal_tolrel (stk_distrib_normal_pdf ([1; 3], 1, [1 10]), ... + [1 / sqrt(2 * pi) ... % normpdf ((1 - 1) / 1) + 0.1 / sqrt(2 * pi); ... % normpdf ((1 - 1) / 10) / 10 + exp(-2) / sqrt(2 * pi) ... % normpdf ((3 - 1) / 1) + 3.910426939754558780e-2 ... % normpdf ((3 - 1) / 10) / 10 + ], eps)); +***** assert (isequal (stk_distrib_normal_pdf (inf), 0.0)); +***** assert (isequal (stk_distrib_normal_pdf (-inf), 0.0)); +***** assert (isnan (stk_distrib_normal_pdf (nan))); +***** assert (isnan (stk_distrib_normal_pdf (0, 0, -1))); +5 tests, 5 passed, 0 known failure, 0 skipped +[inst/misc/distrib/stk_distrib_bivnorm_cdf.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/misc/distrib/stk_distrib_bivnorm_cdf.m ***** test - n = 7; - x = stk_sampling_randunif (n, dim); - y = stk_sampling_randunif (n, dim); - K1 = stk_expcov_aniso (param, x, y); - K2 = stk_expcov_aniso (param, x, y, -1, true); - assert (isequal (size (K1), [n n])); - assert (stk_isequal_tolabs (K2, diag (K1))); + z1 = [0 1; -1 2]; + z2 = [0 1; 1 -2]; - for i = 1:(dim + 1), - dK1 = stk_expcov_aniso (param, x, y, i); - dK2 = stk_expcov_aniso (param, x, y, i, true); - assert (isequal (size (dK1), [n n])); - assert (stk_isequal_tolabs (dK2, diag (dK1))); - end -20 tests, 20 passed, 0 known failure, 0 skipped -[inst/covfcs/stk_materncov_aniso.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/covfcs/stk_materncov_aniso.m -***** shared param, x, y - dim = 1; - param = log ([1.0; 1.5; 2.8]); - x = stk_sampling_randunif(5, dim); - y = stk_sampling_randunif(5, dim); -***** error stk_materncov_aniso(); -***** error stk_materncov_aniso(param); -***** error stk_materncov_aniso(param, x); -***** test stk_materncov_aniso(param, x, y); -***** test stk_materncov_aniso(param, x, y, -1); -***** test stk_materncov_aniso(param, x, y, -1, false); -***** error stk_materncov_aniso(param, x, y, -2); -***** test stk_materncov_aniso(param, x, y, -1); -***** error stk_materncov_aniso(param, x, y, 0); -***** test stk_materncov_aniso(param, x, y, 1); -***** test stk_materncov_aniso(param, x, y, 2); -***** test stk_materncov_aniso(param, x, y, 3); -***** error stk_materncov_aniso(param, x, y, 4); -***** error stk_materncov_aniso(param, x, y, nan); -***** error stk_materncov_aniso(param, x, y, inf); -***** shared dim, param, x, y, nx, ny - dim = 3; - param = log ([1.0; 1.5; 2.8; 2.7; 2.9]); - nx = 4; ny = 10; - x = stk_sampling_randunif(nx, dim); - y = stk_sampling_randunif(ny, dim); + z = cat (3, z1, z2); % 2 x 2 x 2 + + mu1 = 0; % 1 x 1 x 1 + mu2 = [0 1]; % 1 x 2 x 1 + + sigma1 = [1 3]; % 1 x 2 x 1 + sigma2 = [1; 2]; % 2 x 1 x 1 + + rho = [0; 0.5]; % 2 x 1 x 1 + + %% BROADCASTING => the result will be a 2 x 2 matrix + + p = stk_distrib_bivnorm_cdf (z, mu1, mu2, sigma1, sigma2, rho); + + p11 = 0.25; % mvncdf ([ 0 0], [0 0], [1 0; 0 1]); + p12 = 0.315279329909118; % mvncdf ([ 1 1], [0 1], [9 0; 0 1]); + p21 = 0.146208349559646; % mvncdf ([-1 1], [0 0], [1 1; 1 4]); + p22 = 0.064656239880040; % mvncdf ([ 2 -2], [0 1], [9 3; 3 4]); + + assert (stk_isequal_tolabs (p, [p11 p12; p21 p22], 1e-14)) ***** test - K1 = stk_materncov_aniso(param, x, y); - K2 = stk_materncov_aniso(param, x, y, -1); - assert(isequal(size(K1), [nx ny])); - assert(stk_isequal_tolabs(K1, K2)); + [p, q] = stk_distrib_bivnorm_cdf ([inf -inf], 0, 0, 1, 1, 0); + assert ((p == 0.0) && (q == 1.0)) ***** test - for i = 1:(dim+2), - dK = stk_materncov_aniso(param, x, y, i); - assert(isequal(size(dK), [nx ny])); - end + [p, q] = stk_distrib_bivnorm_cdf ([inf -10], 0, 0, 1, 1, 0); + assert (stk_isequal_tolrel (p, 7.619853024160489e-24, 1e-12)) + assert (q == 1.0) ***** test - n = 7; - x = stk_sampling_randunif(n, dim); - y = stk_sampling_randunif(n, dim); + [p, q] = stk_distrib_bivnorm_cdf ([inf 0], 0, 0, 1, 1, 0); + assert (stk_isequal_tolrel (p, 0.5, 1e-12)) + assert (stk_isequal_tolrel (q, 0.5, 1e-12)) +***** test + [p, q] = stk_distrib_bivnorm_cdf ([inf 10], 0, 0, 1, 1, 0); + assert (p == 1.0); + assert (stk_isequal_tolrel (q, 7.619853024160489e-24, 1e-12)) +***** test + [p, q] = stk_distrib_bivnorm_cdf ([inf inf], 0, 0, 1, 1, 0); + assert ((p == 1.0) && (q == 0.0)) +***** test + [p, q] = stk_distrib_bivnorm_cdf ([-inf inf], 0, 0, 1, 1, 0); + assert ((p == 0.0) && (q == 1.0)) +***** test + [p, q] = stk_distrib_bivnorm_cdf ([-10 inf], 0, 0, 1, 1, 0); + assert (stk_isequal_tolrel (p, 7.619853024160489e-24, 1e-12)) + assert (q == 1.0) +***** test + [p, q] = stk_distrib_bivnorm_cdf ([0 inf], 0, 0, 1, 1, 0); + assert (stk_isequal_tolrel (p, 0.5, 1e-12)) + assert (stk_isequal_tolrel (q, 0.5, 1e-12)) +***** test + [p, q] = stk_distrib_bivnorm_cdf ([10 inf], 0, 0, 1, 1, 0); + assert (p == 1.0); + assert (stk_isequal_tolrel (q, 7.619853024160489e-24, 1e-12)) +***** test + [p, q] = stk_distrib_bivnorm_cdf ([inf inf], 0, 0, 1, 1, 0); + assert ((p == 1.0) && (q == 0.0)) +***** test % A mixture of singular and non-singular cases + p = stk_distrib_bivnorm_cdf ([0 0], 0, 0, [1; 0], 1, 0); + assert (isequal (p, [0.25; 0.5])); +12 tests, 12 passed, 0 known failure, 0 skipped +[inst/misc/distrib/stk_distrib_student_cdf.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/misc/distrib/stk_distrib_student_cdf.m +***** assert (stk_isequal_tolrel ( ... + stk_distrib_student_cdf ([-1; 0; 1], [1 2], 0, [1 10]), ... + [0.25, ... % tcdf ((-1 - 0)/1, 1) + 4.6473271920707004e-01; ... % tcdf ((-1 - 0)/10, 2) + 0.50, ... % tcdf (( 0 - 0)/1, 1) + 0.50; ... % tcdf (( 0 - 0)/10, 2) + 0.75, ... % tcdf (( 1 - 0)/1, 1) + 5.3526728079292996e-01 ... % tcdf (( 1 - 0)/10, 2) + ], 4 * eps)) +***** test + [p, q] = stk_distrib_student_cdf (1e10, 2); + assert (isequal (p, 1.0)); + assert (stk_isequal_tolrel (q, 4.999999999999999999925e-21, 10 * eps)); +***** assert (isequal (stk_distrib_student_cdf (0.0, 1), 0.5)); +***** assert (isequal (stk_distrib_student_cdf (inf, 1), 1.0)); +***** assert (isequal (stk_distrib_student_cdf (-inf, 1), 0.0)); +***** assert (isnan (stk_distrib_student_cdf (nan, 1))); +6 tests, 6 passed, 0 known failure, 0 skipped +[inst/misc/distrib/stk_distrib_student_ei.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/misc/distrib/stk_distrib_student_ei.m +***** assert (stk_isequal_tolrel (stk_distrib_student_ei (0, 2), 1 / sqrt (2), eps)) +***** test % Decreasing as a function of z + ei = stk_distrib_student_ei (linspace (-10, 10, 200), 3.33); + assert (all (diff (ei) < 0)) +***** shared M, mu, sigma, ei, nu + M = randn (1, 10); + mu = randn (5, 1); + sigma = 1 + rand (1, 1, 7); + nu = 2; + ei = stk_distrib_student_ei (M, nu, mu, sigma); +***** assert (isequal (size (ei), [5, 10, 7])) +***** assert (all (ei(:) >= 0)) +***** assert (isequal (ei, stk_distrib_student_ei (M, nu, mu, sigma, false))); +***** assert (isequal (ei, stk_distrib_student_ei (-M, nu, -mu, sigma, true))); +6 tests, 6 passed, 0 known failure, 0 skipped +[inst/misc/distrib/stk_distrib_student_pdf.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/misc/distrib/stk_distrib_student_pdf.m +***** assert (stk_isequal_tolrel ( ... + stk_distrib_student_pdf ([1; 3], [1; 2], [0 1], [1 10]), ... + [0.50 / pi ... % tpdf ((1 - 1) / 10, 1) + 0.10 / pi; ... % tpdf ((1 - 1) / 10, 1) / 10 + 1 / (11 * sqrt(11)) ... % tpdf ((3 - 0) / 1, 2) / 1 + 3.4320590294804165e-02 ... % tpdf ((3 - 1) / 10, 2) / 10 + ], eps)); +***** assert (isequal (stk_distrib_student_pdf ( inf, 1.0), 0.0)); +***** assert (isequal (stk_distrib_student_pdf (-inf, 1.0), 0.0)); +***** assert (isnan (stk_distrib_student_pdf ( nan, 1.0))); +4 tests, 4 passed, 0 known failure, 0 skipped +[inst/misc/distrib/stk_distrib_normal_cdf.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/misc/distrib/stk_distrib_normal_cdf.m +***** assert (stk_isequal_tolrel (stk_distrib_normal_cdf ([1; 3], 1, [1 10]), ... + [0.5, ... % normcdf ((1 - 1) / 1) + 0.5; ... % normcdf ((1 - 1) / 10) + 0.5 * erfc(-sqrt(2)), ... % normcdf ((3 - 1) / 1) + 0.5 * erfc(-0.1*sqrt(2)) ... % normcdf ((3 - 1) / 10) + ], eps)); +***** test + [p, q] = stk_distrib_normal_cdf (10); + assert (isequal (p, 1.0)); + assert (stk_isequal_tolrel (q, 7.6198530241604975e-24, eps)); +***** assert (isequal (stk_distrib_normal_cdf ( 0.0), 0.5)); +***** assert (isequal (stk_distrib_normal_cdf ( inf), 1.0)); +***** assert (isequal (stk_distrib_normal_cdf (-inf), 0.0)); +***** assert (isnan (stk_distrib_normal_cdf ( nan))); +***** assert (isnan (stk_distrib_normal_cdf (0, 0, -1))); +***** assert (isequal (stk_distrib_normal_cdf (0, 0, 0), 1.0)); +***** assert (isequal (stk_distrib_normal_cdf (0, 1, 0), 0.0)); +***** assert (isequal (stk_distrib_normal_cdf (1, 0, 0), 1.0)); +10 tests, 10 passed, 0 known failure, 0 skipped +[inst/misc/distrib/stk_distrib_normal_crps.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/misc/distrib/stk_distrib_normal_crps.m +***** assert (stk_isequal_tolabs (stk_distrib_normal_crps (0.0, 0.0, 0.0), 0.0)) +***** assert (stk_isequal_tolabs (stk_distrib_normal_crps (0.0, 0.0, 1.0), (sqrt(2) - 1)/sqrt(pi))) +***** shared n, x_obs, mu, sigma, crps, crps_exp + x_obs = [ 1.78; -2.29; -1.62; -5.89; 2.88; 0.65; 2.74; -3.42]; % observations + mu = [-0.31; -0.59; 1.48; -1.57; -0.05; -0.27; 1.05; 1.27]; % predictions + sigma = [ 2.76; 6.80; 1.63; 1.19; 4.98; 9.60; 5.85; 2.24]; % standard dev + n = size(x_obs, 1); + crps = stk_distrib_normal_crps (x_obs, mu, sigma); +***** assert (isequal (size (crps), [n, 1])) +***** assert (all (crps >= 0)) +***** assert (stk_isequal_tolabs (crps, stk_distrib_normal_crps(mu, x_obs, sigma))) +***** assert (stk_isequal_tolabs (stk_distrib_normal_crps (x_obs, mu, 0), abs (x_obs - mu))) + crps_ref = [ ... + 1.247856605928301 ... + 1.757798727719891 ... + 2.216236225997414 ... + 3.648696666764968 ... + 1.832355265287495 ... + 2.278618297947438 ... + 1.560544734359158 ... + 3.455697443411153 ]; + assert (stk_isequal_tolabs (crps, crps_ref, 1e-10)); +6 tests, 6 passed, 0 known failure, 0 skipped +[inst/misc/test/stk_isequal_tolabs.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/misc/test/stk_isequal_tolabs.m +***** shared r1, r2, a, b, tolabs + a = 1.01; b = 1.02; tolabs = 0.1; +***** error rr = stk_isequal_tolabs(); +***** error rr = stk_isequal_tolabs(a); +***** test r1 = stk_isequal_tolabs(a, b); +***** test r2 = stk_isequal_tolabs(a, b, tolabs); +***** test assert(~r1); +***** test assert(r2); +***** test + a = struct('u', []); b = struct('v', []); + assert(~ stk_isequal_tolabs(a, b)) +***** test + a = struct('u', 1.01); b = struct('u', 1.02); + assert(stk_isequal_tolabs(a, b, tolabs)) +8 tests, 8 passed, 0 known failure, 0 skipped +[inst/misc/test/stk_isequal_tolrel.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/misc/test/stk_isequal_tolrel.m +***** shared r1, r2, r3, a, b, tolrel + a = 1.01; b = 1.02; tolrel = 0.1; +***** error rr = stk_isequal_tolrel(); +***** error rr = stk_isequal_tolrel(a); +***** test r1 = stk_isequal_tolrel(a, b); +***** test r2 = stk_isequal_tolrel(a, b, tolrel); +***** test r3 = stk_isequal_tolrel(a, [b b]); +***** test assert (isequal (r1, false)); +***** test assert (isequal (r2, true)); +***** test assert (isequal (r3, false)); +***** test + a = struct('u', []); b = struct('v', []); + assert(~ stk_isequal_tolrel(a, b)) +***** test + a = struct('u', 1.01); b = struct('u', 1.02); + assert(stk_isequal_tolrel(a, b, tolrel)) +10 tests, 10 passed, 0 known failure, 0 skipped +[inst/misc/test/stk_test.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/misc/test/stk_test.m +***** assert(isempty([])) % support for test assert shorthand +***** assert((1 + 1) == 2) +***** test a=1; +***** test assert(~exist('a')); +***** shared a % create a shared variable +***** test a = 3; % assign to a shared variable +***** test assert(a == 3); % variable should equal 3 in this second 'test' block +***** shared b, c % replace shared variables {'a'} --> {'b', 'c'} +***** test assert(~exist('a')); % a no longer exists +***** test assert(isempty(b)); % variables start off empty +***** shared a % recreate a shared variable that had been deleted +***** test assert (isempty(a)); % it is empty, even though it was equal to 3 before +***** shared a, b, c % creates three shared variables + a = 1; b = 2; c = 3; % give values to all variables, in the same block +***** assert(isequal([a, b, c], [1, 2, 3])); % test all of them together +***** test c=6; % update a value +***** test % show that the update sticks between blocks + assert(isequal([a, b, c], [1, 2, 6])); +***** shared % clear all shared variables +***** assert(~exist('a')) % show that they are cleared +***** error test % not enough input arguments +***** error test(1, 2, 3, 4) % too many input args +***** error garbage % usage on nonexistent function should be +***** error stt_test('test', 'bogus'); % undefined function error +***** error stk_test('test', 'bogus'); % error raised by stk_test itself +***** error stk_test(); +***** error stk_test('disp', 'verbose', [], 'extra arg !!!'); +***** error stk_test([]) +***** error stk_test(0.0) +***** error stk_test('stk_mindist', 0.0) +***** error stk_test('stk_mindist', 'dudule') +24 tests, 24 passed, 0 known failure, 0 skipped +[inst/misc/text/stk_disp_progress.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/misc/text/stk_disp_progress.m +***** error stk_disp_progress ('toto ', 0, 1); +***** test stk_disp_progress ('toto ', 1, 1); +warning: implicit conversion from numeric to char +warning: called from + stk_disp_progress at line 53 column 1 + __test__ at line 2 column 3 + test at line 682 column 11 + /tmp/tmp.U7Xx8aDcQp at line 1686 column 31 - K1 = stk_materncov_aniso(param, x, y); - K2 = stk_materncov_aniso(param, x, y, -1, true); - assert(isequal(size(K1), [n n])); - assert(stk_isequal_tolabs(K2, diag(K1))); +toto +***** error stk_disp_progress ('toto ', 2, 1); +***** test + stk_disp_progress ('toto ', 1, 2); + stk_disp_progress ('toto ', 2, 2); +warning: implicit conversion from numeric to char +warning: called from + stk_disp_progress at line 53 column 1 + __test__ at line 3 column 2 + test at line 682 column 11 + /tmp/tmp.U7Xx8aDcQp at line 1686 column 31 - for i = 1:(dim+2), - dK1 = stk_materncov_aniso(param, x, y, i); - dK2 = stk_materncov_aniso(param, x, y, i, true); - assert(isequal(size(dK1), [n n])); - assert(stk_isequal_tolabs(dK2, diag(dK1))); - end -18 tests, 18 passed, 0 known failure, 0 skipped -[inst/covfcs/stk_expcov_iso.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/covfcs/stk_expcov_iso.m -***** shared param, x, y - dim = 1; - param = log ([1.0; 2.5]); - x = stk_sampling_randunif (5, dim); - y = stk_sampling_randunif (5, dim); -***** error K = stk_expcov_iso ([param; 1.234], x, y); -***** error stk_expcov_iso (); -***** error stk_expcov_iso (param); -***** error stk_expcov_iso (param, x); -***** test stk_expcov_iso (param, x, y); -***** test stk_expcov_iso (param, x, y, -1); -***** test stk_expcov_iso (param, x, y, -1, false); -***** error stk_expcov_iso (param, x, y, -2); -***** test stk_expcov_iso (param, x, y, -1); -***** error stk_expcov_iso (param, x, y, 0); -***** test stk_expcov_iso (param, x, y, 1); -***** test stk_expcov_iso (param, x, y, 2); -***** error stk_expcov_iso (param, x, y, 3); -***** error stk_expcov_iso (param, x, y, nan); -***** error stk_expcov_iso (param, x, y, inf); -***** shared dim, param, x, y, nx, ny - dim = 3; - param = log ([1.0; 2.5]); - nx = 4; ny = 10; - x = stk_sampling_randunif (nx, dim); - y = stk_sampling_randunif (ny, dim); +toto toto +4 tests, 4 passed, 0 known failure, 0 skipped +[inst/misc/text/stk_sprintf_colvect_scientific.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/misc/text/stk_sprintf_colvect_scientific.m +***** shared x, s + x = [1.2; -34567]; +***** test s = stk_sprintf_colvect_scientific(x, 1); +***** assert (isequal(s, ['#'; '#'])) +***** test s = stk_sprintf_colvect_scientific(x, 3); +***** assert (isequal(s, ['###'; '###'])) +***** test s = stk_sprintf_colvect_scientific(x, 5); +***** assert (isequal(s, ['#####'; '#####'])) +***** test s = stk_sprintf_colvect_scientific(x, 6); +***** assert (isequal(s, [' 1e+00'; '-3e+04'])) +***** test s = stk_sprintf_colvect_scientific(x, 7); +***** assert (isequal(s, [' 1e+00'; '-3e+04'])) +***** test s = stk_sprintf_colvect_scientific(x, 8); +***** assert (isequal(s, [' 1.2e+00'; '-3.5e+04'])) +***** test s = stk_sprintf_colvect_scientific(x, 9); +***** assert (isequal(s, [' 1.20e+00'; '-3.46e+04'])) +***** test s = stk_sprintf_colvect_scientific(x, 10); +***** assert (isequal(s, [' 1.200e+00'; '-3.457e+04'])) +***** test s = stk_sprintf_colvect_scientific(x, 11); +***** assert (isequal(s, [' 1.2000e+00'; '-3.4567e+04'])) +***** test s = stk_sprintf_colvect_scientific(x, 12); +***** assert (isequal(s, [' 1.2000e+00'; '-3.4567e+04'])) +***** shared x, s + x = [0.9; 0.91; 0.99; 0.999]; +***** test s = stk_sprintf_colvect_scientific (x, 4); +***** assert (isequal(s, ['####'; '####'; '####'; '####'])) +***** test s = stk_sprintf_colvect_scientific (x, 5); +***** assert (isequal(s, ['9e-01'; '9e-01'; '1e+00'; '1e+00'])) +***** test s = stk_sprintf_colvect_scientific (x, 6); +***** assert (isequal(s, ['9e-01'; '9e-01'; '1e+00'; '1e+00'])) +***** test s = stk_sprintf_colvect_scientific (x, 7); +***** assert (isequal(s, ['9.0e-01'; '9.1e-01'; '9.9e-01'; '1.0e+00'])) +***** test s = stk_sprintf_colvect_scientific (x, 8); +***** assert (isequal(s, ['9.00e-01'; '9.10e-01'; '9.90e-01'; '9.99e-01'])) +***** shared x, s + x = [0.9; -0.91; 0.99; 0.999]; +***** test s = stk_sprintf_colvect_scientific (x, 4); +***** assert (isequal(s, ['####'; '####'; '####'; '####'])) +***** test s = stk_sprintf_colvect_scientific (x, 5); +***** assert (isequal(s, ['#####'; '#####'; '#####'; '#####'])) +***** test s = stk_sprintf_colvect_scientific (x, 6); +***** assert (isequal(s, [' 9e-01'; '-9e-01'; ' 1e+00'; ' 1e+00'])) +***** test s = stk_sprintf_colvect_scientific (x, 7); +***** assert (isequal(s, [' 9e-01'; '-9e-01'; ' 1e+00'; ' 1e+00'])) +***** test s = stk_sprintf_colvect_scientific (x, 8); +***** assert (isequal(s, [' 9.0e-01'; '-9.1e-01'; ' 9.9e-01'; ' 1.0e+00'])) ***** test - K1 = stk_expcov_iso (param, x, y); - K2 = stk_expcov_iso (param, x, y, -1); - assert (isequal (size (K1), [nx ny])); - assert (stk_isequal_tolabs (K1, K2)); + x = [1e6; -1e10; 1e-221]; + s = stk_sprintf_colvect_scientific(x, 10); + assert(isequal(s, [' 1e+006'; '-1e+010'; ' 1e-221'])); +41 tests, 41 passed, 0 known failure, 0 skipped +[inst/misc/text/stk_sprintf_colvect_fixedpoint.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/misc/text/stk_sprintf_colvect_fixedpoint.m +***** shared x, s + x = [1.2; 3.48]; +***** test s = stk_sprintf_colvect_fixedpoint(x, 1); +***** assert (isequal(s, ['1'; '3'])) +***** test s = stk_sprintf_colvect_fixedpoint(x, 2); +***** assert (isequal(s, ['1'; '3'])) +***** test s = stk_sprintf_colvect_fixedpoint(x, 3); +***** assert (isequal(s, ['1.2'; '3.5'])) +***** test s = stk_sprintf_colvect_fixedpoint(x, 4); +***** assert (isequal(s, ['1.20'; '3.48'])) +***** test s = stk_sprintf_colvect_fixedpoint(x, 5); +***** assert (isequal(s, ['1.20'; '3.48'])) +***** shared x, s + x = [1.2; -3.48]; +***** test s = stk_sprintf_colvect_fixedpoint(x, 1); +***** assert (isequal(s, ['#'; '#'])) +***** test s = stk_sprintf_colvect_fixedpoint(x, 2); +***** assert (isequal(s, [' 1'; '-3'])) +***** test s = stk_sprintf_colvect_fixedpoint(x, 3); +***** assert (isequal(s, [' 1'; '-3'])) +***** test s = stk_sprintf_colvect_fixedpoint(x, 4); +***** assert (isequal(s, [' 1.2'; '-3.5'])) +***** test s = stk_sprintf_colvect_fixedpoint(x, 5); +***** assert (isequal(s, [' 1.20'; '-3.48'])) +***** test s = stk_sprintf_colvect_fixedpoint(x, 6); +***** assert (isequal(s, [' 1.20'; '-3.48'])) +***** shared x, s + x = [0.2; 0.48]; +***** test s = stk_sprintf_colvect_fixedpoint(x, 1); +***** assert (isequal(s, ['0'; '0'])) +***** test s = stk_sprintf_colvect_fixedpoint(x, 2); +***** assert (isequal(s, ['0'; '0'])) +***** test s = stk_sprintf_colvect_fixedpoint(x, 3); +***** assert (isequal(s, ['0.2'; '0.5'])) +***** test s = stk_sprintf_colvect_fixedpoint(x, 4); +***** assert (isequal(s, ['0.20'; '0.48'])) +***** test s = stk_sprintf_colvect_fixedpoint(x, 5); +***** assert (isequal(s, ['0.20'; '0.48'])) +32 tests, 32 passed, 0 known failure, 0 skipped +[inst/misc/text/stk_sprintf_colvect.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/misc/text/stk_sprintf_colvect.m +***** shared s +***** test s = stk_sprintf_colvect ([1 1e1], 6); +***** assert (isequal (s, [' 1'; '10'])) +***** test s = stk_sprintf_colvect ([1 1e3], 6); +***** assert (isequal (s, [' 1'; '1000'])) +***** test s = stk_sprintf_colvect ([1 1e5], 6); +***** assert (isequal (s, [' 1'; '100000'])) +***** test s = stk_sprintf_colvect ([1 1e6], 6); +***** assert (isequal (s, ['1e+00'; '1e+06'])) +8 tests, 8 passed, 0 known failure, 0 skipped +[inst/misc/design/stk_phipcrit.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/misc/design/stk_phipcrit.m +***** shared x + x = [0, 0.2, 0.4, 0.6, 0.8, 1.0; + 0, 0.6, 0.8, 1.0, 0.2, 0.4]'; +***** assert (stk_isequal_tolabs ... + (stk_phipcrit (x, 10), 3.946317664423303, 1e-15)) +***** assert (stk_isequal_tolabs ... + (stk_phipcrit (x, 50), 3.614077252813102, 1e-15)); +***** assert (stk_isequal_tolabs ... + (stk_phipcrit (x, 100), 3.574589859827413, 1e-15)); +***** assert (stk_isequal_tolabs ... + (stk_phipcrit (x, 1e9), 1 / stk_mindist (x), 1e-8)); +***** assert (isequal (stk_phipcrit (ones (2)), Inf)); +5 tests, 5 passed, 0 known failure, 0 skipped +[inst/misc/design/stk_maxabscorr.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/misc/design/stk_maxabscorr.m +***** assert (stk_isequal_tolabs (0.0, ... % Test on an OLHS(5) + stk_maxabscorr ([0.4 0.8 0 -0.4 -0.8; -0.8 0.4 0 0.8 -0.4]'))); +1 test, 1 passed, 0 known failure, 0 skipped +[inst/misc/pareto/stk_dominatedhv.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/misc/pareto/stk_dominatedhv.m +***** error hv = stk_dominatedhv (); +***** error hv = stk_dominatedhv (-y, 'incorrect ref type'); +***** error hv = stk_dominatedhv (-y, [0 0]); +***** error hv = stk_dominatedhv (-y, [0 0 0 0 0], 0, 'too many input args'); +***** shared y, hv0 % Example from README.TXT in WFG 1.10 + + y = [ ... + 0.598 0.737 0.131 0.916 6.745; ... + 0.263 0.740 0.449 0.753 6.964; ... + 0.109 8.483 0.199 0.302 8.872 ]; + + hv0 = 1.1452351120; ***** test - for i = 1:2, - dK = stk_expcov_iso (param, x, y, i); - assert (isequal (size (dK), [nx ny])); + hv = stk_dominatedhv (-y); + assert (stk_isequal_tolrel (hv, hv0, 1e-10)); +***** test + yy = stk_dataframe (- y); % Check that @stk_dataframe inputs are accepted + hv = stk_dominatedhv (yy); + assert (stk_isequal_tolrel (hv, hv0, 1e-10)); +***** test + hv = stk_dominatedhv (-y, [], 0); + assert (stk_isequal_tolrel (hv, hv0, 1e-10)); +***** test + hv = stk_dominatedhv (-y, [0 0 0 0 0]); + assert (stk_isequal_tolrel (hv, hv0, 1e-10)); +***** test + hv = stk_dominatedhv (1 - y, [1 1 1 1 1]); + assert (stk_isequal_tolrel (hv, hv0, 1e-10)); +***** test + r = stk_dominatedhv (-y, [], 1); + hv = sum (r.sign .* prod (r.xmax - r.xmin, 2)); + assert (stk_isequal_tolrel (hv, hv0, 1e-10)); +***** shared y1, y2, y0, S, S1 + y0 = [1.00 1.00]; % Reference point + y1 = [1.50 1.50]; % Above the reference point + y2 = [0.50 0.50]; % Below the reference point +***** assert (isequal (0.00, stk_dominatedhv (y1, y0))); +***** assert (isequal (0.25, stk_dominatedhv (y2, y0))); +***** assert (isequal (0.25, stk_dominatedhv ([y1; y2], y0))); +***** assert (isequal (0.25, stk_dominatedhv ([y2; y1; y2], y0))); +***** test S = stk_dominatedhv (y1, y0, 1); % empty decomposition +***** assert (isequal (size (S.xmin, 1), 0)); +***** test S = stk_dominatedhv (y2, y0, 1); % trivial decomposition +***** assert (isequal (S.sign, 1)); +***** assert (isequal (S.xmin, y2)); +***** assert (isequal (S.xmax, y0)); +***** test S1 = stk_dominatedhv ([y2; y0], y0, 1); % shoud be the same as before +***** assert (isequal (S1, S)); +***** test S1 = stk_dominatedhv ([y2; y1], y0, 1); % shoud be the same as before +***** assert (isequal (S1, S)); +***** test S1 = stk_dominatedhv ([y2; y2], y0, 1); % shoud be the same as before +***** assert (isequal (S1, S)); +***** test + for d = 1:10, + y = - 0.5 * ones (1, d); + hv = stk_dominatedhv (y); + assert (isequal (stk_dominatedhv (y), 0.5 ^ d)); end ***** test - n = 7; - x = stk_sampling_randunif (n, dim); - y = stk_sampling_randunif (n, dim); + for d = 1:10, + y = - 0.5 * ones (1, d); + r = stk_dominatedhv (y, [], 1); + hv = sum (r.sign .* prod (r.xmax - r.xmin, 2)); + assert (isequal (stk_dominatedhv (y), 0.5 ^ d)); + end +***** shared y, y_ref, dv, hv0 + y1 = [0.25 0.75]; + y2 = [0.50 0.50]; + y3 = [0.75 0.25]; - K1 = stk_expcov_iso (param, x, y); - K2 = stk_expcov_iso (param, x, y, -1, true); - assert (isequal (size (K1), [n n])); - assert (stk_isequal_tolabs (K2, diag (K1))); + y_ref = [1 1]; - for i = 1:2, - dK1 = stk_expcov_iso (param, x, y, i); - dK2 = stk_expcov_iso (param, x, y, i, true); - assert (isequal (size (dK1), [n n])); - assert (stk_isequal_tolabs (dK2, diag (dK1))); - end -18 tests, 18 passed, 0 known failure, 0 skipped -[inst/covfcs/stk_materncov52_aniso.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/covfcs/stk_materncov52_aniso.m -***** shared param, x, y - dim = 1; - param = log ([1.0; 2.5]); - x = stk_sampling_randunif (5, dim); - y = stk_sampling_randunif (5, dim); -***** error stk_materncov52_aniso (); -***** error stk_materncov52_aniso (param); -***** error stk_materncov52_aniso (param, x); -***** test stk_materncov52_aniso (param, x, y); -***** test stk_materncov52_aniso (param, x, y, -1); -***** test stk_materncov52_aniso (param, x, y, -1, false); -***** error stk_materncov52_aniso (param, x, y, -2); -***** test stk_materncov52_aniso (param, x, y, -1); -***** error stk_materncov52_aniso (param, x, y, 0); -***** test stk_materncov52_aniso (param, x, y, 1); -***** test stk_materncov52_aniso (param, x, y, 2); -***** error stk_materncov52_aniso (param, x, y, 3); -***** error stk_materncov52_aniso (param, x, y, nan); -***** error stk_materncov52_aniso (param, x, y, inf); -***** shared dim, param, x, y, nx, ny - dim = 3; - param = log ([1.0; 2.5; 2.4; 2.6]); - nx = 4; ny = 10; - x = stk_sampling_randunif (nx, dim); - y = stk_sampling_randunif (ny, dim); + y = {[], y1, y2, y3; [y1; y2], [y1; y3], [y2; y3], [y1; y2; y3]}; + + dv = 0.25 ^ 2; hv0 = [0 3 4 3; 5 5 5 6] * dv; ***** test - K1 = stk_materncov52_aniso (param, x, y); - K2 = stk_materncov52_aniso (param, x, y, -1); - assert (isequal (size (K1), [nx ny])); - assert (stk_isequal_tolabs (K1, K2)); + hv1 = stk_dominatedhv (y, y_ref); + assert (isequal (hv0, hv1)); ***** test - for i = 1:(dim + 1), - dK = stk_materncov52_aniso (param, x, y, i); - assert (isequal (size (dK), [nx ny])); + r = stk_dominatedhv (y, y_ref, 1); + + % Check the first decomposition, which should be empty + assert (isempty (r(1).sign)); + assert (isempty (r(1).xmin)); + assert (isempty (r(1).xmax)); + + % Check the other decompositions + for i = 2:6, + hv2 = sum (r(i).sign .* prod (r(i).xmax - r(i).xmin, 2)); + assert (isequal (hv0(i), hv2)); end ***** test - n = 7; - x = stk_sampling_randunif (n, dim); - y = stk_sampling_randunif (n, dim); + y = (0.3:0.1:0.8)'; + hv0 = 0.7; + hv1 = stk_dominatedhv (y, 1); + r = stk_dominatedhv (y, 1, true); + hv2 = sum (r.sign .* prod (r.xmax - r.xmin, 2)); +***** test % four non-dominated points (hypervolume) + zr = [1 1]; + zi = [0.2 0.8; 0.4 0.6; 0.6 0.4; 0.8 0.2] + P = perms (1:4); + for i = 1:24 + HV = stk_dominatedhv (zi(P(i, :), :), zr, 0); + assert (stk_isequal_tolrel (HV, 0.4, 1e-15)); + end +zi = - K1 = stk_materncov52_aniso (param, x, y); - K2 = stk_materncov52_aniso(param, x, y, -1, true); - assert (isequal (size (K1), [n n])); - assert (stk_isequal_tolabs (K2, diag (K1))); + 0.2000 0.8000 + 0.4000 0.6000 + 0.6000 0.4000 + 0.8000 0.2000 - for i = 1:(dim + 1), - dK1 = stk_materncov52_aniso (param, x, y, i); - dK2 = stk_materncov52_aniso (param, x, y, i, true); - assert (isequal (size (dK1), [n n])); - assert (stk_isequal_tolabs (dK2, diag (dK1))); +***** test % four non-dominated points (decomposition) + zr = [1 1]; + zi = [0.2 0.8; 0.4 0.6; 0.6 0.4; 0.8 0.2] + P = perms (1:4); + for i = 1:24 + S = stk_dominatedhv (zi(P(i, :), :), zr, 1); + HV = sum (S.sign .* prod (S.xmax - S.xmin, 2)); + assert (stk_isequal_tolrel (HV, 0.4, 1e-15)); end -17 tests, 17 passed, 0 known failure, 0 skipped -[inst/covfcs/stk_materncov32_aniso.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/covfcs/stk_materncov32_aniso.m -***** shared param, x, y, K1, K2, K3 - dim = 1; - param = log ([1.0; 2.5]); - x = stk_sampling_randunif (5, dim); - y = stk_sampling_randunif (6, dim); -***** error K0 = stk_materncov32_aniso (); -***** error K0 = stk_materncov32_aniso (param); -***** error K0 = stk_materncov32_aniso (param, x); -***** test K1 = stk_materncov32_aniso (param, x, y); -***** test K2 = stk_materncov32_aniso (param, x, y, -1); -***** test K3 = stk_materncov32_aniso (param, x, y, -1, false); -***** assert (isequal (K1, K2)); -***** assert (isequal (K1, K3)); -***** test % df versus ordinary array - u = double (x); v = double (y); - K1 = stk_materncov32_aniso (param, u, v, -1); - K2 = stk_materncov32_aniso (param, stk_dataframe (u), stk_dataframe (v), -1); - assert (isequal (K1, K2)); -***** error stk_materncov32_aniso (param, x, y, -2); -***** test stk_materncov32_aniso (param, x, y, -1); -***** error stk_materncov32_aniso (param, x, y, 0); -***** test stk_materncov32_aniso (param, x, y, 1); -***** test stk_materncov32_aniso (param, x, y, 2); -***** error stk_materncov32_aniso (param, x, y, 3); -***** error stk_materncov32_aniso (param, x, y, nan); -***** error stk_materncov32_aniso (param, x, y, inf); -***** shared dim, param, x, y, nx, ny - dim = 3; - param = log ([1.0; 2.5; 2.4; 2.6]); - nx = 4; ny = 10; - x = stk_sampling_randunif (nx, dim); - y = stk_sampling_randunif (ny, dim); +zi = + + 0.2000 0.8000 + 0.4000 0.6000 + 0.6000 0.4000 + 0.8000 0.2000 + +***** test % a case with 8 points and 5 objectives + % http://sourceforge.net/p/kriging/tickets/33 + + yr = [1.03 0.91 0.96 1.99 16.2]; + + y = [ ... + 0.8180 0.5600 0.1264 1.0755 1.2462; ... + 0.8861 0.6928 0.2994 0.7228 0.9848; ... + 0.9021 0.8829 0.6060 0.1642 0.4282; ... + 0.9116 0.3097 0.8601 0.0468 0.2813; ... + 0.9306 0.1429 0.6688 0.1462 1.3661; ... + 0.9604 0.3406 0.4046 0.7239 1.8741; ... + 0.9648 0.7764 0.5199 0.4098 1.3436; ... + 0.9891 0.4518 0.7956 0.1164 1.2025]; + + hv1 = stk_dominatedhv (y, yr, 0); + + S = stk_dominatedhv (y, yr, 1); + hv2 = sum (S.sign .* prod (S.xmax - S.xmin, 2)); + + assert (isequal (size (S.sign), [87 1])); + assert (isequal (size (S.xmin), [87 5])); + assert (isequal (size (S.xmax), [87 5])); + assert (stk_isequal_tolrel (hv1, 1.538677420906463, 2 * eps)); + assert (stk_isequal_tolrel (hv1, hv2, eps)); +***** test % with random data + NREP = 5; + for p = 1:5 + for n = 1:10 + for i = 1:NREP + % Draw random data + y = rand (n, p); + y = - y ./ (norm (y)); + % Compute hypervolume directly + hv1 = stk_dominatedhv (y, [], 0); + % Compute decomposition, then hypervolume + R = stk_dominatedhv (y, [], 1); + hv2 = sum (R.sign .* prod (R.xmax - R.xmin, 2)); + % Compare results + assert (stk_isequal_tolabs (hv1, hv2, eps)); + end + end + end +35 tests, 35 passed, 0 known failure, 0 skipped +[inst/misc/pareto/stk_paretofind.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/misc/pareto/stk_paretofind.m +***** shared x, ndpos, drank + x = [ ... + 0 2; ... + 2 2; ... + ]; +***** test [ndpos, drank] = stk_paretofind (x); +***** assert (isequal (ndpos, 1)); +***** assert (isequal (drank, [0; 1])); +***** shared x, ndpos, drank + x = [ ... + 3 2; ... + 2 2; ... + ]; +***** test [ndpos, drank] = stk_paretofind (x); +***** assert (isequal (ndpos, 2)); +***** assert (isequal (drank, [1; 0])); +***** shared x, ndpos, drank + x = [ ... + 1 0; ... + 2 0; ... + 0 2; ... + 2 2; ... + -1 3 ]; +***** test [ndpos, drank] = stk_paretofind (x); +***** assert (isequal (ndpos, [5; 3; 1])); +***** assert (isequal (drank, [0; 3; 0; 2; 0])); +***** shared x, ndpos, drank + x = [ ... + 1 0; ... + 2 0; ... + 0 2; ... + 2 2; ... + -1 3; ... + -1 4; ... + 2 2 ]; +***** test [ndpos, drank] = stk_paretofind (x); +***** assert (isequal (ndpos, [5; 3; 1])); +***** assert (isequal (drank, [0; 3; 0; 2; 0; 1; 2])); +12 tests, 12 passed, 0 known failure, 0 skipped +[inst/misc/pareto/stk_isdominated.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/misc/pareto/stk_isdominated.m ***** test - K1 = stk_materncov32_aniso (param, x, y); - K2 = stk_materncov32_aniso (param, x, y, -1); - assert (isequal (size(K1), [nx ny])); - assert (stk_isequal_tolabs (K1, K2)); + A = [1 3 2]; + B = [0 0 0]; + [isdom, dpos] = stk_isdominated (A, B); + assert (isdom == 1); + assert (dpos == 1); ***** test - for i = 1:(dim + 1), - dK = stk_materncov32_aniso (param, x, y, i); - assert (isequal (size (dK), [nx ny])); + A = [1 3 2]; + B = [0 0 3]; + [isdom, dpos] = stk_isdominated (A, B); + assert (isdom == 0); + assert (dpos == 0); +***** test + A = [1 3 2]; + B = [0 0 0; 0 0 3]; + [isdom, dpos] = stk_isdominated (A, B); + assert (isdom == 1); + assert (dpos == 1); +***** test + A = [1 3 2]; + B = [0 0 3; 0 0 0]; + [isdom, dpos] = stk_isdominated (A, B); + assert (isdom == 1); + assert (dpos == 2); +***** test + A = [1 3 2; 1 0 1; -1 0 0; 1 3 2]; + B = [1 0 0; 0 0 3; 0 0 0]; + [isdom, dpos] = stk_isdominated (A, B); + assert (isequal (isdom, logical ([1; 1; 0; 1]))); + assert (isequal (dpos, [3; 3; 0; 3])); +5 tests, 5 passed, 0 known failure, 0 skipped +[inst/misc/parallel/@stk_parallel_engine_none/stk_parallel_engine_none.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/misc/parallel/@stk_parallel_engine_none/stk_parallel_engine_none.m +***** test stk_test_class ('stk_parallel_engine_none') +1 test, 1 passed, 0 known failure, 0 skipped +[inst/misc/error/stk_error.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/misc/error/stk_error.m +***** shared errmsg, mnemonic, badstack + errmsg = 'Go ahead, make my day.'; + mnemonic = 'ClintEastwood'; + badstack = 0; % not a valid stack structure +***** error stk_error(errmsg, mnemonic); +***** error stk_error (errmsg, mnemonic, badstack); +***** error id=STK:stk_error:InvalidArgument stk_error (errmsg, mnemonic, badstack); +3 tests, 3 passed, 0 known failure, 0 skipped +[inst/misc/optim/@stk_optim_octavesqp/stk_optim_octavesqp.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/misc/optim/@stk_optim_octavesqp/stk_optim_octavesqp.m +***** test stk_test_class ('stk_optim_octavesqp') +1 test, 1 passed, 0 known failure, 0 skipped +[inst/misc/optim/stk_optim_testmin_box.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/misc/optim/stk_optim_testmin_box.m +***** shared algo + algo = stk_options_get ('stk_param_estim', 'minimize_box'); +***** error b = stk_optim_testmin_box (); +***** assert (stk_optim_testmin_box (algo)); +***** assert (~ stk_optim_testmin_box ('dudule')); +3 tests, 3 passed, 0 known failure, 0 skipped +[inst/misc/optim/stk_minimize_unconstrained.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/misc/optim/stk_minimize_unconstrained.m +***** test % Call fminsearch using function name + if stk_optim_isavailable ('fminsearch') + assert (stk_optim_testmin_unc ('fminsearch')); end +***** test % Call fminsearch directly, using algorithm object + if stk_optim_isavailable ('fminsearch') + algo = stk_optim_fminsearch ('TolX', 1e-12, 'TolFun', 1e-12); + assert (stk_optim_testmin_unc (algo)); + end +***** test % Call sqp using function name + if stk_optim_isavailable ('octavesqp') + assert (stk_optim_testmin_unc ('octavesqp')); + end +***** test % Call sqp directly, using algorithm object + if stk_optim_isavailable ('octavesqp') + algo = stk_optim_octavesqp (); + assert (stk_optim_testmin_unc (algo)); + end +***** error assert (stk_optim_testmin_unc ('InexistentOptimizer')); +***** error assert (stk_optim_testmin_unc (100)); +6 tests, 6 passed, 0 known failure, 0 skipped +[inst/misc/optim/@stk_optim_optimizer_/stk_optim_optimizer_.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/misc/optim/@stk_optim_optimizer_/stk_optim_optimizer_.m +***** test stk_test_class ('stk_optim_optimizer_') +1 test, 1 passed, 0 known failure, 0 skipped +[inst/misc/optim/@stk_optim_fminsearch/stk_optim_fminsearch.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/misc/optim/@stk_optim_fminsearch/stk_optim_fminsearch.m +***** test stk_test_class ('stk_optim_fminsearch') +1 test, 1 passed, 0 known failure, 0 skipped +[inst/misc/optim/stk_optim_testmin_unc.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/misc/optim/stk_optim_testmin_unc.m +***** shared algo + algo = stk_options_get ('stk_param_estim', 'minimize_unc'); +***** error b = stk_optim_testmin_unc (); +***** assert (stk_optim_testmin_unc (algo)); +***** assert (~ stk_optim_testmin_unc ('dudule')); +3 tests, 3 passed, 0 known failure, 0 skipped +[inst/misc/optim/@stk_optim_fmincon/stk_optim_fmincon.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/misc/optim/@stk_optim_fmincon/stk_optim_fmincon.m +***** test stk_test_class ('stk_optim_fmincon') +1 test, 1 passed, 0 known failure, 0 skipped +[inst/misc/optim/stk_minimize_boxconstrained.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/misc/optim/stk_minimize_boxconstrained.m +***** test % Call fmincon using function name + if stk_optim_isavailable ('fmincon') + assert (stk_optim_testmin_box ('fmincon')); + end +***** test % Call fmincon directly, using algorithm object + if stk_optim_isavailable ('fmincon') + algo = stk_optim_fmincon ('TolX', 1e-12, 'TolFun', 1e-12); + assert (stk_optim_testmin_box (algo)); + end +***** test % Call sqp using function name + if stk_optim_isavailable ('octavesqp') + assert (stk_optim_testmin_box ('octavesqp')); + end +***** test % Call sqp directly, using algorithm object + if stk_optim_isavailable ('octavesqp') + algo = stk_optim_octavesqp (); + assert (stk_optim_testmin_box (algo)); + end +***** error assert (stk_optim_testmin_box ('InexistentOptimizer')); +***** error assert (stk_optim_testmin_box (100)); +6 tests, 6 passed, 0 known failure, 0 skipped +[inst/misc/dist/stk_mindist.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/misc/dist/stk_mindist.m ***** test - n = 7; - x = stk_sampling_randunif (n, dim); - y = stk_sampling_randunif (n, dim); - - K1 = stk_materncov32_aniso (param, x, y); - K2 = stk_materncov32_aniso (param, x, y, -1, true); - assert (isequal (size (K1), [n n])); - assert (stk_isequal_tolabs (K2, diag (K1))); - - for i = 1:(dim + 1), - dK1 = stk_materncov32_aniso (param, x, y, i); - dK2 = stk_materncov32_aniso (param, x, y, i, true); - assert (isequal (size (dK1), [n n])); - assert (stk_isequal_tolabs (dK2, diag (dK1))); + d = 3; x = rand(7, d); + md1 = stk_mindist(x); + md2 = stk_mindist(stk_dataframe(x)); + assert(stk_isequal_tolabs(md1, md2)); +***** test + for nc = [0 5 10], + x = zeros(0, nc); + d = stk_mindist(x); + assert(isempty(d)); end -20 tests, 20 passed, 0 known failure, 0 skipped -[inst/covfcs/stk_materncov32_iso.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/covfcs/stk_materncov32_iso.m -***** shared param, x, y - dim = 1; - param = log ([1.0; 2.5]); - x = stk_sampling_randunif (5, dim); - y = stk_sampling_randunif (5, dim); -***** error K = stk_materncov32_iso ([param; 1.234], x, y); -***** error stk_materncov32_iso (); -***** error stk_materncov32_iso (param); -***** error stk_materncov32_iso (param, x); -***** test stk_materncov32_iso (param, x, y); -***** test stk_materncov32_iso (param, x, y, -1); -***** test stk_materncov32_iso (param, x, y, -1, false); -***** error stk_materncov32_iso (param, x, y, -2); -***** test stk_materncov32_iso (param, x, y, -1); -***** error stk_materncov32_iso (param, x, y, 0); -***** test stk_materncov32_iso (param, x, y, 1); -***** test stk_materncov32_iso (param, x, y, 2); -***** error stk_materncov32_iso (param, x, y, 3); -***** error stk_materncov32_iso (param, x, y, nan); -***** error stk_materncov32_iso (param, x, y, inf); -***** shared dim, param, x, y, nx, ny - dim = 3; - param = log ([1.0; 2.5]); - nx = 4; ny = 10; - x = stk_sampling_randunif (nx, dim); - y = stk_sampling_randunif (ny, dim); ***** test - K1 = stk_materncov32_iso (param, x, y); - K2 = stk_materncov32_iso (param, x, y, -1); - assert (isequal (size (K1), [nx ny])); - assert (stk_isequal_tolabs (K1, K2)); + for nc = [0 5 10], + x = rand(1, nc); + d = stk_mindist(x); + assert(isempty(d)); + end ***** test - for i = 1:2, - dK = stk_materncov32_iso (param, x, y, i); - assert (isequal (size (dK), [nx ny])); + for nr = [2 5 10], + x = zeros(nr, 0); + d = stk_mindist(x); + assert(isequal(d, 0.0)); end ***** test - n = 7; - x = stk_sampling_randunif (n, dim); - y = stk_sampling_randunif (n, dim); - K1 = stk_materncov32_iso (param, x, y); - K2 = stk_materncov32_iso (param, x, y, -1, true); - assert (isequal (size (K1), [n n])); - assert (stk_isequal_tolabs (K2, diag (K1))); + nrep = 20; + TOL_REL = 1e-15; + + for irep = 1:nrep, + + n = 2 + floor(rand * 10); + d = 1 + floor(rand * 10); + x = rand(n, d); + z = stk_mindist(x); + + assert(isequal(size(d), [1, 1])); + assert(~isnan(d)); + assert(~isinf(d)); + + % check the result + mindist = Inf; + for i = 1:(n-1), + for j = (i+1):n, + mindist = min(mindist, norm(x(i,:) - x(j,:))); + end + end + assert(abs(z - mindist) <= TOL_REL * mindist); - for i = 1:2, - dK1 = stk_materncov32_iso (param, x, y, i); - dK2 = stk_materncov32_iso (param, x, y, i, true); - assert (isequal (size (dK1), [n n])); - assert (stk_isequal_tolabs (dK2, diag (dK1))); end -18 tests, 18 passed, 0 known failure, 0 skipped -[inst/covfcs/stk_materncov_iso.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/covfcs/stk_materncov_iso.m -***** shared param, x, y - dim = 1; - param = log ([1.0; 1.5; 2.9]); - x = stk_sampling_randunif(5, dim); - y = stk_sampling_randunif(5, dim); -***** error K = stk_materncov_iso ([param; 1.234], x, y); -***** error stk_materncov_iso(); -***** error stk_materncov_iso(param); -***** error stk_materncov_iso(param, x); -***** test stk_materncov_iso(param, x, y); -***** test stk_materncov_iso(param, x, y, -1); -***** test stk_materncov_iso(param, x, y, -1, false); -***** error stk_materncov_iso(param, x, y, -2); -***** test stk_materncov_iso(param, x, y, -1); -***** error stk_materncov_iso(param, x, y, 0); -***** test stk_materncov_iso(param, x, y, 1); -***** test stk_materncov_iso(param, x, y, 2); -***** test stk_materncov_iso(param, x, y, 3); -***** error stk_materncov_iso(param, x, y, 4); -***** error stk_materncov_iso(param, x, y, nan); -***** error stk_materncov_iso(param, x, y, inf); -***** shared dim, param, x, y, nx, ny - dim = 3; - param = log ([1.0; 1.5; 2.9]); - nx = 4; ny = 10; - x = stk_sampling_randunif (nx, dim); - y = stk_sampling_randunif (ny, dim); +5 tests, 5 passed, 0 known failure, 0 skipped +[inst/misc/dist/stk_filldist_discretized.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/misc/dist/stk_filldist_discretized.m +***** error stk_filldist_discretized(0.0) % incorrect nb of arguments +***** error stk_filldist_discretized(0.0, []) % second arg is empty +***** error stk_filldist_discretized([], 0.0) % first arg is empty ***** test - K1 = stk_materncov_iso (param, x, y); - K2 = stk_materncov_iso (param, x, y, -1); - assert (isequal (size (K1), [nx ny])); - assert (stk_isequal_tolabs (K1, K2)); + d = 3; x = rand(7, d); y = rand(20, d); + fd1 = stk_filldist_discretized(x, y); + fd2 = stk_filldist_discretized(stk_dataframe(x), stk_dataframe(y)); + assert(stk_isequal_tolabs(fd1, fd2)); ***** test - for i = 1:3, - dK = stk_materncov_iso (param, x, y, i); - assert (isequal (size (dK), [nx ny])); + n = 5; + for dim = 1:10, + x = rand(n, dim); + fd = stk_filldist_discretized(x, x); + assert(stk_isequal_tolabs(fd, 0.0)); end ***** test - n = 7; - x = stk_sampling_randunif(n, dim); - y = stk_sampling_randunif(n, dim); - - K1 = stk_materncov_iso(param, x, y); - K2 = stk_materncov_iso(param, x, y, -1, true); - assert(isequal(size(K1), [n n])); - assert(stk_isequal_tolabs(K2, diag(K1))); - - for i = 1:3, - dK1 = stk_materncov_iso(param, x, y, i); - dK2 = stk_materncov_iso(param, x, y, i, true); - assert(isequal(size(dK1), [n n])); - assert(stk_isequal_tolabs(dK2, diag(dK1))); + for dim = 1:10, + x = rand(1, dim); + y = rand(1, dim); + fd = stk_filldist_discretized(x, y); + assert(stk_isequal_tolabs(fd, norm(x - y))); end -19 tests, 19 passed, 0 known failure, 0 skipped -[inst/covfcs/stk_discretecov.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/covfcs/stk_discretecov.m -***** shared model, model2, x0 - n0 = 20; n1 = 10; dim = 4; - x0 = stk_sampling_randunif (n0, dim); - x1 = stk_sampling_randunif (n1, dim); - model = stk_model (@stk_materncov52_aniso, dim); - model.lm = stk_lm_affine (); - model.param = log ([1.0; 2.1; 2.2; 2.3; 2.4]); -***** test % without noise, pairwise = false - model.lognoisevariance = - inf; - model2 = stk_model (@stk_discretecov, model, x0); - idx = [1 4 9]; - [K1, P1] = stk_make_matcov (model, x0(idx, :)); - [K2, P2] = stk_make_matcov (model2, idx'); - assert (stk_isequal_tolrel (K1, K2)); - assert (stk_isequal_tolrel (P1, P2)); -***** test % without noise, pairwise = true - K1 = stk_make_matcov (model, x0([2 5 6], :), [], true); - K2 = stk_make_matcov (model2, [2 5 6]', [], true); - assert (stk_isequal_tolrel (K1, K2)); -***** test % with noise, pairwise = false - model.lognoisevariance = log (0.01); - model2 = stk_model (@stk_discretecov, model, x0); - idx = [1 4 9]; - [K1, P1] = stk_make_matcov (model, x0(idx, :)); - [K2, P2] = stk_make_matcov (model2, idx'); - assert (stk_isequal_tolrel (K1, K2)); - assert (stk_isequal_tolrel (P1, P2)); -3 tests, 3 passed, 0 known failure, 0 skipped -[inst/covfcs/stk_sphcov_aniso.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/covfcs/stk_sphcov_aniso.m -***** shared param, x, y, K1, K2, K3 - dim = 1; - param = log ([1.0; 2.5]); - x = stk_sampling_randunif (5, dim); - y = stk_sampling_randunif (6, dim); -***** error K0 = stk_sphcov_aniso (); -***** error K0 = stk_sphcov_aniso (param); -***** error K0 = stk_sphcov_aniso (param, x); -***** test K1 = stk_sphcov_aniso (param, x, y); -***** test K2 = stk_sphcov_aniso (param, x, y, -1); -***** test K3 = stk_sphcov_aniso (param, x, y, -1, false); -***** assert (isequal (K1, K2)); -***** assert (isequal (K1, K3)); -***** test % df versus ordinary array - u = double (x); v = double (y); - K1 = stk_sphcov_aniso (param, u, v, -1); - K2 = stk_sphcov_aniso (param, stk_dataframe (u), stk_dataframe (v), -1); - assert (isequal (K1, K2)); -***** error stk_sphcov_aniso (param, x, y, -2); -***** test stk_sphcov_aniso (param, x, y, -1); -***** error stk_sphcov_aniso (param, x, y, 0); -***** test stk_sphcov_aniso (param, x, y, 1); -***** test stk_sphcov_aniso (param, x, y, 2); -***** error stk_sphcov_aniso (param, x, y, 3); -***** error stk_sphcov_aniso (param, x, y, nan); -***** error stk_sphcov_aniso (param, x, y, inf); -***** shared dim, param, x, y, nx, ny - dim = 3; - param = log ([1.0; 2.5; 2.4; 2.6]); - nx = 4; ny = 10; - x = stk_sampling_randunif (nx, dim); - y = stk_sampling_randunif (ny, dim); -***** test - K1 = stk_sphcov_aniso (param, x, y); - K2 = stk_sphcov_aniso (param, x, y, -1); - assert (isequal (size(K1), [nx ny])); - assert (stk_isequal_tolabs (K1, K2)); ***** test - for i = 1:(dim + 1), - dK = stk_sphcov_aniso (param, x, y, i); - assert (isequal (size (dK), [nx ny])); + n = 4; + for dim = 2:10, + x = zeros(n, dim); + y = rand(1, dim); + fd = stk_filldist_discretized(x, y); + assert(stk_isequal_tolabs(fd, max(stk_dist(x, y)))); end ***** test - n = 7; - x = stk_sampling_randunif (n, dim); - y = stk_sampling_randunif (n, dim); - - K1 = stk_sphcov_aniso (param, x, y); - K2 = stk_sphcov_aniso (param, x, y, -1, true); - assert (isequal (size (K1), [n n])); - assert (stk_isequal_tolabs (K2, diag (K1))); - - for i = 1:(dim + 1), - dK1 = stk_sphcov_aniso (param, x, y, i); - dK2 = stk_sphcov_aniso (param, x, y, i, true); - assert (isequal (size (dK1), [n n])); - assert (stk_isequal_tolabs (dK2, diag (dK1))); + for dim = [1 3 6], + x = 0.5 * ones(1, dim); + y = stk_sampling_regulargrid(2^dim, dim); % [0; 1]^d is the default box + fd = stk_filldist_discretized(x, y); + assert(stk_isequal_tolabs(fd, 0.5 * sqrt(dim))); end -20 tests, 20 passed, 0 known failure, 0 skipped -[inst/covfcs/stk_noisecov.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/covfcs/stk_noisecov.m -***** shared ni, lognoisevariance, diff - ni = 5; - lognoisevariance = 0.0; - diff = -1; -***** error K = stk_noisecov (); -***** error K = stk_noisecov (ni); -***** test K = stk_noisecov (ni, lognoisevariance); -***** test K = stk_noisecov (ni, lognoisevariance, diff); -***** test K = stk_noisecov (ni, lognoisevariance, diff, true); -5 tests, 5 passed, 0 known failure, 0 skipped -[inst/covfcs/rbf/stk_rbf_matern52.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/covfcs/rbf/stk_rbf_matern52.m -***** shared h, diff - h = 1.0; diff = -1; -***** error stk_rbf_matern52 (); -***** test stk_rbf_matern52 (h); -***** test stk_rbf_matern52 (h, diff); -***** test %% h = 0.0 => correlation = 1.0 - x = stk_rbf_matern52 (0.0); - assert (stk_isequal_tolrel (x, 1.0, 1e-8)); -***** test %% consistency with stk_rbf_matern: function values - for h = 0.1:0.1:2.0, - x = stk_rbf_matern (5/2, h); - y = stk_rbf_matern52 (h); - assert (stk_isequal_tolrel (x, y, 1e-8)); +***** test + for dim = [1 3 7], + x = zeros(1, dim); + y = stk_sampling_regulargrid(3^dim, dim); + [fd, ymax] = stk_filldist_discretized(x, y); + assert(stk_isequal_tolabs(fd, sqrt(dim))); + assert(stk_isequal_tolabs(ymax, ones(1, dim))); end -***** test %% consistency with stk_rbf_matern: derivatives - for h = 0.1:0.1:2.0, - x = stk_rbf_matern (5/2, h, 2); - y = stk_rbf_matern52 (h, 1); - assert (stk_isequal_tolrel (x, y, 1e-8)); +9 tests, 9 passed, 0 known failure, 0 skipped +[inst/misc/dist/stk_dist.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/misc/dist/stk_dist.m +***** error stk_dist(); +***** error stk_dist(0, 0, 0); +***** error stk_dist(0, 0, 0, 0); +***** error stk_dist(0, ones(1, 2)); +***** error stk_dist(eye(3), ones(1, 2)); +***** error stk_dist(ones(2, 1), zeros(2)); +***** shared x, y, z + x = zeros(11, 5); + y = zeros(13, 5); + z = ones(7, 5); +***** test + Dx = stk_dist(x); + assert(isequal(Dx, zeros(11))); +***** test + Dxx = stk_dist(x, x); + assert(isequal(Dxx, zeros(11))); +***** test + Dxy = stk_dist(x, y); + assert(isequal(Dxy, zeros(11, 13))); +***** test + Dzz = stk_dist(z, z); + assert(isequal(Dzz, zeros(7))); +***** test + Dxz = stk_dist(x, z); + assert(stk_isequal_tolabs(Dxz, sqrt(5)*ones(11, 7))); +***** test + x = randn(5,3); + y = randn(5,3); + D1 = stk_dist(x, y, true); % pairwise + D2 = stk_dist(x, y); + assert(stk_isequal_tolabs(D1, diag(D2))); +***** test + x = randn(5,3); + D1 = stk_dist(x, [], true); % pairwise + assert(stk_isequal_tolabs(D1, zeros(5, 1))); + D1 = stk_dist(x, x, true); % pairwise + assert(stk_isequal_tolabs(D1, zeros(5, 1))); +13 tests, 13 passed, 0 known failure, 0 skipped +[inst/misc/dist/stk_filldist_exact.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/misc/dist/stk_filldist_exact.m +***** test + d = 3; x = rand(7, d); box = repmat([0; 1], 1, d); + fd1 = stk_filldist_exact(x, box); + fd2 = stk_filldist_exact(stk_dataframe(x), stk_dataframe(box)); + assert(stk_isequal_tolabs(fd1, fd2)); +***** test + for dim = 1:6, + x = 0.5 * ones(1, dim); + fd = stk_filldist_exact(x); % [0; 1]^d is the default box + assert(stk_isequal_tolabs(fd, 0.5 * sqrt(dim))); end -***** assert (stk_rbf_matern52 (inf) == 0) -7 tests, 7 passed, 0 known failure, 0 skipped -[inst/covfcs/rbf/stk_rbf_gauss.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/covfcs/rbf/stk_rbf_gauss.m -***** shared h, diff - h = 1.0; diff = -1; -***** error stk_rbf_gauss (); -***** test stk_rbf_gauss (h); -***** test stk_rbf_gauss (h, diff); -***** test % h = 0.0 => correlation = 1.0 - x = stk_rbf_gauss (0.0); - assert (stk_isequal_tolrel (x, 1.0, 1e-8)); -4 tests, 4 passed, 0 known failure, 0 skipped -[inst/covfcs/rbf/stk_rbf_spherical.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/covfcs/rbf/stk_rbf_spherical.m -***** shared h, diff - h = 1.0; diff = -1; -***** error stk_rbf_spherical (); -***** test stk_rbf_spherical (h); -***** test stk_rbf_spherical (h, diff); -***** test %% h = 0.0 => correlation = 1.0 - x = stk_rbf_spherical (0.0); - assert (stk_isequal_tolrel (x, 1.0, 1e-8)); -***** test %% check derivative numerically - h = [-1 -0.5 -0.1 0.1 0.5 1]; delta = 1e-9; - d1 = (stk_rbf_spherical (h + delta) - stk_rbf_spherical (h)) / delta; - d2 = stk_rbf_spherical (h, 1); - assert (stk_isequal_tolabs (d1, d2, 1e-4)); -***** assert (stk_rbf_spherical (inf) == 0) -6 tests, 6 passed, 0 known failure, 0 skipped -[inst/covfcs/rbf/stk_rbf_exponential.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/covfcs/rbf/stk_rbf_exponential.m -***** shared h, diff - h = 1.0; diff = -1; -***** error stk_rbf_exponential (); -***** test stk_rbf_exponential (h); -***** test stk_rbf_exponential (h, diff); -***** test %% h = 0.0 => correlation = 1.0 - x = stk_rbf_exponential (0.0); - assert (stk_isequal_tolrel (x, 1.0, 1e-8)); -***** test %% check derivative numerically - h = [-1 -0.5 -0.1 0.1 0.5 1]; delta = 1e-9; - d1 = (stk_rbf_exponential (h + delta) - stk_rbf_exponential (h)) / delta; - d2 = stk_rbf_exponential (h, 1); - assert (stk_isequal_tolabs (d1, d2, 1e-4)); -***** test %% consistency with stk_rbf_matern: function values - for h = 0.1:0.1:2.0, - x = stk_rbf_matern (1/2, h); - y = stk_rbf_exponential (h); - assert (stk_isequal_tolrel (x, y, 1e-8)); +***** test + for dim = [1 3 7], + box = repmat([1; 2], 1, dim); + x = 1 + 0.5 * ones(1, dim); + fd = stk_filldist_exact(x, box); + assert(stk_isequal_tolabs(fd, 0.5 * sqrt(dim))); end -***** test %% consistency with stk_rbf_matern: derivatives - for h = 0.1:0.1:2.0, - x = stk_rbf_matern (1/2, h, 2); - y = stk_rbf_exponential (h, 1); - assert (stk_isequal_tolrel (x, y, 1e-8)); +***** test + for dim = [1 3 7], + x = zeros(1, dim); + [fd, ymax] = stk_filldist_exact(x); + assert(stk_isequal_tolabs(fd, sqrt(dim))); + assert(stk_isequal_tolabs(ymax, ones(1, dim))); end -***** assert (stk_rbf_exponential (inf) == 0) -8 tests, 8 passed, 0 known failure, 0 skipped -[inst/covfcs/rbf/stk_rbf_matern.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/covfcs/rbf/stk_rbf_matern.m -***** shared nu, h, diff - nu = 1.0; h = 1.0; diff = -1; -***** error stk_rbf_matern (); -***** error stk_rbf_matern (nu); -***** test stk_rbf_matern (nu, h); -***** test stk_rbf_matern (nu, h, diff); -***** test %% h = 0.0 => correlation = 1.0 - for nu = 0.1:0.2:5.0, - x = stk_rbf_matern (nu, 0.0); - assert (stk_isequal_tolrel (x, 1.0, 1e-8)); +4 tests, 4 passed, 0 known failure, 0 skipped +[inst/misc/dist/stk_gpquadform.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/misc/dist/stk_gpquadform.m +***** shared x, y, z, rx, ry, rz + x = rand(5, 2); rx = rand(5, 2) + 1; + y = rand(6, 2); ry = rand(6, 2) + 1; + z = rand(5, 3); rz = rand(5, 3) + 1; +***** error Q = stk_gpquadform(x, ry, y, ry) +***** error Q = stk_gpquadform(x, rz, y, ry) +***** error Q = stk_gpquadform(x, rx, y, rx) +***** error Q = stk_gpquadform(x, rx, y, rz) +***** error Q = stk_gpquadform(x, rx, z, ry) +***** shared x, y, z, rx, ry, rz + x = zeros (11, 5); rx = 1/sqrt(2) * ones (11, 5); + y = zeros (13, 5); ry = 1/sqrt(2) * ones (13, 5); + z = ones ( 7, 5); rz = 1/sqrt(2) * ones ( 7, 5); +***** test + Qx = stk_gpquadform(x, [], rx); + assert(isequal(Qx, zeros(11))); +***** test + Qxx = stk_gpquadform(x, x, rx, rx); + assert(isequal(Qxx, zeros(11))); +***** test + Qxy = stk_gpquadform(x, y, rx, ry); + assert(isequal(Qxy, zeros(11, 13))); +***** test + Qzz = stk_gpquadform(z, [], rz); + assert(isequal(Qzz, zeros(7))); +***** test + Qxz = stk_gpquadform(x, z, rx, rz); + assert(stk_isequal_tolabs(Qxz, 5 * ones(11, 7))); +***** test + x = randn(5, 3); rx = 1 + rand(5, 3); + y = randn(5, 3); ry = 1 + rand(5, 3); + Q1 = stk_gpquadform(x, y, rx, ry, true); % pairwise + Q2 = stk_gpquadform(x, y, rx, ry, false); + assert(isequal(size(Q1), [5 1])); + assert(isequal(size(Q2), [5 5])); + assert(stk_isequal_tolabs(Q1, diag(Q2))); +***** test + x = randn(5, 3); rx = 1 + rand(5, 3); + Q1 = stk_gpquadform(x, [], rx, [], true); % pairwise + assert(stk_isequal_tolabs(Q1, zeros(5, 1))); + Q1 = stk_gpquadform(x, x, rx, rx, true); % pairwise + assert(stk_isequal_tolabs(Q1, zeros(5, 1))); +***** shared x, y, z, rx, ry, rz + x = zeros (11, 5); rx = 2 * ones (11, 5); + y = zeros (13, 5); ry = 2 * ones (13, 5); + z = ones ( 7, 5); rz = 2 * ones ( 7, 5); +***** test + Qx = stk_gpquadform(x, [], rx); + assert(isequal(Qx, zeros(11))); +***** test + Qxx = stk_gpquadform(x, x, rx, rx); + assert(isequal(Qxx, zeros(11))); +***** test + Qxy = stk_gpquadform(x, y, rx, ry); + assert(isequal(Qxy, zeros(11, 13))); +***** test + Qzz = stk_gpquadform(z, [], rz); + assert(isequal(Qzz, zeros(7))); +***** test + Qxz = stk_gpquadform(x, z, rx, rz); + assert(stk_isequal_tolabs(Qxz, 5/8 * ones(11, 7))); +17 tests, 17 passed, 0 known failure, 0 skipped +[inst/misc/dist/stk_filldist.m] +>>>>> /build/reproducible-path/octave-stk-2.8.1/inst/misc/dist/stk_filldist.m +***** test %%% exact + d = 3; x = rand(7, d); box = repmat([0; 1], 1, d); + fd1 = stk_filldist(x, box); + fd2 = stk_filldist(stk_dataframe(x), stk_dataframe(box)); + assert(stk_isequal_tolabs(fd1, fd2)); +***** test %%% discretized + d = 3; x = rand(7, d); y = rand(20, d); + fd1 = stk_filldist(x, y); + fd2 = stk_filldist(stk_dataframe(x), stk_dataframe(y)); + assert(stk_isequal_tolabs(fd1, fd2)); +***** test + n = 5; % must be bigger than 2 + for dim = 1:10, + x = rand(n, dim); + fd = stk_filldist(x, x); + assert(stk_isequal_tolabs(fd, 0.0)); end -5 tests, 5 passed, 0 known failure, 0 skipped -[inst/covfcs/rbf/stk_rbf_matern32.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/covfcs/rbf/stk_rbf_matern32.m -***** shared h, diff - h = 1.0; diff = -1; -***** error stk_rbf_matern32 (); -***** test stk_rbf_matern32 (h); -***** test stk_rbf_matern32 (h, diff); -***** test %% h = 0.0 => correlation = 1.0 - x = stk_rbf_matern32 (0.0); - assert (stk_isequal_tolrel (x, 1.0, 1e-8)); -***** test %% consistency with stk_rbf_matern: function values - for h = 0.1:0.1:2.0, - x = stk_rbf_matern (3/2, h); - y = stk_rbf_matern32 (h); - assert (stk_isequal_tolrel (x, y, 1e-8)); +***** test %%% exact + for dim = 1:6, + x = 0.5 * ones(1, dim); + fd = stk_filldist(x); % [0; 1]^d is the default box + assert(stk_isequal_tolabs(fd, 0.5 * sqrt(dim))); end -***** test %% consistency with stk_rbf_matern: derivatives - for h = 0.1:0.1:2.0, - x = stk_rbf_matern (3/2, h, 2); - y = stk_rbf_matern32 (h, 1); - assert (stk_isequal_tolrel (x, y, 1e-8)); +***** test %%% discretized + for dim = 1:6, + x = 0.5 * ones(1, dim); + y = stk_sampling_regulargrid(2^dim, dim); % [0; 1]^d is the default box + fd = stk_filldist(x, y); + assert(stk_isequal_tolabs(fd, 0.5 * sqrt(dim))); end -***** assert (stk_rbf_matern32 (inf) == 0) -7 tests, 7 passed, 0 known failure, 0 skipped -[inst/covfcs/stk_sphcov_iso.m] ->>>>> /build/reproducible-path/octave-stk-2.8.1/inst/covfcs/stk_sphcov_iso.m -***** shared param, x, y - dim = 1; - param = log ([1.0; 2.5]); - x = stk_sampling_randunif (5, dim); - y = stk_sampling_randunif (5, dim); -***** error K = stk_sphcov_iso ([param; 1.234], x, y); -***** error stk_sphcov_iso (); -***** error stk_sphcov_iso (param); -***** error stk_sphcov_iso (param, x); -***** test stk_sphcov_iso (param, x, y); -***** test stk_sphcov_iso (param, x, y, -1); -***** test stk_sphcov_iso (param, x, y, -1, false); -***** error stk_sphcov_iso (param, x, y, -2); -***** test stk_sphcov_iso (param, x, y, -1); -***** error stk_sphcov_iso (param, x, y, 0); -***** test stk_sphcov_iso (param, x, y, 1); -***** test stk_sphcov_iso (param, x, y, 2); -***** error stk_sphcov_iso (param, x, y, 3); -***** error stk_sphcov_iso (param, x, y, nan); -***** error stk_sphcov_iso (param, x, y, inf); -***** shared dim, param, x, y, nx, ny - dim = 3; - param = log ([1.0; 2.5]); - nx = 4; ny = 10; - x = stk_sampling_randunif (nx, dim); - y = stk_sampling_randunif (ny, dim); -***** test - K1 = stk_sphcov_iso (param, x, y); - K2 = stk_sphcov_iso (param, x, y, -1); - assert (isequal (size (K1), [nx ny])); - assert (stk_isequal_tolabs (K1, K2)); ***** test - for i = 1:2, - dK = stk_sphcov_iso (param, x, y, i); - assert (isequal (size (dK), [nx ny])); + for dim = [1 3 7], + box = repmat([1; 2], 1, dim); + x = 1 + 0.5 * ones(1, dim); + fd = stk_filldist(x, box); + assert(stk_isequal_tolabs(fd, 0.5 * sqrt(dim))); end ***** test - n = 7; - x = stk_sampling_randunif (n, dim); - y = stk_sampling_randunif (n, dim); - - K1 = stk_sphcov_iso (param, x, y); - K2 = stk_sphcov_iso (param, x, y, -1, true); - assert (isequal (size (K1), [n n])); - assert (stk_isequal_tolabs (K2, diag (K1))); - - for i = 1:2, - dK1 = stk_sphcov_iso (param, x, y, i); - dK2 = stk_sphcov_iso (param, x, y, i, true); - assert (isequal (size (dK1), [n n])); - assert (stk_isequal_tolabs (dK2, diag (dK1))); + dim = 3; + box = repmat([-1; 1], 1, dim); + x = stk_sampling_randunif(20, dim, box); + y = stk_sampling_regulargrid(3^dim, dim, box); + fd1 = stk_filldist(x, box); + fd2 = stk_filldist(x, y); + assert(fd1 >= fd2 - 10 * eps); +***** test %%% exact + for dim = [1 3 7], + x = zeros(1, dim); + [fd, ymax] = stk_filldist_exact(x); + assert(stk_isequal_tolabs(fd, sqrt(dim))); + assert(stk_isequal_tolabs(ymax, ones(1, dim))); end -18 tests, 18 passed, 0 known failure, 0 skipped +***** test %%% discretized + for dim = [1 3 7], + x = zeros(1, dim); + y = stk_sampling_regulargrid(3^dim, dim); + [fd, ymax] = stk_filldist(x, y); + assert(stk_isequal_tolabs(fd, sqrt(dim))); + assert(stk_isequal_tolabs(ymax, ones(1, dim))); + end +9 tests, 9 passed, 0 known failure, 0 skipped [inst/utils/stk_generate_samplepaths.m] >>>>> /build/reproducible-path/octave-stk-2.8.1/inst/utils/stk_generate_samplepaths.m ***** shared model, xi, zi, xt, n, nb_paths @@ -11135,8 +11111,8 @@ dpkg-gencontrol: warning: package octave-stk: substitution variable ${octave:Upstream-Description} unused, but is defined dh_md5sums -O--buildsystem=octave dh_builddeb -O--buildsystem=octave -dpkg-deb: building package 'octave-stk' in '../octave-stk_2.8.1-3_i386.deb'. dpkg-deb: building package 'octave-stk-dbgsym' in '../octave-stk-dbgsym_2.8.1-3_i386.deb'. +dpkg-deb: building package 'octave-stk' in '../octave-stk_2.8.1-3_i386.deb'. dpkg-genbuildinfo --build=binary -O../octave-stk_2.8.1-3_i386.buildinfo dpkg-genchanges --build=binary -O../octave-stk_2.8.1-3_i386.changes dpkg-genchanges: info: binary-only upload (no source code included) @@ -11144,12 +11120,14 @@ dpkg-buildpackage: info: binary-only upload (no source included) dpkg-genchanges: info: not including original source code in upload I: copying local configuration +I: user script /srv/workspace/pbuilder/25398/tmp/hooks/B01_cleanup starting +I: user script /srv/workspace/pbuilder/25398/tmp/hooks/B01_cleanup finished I: unmounting dev/ptmx filesystem I: unmounting dev/pts filesystem I: unmounting dev/shm filesystem I: unmounting proc filesystem I: unmounting sys filesystem I: cleaning the build env -I: removing directory /srv/workspace/pbuilder/17486 and its subdirectories -I: Current time: Fri Nov 7 23:33:46 -12 2025 -I: pbuilder-time-stamp: 1762601626 +I: removing directory /srv/workspace/pbuilder/25398 and its subdirectories +I: Current time: Sun Oct 6 19:14:46 +14 2024 +I: pbuilder-time-stamp: 1728191686