0s autopkgtest [07:12:54]: starting date and time: 2026-02-05 07:12:54+0000 0s autopkgtest [07:12:54]: git checkout: 508d4a25 a-v-ssh wait_for_ssh: demote "ssh connection failed" to a debug message 0s autopkgtest [07:12:54]: host juju-7f2275-prod-proposed-migration-environment-9; command line: /home/ubuntu/autopkgtest/runner/autopkgtest --output-dir /tmp/autopkgtest-work.ziup2ndl/out --timeout-copy=6000 --setup-commands 'ln -s /dev/null /etc/systemd/system/bluetooth.service; printf "http_proxy=http://squid.internal:3128\nhttps_proxy=http://squid.internal:3128\nno_proxy=127.0.0.1,127.0.1.1,localhost,localdomain,internal,login.ubuntu.com,archive.ubuntu.com,ports.ubuntu.com,security.ubuntu.com,ddebs.ubuntu.com,changelogs.ubuntu.com,keyserver.ubuntu.com,launchpadlibrarian.net,launchpadcontent.net,launchpad.net,keystone.ps5.canonical.com,objectstorage.prodstack5.canonical.com,radosgw.ps5.canonical.com\n" >> /etc/environment' --apt-pocket=proposed=src:glibc --apt-upgrade octave-statistics --timeout-short=300 --timeout-copy=20000 --timeout-build=20000 --env=ADT_TEST_TRIGGERS=glibc/2.42-2ubuntu5 -- lxd -r lxd-armhf-10.145.243.52 lxd-armhf-10.145.243.52:autopkgtest/ubuntu/resolute/armhf 21s autopkgtest [07:13:15]: testbed dpkg architecture: armhf 23s autopkgtest [07:13:17]: testbed apt version: 3.1.14 27s autopkgtest [07:13:21]: @@@@@@@@@@@@@@@@@@@@ test bed setup 29s autopkgtest [07:13:23]: testbed release detected to be: None 37s autopkgtest [07:13:31]: updating testbed package index (apt update) 39s Get:1 http://ftpmaster.internal/ubuntu resolute-proposed InRelease [124 kB] 39s Get:2 http://ftpmaster.internal/ubuntu resolute InRelease [124 kB] 40s Hit:3 http://ftpmaster.internal/ubuntu resolute-updates InRelease 40s Hit:4 http://ftpmaster.internal/ubuntu resolute-security InRelease 40s Get:5 http://ftpmaster.internal/ubuntu resolute-proposed/main Sources [228 kB] 40s Get:6 http://ftpmaster.internal/ubuntu resolute-proposed/restricted Sources [5260 B] 40s Get:7 http://ftpmaster.internal/ubuntu resolute-proposed/multiverse Sources [35.4 kB] 40s Get:8 http://ftpmaster.internal/ubuntu resolute-proposed/universe Sources [1719 kB] 40s Get:9 http://ftpmaster.internal/ubuntu resolute-proposed/main armhf Packages [253 kB] 40s Get:10 http://ftpmaster.internal/ubuntu resolute-proposed/universe armhf Packages [1418 kB] 40s Get:11 http://ftpmaster.internal/ubuntu resolute-proposed/multiverse armhf Packages [9664 B] 40s Get:12 http://ftpmaster.internal/ubuntu resolute/universe Sources [21.3 MB] 41s Get:13 http://ftpmaster.internal/ubuntu resolute/main Sources [1400 kB] 41s Get:14 http://ftpmaster.internal/ubuntu resolute/main armhf Packages [1374 kB] 41s Get:15 http://ftpmaster.internal/ubuntu resolute/universe armhf Packages [15.1 MB] 45s Fetched 43.1 MB in 6s (7781 kB/s) 46s Reading package lists... 54s autopkgtest [07:13:48]: upgrading testbed (apt dist-upgrade and autopurge) 56s Reading package lists... 56s Building dependency tree... 56s Reading state information... 57s Calculating upgrade... 57s The following packages will be upgraded: 57s libc-bin libc-gconv-modules-extra libc6 locales 58s 4 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 58s Need to get 7850 kB of archives. 58s After this operation, 0 B of additional disk space will be used. 58s Get:1 http://ftpmaster.internal/ubuntu resolute-proposed/main armhf libc-gconv-modules-extra armhf 2.42-2ubuntu5 [1417 kB] 58s Get:2 http://ftpmaster.internal/ubuntu resolute-proposed/main armhf libc6 armhf 2.42-2ubuntu5 [1632 kB] 58s Get:3 http://ftpmaster.internal/ubuntu resolute-proposed/main armhf libc-bin armhf 2.42-2ubuntu5 [545 kB] 58s Get:4 http://ftpmaster.internal/ubuntu resolute-proposed/main armhf locales all 2.42-2ubuntu5 [4255 kB] 59s Preconfiguring packages ... 59s Fetched 7850 kB in 1s (9147 kB/s) 59s (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 ... 68395 files and directories currently installed.) 59s Preparing to unpack .../libc-gconv-modules-extra_2.42-2ubuntu5_armhf.deb ... 59s Unpacking libc-gconv-modules-extra:armhf (2.42-2ubuntu5) over (2.42-2ubuntu4) ... 59s Setting up libc-gconv-modules-extra:armhf (2.42-2ubuntu5) ... 60s (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 ... 68395 files and directories currently installed.) 60s Preparing to unpack .../libc6_2.42-2ubuntu5_armhf.deb ... 60s readlink: /usr/lib/libeatmydata: No such file or directory 60s Unpacking libc6:armhf (2.42-2ubuntu5) over (2.42-2ubuntu4) ... 60s Setting up libc6:armhf (2.42-2ubuntu5) ... 60s (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 ... 68395 files and directories currently installed.) 60s Preparing to unpack .../libc-bin_2.42-2ubuntu5_armhf.deb ... 60s Unpacking libc-bin (2.42-2ubuntu5) over (2.42-2ubuntu4) ... 60s Setting up libc-bin (2.42-2ubuntu5) ... 61s (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 ... 68395 files and directories currently installed.) 61s Preparing to unpack .../locales_2.42-2ubuntu5_all.deb ... 61s Unpacking locales (2.42-2ubuntu5) over (2.42-2ubuntu4) ... 61s Setting up locales (2.42-2ubuntu5) ... 63s Generating locales (this might take a while)... 66s en_US.UTF-8... done 66s Generation complete. 66s Processing triggers for systemd (259-1ubuntu3) ... 66s Processing triggers for man-db (2.13.1-1) ... 70s Reading package lists... 70s Building dependency tree... 70s Reading state information... 71s Solving dependencies... 72s 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 74s autopkgtest [07:14:08]: rebooting testbed after setup commands that affected boot 117s autopkgtest [07:14:51]: testbed running kernel: Linux 6.8.0-87-generic #88~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Tue Oct 14 14:00:09 UTC 2 145s autopkgtest [07:15:19]: @@@@@@@@@@@@@@@@@@@@ apt-source octave-statistics 162s Get:1 http://ftpmaster.internal/ubuntu resolute/universe octave-statistics 1.7.6-2 (dsc) [2289 B] 162s Get:2 http://ftpmaster.internal/ubuntu resolute/universe octave-statistics 1.7.6-2 (tar) [1424 kB] 162s Get:3 http://ftpmaster.internal/ubuntu resolute/universe octave-statistics 1.7.6-2 (diff) [10.3 kB] 162s gpgv: Signature made Mon Oct 27 09:10:08 2025 UTC 162s gpgv: using RSA key 53951D95272E0C5B82BE8C4A2CECE9350ECEBE4A 162s gpgv: Can't check signature: No public key 162s dpkg-source: warning: cannot verify inline signature for ./octave-statistics_1.7.6-2.dsc: no acceptable signature found 162s autopkgtest [07:15:36]: testing package octave-statistics version 1.7.6-2 166s autopkgtest [07:15:40]: build not needed 168s autopkgtest [07:15:42]: test command1: preparing testbed 171s Reading package lists... 171s Building dependency tree... 171s Reading state information... 172s Solving dependencies... 173s The following NEW packages will be installed: 173s aglfn appstream autoconf automake autopoint autotools-dev cme comerr-dev cpp 173s cpp-15 cpp-15-arm-linux-gnueabihf cpp-arm-linux-gnueabihf debhelper 173s debugedit dh-autoreconf dh-octave dh-octave-autopkgtest 173s dh-strip-nondeterminism diffstat dwz fontconfig fontconfig-config 173s fonts-freefont-otf g++ g++-15 g++-15-arm-linux-gnueabihf 173s g++-arm-linux-gnueabihf gcc gcc-15 gcc-15-arm-linux-gnueabihf 173s gcc-arm-linux-gnueabihf gettext gfortran gfortran-15 173s gfortran-15-arm-linux-gnueabihf gfortran-arm-linux-gnueabihf gnuplot-data 173s gnuplot-nox hdf5-helpers intltool-debian krb5-multidev libaec-dev libaec0 173s libalgorithm-c3-perl libaliased-perl libamd3 libaom3 libapp-cmd-perl 173s libappstream5 libapt-pkg-perl libarchive-zip-perl libarpack2t64 173s libarray-intspan-perl libasan8 libasound2-data libasound2t64 libasyncns0 173s libavahi-client3 libavahi-common-data libavahi-common3 173s libb-hooks-endofscope-perl libb-hooks-op-check-perl libb-keywords-perl 173s libb2-1 libberkeleydb-perl libblas-dev libblas3 libboolean-perl 173s libbrotli-dev libc-dev-bin libc6-dev libcairo2 libcamd3 libcapture-tiny-perl 173s libcarp-assert-more-perl libcc1-0 libccolamd3 libcgi-pm-perl libcholmod5 173s libclass-c3-perl libclass-data-inheritable-perl libclass-inspector-perl 173s libclass-load-perl libclass-method-modifiers-perl libclass-tiny-perl 173s libclass-xsaccessor-perl libclone-choose-perl libclone-perl libcolamd3 173s libconfig-inifiles-perl libconfig-model-backend-yaml-perl 173s libconfig-model-dpkg-perl libconfig-model-perl libconfig-tiny-perl 173s libconst-fast-perl libconvert-binhex-perl libcpanel-json-xs-perl 173s libcrypt-dev libcups2t64 libcurl4-openssl-dev libcxsparse4 173s libdata-dpath-perl libdata-messagepack-perl libdata-optlist-perl 173s libdata-section-perl libdata-validate-domain-perl libdata-validate-ip-perl 173s libdata-validate-uri-perl libdatrie1 libde265-0 libdebhelper-perl 173s libdeflate0 libdevel-callchecker-perl libdevel-size-perl 173s libdevel-stacktrace-perl libdouble-conversion3 libduktape207 libdw1t64 173s libdynaloader-functions-perl libegl-mesa0 libegl1 libemail-address-xs-perl 173s libencode-locale-perl liberror-perl libevent-2.1-7t64 173s libexception-class-perl libexporter-lite-perl libexporter-tiny-perl 173s libfftw3-bin libfftw3-dev libfftw3-double3 libfftw3-single3 173s libfile-basedir-perl libfile-find-rule-perl libfile-homedir-perl 173s libfile-listing-perl libfile-sharedir-perl libfile-stripnondeterminism-perl 173s libfile-which-perl libflac14 libfltk-gl1.3t64 libfltk1.3t64 libfont-ttf-perl 173s libfontconfig1 libfontenc1 libfreetype6 libfyaml0 libgbm1 libgcc-15-dev 173s libgd3 libgetopt-long-descriptive-perl libgfortran-15-dev libgfortran5 173s libgl-dev libgl1 libgl1-mesa-dri libgl2ps1.4 libglpk40 libglu1-mesa 173s libglvnd0 libglx-dev libglx-mesa0 libglx0 libgmp-dev libgmpxx4ldbl 173s libgnutls-dane0t64 libgnutls-openssl27t64 libgnutls28-dev libgomp1 173s libgraphicsmagick++-q16-12t64 libgraphicsmagick-q16-3t64 libgraphite2-3 173s libgssrpc4t64 libharfbuzz0b libhash-merge-perl libhdf5-310 libhdf5-cpp-310 173s libhdf5-dev libhdf5-fortran-310 libhdf5-hl-310 libhdf5-hl-cpp-310 173s libhdf5-hl-fortran-310 libheif-plugin-aomdec libheif-plugin-libde265 173s libheif1 libhtml-form-perl libhtml-html5-entities-perl libhtml-parser-perl 173s libhtml-tagset-perl libhtml-tokeparser-simple-perl libhtml-tree-perl 173s libhttp-cookies-perl libhttp-date-perl libhttp-message-perl 173s libhttp-negotiate-perl libice6 libidn2-dev libimagequant0 173s libimport-into-perl libindirect-perl libinput-bin libinput10 libintl-perl 173s libio-html-perl libio-interactive-perl libio-socket-ssl-perl 173s libio-string-perl libio-stringy-perl libio-tiecombine-perl libipc-run3-perl 173s libipc-system-simple-perl libisl23 libiterator-perl libiterator-util-perl 173s libjack-jackd2-0 libjbig0 libjpeg-dev libjpeg-turbo8 libjpeg-turbo8-dev 173s libjpeg8 libjpeg8-dev libjson-maybexs-perl libjson-perl libjxl0.11 173s libkadm5clnt-mit12 libkadm5srv-mit12 libkdb5-10t64 libkrb5-dev liblapack-dev 173s liblapack3 liblcms2-2 libldap-dev liblerc4 liblingua-en-inflect-perl 173s liblist-compare-perl liblist-moreutils-perl liblist-moreutils-xs-perl 173s liblist-someutils-perl liblist-utilsby-perl libllvm21 173s liblog-any-adapter-screen-perl liblog-any-perl liblog-log4perl-perl libltdl7 173s liblua5.4-0 liblwp-mediatypes-perl liblwp-protocol-https-perl 173s libmailtools-perl libmarkdown2 libmd4c0 libmime-tools-perl libmldbm-perl 173s libmodule-implementation-perl libmodule-pluggable-perl 173s libmodule-runtime-perl libmoo-perl libmoox-aliases-perl libmouse-perl 173s libmousex-nativetraits-perl libmousex-strictconstructor-perl libmp3lame0 173s libmpc3 libmpg123-0t64 libmro-compat-perl libmtdev1t64 173s libnamespace-clean-perl libncurses-dev libnet-domain-tld-perl 173s libnet-http-perl libnet-ipv6addr-perl libnet-netmask-perl 173s libnet-smtp-ssl-perl libnet-ssleay-perl libnetaddr-ip-perl libnghttp2-dev 173s libnumber-compare-perl libobject-pad-perl libogg0 libopengl0 libopus0 173s libp11-kit-dev libpackage-stash-perl libpango-1.0-0 libpangocairo-1.0-0 173s libpangoft2-1.0-0 libparams-classify-perl libparams-util-perl 173s libparams-validate-perl libparse-debcontrol-perl libparse-recdescent-perl 173s libpath-iterator-rule-perl libpath-tiny-perl libpcre2-16-0 173s libperl-critic-perl libperlio-gzip-perl libperlio-utf8-strict-perl 173s libpixman-1-0 libpkgconf3 libpod-constants-perl libpod-parser-perl 173s libpod-pom-perl libpod-spell-perl libportaudio2 libppi-perl 173s libppix-quotelike-perl libppix-regexp-perl libppix-utils-perl 173s libproc-processtable-perl libproxy1v5 libpsl-dev libpulse0 libqhull-r8.0 173s libqrupdate1 libqscintilla2-qt6-15 libqscintilla2-qt6-l10n 173s libqt6core5compat6 libqt6core6t64 libqt6dbus6 libqt6gui6 libqt6help6 173s libqt6network6 libqt6opengl6 libqt6openglwidgets6 libqt6printsupport6 173s libqt6sql6 libqt6widgets6 libqt6xml6 libreadline-dev libreadonly-perl 173s libregexp-common-perl libregexp-pattern-license-perl libregexp-pattern-perl 173s libregexp-wildcards-perl librole-tiny-perl librtmp-dev libsafe-isa-perl 173s libsamplerate0 libsereal-decoder-perl libsereal-encoder-perl 173s libset-intspan-perl libsharpyuv0 libsm6 libsndfile1 173s libsoftware-copyright-perl libsoftware-license-perl 173s libsoftware-licensemoreutils-perl libsort-versions-perl libspqr4 173s libssh2-1-dev libssl-dev libstdc++-15-dev libstemmer0d libstrictures-perl 173s libstring-copyright-perl libstring-escape-perl libstring-format-perl 173s libstring-license-perl libstring-rewriteprefix-perl libsub-exporter-perl 173s libsub-exporter-progressive-perl libsub-identify-perl libsub-install-perl 173s libsub-name-perl libsub-quote-perl libsub-uplevel-perl libsuitesparseconfig7 173s libsyntax-keyword-try-perl libsz2 libtask-weaken-perl libtasn1-6-dev 173s libterm-readkey-perl libtest-exception-perl libtext-autoformat-perl 173s libtext-glob-perl libtext-levenshtein-damerau-perl 173s libtext-levenshteinxs-perl libtext-markdown-discount-perl 173s libtext-reform-perl libtext-template-perl libtext-unidecode-perl 173s libtext-wrapper-perl libtext-xslate-perl libthai-data libthai0 libtiff6 173s libtime-duration-perl libtime-moment-perl libtimedate-perl libtoml-tiny-perl 173s libtool libtry-tiny-perl libts0t64 libubsan1 libumfpack6 libunbound8 173s libunicode-utf8-perl liburi-perl libvariable-magic-perl libvorbis0a 173s libvorbisenc2 libvulkan1 libwacom-common libwacom9 libwayland-client0 173s libwebp7 libwebpmux3 libwmflite-0.2-7 libwww-mechanize-perl libwww-perl 173s libwww-robotrules-perl libx11-dev libx11-xcb1 libxau-dev libxaw7 173s libxcb-cursor0 libxcb-dri3-0 libxcb-glx0 libxcb-icccm4 libxcb-image0 173s libxcb-keysyms1 libxcb-present0 libxcb-randr0 libxcb-render-util0 173s libxcb-render0 libxcb-shape0 libxcb-shm0 libxcb-sync1 libxcb-util1 173s libxcb-xfixes0 libxcb-xinput0 libxcb-xkb1 libxcb1-dev libxcursor1 173s libxdmcp-dev libxfixes3 libxfont2 libxft2 libxinerama1 libxkbcommon-x11-0 173s libxkbfile1 libxml-libxml-perl libxml-namespacesupport-perl 173s libxml-sax-base-perl libxml-sax-perl libxmu6 libxpm4 libxrandr2 libxrender1 173s libxs-parse-keyword-perl libxs-parse-sublike-perl libxshmfence1 libxt6t64 173s libxxf86vm1 libyaml-libyaml-perl libyaml-pp-perl libyaml-tiny-perl 173s libzstd-dev licensecheck lintian linux-libc-dev lzip lzop m4 mesa-libgallium 173s nettle-dev octave octave-common octave-dev octave-io octave-statistics 173s octave-statistics-common patchutils perl-openssl-defaults perltidy pkgconf 173s pkgconf-bin po-debconf rpcsvc-proto t1utils tex-common texinfo texinfo-lib 173s unzip x11-common x11-xkb-utils x11proto-dev xorg-sgml-doctools 173s xserver-common xtrans-dev xvfb zlib1g-dev 173s 0 upgraded, 491 newly installed, 0 to remove and 0 not upgraded. 173s Need to get 202 MB of archives. 173s After this operation, 645 MB of additional disk space will be used. 173s Get:1 http://ftpmaster.internal/ubuntu resolute/main armhf libfyaml0 armhf 0.9.3-1 [243 kB] 173s Get:2 http://ftpmaster.internal/ubuntu resolute/main armhf libstemmer0d armhf 3.0.1-1 [138 kB] 173s Get:3 http://ftpmaster.internal/ubuntu resolute/main armhf libappstream5 armhf 1.1.1-1 [212 kB] 174s Get:4 http://ftpmaster.internal/ubuntu resolute/main armhf appstream armhf 1.1.1-1 [66.3 kB] 174s Get:5 http://ftpmaster.internal/ubuntu resolute/main armhf m4 armhf 1.4.20-2 [212 kB] 174s Get:6 http://ftpmaster.internal/ubuntu resolute/main armhf autoconf all 2.72-3.1ubuntu1 [384 kB] 174s Get:7 http://ftpmaster.internal/ubuntu resolute/main armhf autotools-dev all 20240727.1 [43.4 kB] 174s Get:8 http://ftpmaster.internal/ubuntu resolute/main armhf automake all 1:1.18.1-3build1 [582 kB] 174s Get:9 http://ftpmaster.internal/ubuntu resolute/main armhf autopoint all 0.23.2-1 [620 kB] 174s Get:10 http://ftpmaster.internal/ubuntu resolute/main armhf libcapture-tiny-perl all 0.50-1 [20.7 kB] 174s Get:11 http://ftpmaster.internal/ubuntu resolute/main armhf libparams-util-perl armhf 1.102-3build1 [20.5 kB] 174s Get:12 http://ftpmaster.internal/ubuntu resolute/main armhf libsub-install-perl all 0.929-1 [9764 B] 174s Get:13 http://ftpmaster.internal/ubuntu resolute/main armhf libdata-optlist-perl all 0.114-1 [9708 B] 174s Get:14 http://ftpmaster.internal/ubuntu resolute/main armhf libb-hooks-op-check-perl armhf 0.22-3build2 [9174 B] 174s Get:15 http://ftpmaster.internal/ubuntu resolute/main armhf libdynaloader-functions-perl all 0.004-2 [11.5 kB] 174s Get:16 http://ftpmaster.internal/ubuntu resolute/main armhf libdevel-callchecker-perl armhf 0.009-2 [13.8 kB] 174s Get:17 http://ftpmaster.internal/ubuntu resolute/main armhf libparams-classify-perl armhf 0.015-2build6 [18.8 kB] 174s Get:18 http://ftpmaster.internal/ubuntu resolute/main armhf libmodule-runtime-perl all 0.018-1 [15.2 kB] 174s Get:19 http://ftpmaster.internal/ubuntu resolute/main armhf libtry-tiny-perl all 0.32-1 [21.2 kB] 174s Get:20 http://ftpmaster.internal/ubuntu resolute/main armhf libmodule-implementation-perl all 0.09-2 [12.0 kB] 174s Get:21 http://ftpmaster.internal/ubuntu resolute/main armhf libpackage-stash-perl all 0.40-1 [19.5 kB] 174s Get:22 http://ftpmaster.internal/ubuntu resolute/universe armhf libclass-load-perl all 0.25-2 [12.7 kB] 174s Get:23 http://ftpmaster.internal/ubuntu resolute/main armhf libio-stringy-perl all 2.113-2 [45.3 kB] 174s Get:24 http://ftpmaster.internal/ubuntu resolute/universe armhf libparams-validate-perl armhf 1.31-2build4 [52.9 kB] 174s Get:25 http://ftpmaster.internal/ubuntu resolute/main armhf libsub-exporter-perl all 0.990-1 [49.0 kB] 174s Get:26 http://ftpmaster.internal/ubuntu resolute/universe armhf libgetopt-long-descriptive-perl all 0.116-2 [25.0 kB] 174s Get:27 http://ftpmaster.internal/ubuntu resolute/universe armhf libio-tiecombine-perl all 1.005-3 [9464 B] 174s Get:28 http://ftpmaster.internal/ubuntu resolute/universe armhf libmodule-pluggable-perl all 5.2-5 [19.5 kB] 174s Get:29 http://ftpmaster.internal/ubuntu resolute/universe armhf libstring-rewriteprefix-perl all 0.009-1 [6310 B] 174s Get:30 http://ftpmaster.internal/ubuntu resolute/universe armhf libapp-cmd-perl all 0.338-1 [58.5 kB] 174s Get:31 http://ftpmaster.internal/ubuntu resolute/universe armhf libboolean-perl all 0.46-3 [8430 B] 174s Get:32 http://ftpmaster.internal/ubuntu resolute/universe armhf libsub-uplevel-perl all 0.2800-3 [11.6 kB] 174s Get:33 http://ftpmaster.internal/ubuntu resolute/universe armhf libtest-exception-perl all 0.43-3 [13.4 kB] 174s Get:34 http://ftpmaster.internal/ubuntu resolute/universe armhf libcarp-assert-more-perl all 2.9.0-1 [19.4 kB] 174s Get:35 http://ftpmaster.internal/ubuntu resolute/main armhf libfile-which-perl all 1.27-2 [12.5 kB] 174s Get:36 http://ftpmaster.internal/ubuntu resolute/main armhf libfile-homedir-perl all 1.006-2 [37.0 kB] 174s Get:37 http://ftpmaster.internal/ubuntu resolute/universe armhf libclone-choose-perl all 0.010-2 [7738 B] 174s Get:38 http://ftpmaster.internal/ubuntu resolute/universe armhf libhash-merge-perl all 0.302-1 [13.0 kB] 174s Get:39 http://ftpmaster.internal/ubuntu resolute/main armhf libjson-perl all 4.10000-1 [81.9 kB] 174s Get:40 http://ftpmaster.internal/ubuntu resolute/main armhf libexporter-tiny-perl all 1.006003-1 [35.5 kB] 174s Get:41 http://ftpmaster.internal/ubuntu resolute/universe armhf liblist-moreutils-xs-perl armhf 0.430-4build1 [37.9 kB] 174s Get:42 http://ftpmaster.internal/ubuntu resolute/universe armhf liblist-moreutils-perl all 0.430-2 [38.2 kB] 174s Get:43 http://ftpmaster.internal/ubuntu resolute/universe armhf liblog-log4perl-perl all 1.57-1 [345 kB] 174s Get:44 http://ftpmaster.internal/ubuntu resolute/main armhf libmouse-perl armhf 2.6.1-1 [129 kB] 174s Get:45 http://ftpmaster.internal/ubuntu resolute/universe armhf libmousex-nativetraits-perl all 1.09-3 [53.2 kB] 174s Get:46 http://ftpmaster.internal/ubuntu resolute/universe armhf libmousex-strictconstructor-perl all 0.02-3 [4582 B] 174s Get:47 http://ftpmaster.internal/ubuntu resolute/universe armhf libparse-recdescent-perl all 1.967015+dfsg-4 [139 kB] 174s Get:48 http://ftpmaster.internal/ubuntu resolute/main armhf libpath-tiny-perl all 0.148-1 [47.9 kB] 174s Get:49 http://ftpmaster.internal/ubuntu resolute/universe armhf libpod-pom-perl all 2.01-4 [61.3 kB] 174s Get:50 http://ftpmaster.internal/ubuntu resolute/main armhf libregexp-common-perl all 2024080801-1 [162 kB] 174s Get:51 http://ftpmaster.internal/ubuntu resolute/main armhf libyaml-tiny-perl all 1.76-1 [24.2 kB] 174s Get:52 http://ftpmaster.internal/ubuntu resolute/universe armhf libconfig-model-perl all 2.155-1 [356 kB] 174s Get:53 http://ftpmaster.internal/ubuntu resolute/universe armhf libyaml-pp-perl all 0.39.0-1 [107 kB] 174s Get:54 http://ftpmaster.internal/ubuntu resolute/universe armhf cme all 1.044-2 [68.0 kB] 175s Get:55 http://ftpmaster.internal/ubuntu resolute/main armhf libisl23 armhf 0.27-1build1 [553 kB] 175s Get:56 http://ftpmaster.internal/ubuntu resolute/main armhf libmpc3 armhf 1.3.1-2 [47.0 kB] 175s Get:57 http://ftpmaster.internal/ubuntu resolute/main armhf cpp-15-arm-linux-gnueabihf armhf 15.2.0-12ubuntu1 [10.1 MB] 175s Get:58 http://ftpmaster.internal/ubuntu resolute/main armhf cpp-15 armhf 15.2.0-12ubuntu1 [1032 B] 175s Get:59 http://ftpmaster.internal/ubuntu resolute/main armhf cpp-arm-linux-gnueabihf armhf 4:15.2.0-4ubuntu1 [5756 B] 175s Get:60 http://ftpmaster.internal/ubuntu resolute/main armhf cpp armhf 4:15.2.0-4ubuntu1 [22.4 kB] 175s Get:61 http://ftpmaster.internal/ubuntu resolute/main armhf libdebhelper-perl all 13.28ubuntu1 [97.4 kB] 175s Get:62 http://ftpmaster.internal/ubuntu resolute/main armhf libcc1-0 armhf 15.2.0-12ubuntu1 [43.5 kB] 175s Get:63 http://ftpmaster.internal/ubuntu resolute/main armhf libgomp1 armhf 15.2.0-12ubuntu1 [129 kB] 175s Get:64 http://ftpmaster.internal/ubuntu resolute/main armhf libasan8 armhf 15.2.0-12ubuntu1 [2949 kB] 176s Get:65 http://ftpmaster.internal/ubuntu resolute/main armhf libubsan1 armhf 15.2.0-12ubuntu1 [1187 kB] 176s Get:66 http://ftpmaster.internal/ubuntu resolute/main armhf libgcc-15-dev armhf 15.2.0-12ubuntu1 [898 kB] 176s Get:67 http://ftpmaster.internal/ubuntu resolute/main armhf gcc-15-arm-linux-gnueabihf armhf 15.2.0-12ubuntu1 [19.5 MB] 176s Get:68 http://ftpmaster.internal/ubuntu resolute/main armhf gcc-15 armhf 15.2.0-12ubuntu1 [499 kB] 176s Get:69 http://ftpmaster.internal/ubuntu resolute/main armhf gcc-arm-linux-gnueabihf armhf 4:15.2.0-4ubuntu1 [1220 B] 176s Get:70 http://ftpmaster.internal/ubuntu resolute/main armhf gcc armhf 4:15.2.0-4ubuntu1 [5022 B] 176s Get:71 http://ftpmaster.internal/ubuntu resolute-proposed/main armhf libc-dev-bin armhf 2.42-2ubuntu5 [21.8 kB] 176s Get:72 http://ftpmaster.internal/ubuntu resolute/main armhf linux-libc-dev armhf 6.18.0-9.9 [1819 kB] 176s Get:73 http://ftpmaster.internal/ubuntu resolute/main armhf libcrypt-dev armhf 1:4.5.1-1 [128 kB] 177s Get:74 http://ftpmaster.internal/ubuntu resolute/main armhf rpcsvc-proto armhf 1.4.3-1build1 [62.6 kB] 177s Get:75 http://ftpmaster.internal/ubuntu resolute-proposed/main armhf libc6-dev armhf 2.42-2ubuntu5 [1416 kB] 177s Get:76 http://ftpmaster.internal/ubuntu resolute/main armhf libtool all 2.5.4-9 [169 kB] 177s Get:77 http://ftpmaster.internal/ubuntu resolute/main armhf dh-autoreconf all 21 [12.5 kB] 177s Get:78 http://ftpmaster.internal/ubuntu resolute/main armhf libarchive-zip-perl all 1.68-1 [90.2 kB] 177s Get:79 http://ftpmaster.internal/ubuntu resolute/main armhf libfile-stripnondeterminism-perl all 1.15.0-1build1 [20.6 kB] 177s Get:80 http://ftpmaster.internal/ubuntu resolute/main armhf dh-strip-nondeterminism all 1.15.0-1build1 [5110 B] 177s Get:81 http://ftpmaster.internal/ubuntu resolute/main armhf libdw1t64 armhf 0.194-1 [254 kB] 177s Get:82 http://ftpmaster.internal/ubuntu resolute/main armhf debugedit armhf 1:5.2-3build1 [49.0 kB] 177s Get:83 http://ftpmaster.internal/ubuntu resolute/main armhf dwz armhf 0.16-2 [114 kB] 177s Get:84 http://ftpmaster.internal/ubuntu resolute/main armhf gettext armhf 0.23.2-1 [1059 kB] 177s Get:85 http://ftpmaster.internal/ubuntu resolute/main armhf intltool-debian all 0.35.0+20060710.6build1 [24.1 kB] 177s Get:86 http://ftpmaster.internal/ubuntu resolute/main armhf po-debconf all 1.0.22 [215 kB] 177s Get:87 http://ftpmaster.internal/ubuntu resolute/main armhf debhelper all 13.28ubuntu1 [916 kB] 177s Get:88 http://ftpmaster.internal/ubuntu resolute/universe armhf aglfn all 1.7+git20191031.4036a9c-2build1 [33.2 kB] 177s Get:89 http://ftpmaster.internal/ubuntu resolute/universe armhf gnuplot-data all 6.0.2+dfsg1-2ubuntu1 [76.0 kB] 177s Get:90 http://ftpmaster.internal/ubuntu resolute/main armhf libfreetype6 armhf 2.14.1+dfsg-2 [345 kB] 177s Get:91 http://ftpmaster.internal/ubuntu resolute/universe armhf fonts-freefont-otf all 20211204+svn4273-4build1 [4594 kB] 177s Get:92 http://ftpmaster.internal/ubuntu resolute/main armhf fontconfig-config armhf 2.17.1-3ubuntu1 [38.5 kB] 177s Get:93 http://ftpmaster.internal/ubuntu resolute/main armhf libfontconfig1 armhf 2.17.1-3ubuntu1 [117 kB] 177s Get:94 http://ftpmaster.internal/ubuntu resolute/main armhf libpixman-1-0 armhf 0.46.4-1 [196 kB] 177s Get:95 http://ftpmaster.internal/ubuntu resolute/main armhf libxcb-render0 armhf 1.17.0-2ubuntu1 [15.5 kB] 177s Get:96 http://ftpmaster.internal/ubuntu resolute/main armhf libxcb-shm0 armhf 1.17.0-2ubuntu1 [5956 B] 177s Get:97 http://ftpmaster.internal/ubuntu resolute/main armhf libxrender1 armhf 1:0.9.12-1 [16.6 kB] 177s Get:98 http://ftpmaster.internal/ubuntu resolute/main armhf libcairo2 armhf 1.18.4-3 [489 kB] 177s Get:99 http://ftpmaster.internal/ubuntu resolute/main armhf libsharpyuv0 armhf 1.5.0-0.1build1 [16.3 kB] 177s Get:100 http://ftpmaster.internal/ubuntu resolute/main armhf libaom3 armhf 3.13.1-2 [1258 kB] 177s Get:101 http://ftpmaster.internal/ubuntu resolute/main armhf libheif-plugin-aomdec armhf 1.21.2-1 [13.0 kB] 177s Get:102 http://ftpmaster.internal/ubuntu resolute/main armhf libde265-0 armhf 1.0.16-1build1 [159 kB] 178s Get:103 http://ftpmaster.internal/ubuntu resolute/main armhf libheif-plugin-libde265 armhf 1.21.2-1 [13.6 kB] 178s Get:104 http://ftpmaster.internal/ubuntu resolute/main armhf libheif1 armhf 1.21.2-1 [597 kB] 178s Get:105 http://ftpmaster.internal/ubuntu resolute/main armhf libimagequant0 armhf 2.18.0-1build1 [31.1 kB] 178s Get:106 http://ftpmaster.internal/ubuntu resolute/main armhf libjpeg-turbo8 armhf 2.1.5-4ubuntu2 [127 kB] 178s Get:107 http://ftpmaster.internal/ubuntu resolute/main armhf libjpeg8 armhf 8c-2ubuntu11 [2148 B] 178s Get:108 http://ftpmaster.internal/ubuntu resolute/main armhf libdeflate0 armhf 1.23-2 [38.7 kB] 178s Get:109 http://ftpmaster.internal/ubuntu resolute/main armhf libjbig0 armhf 2.1-6.1ubuntu3 [25.3 kB] 179s Get:110 http://ftpmaster.internal/ubuntu resolute/main armhf liblerc4 armhf 4.0.0+ds-5ubuntu2 [162 kB] 179s Get:111 http://ftpmaster.internal/ubuntu resolute/main armhf libwebp7 armhf 1.5.0-0.1build1 [189 kB] 179s Get:112 http://ftpmaster.internal/ubuntu resolute/main armhf libtiff6 armhf 4.7.0-3ubuntu3 [188 kB] 179s Get:113 http://ftpmaster.internal/ubuntu resolute/main armhf libxpm4 armhf 1:3.5.17-1build3 [31.1 kB] 179s Get:114 http://ftpmaster.internal/ubuntu resolute/main armhf libgd3 armhf 2.3.3-13ubuntu1 [109 kB] 179s Get:115 http://ftpmaster.internal/ubuntu resolute/main armhf liblua5.4-0 armhf 5.4.8-1 [134 kB] 179s Get:116 http://ftpmaster.internal/ubuntu resolute/main armhf fontconfig armhf 2.17.1-3ubuntu1 [180 kB] 179s Get:117 http://ftpmaster.internal/ubuntu resolute/main armhf libgraphite2-3 armhf 1.3.14-11ubuntu1 [65.2 kB] 179s Get:118 http://ftpmaster.internal/ubuntu resolute/main armhf libharfbuzz0b armhf 12.3.2-1 [501 kB] 179s Get:119 http://ftpmaster.internal/ubuntu resolute/main armhf libthai-data all 0.1.30-1 [155 kB] 179s Get:120 http://ftpmaster.internal/ubuntu resolute/main armhf libdatrie1 armhf 0.2.14-1 [16.4 kB] 179s Get:121 http://ftpmaster.internal/ubuntu resolute/main armhf libthai0 armhf 0.1.30-1 [15.4 kB] 179s Get:122 http://ftpmaster.internal/ubuntu resolute/main armhf libpango-1.0-0 armhf 1.57.0-1 [218 kB] 180s Get:123 http://ftpmaster.internal/ubuntu resolute/main armhf libpangoft2-1.0-0 armhf 1.57.0-1 [45.2 kB] 180s Get:124 http://ftpmaster.internal/ubuntu resolute/main armhf libpangocairo-1.0-0 armhf 1.57.0-1 [25.3 kB] 180s Get:125 http://ftpmaster.internal/ubuntu resolute/main armhf libwebpmux3 armhf 1.5.0-0.1build1 [22.4 kB] 180s Get:126 http://ftpmaster.internal/ubuntu resolute/universe armhf gnuplot-nox armhf 6.0.2+dfsg1-2ubuntu1 [915 kB] 180s Get:127 http://ftpmaster.internal/ubuntu resolute/universe armhf dh-octave-autopkgtest all 1.14.0 [11.9 kB] 180s Get:128 http://ftpmaster.internal/ubuntu resolute/main armhf libapt-pkg-perl armhf 0.1.43 [66.6 kB] 180s Get:129 http://ftpmaster.internal/ubuntu resolute/main armhf libarray-intspan-perl all 2.004-2 [25.0 kB] 180s Get:130 http://ftpmaster.internal/ubuntu resolute/main armhf libconfig-inifiles-perl all 3.000003-4 [38.5 kB] 180s Get:131 http://ftpmaster.internal/ubuntu resolute/main armhf libyaml-libyaml-perl armhf 0.904.0+ds-1 [40.4 kB] 180s Get:132 http://ftpmaster.internal/ubuntu resolute/universe armhf libconfig-model-backend-yaml-perl all 2.134-2 [10.5 kB] 180s Get:133 http://ftpmaster.internal/ubuntu resolute/universe armhf libexporter-lite-perl all 0.09-2 [9748 B] 180s Get:134 http://ftpmaster.internal/ubuntu resolute/main armhf libencode-locale-perl all 1.05-3 [11.6 kB] 180s Get:135 http://ftpmaster.internal/ubuntu resolute/main armhf libtimedate-perl all 2.3300-2 [34.0 kB] 180s Get:136 http://ftpmaster.internal/ubuntu resolute/main armhf libhttp-date-perl all 6.06-1 [10.2 kB] 180s Get:137 http://ftpmaster.internal/ubuntu resolute/main armhf libfile-listing-perl all 6.16-1 [11.3 kB] 180s Get:138 http://ftpmaster.internal/ubuntu resolute/main armhf libhtml-tagset-perl all 3.24-1 [14.1 kB] 180s Get:139 http://ftpmaster.internal/ubuntu resolute/main armhf liburi-perl all 5.34-2build1 [100 kB] 180s Get:140 http://ftpmaster.internal/ubuntu resolute/main armhf libhtml-parser-perl armhf 3.83-1build1 [83.1 kB] 180s Get:141 http://ftpmaster.internal/ubuntu resolute/main armhf libhtml-tree-perl all 5.07-3 [200 kB] 180s Get:142 http://ftpmaster.internal/ubuntu resolute/main armhf libclone-perl armhf 0.47-1 [10.0 kB] 180s Get:143 http://ftpmaster.internal/ubuntu resolute/main armhf libio-html-perl all 1.004-3 [15.9 kB] 180s Get:144 http://ftpmaster.internal/ubuntu resolute/main armhf liblwp-mediatypes-perl all 6.04-2 [20.1 kB] 180s Get:145 http://ftpmaster.internal/ubuntu resolute/main armhf libhttp-message-perl all 7.01-1ubuntu1 [76.1 kB] 180s Get:146 http://ftpmaster.internal/ubuntu resolute/main armhf libhttp-cookies-perl all 6.11-1 [18.2 kB] 180s Get:147 http://ftpmaster.internal/ubuntu resolute/main armhf libhttp-negotiate-perl all 6.01-2 [12.4 kB] 180s Get:148 http://ftpmaster.internal/ubuntu resolute/main armhf perl-openssl-defaults armhf 7build4 [6710 B] 180s Get:149 http://ftpmaster.internal/ubuntu resolute/main armhf libnet-ssleay-perl armhf 1.94-3 [298 kB] 181s Get:150 http://ftpmaster.internal/ubuntu resolute/main armhf libio-socket-ssl-perl all 2.098-1 [205 kB] 181s Get:151 http://ftpmaster.internal/ubuntu resolute/main armhf libnet-http-perl all 6.24-1build1 [21.7 kB] 181s Get:152 http://ftpmaster.internal/ubuntu resolute/main armhf liblwp-protocol-https-perl all 6.14-1 [9040 B] 181s Get:153 http://ftpmaster.internal/ubuntu resolute/main armhf libwww-robotrules-perl all 6.02-1build1 [12.4 kB] 181s Get:154 http://ftpmaster.internal/ubuntu resolute/main armhf libwww-perl all 6.81-1build1 [141 kB] 181s Get:155 http://ftpmaster.internal/ubuntu resolute/main armhf liberror-perl all 0.17030-1 [23.5 kB] 181s Get:156 http://ftpmaster.internal/ubuntu resolute/universe armhf libparse-debcontrol-perl all 2.005-6 [20.4 kB] 181s Get:157 http://ftpmaster.internal/ubuntu resolute/universe armhf libsoftware-copyright-perl all 0.015-1 [14.4 kB] 181s Get:158 http://ftpmaster.internal/ubuntu resolute/universe armhf libalgorithm-c3-perl all 0.11-2 [10.2 kB] 181s Get:159 http://ftpmaster.internal/ubuntu resolute/universe armhf libclass-c3-perl all 0.35-2 [18.4 kB] 181s Get:160 http://ftpmaster.internal/ubuntu resolute/universe armhf libmro-compat-perl all 0.15-2 [10.1 kB] 181s Get:161 http://ftpmaster.internal/ubuntu resolute/universe armhf libdata-section-perl all 0.200008-1 [11.6 kB] 181s Get:162 http://ftpmaster.internal/ubuntu resolute/universe armhf libtext-template-perl all 1.61-1 [48.5 kB] 181s Get:163 http://ftpmaster.internal/ubuntu resolute/universe armhf libsoftware-license-perl all 0.104007-1 [123 kB] 181s Get:164 http://ftpmaster.internal/ubuntu resolute/universe armhf libsoftware-licensemoreutils-perl all 1.009-1 [21.5 kB] 181s Get:165 http://ftpmaster.internal/ubuntu resolute/main armhf libsort-versions-perl all 1.62-3 [7378 B] 181s Get:166 http://ftpmaster.internal/ubuntu resolute/universe armhf libtext-reform-perl all 1.20-5 [35.4 kB] 181s Get:167 http://ftpmaster.internal/ubuntu resolute/universe armhf libtext-autoformat-perl all 1.750000-2 [29.8 kB] 181s Get:168 http://ftpmaster.internal/ubuntu resolute/universe armhf libtext-levenshtein-damerau-perl all 0.41-3 [10.8 kB] 181s Get:169 http://ftpmaster.internal/ubuntu resolute/universe armhf libtoml-tiny-perl all 0.20-1 [21.8 kB] 181s Get:170 http://ftpmaster.internal/ubuntu resolute/main armhf libclass-inspector-perl all 1.36-3 [15.4 kB] 181s Get:171 http://ftpmaster.internal/ubuntu resolute/main armhf libfile-sharedir-perl all 1.118-3 [14.0 kB] 181s Get:172 http://ftpmaster.internal/ubuntu resolute/main armhf libindirect-perl armhf 0.39-2build5 [20.6 kB] 181s Get:173 http://ftpmaster.internal/ubuntu resolute/main armhf libxs-parse-keyword-perl armhf 0.49-1 [59.5 kB] 181s Get:174 http://ftpmaster.internal/ubuntu resolute/main armhf libxs-parse-sublike-perl armhf 0.41-1 [45.8 kB] 181s Get:175 http://ftpmaster.internal/ubuntu resolute/main armhf libobject-pad-perl armhf 0.823-2 [123 kB] 181s Get:176 http://ftpmaster.internal/ubuntu resolute/main armhf libsyntax-keyword-try-perl armhf 0.31-1 [23.8 kB] 181s Get:177 http://ftpmaster.internal/ubuntu resolute/main armhf libio-interactive-perl all 1.027-1 [10.8 kB] 181s Get:178 http://ftpmaster.internal/ubuntu resolute/main armhf liblog-any-perl all 1.718-1build1 [69.6 kB] 181s Get:179 http://ftpmaster.internal/ubuntu resolute/main armhf liblog-any-adapter-screen-perl all 0.141-1 [12.9 kB] 181s Get:180 http://ftpmaster.internal/ubuntu resolute/main armhf libsub-exporter-progressive-perl all 0.001013-3 [6718 B] 181s Get:181 http://ftpmaster.internal/ubuntu resolute/main armhf libvariable-magic-perl armhf 0.64-1build1 [33.4 kB] 181s Get:182 http://ftpmaster.internal/ubuntu resolute/main armhf libb-hooks-endofscope-perl all 0.28-2 [15.8 kB] 181s Get:183 http://ftpmaster.internal/ubuntu resolute/main armhf libsub-identify-perl armhf 0.14-4 [9632 B] 181s Get:184 http://ftpmaster.internal/ubuntu resolute/main armhf libsub-name-perl armhf 0.28-1 [10.0 kB] 181s Get:185 http://ftpmaster.internal/ubuntu resolute/main armhf libnamespace-clean-perl all 0.27-2 [14.0 kB] 181s Get:186 http://ftpmaster.internal/ubuntu resolute/main armhf libnumber-compare-perl all 0.03-3 [5974 B] 181s Get:187 http://ftpmaster.internal/ubuntu resolute/main armhf libtext-glob-perl all 0.11-3 [6780 B] 181s Get:188 http://ftpmaster.internal/ubuntu resolute/main armhf libpath-iterator-rule-perl all 1.015-2 [39.9 kB] 181s Get:189 http://ftpmaster.internal/ubuntu resolute/main armhf libpod-parser-perl all 1.67-1 [80.6 kB] 182s Get:190 http://ftpmaster.internal/ubuntu resolute/main armhf libpod-constants-perl all 0.19-2 [16.3 kB] 182s Get:191 http://ftpmaster.internal/ubuntu resolute/main armhf libset-intspan-perl all 1.19-3 [24.8 kB] 182s Get:192 http://ftpmaster.internal/ubuntu resolute/main armhf libstring-copyright-perl all 0.003014-1 [20.5 kB] 182s Get:193 http://ftpmaster.internal/ubuntu resolute/main armhf libstring-escape-perl all 2010.002-3 [16.1 kB] 182s Get:194 http://ftpmaster.internal/ubuntu resolute/main armhf libregexp-pattern-license-perl all 3.11.2-1 [85.3 kB] 182s Get:195 http://ftpmaster.internal/ubuntu resolute/main armhf libregexp-pattern-perl all 0.2.14-2 [17.6 kB] 182s Get:196 http://ftpmaster.internal/ubuntu resolute/main armhf libstring-license-perl all 0.0.11-1ubuntu1 [34.3 kB] 182s Get:197 http://ftpmaster.internal/ubuntu resolute/main armhf licensecheck all 3.3.9-1ubuntu2 [37.2 kB] 182s Get:198 http://ftpmaster.internal/ubuntu resolute/main armhf diffstat armhf 1.68-1 [28.5 kB] 182s Get:199 http://ftpmaster.internal/ubuntu resolute/main armhf libberkeleydb-perl armhf 0.66-2 [109 kB] 182s Get:200 http://ftpmaster.internal/ubuntu resolute/main armhf libclass-xsaccessor-perl armhf 1.19-4build6 [32.4 kB] 182s Get:201 http://ftpmaster.internal/ubuntu resolute/main armhf libconfig-tiny-perl all 2.30-1 [14.7 kB] 182s Get:202 http://ftpmaster.internal/ubuntu resolute/main armhf libconst-fast-perl all 0.014-2 [8034 B] 182s Get:203 http://ftpmaster.internal/ubuntu resolute/main armhf libcpanel-json-xs-perl armhf 4.40-1 [114 kB] 182s Get:204 http://ftpmaster.internal/ubuntu resolute/main armhf libaliased-perl all 0.34-3 [12.8 kB] 182s Get:205 http://ftpmaster.internal/ubuntu resolute/main armhf libclass-data-inheritable-perl all 0.10-1 [8038 B] 182s Get:206 http://ftpmaster.internal/ubuntu resolute/main armhf libdevel-stacktrace-perl all 2.0500-1 [22.1 kB] 182s Get:207 http://ftpmaster.internal/ubuntu resolute/main armhf libexception-class-perl all 1.45-1 [28.6 kB] 182s Get:208 http://ftpmaster.internal/ubuntu resolute/main armhf libiterator-perl all 0.03+ds1-2 [18.8 kB] 182s Get:209 http://ftpmaster.internal/ubuntu resolute/main armhf libiterator-util-perl all 0.02+ds1-2 [14.1 kB] 182s Get:210 http://ftpmaster.internal/ubuntu resolute/main armhf libdata-dpath-perl all 0.60-1 [37.3 kB] 182s Get:211 http://ftpmaster.internal/ubuntu resolute/main armhf libnet-domain-tld-perl all 1.75-4 [29.0 kB] 182s Get:212 http://ftpmaster.internal/ubuntu resolute/main armhf libdata-validate-domain-perl all 0.15-1 [10.4 kB] 182s Get:213 http://ftpmaster.internal/ubuntu resolute/main armhf libnet-ipv6addr-perl all 1.02-1 [21.0 kB] 182s Get:214 http://ftpmaster.internal/ubuntu resolute/main armhf libnet-netmask-perl all 2.0003-1build1 [24.8 kB] 182s Get:215 http://ftpmaster.internal/ubuntu resolute/main armhf libnetaddr-ip-perl armhf 4.079+dfsg-2build5 [79.0 kB] 182s Get:216 http://ftpmaster.internal/ubuntu resolute/main armhf libdata-validate-ip-perl all 0.31-1 [17.2 kB] 182s Get:217 http://ftpmaster.internal/ubuntu resolute/main armhf libdata-validate-uri-perl all 0.07-3 [10.8 kB] 182s Get:218 http://ftpmaster.internal/ubuntu resolute/main armhf libdevel-size-perl armhf 0.85-1 [18.4 kB] 182s Get:219 http://ftpmaster.internal/ubuntu resolute/main armhf libemail-address-xs-perl armhf 1.05-1build5 [26.5 kB] 182s Get:220 http://ftpmaster.internal/ubuntu resolute/main armhf libipc-system-simple-perl all 1.30-2 [22.3 kB] 182s Get:221 http://ftpmaster.internal/ubuntu resolute/main armhf libfile-basedir-perl all 0.09-2 [14.4 kB] 182s Get:222 http://ftpmaster.internal/ubuntu resolute/main armhf libfile-find-rule-perl all 0.35-1build1 [24.0 kB] 182s Get:223 http://ftpmaster.internal/ubuntu resolute/main armhf libio-string-perl all 1.08-4 [11.1 kB] 183s Get:224 http://ftpmaster.internal/ubuntu resolute/main armhf libfont-ttf-perl all 1.06-2 [323 kB] 183s Get:225 http://ftpmaster.internal/ubuntu resolute/main armhf libhtml-html5-entities-perl all 0.004-3 [21.6 kB] 183s Get:226 http://ftpmaster.internal/ubuntu resolute/main armhf libhtml-tokeparser-simple-perl all 3.16-4 [38.0 kB] 183s Get:227 http://ftpmaster.internal/ubuntu resolute/main armhf libipc-run3-perl all 0.049-1 [28.8 kB] 183s Get:228 http://ftpmaster.internal/ubuntu resolute/main armhf libjson-maybexs-perl all 1.004008-1 [11.1 kB] 183s Get:229 http://ftpmaster.internal/ubuntu resolute/main armhf liblist-compare-perl all 0.55-2 [62.9 kB] 183s Get:230 http://ftpmaster.internal/ubuntu resolute/main armhf liblist-someutils-perl all 0.59-1 [30.4 kB] 183s Get:231 http://ftpmaster.internal/ubuntu resolute/main armhf liblist-utilsby-perl all 0.12-2 [14.9 kB] 183s Get:232 http://ftpmaster.internal/ubuntu resolute/main armhf libmldbm-perl all 2.05-4 [16.0 kB] 183s Get:233 http://ftpmaster.internal/ubuntu resolute/main armhf libclass-method-modifiers-perl all 2.15-1 [16.1 kB] 183s Get:234 http://ftpmaster.internal/ubuntu resolute/main armhf libimport-into-perl all 1.002005-2 [10.7 kB] 183s Get:235 http://ftpmaster.internal/ubuntu resolute/main armhf librole-tiny-perl all 2.002004-1 [16.3 kB] 183s Get:236 http://ftpmaster.internal/ubuntu resolute/main armhf libsub-quote-perl all 2.006009-1ubuntu1 [20.3 kB] 183s Get:237 http://ftpmaster.internal/ubuntu resolute/main armhf libmoo-perl all 2.005005-1 [47.4 kB] 183s Get:238 http://ftpmaster.internal/ubuntu resolute/main armhf libstrictures-perl all 2.000006-1build1 [15.2 kB] 183s Get:239 http://ftpmaster.internal/ubuntu resolute/main armhf libmoox-aliases-perl all 0.001006-2 [6796 B] 183s Get:240 http://ftpmaster.internal/ubuntu resolute/main armhf libperlio-gzip-perl armhf 0.20-1build5 [13.5 kB] 183s Get:241 http://ftpmaster.internal/ubuntu resolute/main armhf libperlio-utf8-strict-perl armhf 0.010-1build4 [10.5 kB] 183s Get:242 http://ftpmaster.internal/ubuntu resolute/main armhf libproc-processtable-perl armhf 0.637-1 [35.3 kB] 183s Get:243 http://ftpmaster.internal/ubuntu resolute/main armhf libregexp-wildcards-perl all 1.05-3 [12.9 kB] 183s Get:244 http://ftpmaster.internal/ubuntu resolute/main armhf libsereal-decoder-perl armhf 5.004+ds-1build5 [94.4 kB] 183s Get:245 http://ftpmaster.internal/ubuntu resolute/main armhf libsereal-encoder-perl armhf 5.004+ds-1build4 [96.1 kB] 183s Get:246 http://ftpmaster.internal/ubuntu resolute/main armhf libterm-readkey-perl armhf 2.38-2build5 [22.6 kB] 183s Get:247 http://ftpmaster.internal/ubuntu resolute/main armhf libtext-levenshteinxs-perl armhf 0.03-5build5 [7482 B] 183s Get:248 http://ftpmaster.internal/ubuntu resolute/main armhf libmarkdown2 armhf 2.2.7-2.1build1 [31.6 kB] 183s Get:249 http://ftpmaster.internal/ubuntu resolute/main armhf libtext-markdown-discount-perl armhf 0.18-1 [12.0 kB] 183s Get:250 http://ftpmaster.internal/ubuntu resolute/main armhf libdata-messagepack-perl armhf 1.02-3 [29.5 kB] 183s Get:251 http://ftpmaster.internal/ubuntu resolute/main armhf libtext-xslate-perl armhf 3.5.9-2build1 [158 kB] 183s Get:252 http://ftpmaster.internal/ubuntu resolute/main armhf libtime-duration-perl all 1.21-2 [12.3 kB] 183s Get:253 http://ftpmaster.internal/ubuntu resolute/main armhf libtime-moment-perl armhf 0.46-1 [75.9 kB] 183s Get:254 http://ftpmaster.internal/ubuntu resolute/main armhf libunicode-utf8-perl armhf 0.63-1 [17.4 kB] 183s Get:255 http://ftpmaster.internal/ubuntu resolute/main armhf libcgi-pm-perl all 4.71-1build1 [185 kB] 183s Get:256 http://ftpmaster.internal/ubuntu resolute/main armhf libhtml-form-perl all 6.13-1build1 [31.3 kB] 183s Get:257 http://ftpmaster.internal/ubuntu resolute/main armhf libwww-mechanize-perl all 2.20-1ubuntu1 [95.5 kB] 183s Get:258 http://ftpmaster.internal/ubuntu resolute/main armhf libxml-namespacesupport-perl all 1.12-2 [13.5 kB] 183s Get:259 http://ftpmaster.internal/ubuntu resolute/main armhf libxml-sax-base-perl all 1.09-3 [18.9 kB] 183s Get:260 http://ftpmaster.internal/ubuntu resolute/main armhf libxml-sax-perl all 1.02+dfsg-4 [52.4 kB] 183s Get:261 http://ftpmaster.internal/ubuntu resolute/main armhf libxml-libxml-perl armhf 2.0207+dfsg+really+2.0207-0ubuntu7 [293 kB] 183s Get:262 http://ftpmaster.internal/ubuntu resolute/main armhf lzip armhf 1.25-4 [81.6 kB] 183s Get:263 http://ftpmaster.internal/ubuntu resolute/main armhf lzop armhf 1.04-2build4 [82.7 kB] 183s Get:264 http://ftpmaster.internal/ubuntu resolute/main armhf patchutils armhf 0.4.3-1 [77.8 kB] 183s Get:265 http://ftpmaster.internal/ubuntu resolute/main armhf t1utils armhf 1.41-4build4 [52.4 kB] 183s Get:266 http://ftpmaster.internal/ubuntu resolute/main armhf unzip armhf 6.0-29ubuntu1 [167 kB] 183s Get:267 http://ftpmaster.internal/ubuntu resolute/main armhf lintian all 2.127.0ubuntu1 [1079 kB] 184s Get:268 http://ftpmaster.internal/ubuntu resolute/universe armhf libconfig-model-dpkg-perl all 3.016 [194 kB] 184s Get:269 http://ftpmaster.internal/ubuntu resolute/main armhf libconvert-binhex-perl all 1.125-3 [27.1 kB] 184s Get:270 http://ftpmaster.internal/ubuntu resolute/main armhf libnet-smtp-ssl-perl all 1.04-2 [6218 B] 184s Get:271 http://ftpmaster.internal/ubuntu resolute/main armhf libmailtools-perl all 2.22-1 [77.1 kB] 184s Get:272 http://ftpmaster.internal/ubuntu resolute/main armhf libmime-tools-perl all 5.515-1 [187 kB] 184s Get:273 http://ftpmaster.internal/ubuntu resolute/universe armhf libb-keywords-perl all 1.29-1 [10.4 kB] 184s Get:274 http://ftpmaster.internal/ubuntu resolute/universe armhf libclass-tiny-perl all 1.008-2 [16.4 kB] 184s Get:275 http://ftpmaster.internal/ubuntu resolute/universe armhf liblingua-en-inflect-perl all 1.905-2 [50.8 kB] 184s Get:276 http://ftpmaster.internal/ubuntu resolute/universe armhf libpod-spell-perl all 1.27-1 [30.4 kB] 184s Get:277 http://ftpmaster.internal/ubuntu resolute/universe armhf libsafe-isa-perl all 1.000010-1build1 [7334 B] 184s Get:278 http://ftpmaster.internal/ubuntu resolute/universe armhf libtask-weaken-perl all 1.06-2 [7924 B] 184s Get:279 http://ftpmaster.internal/ubuntu resolute/universe armhf libppi-perl all 1.284-1 [281 kB] 184s Get:280 http://ftpmaster.internal/ubuntu resolute/universe armhf libreadonly-perl all 2.050-3 [19.9 kB] 184s Get:281 http://ftpmaster.internal/ubuntu resolute/universe armhf libppix-quotelike-perl all 0.023-1 [71.6 kB] 184s Get:282 http://ftpmaster.internal/ubuntu resolute/universe armhf libppix-regexp-perl all 0.091-1 [234 kB] 184s Get:283 http://ftpmaster.internal/ubuntu resolute/universe armhf libppix-utils-perl all 0.003-2 [28.4 kB] 184s Get:284 http://ftpmaster.internal/ubuntu resolute/universe armhf libstring-format-perl all 1.18-1build1 [8824 B] 184s Get:285 http://ftpmaster.internal/ubuntu resolute/universe armhf perltidy all 20250105-1build1 [645 kB] 184s Get:286 http://ftpmaster.internal/ubuntu resolute/universe armhf libperl-critic-perl all 1.156-1 [654 kB] 184s Get:287 http://ftpmaster.internal/ubuntu resolute/universe armhf libtext-wrapper-perl all 1.05-4 [9820 B] 184s Get:288 http://ftpmaster.internal/ubuntu resolute/main armhf libsuitesparseconfig7 armhf 1:7.12.1+dfsg-1 [21.4 kB] 184s Get:289 http://ftpmaster.internal/ubuntu resolute/universe armhf libamd3 armhf 1:7.12.1+dfsg-1 [37.5 kB] 184s Get:290 http://ftpmaster.internal/ubuntu resolute/main armhf libblas3 armhf 3.12.1-7ubuntu1 [133 kB] 184s Get:291 http://ftpmaster.internal/ubuntu resolute/main armhf libgfortran5 armhf 15.2.0-12ubuntu1 [334 kB] 184s Get:292 http://ftpmaster.internal/ubuntu resolute/main armhf liblapack3 armhf 3.12.1-7ubuntu1 [2090 kB] 184s Get:293 http://ftpmaster.internal/ubuntu resolute/universe armhf libarpack2t64 armhf 3.9.1-6 [88.7 kB] 184s Get:294 http://ftpmaster.internal/ubuntu resolute/universe armhf libccolamd3 armhf 1:7.12.1+dfsg-1 [36.1 kB] 184s Get:295 http://ftpmaster.internal/ubuntu resolute/universe armhf libcamd3 armhf 1:7.12.1+dfsg-1 [34.5 kB] 184s Get:296 http://ftpmaster.internal/ubuntu resolute/main armhf libcolamd3 armhf 1:7.12.1+dfsg-1 [28.2 kB] 184s Get:297 http://ftpmaster.internal/ubuntu resolute/universe armhf libcholmod5 armhf 1:7.12.1+dfsg-1 [684 kB] 184s Get:298 http://ftpmaster.internal/ubuntu resolute/universe armhf libcxsparse4 armhf 1:7.12.1+dfsg-1 [79.7 kB] 184s Get:299 http://ftpmaster.internal/ubuntu resolute/main armhf libfftw3-double3 armhf 3.3.10-2fakesync1build2 [368 kB] 184s Get:300 http://ftpmaster.internal/ubuntu resolute/main armhf libfftw3-single3 armhf 3.3.10-2fakesync1build2 [583 kB] 185s Get:301 http://ftpmaster.internal/ubuntu resolute/main armhf libxfixes3 armhf 1:6.0.0-2build2 [9382 B] 185s Get:302 http://ftpmaster.internal/ubuntu resolute/main armhf libxcursor1 armhf 1:1.2.3-1build1 [18.5 kB] 185s Get:303 http://ftpmaster.internal/ubuntu resolute/main armhf libxft2 armhf 2.3.6-1build2 [37.2 kB] 185s Get:304 http://ftpmaster.internal/ubuntu resolute/main armhf libxinerama1 armhf 2:1.1.4-3build2 [5932 B] 185s Get:305 http://ftpmaster.internal/ubuntu resolute/universe armhf libfltk1.3t64 armhf 1.3.11-3 [557 kB] 185s Get:306 http://ftpmaster.internal/ubuntu resolute/main armhf libglvnd0 armhf 1.7.0-3 [71.3 kB] 185s Get:307 http://ftpmaster.internal/ubuntu resolute/main armhf libllvm21 armhf 1:21.1.8-1ubuntu1 [30.3 MB] 190s Get:308 http://ftpmaster.internal/ubuntu resolute/main armhf libx11-xcb1 armhf 2:1.8.12-1build1 [7920 B] 190s Get:309 http://ftpmaster.internal/ubuntu resolute/main armhf libxcb-dri3-0 armhf 1.17.0-2ubuntu1 [7342 B] 190s Get:310 http://ftpmaster.internal/ubuntu resolute/main armhf libxcb-present0 armhf 1.17.0-2ubuntu1 [6080 B] 190s Get:311 http://ftpmaster.internal/ubuntu resolute/main armhf libxcb-randr0 armhf 1.17.0-2ubuntu1 [16.9 kB] 190s Get:312 http://ftpmaster.internal/ubuntu resolute/main armhf libxcb-sync1 armhf 1.17.0-2ubuntu1 [8840 B] 190s Get:313 http://ftpmaster.internal/ubuntu resolute/main armhf libxcb-xfixes0 armhf 1.17.0-2ubuntu1 [10.2 kB] 190s Get:314 http://ftpmaster.internal/ubuntu resolute/main armhf libxshmfence1 armhf 1.3.3-1build1 [5000 B] 190s Get:315 http://ftpmaster.internal/ubuntu resolute/main armhf mesa-libgallium armhf 25.3.3-1ubuntu1 [8874 kB] 192s Get:316 http://ftpmaster.internal/ubuntu resolute/main armhf libgbm1 armhf 25.3.3-1ubuntu1 [30.0 kB] 192s Get:317 http://ftpmaster.internal/ubuntu resolute/main armhf libvulkan1 armhf 1.4.335.0-1 [137 kB] 192s Get:318 http://ftpmaster.internal/ubuntu resolute/main armhf libgl1-mesa-dri armhf 25.3.3-1ubuntu1 [32.7 kB] 192s Get:319 http://ftpmaster.internal/ubuntu resolute/main armhf libxcb-glx0 armhf 1.17.0-2ubuntu1 [22.8 kB] 192s Get:320 http://ftpmaster.internal/ubuntu resolute/main armhf libxxf86vm1 armhf 1:1.1.4-2 [9110 B] 192s Get:321 http://ftpmaster.internal/ubuntu resolute/main armhf libglx-mesa0 armhf 25.3.3-1ubuntu1 [87.3 kB] 192s Get:322 http://ftpmaster.internal/ubuntu resolute/main armhf libglx0 armhf 1.7.0-3 [37.9 kB] 192s Get:323 http://ftpmaster.internal/ubuntu resolute/main armhf libgl1 armhf 1.7.0-3 [102 kB] 192s Get:324 http://ftpmaster.internal/ubuntu resolute/universe armhf libfltk-gl1.3t64 armhf 1.3.11-3 [36.7 kB] 192s Get:325 http://ftpmaster.internal/ubuntu resolute/universe armhf libgl2ps1.4 armhf 1.4.2+dfsg1-4 [41.1 kB] 192s Get:326 http://ftpmaster.internal/ubuntu resolute/main armhf libltdl7 armhf 2.5.4-9 [40.4 kB] 192s Get:327 http://ftpmaster.internal/ubuntu resolute/universe armhf libglpk40 armhf 5.0-2 [325 kB] 192s Get:328 http://ftpmaster.internal/ubuntu resolute/main armhf libopengl0 armhf 1.7.0-3 [35.6 kB] 192s Get:329 http://ftpmaster.internal/ubuntu resolute/universe armhf libglu1-mesa armhf 9.0.2-1.1build2 [157 kB] 192s Get:330 http://ftpmaster.internal/ubuntu resolute/main armhf liblcms2-2 armhf 2.17-1 [139 kB] 192s Get:331 http://ftpmaster.internal/ubuntu resolute/main armhf libjxl0.11 armhf 0.11.1-6ubuntu1 [1108 kB] 192s Get:332 http://ftpmaster.internal/ubuntu resolute/main armhf libwmflite-0.2-7 armhf 0.2.13-2 [63.1 kB] 192s Get:333 http://ftpmaster.internal/ubuntu resolute/universe armhf libgraphicsmagick-q16-3t64 armhf 1.4+really1.3.45+hg17696-1build1 [1230 kB] 192s Get:334 http://ftpmaster.internal/ubuntu resolute/universe armhf libgraphicsmagick++-q16-12t64 armhf 1.4+really1.3.45+hg17696-1build1 [107 kB] 192s Get:335 http://ftpmaster.internal/ubuntu resolute/universe armhf libsz2 armhf 1.1.5-1 [16.3 kB] 192s Get:336 http://ftpmaster.internal/ubuntu resolute/universe armhf libhdf5-310 armhf 1.14.6+repack-2 [1423 kB] 192s Get:337 http://ftpmaster.internal/ubuntu resolute/main armhf libasound2-data all 1.2.15.3-1ubuntu1 [21.4 kB] 192s Get:338 http://ftpmaster.internal/ubuntu resolute/main armhf libasound2t64 armhf 1.2.15.3-1ubuntu1 [362 kB] 192s Get:339 http://ftpmaster.internal/ubuntu resolute/main armhf libopus0 armhf 1.6.1-1 [3510 kB] 193s Get:340 http://ftpmaster.internal/ubuntu resolute/main armhf libsamplerate0 armhf 0.2.2-4build2 [1340 kB] 193s Get:341 http://ftpmaster.internal/ubuntu resolute/main armhf libjack-jackd2-0 armhf 1.9.22~dfsg-5 [247 kB] 193s Get:342 http://ftpmaster.internal/ubuntu resolute/main armhf libasyncns0 armhf 0.8-7 [10.8 kB] 193s Get:343 http://ftpmaster.internal/ubuntu resolute/main armhf libogg0 armhf 1.3.6-2 [20.6 kB] 193s Get:344 http://ftpmaster.internal/ubuntu resolute/main armhf libflac14 armhf 1.5.0+ds-5 [136 kB] 193s Get:345 http://ftpmaster.internal/ubuntu resolute/main armhf libmp3lame0 armhf 3.100-6build2 [126 kB] 193s Get:346 http://ftpmaster.internal/ubuntu resolute/main armhf libmpg123-0t64 armhf 1.33.3-2 [160 kB] 193s Get:347 http://ftpmaster.internal/ubuntu resolute/main armhf libvorbis0a armhf 1.3.7-3build1 [86.6 kB] 193s Get:348 http://ftpmaster.internal/ubuntu resolute/main armhf libvorbisenc2 armhf 1.3.7-3build1 [72.7 kB] 193s Get:349 http://ftpmaster.internal/ubuntu resolute/main armhf libsndfile1 armhf 1.2.2-4 [201 kB] 193s Get:350 http://ftpmaster.internal/ubuntu resolute/main armhf libpulse0 armhf 1:17.0+dfsg1-2ubuntu4 [280 kB] 193s Get:351 http://ftpmaster.internal/ubuntu resolute/universe armhf libportaudio2 armhf 19.7.0+git20251227.3270c9ae-0ubuntu1 [70.2 kB] 193s Get:352 http://ftpmaster.internal/ubuntu resolute/universe armhf libqhull-r8.0 armhf 2020.2-8 [175 kB] 193s Get:353 http://ftpmaster.internal/ubuntu resolute/universe armhf libqrupdate1 armhf 1.1.5-3 [30.8 kB] 193s Get:354 http://ftpmaster.internal/ubuntu resolute/universe armhf libqscintilla2-qt6-l10n all 2.14.1+dfsg-2 [55.5 kB] 193s Get:355 http://ftpmaster.internal/ubuntu resolute/universe armhf libb2-1 armhf 0.98.1-1.1build2 [26.2 kB] 193s Get:356 http://ftpmaster.internal/ubuntu resolute/universe armhf libdouble-conversion3 armhf 3.4.0-1 [39.3 kB] 193s Get:357 http://ftpmaster.internal/ubuntu resolute/main armhf libpcre2-16-0 armhf 10.46-1 [206 kB] 193s Get:358 http://ftpmaster.internal/ubuntu resolute/universe armhf libqt6core6t64 armhf 6.9.2+dfsg-3ubuntu2 [1791 kB] 193s Get:359 http://ftpmaster.internal/ubuntu resolute/main armhf libwayland-client0 armhf 1.24.0-2 [24.6 kB] 193s Get:360 http://ftpmaster.internal/ubuntu resolute/main armhf libegl-mesa0 armhf 25.3.3-1ubuntu1 [96.0 kB] 193s Get:361 http://ftpmaster.internal/ubuntu resolute/main armhf libegl1 armhf 1.7.0-3 [30.2 kB] 193s Get:362 http://ftpmaster.internal/ubuntu resolute/main armhf x11-common all 1:7.7+24ubuntu1 [22.4 kB] 193s Get:363 http://ftpmaster.internal/ubuntu resolute/main armhf libice6 armhf 2:1.1.1-1build1 [37.5 kB] 193s Get:364 http://ftpmaster.internal/ubuntu resolute/main armhf libmtdev1t64 armhf 1.1.7-1build1 [13.2 kB] 193s Get:365 http://ftpmaster.internal/ubuntu resolute/main armhf libwacom-common all 2.16.1-1 [113 kB] 193s Get:366 http://ftpmaster.internal/ubuntu resolute/main armhf libwacom9 armhf 2.16.1-1 [24.7 kB] 193s Get:367 http://ftpmaster.internal/ubuntu resolute/main armhf libinput-bin armhf 1.30.1-1 [27.7 kB] 193s Get:368 http://ftpmaster.internal/ubuntu resolute/main armhf libinput10 armhf 1.30.1-1 [144 kB] 193s Get:369 http://ftpmaster.internal/ubuntu resolute/universe armhf libmd4c0 armhf 0.5.2-2build1 [38.6 kB] 193s Get:370 http://ftpmaster.internal/ubuntu resolute/universe armhf libqt6dbus6 armhf 6.9.2+dfsg-3ubuntu2 [247 kB] 193s Get:371 http://ftpmaster.internal/ubuntu resolute/main armhf libsm6 armhf 2:1.2.6-1 [15.3 kB] 193s Get:372 http://ftpmaster.internal/ubuntu resolute/universe armhf libts0t64 armhf 1.22-1.1build2 [60.9 kB] 193s Get:373 http://ftpmaster.internal/ubuntu resolute/main armhf libxcb-util1 armhf 0.4.1-1build1 [9628 B] 193s Get:374 http://ftpmaster.internal/ubuntu resolute/universe armhf libxcb-image0 armhf 0.4.0-2build2 [9776 B] 193s Get:375 http://ftpmaster.internal/ubuntu resolute/universe armhf libxcb-render-util0 armhf 0.3.10-1build1 [9460 B] 193s Get:376 http://ftpmaster.internal/ubuntu resolute/universe armhf libxcb-cursor0 armhf 0.1.5-1build1 [9986 B] 193s Get:377 http://ftpmaster.internal/ubuntu resolute/universe armhf libxcb-icccm4 armhf 0.4.2-1build1 [9914 B] 193s Get:378 http://ftpmaster.internal/ubuntu resolute/universe armhf libxcb-keysyms1 armhf 0.4.1-1build1 [8090 B] 193s Get:379 http://ftpmaster.internal/ubuntu resolute/main armhf libxcb-shape0 armhf 1.17.0-2ubuntu1 [6186 B] 193s Get:380 http://ftpmaster.internal/ubuntu resolute/main armhf libxcb-xinput0 armhf 1.17.0-2ubuntu1 [29.2 kB] 193s Get:381 http://ftpmaster.internal/ubuntu resolute/main armhf libxcb-xkb1 armhf 1.17.0-2ubuntu1 [28.4 kB] 193s Get:382 http://ftpmaster.internal/ubuntu resolute/main armhf libxkbcommon-x11-0 armhf 1.12.3-1 [14.8 kB] 193s Get:383 http://ftpmaster.internal/ubuntu resolute/universe armhf libqt6gui6 armhf 6.9.2+dfsg-3ubuntu2 [3070 kB] 194s Get:384 http://ftpmaster.internal/ubuntu resolute/main armhf libavahi-common-data armhf 0.8-17ubuntu2 [31.5 kB] 194s Get:385 http://ftpmaster.internal/ubuntu resolute/main armhf libavahi-common3 armhf 0.8-17ubuntu2 [20.4 kB] 194s Get:386 http://ftpmaster.internal/ubuntu resolute/main armhf libavahi-client3 armhf 0.8-17ubuntu2 [24.4 kB] 194s Get:387 http://ftpmaster.internal/ubuntu resolute/main armhf libcups2t64 armhf 2.4.16-1ubuntu1 [242 kB] 194s Get:388 http://ftpmaster.internal/ubuntu resolute/universe armhf libqt6widgets6 armhf 6.9.2+dfsg-3ubuntu2 [2549 kB] 194s Get:389 http://ftpmaster.internal/ubuntu resolute/universe armhf libqt6printsupport6 armhf 6.9.2+dfsg-3ubuntu2 [210 kB] 194s Get:390 http://ftpmaster.internal/ubuntu resolute/universe armhf libqscintilla2-qt6-15 armhf 2.14.1+dfsg-2 [1057 kB] 194s Get:391 http://ftpmaster.internal/ubuntu resolute/universe armhf libqt6core5compat6 armhf 6.9.2-3build1 [131 kB] 194s Get:392 http://ftpmaster.internal/ubuntu resolute/universe armhf libqt6sql6 armhf 6.9.2+dfsg-3ubuntu2 [129 kB] 194s Get:393 http://ftpmaster.internal/ubuntu resolute/universe armhf libqt6help6 armhf 6.9.2-5 [178 kB] 194s Get:394 http://ftpmaster.internal/ubuntu resolute/main armhf libduktape207 armhf 2.7.0+tests-0ubuntu4 [123 kB] 194s Get:395 http://ftpmaster.internal/ubuntu resolute/main armhf libproxy1v5 armhf 0.5.12-1 [25.7 kB] 194s Get:396 http://ftpmaster.internal/ubuntu resolute/universe armhf libqt6network6 armhf 6.9.2+dfsg-3ubuntu2 [768 kB] 194s Get:397 http://ftpmaster.internal/ubuntu resolute/universe armhf libqt6opengl6 armhf 6.9.2+dfsg-3ubuntu2 [391 kB] 194s Get:398 http://ftpmaster.internal/ubuntu resolute/universe armhf libqt6openglwidgets6 armhf 6.9.2+dfsg-3ubuntu2 [41.6 kB] 194s Get:399 http://ftpmaster.internal/ubuntu resolute/universe armhf libqt6xml6 armhf 6.9.2+dfsg-3ubuntu2 [74.0 kB] 194s Get:400 http://ftpmaster.internal/ubuntu resolute/universe armhf libspqr4 armhf 1:7.12.1+dfsg-1 [139 kB] 194s Get:401 http://ftpmaster.internal/ubuntu resolute/universe armhf libumfpack6 armhf 1:7.12.1+dfsg-1 [300 kB] 194s Get:402 http://ftpmaster.internal/ubuntu resolute/universe armhf libtext-unidecode-perl all 1.30-3 [105 kB] 194s Get:403 http://ftpmaster.internal/ubuntu resolute/main armhf libintl-perl all 1.35-1 [701 kB] 194s Get:404 http://ftpmaster.internal/ubuntu resolute/universe armhf texinfo-lib armhf 7.2-5 [409 kB] 194s Get:405 http://ftpmaster.internal/ubuntu resolute/universe armhf tex-common all 6.20 [30.0 kB] 194s Get:406 http://ftpmaster.internal/ubuntu resolute/universe armhf texinfo all 7.2-5 [1217 kB] 195s Get:407 http://ftpmaster.internal/ubuntu resolute/universe armhf octave-common all 10.3.0-3 [6088 kB] 196s Get:408 http://ftpmaster.internal/ubuntu resolute/universe armhf octave armhf 10.3.0-3 [9155 kB] 196s Get:409 http://ftpmaster.internal/ubuntu resolute/main armhf libncurses-dev armhf 6.6+20251231-1 [348 kB] 196s Get:410 http://ftpmaster.internal/ubuntu resolute/main armhf libreadline-dev armhf 8.3-3 [165 kB] 196s Get:411 http://ftpmaster.internal/ubuntu resolute/universe armhf libhdf5-fortran-310 armhf 1.14.6+repack-2 [95.9 kB] 196s Get:412 http://ftpmaster.internal/ubuntu resolute/universe armhf libhdf5-hl-310 armhf 1.14.6+repack-2 [58.9 kB] 196s Get:413 http://ftpmaster.internal/ubuntu resolute/universe armhf libhdf5-hl-fortran-310 armhf 1.14.6+repack-2 [26.8 kB] 196s Get:414 http://ftpmaster.internal/ubuntu resolute/universe armhf libhdf5-cpp-310 armhf 1.14.6+repack-2 [125 kB] 196s Get:415 http://ftpmaster.internal/ubuntu resolute/universe armhf libhdf5-hl-cpp-310 armhf 1.14.6+repack-2 [11.1 kB] 196s Get:416 http://ftpmaster.internal/ubuntu resolute/main armhf zlib1g-dev armhf 1:1.3.dfsg+really1.3.1-1ubuntu2 [881 kB] 197s Get:417 http://ftpmaster.internal/ubuntu resolute/main armhf libjpeg-turbo8-dev armhf 2.1.5-4ubuntu2 [264 kB] 197s Get:418 http://ftpmaster.internal/ubuntu resolute/main armhf libjpeg8-dev armhf 8c-2ubuntu11 [1484 B] 197s Get:419 http://ftpmaster.internal/ubuntu resolute/main armhf libjpeg-dev armhf 8c-2ubuntu11 [1482 B] 197s Get:420 http://ftpmaster.internal/ubuntu resolute/universe armhf libaec0 armhf 1.1.5-1 [20.8 kB] 197s Get:421 http://ftpmaster.internal/ubuntu resolute/universe armhf libaec-dev armhf 1.1.5-1 [21.3 kB] 197s Get:422 http://ftpmaster.internal/ubuntu resolute/main armhf libbrotli-dev armhf 1.1.0-2build6 [337 kB] 197s Get:423 http://ftpmaster.internal/ubuntu resolute/main armhf libidn2-dev armhf 2.3.8-4 [116 kB] 197s Get:424 http://ftpmaster.internal/ubuntu resolute/main armhf comerr-dev armhf 2.1-1.47.2-3ubuntu2 [44.1 kB] 197s Get:425 http://ftpmaster.internal/ubuntu resolute/main armhf libgssrpc4t64 armhf 1.22.1-2 [51.8 kB] 197s Get:426 http://ftpmaster.internal/ubuntu resolute/main armhf libkadm5clnt-mit12 armhf 1.22.1-2 [35.7 kB] 197s Get:427 http://ftpmaster.internal/ubuntu resolute/main armhf libkdb5-10t64 armhf 1.22.1-2 [36.0 kB] 197s Get:428 http://ftpmaster.internal/ubuntu resolute/main armhf libkadm5srv-mit12 armhf 1.22.1-2 [46.7 kB] 197s Get:429 http://ftpmaster.internal/ubuntu resolute/main armhf krb5-multidev armhf 1.22.1-2 [126 kB] 197s Get:430 http://ftpmaster.internal/ubuntu resolute/main armhf libkrb5-dev armhf 1.22.1-2 [11.9 kB] 197s Get:431 http://ftpmaster.internal/ubuntu resolute/main armhf libldap-dev armhf 2.6.10+dfsg-1ubuntu5 [290 kB] 197s Get:432 http://ftpmaster.internal/ubuntu resolute/main armhf libpkgconf3 armhf 1.8.1-4build1 [26.6 kB] 197s Get:433 http://ftpmaster.internal/ubuntu resolute/main armhf pkgconf-bin armhf 1.8.1-4build1 [21.4 kB] 197s Get:434 http://ftpmaster.internal/ubuntu resolute/main armhf pkgconf armhf 1.8.1-4build1 [16.8 kB] 197s Get:435 http://ftpmaster.internal/ubuntu resolute/main armhf libnghttp2-dev armhf 1.64.0-1.1ubuntu1 [107 kB] 197s Get:436 http://ftpmaster.internal/ubuntu resolute/main armhf libpsl-dev armhf 0.21.2-1.1build2 [77.8 kB] 197s Get:437 http://ftpmaster.internal/ubuntu resolute/main armhf libgmpxx4ldbl armhf 2:6.3.0+dfsg-5ubuntu1 [9224 B] 197s Get:438 http://ftpmaster.internal/ubuntu resolute/main armhf libgmp-dev armhf 2:6.3.0+dfsg-5ubuntu1 [292 kB] 197s Get:439 http://ftpmaster.internal/ubuntu resolute/main armhf libevent-2.1-7t64 armhf 2.1.12-stable-10build1 [130 kB] 197s Get:440 http://ftpmaster.internal/ubuntu resolute/main armhf libunbound8 armhf 1.24.2-1ubuntu1 [433 kB] 197s Get:441 http://ftpmaster.internal/ubuntu resolute/main armhf libgnutls-dane0t64 armhf 3.8.10-3ubuntu1 [32.6 kB] 197s Get:442 http://ftpmaster.internal/ubuntu resolute/main armhf libgnutls-openssl27t64 armhf 3.8.10-3ubuntu1 [32.3 kB] 197s Get:443 http://ftpmaster.internal/ubuntu resolute/main armhf libp11-kit-dev armhf 0.25.10-1 [29.3 kB] 197s Get:444 http://ftpmaster.internal/ubuntu resolute/main armhf libtasn1-6-dev armhf 4.21.0-2 [86.7 kB] 197s Get:445 http://ftpmaster.internal/ubuntu resolute/main armhf nettle-dev armhf 3.10.2-1 [1174 kB] 197s Get:446 http://ftpmaster.internal/ubuntu resolute/main armhf libgnutls28-dev armhf 3.8.10-3ubuntu1 [1043 kB] 197s Get:447 http://ftpmaster.internal/ubuntu resolute/main armhf librtmp-dev armhf 2.4+20151223.gitfa8646d.1-3 [63.4 kB] 197s Get:448 http://ftpmaster.internal/ubuntu resolute/main armhf libssl-dev armhf 3.5.3-1ubuntu2 [2550 kB] 197s Get:449 http://ftpmaster.internal/ubuntu resolute/main armhf libssh2-1-dev armhf 1.11.1-1build1 [270 kB] 197s Get:450 http://ftpmaster.internal/ubuntu resolute/main armhf libzstd-dev armhf 1.5.7+dfsg-3 [342 kB] 197s Get:451 http://ftpmaster.internal/ubuntu resolute/main armhf libcurl4-openssl-dev armhf 8.18.0-1ubuntu1 [505 kB] 197s Get:452 http://ftpmaster.internal/ubuntu resolute/universe armhf hdf5-helpers armhf 1.14.6+repack-2 [17.3 kB] 197s Get:453 http://ftpmaster.internal/ubuntu resolute/universe armhf libhdf5-dev armhf 1.14.6+repack-2 [3352 kB] 197s Get:454 http://ftpmaster.internal/ubuntu resolute/main armhf xorg-sgml-doctools all 1:1.11-1.1build1 [10.3 kB] 197s Get:455 http://ftpmaster.internal/ubuntu resolute/main armhf x11proto-dev all 2025.1-1 [608 kB] 197s Get:456 http://ftpmaster.internal/ubuntu resolute/main armhf libxau-dev armhf 1:1.0.11-1build1 [9048 B] 197s Get:457 http://ftpmaster.internal/ubuntu resolute/main armhf libxdmcp-dev armhf 1:1.1.5-2 [24.7 kB] 197s Get:458 http://ftpmaster.internal/ubuntu resolute/main armhf xtrans-dev all 1.6.0-1build1 [66.2 kB] 197s Get:459 http://ftpmaster.internal/ubuntu resolute/main armhf libxcb1-dev armhf 1.17.0-2ubuntu1 [85.8 kB] 197s Get:460 http://ftpmaster.internal/ubuntu resolute/main armhf libx11-dev armhf 2:1.8.12-1build1 [678 kB] 197s Get:461 http://ftpmaster.internal/ubuntu resolute/main armhf libglx-dev armhf 1.7.0-3 [14.1 kB] 197s Get:462 http://ftpmaster.internal/ubuntu resolute/main armhf libgl-dev armhf 1.7.0-3 [103 kB] 197s Get:463 http://ftpmaster.internal/ubuntu resolute/main armhf libblas-dev armhf 3.12.1-7ubuntu1 [141 kB] 197s Get:464 http://ftpmaster.internal/ubuntu resolute/main armhf liblapack-dev armhf 3.12.1-7ubuntu1 [2207 kB] 198s Get:465 http://ftpmaster.internal/ubuntu resolute/main armhf libfftw3-bin armhf 3.3.10-2fakesync1build2 [30.2 kB] 198s Get:466 http://ftpmaster.internal/ubuntu resolute/main armhf libfftw3-dev armhf 3.3.10-2fakesync1build2 [926 kB] 198s Get:467 http://ftpmaster.internal/ubuntu resolute/main armhf libgfortran-15-dev armhf 15.2.0-12ubuntu1 [380 kB] 198s Get:468 http://ftpmaster.internal/ubuntu resolute/main armhf gfortran-15-arm-linux-gnueabihf armhf 15.2.0-12ubuntu1 [10.7 MB] 198s Get:469 http://ftpmaster.internal/ubuntu resolute/main armhf gfortran-15 armhf 15.2.0-12ubuntu1 [18.1 kB] 198s Get:470 http://ftpmaster.internal/ubuntu resolute/main armhf gfortran-arm-linux-gnueabihf armhf 4:15.2.0-4ubuntu1 [1020 B] 198s Get:471 http://ftpmaster.internal/ubuntu resolute/main armhf gfortran armhf 4:15.2.0-4ubuntu1 [1162 B] 198s Get:472 http://ftpmaster.internal/ubuntu resolute/main armhf libstdc++-15-dev armhf 15.2.0-12ubuntu1 [2638 kB] 198s Get:473 http://ftpmaster.internal/ubuntu resolute/main armhf g++-15-arm-linux-gnueabihf armhf 15.2.0-12ubuntu1 [11.4 MB] 199s Get:474 http://ftpmaster.internal/ubuntu resolute/main armhf g++-15 armhf 15.2.0-12ubuntu1 [25.3 kB] 199s Get:475 http://ftpmaster.internal/ubuntu resolute/main armhf g++-arm-linux-gnueabihf armhf 4:15.2.0-4ubuntu1 [968 B] 199s Get:476 http://ftpmaster.internal/ubuntu resolute/main armhf g++ armhf 4:15.2.0-4ubuntu1 [1086 B] 199s Get:477 http://ftpmaster.internal/ubuntu resolute/universe armhf octave-dev armhf 10.3.0-3 [464 kB] 199s Get:478 http://ftpmaster.internal/ubuntu resolute/universe armhf dh-octave all 1.14.0 [21.1 kB] 199s Get:479 http://ftpmaster.internal/ubuntu resolute/main armhf libfontenc1 armhf 1:1.1.8-1build2 [11.7 kB] 199s Get:480 http://ftpmaster.internal/ubuntu resolute/main armhf libxt6t64 armhf 1:1.2.1-1.3 [145 kB] 199s Get:481 http://ftpmaster.internal/ubuntu resolute/main armhf libxmu6 armhf 2:1.1.3-4 [41.2 kB] 199s Get:482 http://ftpmaster.internal/ubuntu resolute/main armhf libxaw7 armhf 2:1.0.16-1build1 [156 kB] 199s Get:483 http://ftpmaster.internal/ubuntu resolute/main armhf libxfont2 armhf 1:2.0.6-2 [82.7 kB] 199s Get:484 http://ftpmaster.internal/ubuntu resolute/main armhf libxkbfile1 armhf 1:1.1.0-1build5 [60.6 kB] 199s Get:485 http://ftpmaster.internal/ubuntu resolute/main armhf libxrandr2 armhf 2:1.5.4-1build1 [15.6 kB] 199s Get:486 http://ftpmaster.internal/ubuntu resolute/universe armhf octave-io armhf 2.7.0-3 [239 kB] 199s Get:487 http://ftpmaster.internal/ubuntu resolute/universe armhf octave-statistics-common all 1.7.6-2 [1008 kB] 199s Get:488 http://ftpmaster.internal/ubuntu resolute/universe armhf octave-statistics armhf 1.7.6-2 [131 kB] 199s Get:489 http://ftpmaster.internal/ubuntu resolute/main armhf x11-xkb-utils armhf 7.7+9build1 [159 kB] 199s Get:490 http://ftpmaster.internal/ubuntu resolute/main armhf xserver-common all 2:21.1.21-1ubuntu1 [34.8 kB] 199s Get:491 http://ftpmaster.internal/ubuntu resolute/universe armhf xvfb armhf 2:21.1.21-1ubuntu1 [744 kB] 201s Fetched 202 MB in 26s (7789 kB/s) 201s Selecting previously unselected package libfyaml0:armhf. 201s (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 ... 68395 files and directories currently installed.) 201s Preparing to unpack .../000-libfyaml0_0.9.3-1_armhf.deb ... 201s Unpacking libfyaml0:armhf (0.9.3-1) ... 201s Selecting previously unselected package libstemmer0d:armhf. 201s Preparing to unpack .../001-libstemmer0d_3.0.1-1_armhf.deb ... 201s Unpacking libstemmer0d:armhf (3.0.1-1) ... 201s Selecting previously unselected package libappstream5:armhf. 201s Preparing to unpack .../002-libappstream5_1.1.1-1_armhf.deb ... 201s Unpacking libappstream5:armhf (1.1.1-1) ... 201s Selecting previously unselected package appstream. 201s Preparing to unpack .../003-appstream_1.1.1-1_armhf.deb ... 201s Unpacking appstream (1.1.1-1) ... 201s Selecting previously unselected package m4. 201s Preparing to unpack .../004-m4_1.4.20-2_armhf.deb ... 201s Unpacking m4 (1.4.20-2) ... 201s Selecting previously unselected package autoconf. 201s Preparing to unpack .../005-autoconf_2.72-3.1ubuntu1_all.deb ... 201s Unpacking autoconf (2.72-3.1ubuntu1) ... 201s Selecting previously unselected package autotools-dev. 201s Preparing to unpack .../006-autotools-dev_20240727.1_all.deb ... 201s Unpacking autotools-dev (20240727.1) ... 201s Selecting previously unselected package automake. 201s Preparing to unpack .../007-automake_1%3a1.18.1-3build1_all.deb ... 201s Unpacking automake (1:1.18.1-3build1) ... 201s Selecting previously unselected package autopoint. 201s Preparing to unpack .../008-autopoint_0.23.2-1_all.deb ... 201s Unpacking autopoint (0.23.2-1) ... 201s Selecting previously unselected package libcapture-tiny-perl. 201s Preparing to unpack .../009-libcapture-tiny-perl_0.50-1_all.deb ... 201s Unpacking libcapture-tiny-perl (0.50-1) ... 201s Selecting previously unselected package libparams-util-perl. 201s Preparing to unpack .../010-libparams-util-perl_1.102-3build1_armhf.deb ... 201s Unpacking libparams-util-perl (1.102-3build1) ... 201s Selecting previously unselected package libsub-install-perl. 201s Preparing to unpack .../011-libsub-install-perl_0.929-1_all.deb ... 201s Unpacking libsub-install-perl (0.929-1) ... 201s Selecting previously unselected package libdata-optlist-perl. 201s Preparing to unpack .../012-libdata-optlist-perl_0.114-1_all.deb ... 201s Unpacking libdata-optlist-perl (0.114-1) ... 201s Selecting previously unselected package libb-hooks-op-check-perl:armhf. 201s Preparing to unpack .../013-libb-hooks-op-check-perl_0.22-3build2_armhf.deb ... 201s Unpacking libb-hooks-op-check-perl:armhf (0.22-3build2) ... 201s Selecting previously unselected package libdynaloader-functions-perl. 201s Preparing to unpack .../014-libdynaloader-functions-perl_0.004-2_all.deb ... 201s Unpacking libdynaloader-functions-perl (0.004-2) ... 201s Selecting previously unselected package libdevel-callchecker-perl:armhf. 201s Preparing to unpack .../015-libdevel-callchecker-perl_0.009-2_armhf.deb ... 201s Unpacking libdevel-callchecker-perl:armhf (0.009-2) ... 202s Selecting previously unselected package libparams-classify-perl:armhf. 202s Preparing to unpack .../016-libparams-classify-perl_0.015-2build6_armhf.deb ... 202s Unpacking libparams-classify-perl:armhf (0.015-2build6) ... 202s Selecting previously unselected package libmodule-runtime-perl. 202s Preparing to unpack .../017-libmodule-runtime-perl_0.018-1_all.deb ... 202s Unpacking libmodule-runtime-perl (0.018-1) ... 202s Selecting previously unselected package libtry-tiny-perl. 202s Preparing to unpack .../018-libtry-tiny-perl_0.32-1_all.deb ... 202s Unpacking libtry-tiny-perl (0.32-1) ... 202s Selecting previously unselected package libmodule-implementation-perl. 202s Preparing to unpack .../019-libmodule-implementation-perl_0.09-2_all.deb ... 202s Unpacking libmodule-implementation-perl (0.09-2) ... 202s Selecting previously unselected package libpackage-stash-perl. 202s Preparing to unpack .../020-libpackage-stash-perl_0.40-1_all.deb ... 202s Unpacking libpackage-stash-perl (0.40-1) ... 202s Selecting previously unselected package libclass-load-perl. 202s Preparing to unpack .../021-libclass-load-perl_0.25-2_all.deb ... 202s Unpacking libclass-load-perl (0.25-2) ... 202s Selecting previously unselected package libio-stringy-perl. 202s Preparing to unpack .../022-libio-stringy-perl_2.113-2_all.deb ... 202s Unpacking libio-stringy-perl (2.113-2) ... 202s Selecting previously unselected package libparams-validate-perl:armhf. 202s Preparing to unpack .../023-libparams-validate-perl_1.31-2build4_armhf.deb ... 202s Unpacking libparams-validate-perl:armhf (1.31-2build4) ... 202s Selecting previously unselected package libsub-exporter-perl. 202s Preparing to unpack .../024-libsub-exporter-perl_0.990-1_all.deb ... 202s Unpacking libsub-exporter-perl (0.990-1) ... 202s Selecting previously unselected package libgetopt-long-descriptive-perl. 202s Preparing to unpack .../025-libgetopt-long-descriptive-perl_0.116-2_all.deb ... 202s Unpacking libgetopt-long-descriptive-perl (0.116-2) ... 202s Selecting previously unselected package libio-tiecombine-perl. 202s Preparing to unpack .../026-libio-tiecombine-perl_1.005-3_all.deb ... 202s Unpacking libio-tiecombine-perl (1.005-3) ... 202s Selecting previously unselected package libmodule-pluggable-perl. 202s Preparing to unpack .../027-libmodule-pluggable-perl_5.2-5_all.deb ... 202s Unpacking libmodule-pluggable-perl (5.2-5) ... 202s Selecting previously unselected package libstring-rewriteprefix-perl. 202s Preparing to unpack .../028-libstring-rewriteprefix-perl_0.009-1_all.deb ... 202s Unpacking libstring-rewriteprefix-perl (0.009-1) ... 202s Selecting previously unselected package libapp-cmd-perl. 202s Preparing to unpack .../029-libapp-cmd-perl_0.338-1_all.deb ... 202s Unpacking libapp-cmd-perl (0.338-1) ... 202s Selecting previously unselected package libboolean-perl. 202s Preparing to unpack .../030-libboolean-perl_0.46-3_all.deb ... 202s Unpacking libboolean-perl (0.46-3) ... 202s Selecting previously unselected package libsub-uplevel-perl. 202s Preparing to unpack .../031-libsub-uplevel-perl_0.2800-3_all.deb ... 202s Unpacking libsub-uplevel-perl (0.2800-3) ... 202s Selecting previously unselected package libtest-exception-perl. 202s Preparing to unpack .../032-libtest-exception-perl_0.43-3_all.deb ... 202s Unpacking libtest-exception-perl (0.43-3) ... 202s Selecting previously unselected package libcarp-assert-more-perl. 202s Preparing to unpack .../033-libcarp-assert-more-perl_2.9.0-1_all.deb ... 202s Unpacking libcarp-assert-more-perl (2.9.0-1) ... 202s Selecting previously unselected package libfile-which-perl. 202s Preparing to unpack .../034-libfile-which-perl_1.27-2_all.deb ... 202s Unpacking libfile-which-perl (1.27-2) ... 202s Selecting previously unselected package libfile-homedir-perl. 202s Preparing to unpack .../035-libfile-homedir-perl_1.006-2_all.deb ... 202s Unpacking libfile-homedir-perl (1.006-2) ... 202s Selecting previously unselected package libclone-choose-perl. 202s Preparing to unpack .../036-libclone-choose-perl_0.010-2_all.deb ... 202s Unpacking libclone-choose-perl (0.010-2) ... 202s Selecting previously unselected package libhash-merge-perl. 202s Preparing to unpack .../037-libhash-merge-perl_0.302-1_all.deb ... 202s Unpacking libhash-merge-perl (0.302-1) ... 203s Selecting previously unselected package libjson-perl. 203s Preparing to unpack .../038-libjson-perl_4.10000-1_all.deb ... 203s Unpacking libjson-perl (4.10000-1) ... 203s Selecting previously unselected package libexporter-tiny-perl. 203s Preparing to unpack .../039-libexporter-tiny-perl_1.006003-1_all.deb ... 203s Unpacking libexporter-tiny-perl (1.006003-1) ... 203s Selecting previously unselected package liblist-moreutils-xs-perl. 203s Preparing to unpack .../040-liblist-moreutils-xs-perl_0.430-4build1_armhf.deb ... 203s Unpacking liblist-moreutils-xs-perl (0.430-4build1) ... 203s Selecting previously unselected package liblist-moreutils-perl. 203s Preparing to unpack .../041-liblist-moreutils-perl_0.430-2_all.deb ... 203s Unpacking liblist-moreutils-perl (0.430-2) ... 203s Selecting previously unselected package liblog-log4perl-perl. 203s Preparing to unpack .../042-liblog-log4perl-perl_1.57-1_all.deb ... 203s Unpacking liblog-log4perl-perl (1.57-1) ... 203s Selecting previously unselected package libmouse-perl:armhf. 203s Preparing to unpack .../043-libmouse-perl_2.6.1-1_armhf.deb ... 203s Unpacking libmouse-perl:armhf (2.6.1-1) ... 203s Selecting previously unselected package libmousex-nativetraits-perl. 203s Preparing to unpack .../044-libmousex-nativetraits-perl_1.09-3_all.deb ... 203s Unpacking libmousex-nativetraits-perl (1.09-3) ... 203s Selecting previously unselected package libmousex-strictconstructor-perl. 203s Preparing to unpack .../045-libmousex-strictconstructor-perl_0.02-3_all.deb ... 203s Unpacking libmousex-strictconstructor-perl (0.02-3) ... 203s Selecting previously unselected package libparse-recdescent-perl. 203s Preparing to unpack .../046-libparse-recdescent-perl_1.967015+dfsg-4_all.deb ... 203s Unpacking libparse-recdescent-perl (1.967015+dfsg-4) ... 203s Selecting previously unselected package libpath-tiny-perl. 203s Preparing to unpack .../047-libpath-tiny-perl_0.148-1_all.deb ... 203s Unpacking libpath-tiny-perl (0.148-1) ... 203s Selecting previously unselected package libpod-pom-perl. 203s Preparing to unpack .../048-libpod-pom-perl_2.01-4_all.deb ... 203s Unpacking libpod-pom-perl (2.01-4) ... 203s Selecting previously unselected package libregexp-common-perl. 203s Preparing to unpack .../049-libregexp-common-perl_2024080801-1_all.deb ... 203s Unpacking libregexp-common-perl (2024080801-1) ... 203s Selecting previously unselected package libyaml-tiny-perl. 203s Preparing to unpack .../050-libyaml-tiny-perl_1.76-1_all.deb ... 203s Unpacking libyaml-tiny-perl (1.76-1) ... 203s Selecting previously unselected package libconfig-model-perl. 203s Preparing to unpack .../051-libconfig-model-perl_2.155-1_all.deb ... 203s Unpacking libconfig-model-perl (2.155-1) ... 203s Selecting previously unselected package libyaml-pp-perl. 203s Preparing to unpack .../052-libyaml-pp-perl_0.39.0-1_all.deb ... 203s Unpacking libyaml-pp-perl (0.39.0-1) ... 203s Selecting previously unselected package cme. 203s Preparing to unpack .../053-cme_1.044-2_all.deb ... 203s Unpacking cme (1.044-2) ... 203s Selecting previously unselected package libisl23:armhf. 203s Preparing to unpack .../054-libisl23_0.27-1build1_armhf.deb ... 203s Unpacking libisl23:armhf (0.27-1build1) ... 203s Selecting previously unselected package libmpc3:armhf. 204s Preparing to unpack .../055-libmpc3_1.3.1-2_armhf.deb ... 204s Unpacking libmpc3:armhf (1.3.1-2) ... 204s Selecting previously unselected package cpp-15-arm-linux-gnueabihf. 204s Preparing to unpack .../056-cpp-15-arm-linux-gnueabihf_15.2.0-12ubuntu1_armhf.deb ... 204s Unpacking cpp-15-arm-linux-gnueabihf (15.2.0-12ubuntu1) ... 204s Selecting previously unselected package cpp-15. 204s Preparing to unpack .../057-cpp-15_15.2.0-12ubuntu1_armhf.deb ... 204s Unpacking cpp-15 (15.2.0-12ubuntu1) ... 204s Selecting previously unselected package cpp-arm-linux-gnueabihf. 204s Preparing to unpack .../058-cpp-arm-linux-gnueabihf_4%3a15.2.0-4ubuntu1_armhf.deb ... 204s Unpacking cpp-arm-linux-gnueabihf (4:15.2.0-4ubuntu1) ... 204s Selecting previously unselected package cpp. 204s Preparing to unpack .../059-cpp_4%3a15.2.0-4ubuntu1_armhf.deb ... 204s Unpacking cpp (4:15.2.0-4ubuntu1) ... 204s Selecting previously unselected package libdebhelper-perl. 204s Preparing to unpack .../060-libdebhelper-perl_13.28ubuntu1_all.deb ... 204s Unpacking libdebhelper-perl (13.28ubuntu1) ... 204s Selecting previously unselected package libcc1-0:armhf. 204s Preparing to unpack .../061-libcc1-0_15.2.0-12ubuntu1_armhf.deb ... 204s Unpacking libcc1-0:armhf (15.2.0-12ubuntu1) ... 204s Selecting previously unselected package libgomp1:armhf. 204s Preparing to unpack .../062-libgomp1_15.2.0-12ubuntu1_armhf.deb ... 204s Unpacking libgomp1:armhf (15.2.0-12ubuntu1) ... 204s Selecting previously unselected package libasan8:armhf. 204s Preparing to unpack .../063-libasan8_15.2.0-12ubuntu1_armhf.deb ... 204s Unpacking libasan8:armhf (15.2.0-12ubuntu1) ... 204s Selecting previously unselected package libubsan1:armhf. 204s Preparing to unpack .../064-libubsan1_15.2.0-12ubuntu1_armhf.deb ... 204s Unpacking libubsan1:armhf (15.2.0-12ubuntu1) ... 204s Selecting previously unselected package libgcc-15-dev:armhf. 204s Preparing to unpack .../065-libgcc-15-dev_15.2.0-12ubuntu1_armhf.deb ... 204s Unpacking libgcc-15-dev:armhf (15.2.0-12ubuntu1) ... 205s Selecting previously unselected package gcc-15-arm-linux-gnueabihf. 205s Preparing to unpack .../066-gcc-15-arm-linux-gnueabihf_15.2.0-12ubuntu1_armhf.deb ... 205s Unpacking gcc-15-arm-linux-gnueabihf (15.2.0-12ubuntu1) ... 205s Selecting previously unselected package gcc-15. 205s Preparing to unpack .../067-gcc-15_15.2.0-12ubuntu1_armhf.deb ... 205s Unpacking gcc-15 (15.2.0-12ubuntu1) ... 205s Selecting previously unselected package gcc-arm-linux-gnueabihf. 205s Preparing to unpack .../068-gcc-arm-linux-gnueabihf_4%3a15.2.0-4ubuntu1_armhf.deb ... 205s Unpacking gcc-arm-linux-gnueabihf (4:15.2.0-4ubuntu1) ... 205s Selecting previously unselected package gcc. 205s Preparing to unpack .../069-gcc_4%3a15.2.0-4ubuntu1_armhf.deb ... 205s Unpacking gcc (4:15.2.0-4ubuntu1) ... 205s Selecting previously unselected package libc-dev-bin. 205s Preparing to unpack .../070-libc-dev-bin_2.42-2ubuntu5_armhf.deb ... 205s Unpacking libc-dev-bin (2.42-2ubuntu5) ... 205s Selecting previously unselected package linux-libc-dev:armhf. 205s Preparing to unpack .../071-linux-libc-dev_6.18.0-9.9_armhf.deb ... 205s Unpacking linux-libc-dev:armhf (6.18.0-9.9) ... 206s Selecting previously unselected package libcrypt-dev:armhf. 206s Preparing to unpack .../072-libcrypt-dev_1%3a4.5.1-1_armhf.deb ... 206s Unpacking libcrypt-dev:armhf (1:4.5.1-1) ... 206s Selecting previously unselected package rpcsvc-proto. 206s Preparing to unpack .../073-rpcsvc-proto_1.4.3-1build1_armhf.deb ... 206s Unpacking rpcsvc-proto (1.4.3-1build1) ... 206s Selecting previously unselected package libc6-dev:armhf. 206s Preparing to unpack .../074-libc6-dev_2.42-2ubuntu5_armhf.deb ... 206s Unpacking libc6-dev:armhf (2.42-2ubuntu5) ... 206s Selecting previously unselected package libtool. 206s Preparing to unpack .../075-libtool_2.5.4-9_all.deb ... 206s Unpacking libtool (2.5.4-9) ... 206s Selecting previously unselected package dh-autoreconf. 206s Preparing to unpack .../076-dh-autoreconf_21_all.deb ... 206s Unpacking dh-autoreconf (21) ... 206s Selecting previously unselected package libarchive-zip-perl. 206s Preparing to unpack .../077-libarchive-zip-perl_1.68-1_all.deb ... 206s Unpacking libarchive-zip-perl (1.68-1) ... 206s Selecting previously unselected package libfile-stripnondeterminism-perl. 206s Preparing to unpack .../078-libfile-stripnondeterminism-perl_1.15.0-1build1_all.deb ... 206s Unpacking libfile-stripnondeterminism-perl (1.15.0-1build1) ... 206s Selecting previously unselected package dh-strip-nondeterminism. 206s Preparing to unpack .../079-dh-strip-nondeterminism_1.15.0-1build1_all.deb ... 206s Unpacking dh-strip-nondeterminism (1.15.0-1build1) ... 206s Selecting previously unselected package libdw1t64:armhf. 206s Preparing to unpack .../080-libdw1t64_0.194-1_armhf.deb ... 206s Unpacking libdw1t64:armhf (0.194-1) ... 206s Selecting previously unselected package debugedit. 206s Preparing to unpack .../081-debugedit_1%3a5.2-3build1_armhf.deb ... 206s Unpacking debugedit (1:5.2-3build1) ... 206s Selecting previously unselected package dwz. 206s Preparing to unpack .../082-dwz_0.16-2_armhf.deb ... 206s Unpacking dwz (0.16-2) ... 206s Selecting previously unselected package gettext. 206s Preparing to unpack .../083-gettext_0.23.2-1_armhf.deb ... 206s Unpacking gettext (0.23.2-1) ... 206s Selecting previously unselected package intltool-debian. 206s Preparing to unpack .../084-intltool-debian_0.35.0+20060710.6build1_all.deb ... 206s Unpacking intltool-debian (0.35.0+20060710.6build1) ... 206s Selecting previously unselected package po-debconf. 206s Preparing to unpack .../085-po-debconf_1.0.22_all.deb ... 206s Unpacking po-debconf (1.0.22) ... 207s Selecting previously unselected package debhelper. 207s Preparing to unpack .../086-debhelper_13.28ubuntu1_all.deb ... 207s Unpacking debhelper (13.28ubuntu1) ... 207s Selecting previously unselected package aglfn. 207s Preparing to unpack .../087-aglfn_1.7+git20191031.4036a9c-2build1_all.deb ... 207s Unpacking aglfn (1.7+git20191031.4036a9c-2build1) ... 207s Selecting previously unselected package gnuplot-data. 207s Preparing to unpack .../088-gnuplot-data_6.0.2+dfsg1-2ubuntu1_all.deb ... 207s Unpacking gnuplot-data (6.0.2+dfsg1-2ubuntu1) ... 207s Selecting previously unselected package libfreetype6:armhf. 207s Preparing to unpack .../089-libfreetype6_2.14.1+dfsg-2_armhf.deb ... 207s Unpacking libfreetype6:armhf (2.14.1+dfsg-2) ... 207s Selecting previously unselected package fonts-freefont-otf. 207s Preparing to unpack .../090-fonts-freefont-otf_20211204+svn4273-4build1_all.deb ... 207s Unpacking fonts-freefont-otf (20211204+svn4273-4build1) ... 207s Selecting previously unselected package fontconfig-config. 207s Preparing to unpack .../091-fontconfig-config_2.17.1-3ubuntu1_armhf.deb ... 207s Unpacking fontconfig-config (2.17.1-3ubuntu1) ... 207s Selecting previously unselected package libfontconfig1:armhf. 207s Preparing to unpack .../092-libfontconfig1_2.17.1-3ubuntu1_armhf.deb ... 208s Unpacking libfontconfig1:armhf (2.17.1-3ubuntu1) ... 208s Selecting previously unselected package libpixman-1-0:armhf. 208s Preparing to unpack .../093-libpixman-1-0_0.46.4-1_armhf.deb ... 208s Unpacking libpixman-1-0:armhf (0.46.4-1) ... 208s Selecting previously unselected package libxcb-render0:armhf. 208s Preparing to unpack .../094-libxcb-render0_1.17.0-2ubuntu1_armhf.deb ... 208s Unpacking libxcb-render0:armhf (1.17.0-2ubuntu1) ... 208s Selecting previously unselected package libxcb-shm0:armhf. 208s Preparing to unpack .../095-libxcb-shm0_1.17.0-2ubuntu1_armhf.deb ... 208s Unpacking libxcb-shm0:armhf (1.17.0-2ubuntu1) ... 208s Selecting previously unselected package libxrender1:armhf. 208s Preparing to unpack .../096-libxrender1_1%3a0.9.12-1_armhf.deb ... 208s Unpacking libxrender1:armhf (1:0.9.12-1) ... 208s Selecting previously unselected package libcairo2:armhf. 208s Preparing to unpack .../097-libcairo2_1.18.4-3_armhf.deb ... 208s Unpacking libcairo2:armhf (1.18.4-3) ... 208s Selecting previously unselected package libsharpyuv0:armhf. 208s Preparing to unpack .../098-libsharpyuv0_1.5.0-0.1build1_armhf.deb ... 208s Unpacking libsharpyuv0:armhf (1.5.0-0.1build1) ... 208s Selecting previously unselected package libaom3:armhf. 208s Preparing to unpack .../099-libaom3_3.13.1-2_armhf.deb ... 208s Unpacking libaom3:armhf (3.13.1-2) ... 208s Selecting previously unselected package libheif-plugin-aomdec:armhf. 208s Preparing to unpack .../100-libheif-plugin-aomdec_1.21.2-1_armhf.deb ... 208s Unpacking libheif-plugin-aomdec:armhf (1.21.2-1) ... 208s Selecting previously unselected package libde265-0:armhf. 208s Preparing to unpack .../101-libde265-0_1.0.16-1build1_armhf.deb ... 208s Unpacking libde265-0:armhf (1.0.16-1build1) ... 208s Selecting previously unselected package libheif-plugin-libde265:armhf. 208s Preparing to unpack .../102-libheif-plugin-libde265_1.21.2-1_armhf.deb ... 208s Unpacking libheif-plugin-libde265:armhf (1.21.2-1) ... 208s Selecting previously unselected package libheif1:armhf. 208s Preparing to unpack .../103-libheif1_1.21.2-1_armhf.deb ... 208s Unpacking libheif1:armhf (1.21.2-1) ... 208s Selecting previously unselected package libimagequant0:armhf. 208s Preparing to unpack .../104-libimagequant0_2.18.0-1build1_armhf.deb ... 208s Unpacking libimagequant0:armhf (2.18.0-1build1) ... 208s Selecting previously unselected package libjpeg-turbo8:armhf. 208s Preparing to unpack .../105-libjpeg-turbo8_2.1.5-4ubuntu2_armhf.deb ... 208s Unpacking libjpeg-turbo8:armhf (2.1.5-4ubuntu2) ... 208s Selecting previously unselected package libjpeg8:armhf. 208s Preparing to unpack .../106-libjpeg8_8c-2ubuntu11_armhf.deb ... 208s Unpacking libjpeg8:armhf (8c-2ubuntu11) ... 208s Selecting previously unselected package libdeflate0:armhf. 208s Preparing to unpack .../107-libdeflate0_1.23-2_armhf.deb ... 208s Unpacking libdeflate0:armhf (1.23-2) ... 208s Selecting previously unselected package libjbig0:armhf. 208s Preparing to unpack .../108-libjbig0_2.1-6.1ubuntu3_armhf.deb ... 208s Unpacking libjbig0:armhf (2.1-6.1ubuntu3) ... 208s Selecting previously unselected package liblerc4:armhf. 208s Preparing to unpack .../109-liblerc4_4.0.0+ds-5ubuntu2_armhf.deb ... 208s Unpacking liblerc4:armhf (4.0.0+ds-5ubuntu2) ... 208s Selecting previously unselected package libwebp7:armhf. 208s Preparing to unpack .../110-libwebp7_1.5.0-0.1build1_armhf.deb ... 208s Unpacking libwebp7:armhf (1.5.0-0.1build1) ... 208s Selecting previously unselected package libtiff6:armhf. 209s Preparing to unpack .../111-libtiff6_4.7.0-3ubuntu3_armhf.deb ... 209s Unpacking libtiff6:armhf (4.7.0-3ubuntu3) ... 209s Selecting previously unselected package libxpm4:armhf. 209s Preparing to unpack .../112-libxpm4_1%3a3.5.17-1build3_armhf.deb ... 209s Unpacking libxpm4:armhf (1:3.5.17-1build3) ... 209s Selecting previously unselected package libgd3:armhf. 209s Preparing to unpack .../113-libgd3_2.3.3-13ubuntu1_armhf.deb ... 209s Unpacking libgd3:armhf (2.3.3-13ubuntu1) ... 209s Selecting previously unselected package liblua5.4-0:armhf. 209s Preparing to unpack .../114-liblua5.4-0_5.4.8-1_armhf.deb ... 209s Unpacking liblua5.4-0:armhf (5.4.8-1) ... 209s Selecting previously unselected package fontconfig. 209s Preparing to unpack .../115-fontconfig_2.17.1-3ubuntu1_armhf.deb ... 209s Unpacking fontconfig (2.17.1-3ubuntu1) ... 209s Selecting previously unselected package libgraphite2-3:armhf. 209s Preparing to unpack .../116-libgraphite2-3_1.3.14-11ubuntu1_armhf.deb ... 209s Unpacking libgraphite2-3:armhf (1.3.14-11ubuntu1) ... 209s Selecting previously unselected package libharfbuzz0b:armhf. 209s Preparing to unpack .../117-libharfbuzz0b_12.3.2-1_armhf.deb ... 209s Unpacking libharfbuzz0b:armhf (12.3.2-1) ... 209s Selecting previously unselected package libthai-data. 209s Preparing to unpack .../118-libthai-data_0.1.30-1_all.deb ... 209s Unpacking libthai-data (0.1.30-1) ... 209s Selecting previously unselected package libdatrie1:armhf. 209s Preparing to unpack .../119-libdatrie1_0.2.14-1_armhf.deb ... 209s Unpacking libdatrie1:armhf (0.2.14-1) ... 209s Selecting previously unselected package libthai0:armhf. 209s Preparing to unpack .../120-libthai0_0.1.30-1_armhf.deb ... 209s Unpacking libthai0:armhf (0.1.30-1) ... 209s Selecting previously unselected package libpango-1.0-0:armhf. 209s Preparing to unpack .../121-libpango-1.0-0_1.57.0-1_armhf.deb ... 209s Unpacking libpango-1.0-0:armhf (1.57.0-1) ... 209s Selecting previously unselected package libpangoft2-1.0-0:armhf. 209s Preparing to unpack .../122-libpangoft2-1.0-0_1.57.0-1_armhf.deb ... 209s Unpacking libpangoft2-1.0-0:armhf (1.57.0-1) ... 209s Selecting previously unselected package libpangocairo-1.0-0:armhf. 209s Preparing to unpack .../123-libpangocairo-1.0-0_1.57.0-1_armhf.deb ... 209s Unpacking libpangocairo-1.0-0:armhf (1.57.0-1) ... 209s Selecting previously unselected package libwebpmux3:armhf. 209s Preparing to unpack .../124-libwebpmux3_1.5.0-0.1build1_armhf.deb ... 209s Unpacking libwebpmux3:armhf (1.5.0-0.1build1) ... 209s Selecting previously unselected package gnuplot-nox. 209s Preparing to unpack .../125-gnuplot-nox_6.0.2+dfsg1-2ubuntu1_armhf.deb ... 209s Unpacking gnuplot-nox (6.0.2+dfsg1-2ubuntu1) ... 209s Selecting previously unselected package dh-octave-autopkgtest. 209s Preparing to unpack .../126-dh-octave-autopkgtest_1.14.0_all.deb ... 209s Unpacking dh-octave-autopkgtest (1.14.0) ... 209s Selecting previously unselected package libapt-pkg-perl. 209s Preparing to unpack .../127-libapt-pkg-perl_0.1.43_armhf.deb ... 209s Unpacking libapt-pkg-perl (0.1.43) ... 209s Selecting previously unselected package libarray-intspan-perl. 209s Preparing to unpack .../128-libarray-intspan-perl_2.004-2_all.deb ... 209s Unpacking libarray-intspan-perl (2.004-2) ... 209s Selecting previously unselected package libconfig-inifiles-perl. 209s Preparing to unpack .../129-libconfig-inifiles-perl_3.000003-4_all.deb ... 209s Unpacking libconfig-inifiles-perl (3.000003-4) ... 210s Selecting previously unselected package libyaml-libyaml-perl. 210s Preparing to unpack .../130-libyaml-libyaml-perl_0.904.0+ds-1_armhf.deb ... 210s Unpacking libyaml-libyaml-perl (0.904.0+ds-1) ... 210s Selecting previously unselected package libconfig-model-backend-yaml-perl. 210s Preparing to unpack .../131-libconfig-model-backend-yaml-perl_2.134-2_all.deb ... 210s Unpacking libconfig-model-backend-yaml-perl (2.134-2) ... 210s Selecting previously unselected package libexporter-lite-perl. 210s Preparing to unpack .../132-libexporter-lite-perl_0.09-2_all.deb ... 210s Unpacking libexporter-lite-perl (0.09-2) ... 210s Selecting previously unselected package libencode-locale-perl. 210s Preparing to unpack .../133-libencode-locale-perl_1.05-3_all.deb ... 210s Unpacking libencode-locale-perl (1.05-3) ... 210s Selecting previously unselected package libtimedate-perl. 210s Preparing to unpack .../134-libtimedate-perl_2.3300-2_all.deb ... 210s Unpacking libtimedate-perl (2.3300-2) ... 210s Selecting previously unselected package libhttp-date-perl. 210s Preparing to unpack .../135-libhttp-date-perl_6.06-1_all.deb ... 210s Unpacking libhttp-date-perl (6.06-1) ... 210s Selecting previously unselected package libfile-listing-perl. 210s Preparing to unpack .../136-libfile-listing-perl_6.16-1_all.deb ... 210s Unpacking libfile-listing-perl (6.16-1) ... 210s Selecting previously unselected package libhtml-tagset-perl. 210s Preparing to unpack .../137-libhtml-tagset-perl_3.24-1_all.deb ... 210s Unpacking libhtml-tagset-perl (3.24-1) ... 210s Selecting previously unselected package liburi-perl. 210s Preparing to unpack .../138-liburi-perl_5.34-2build1_all.deb ... 210s Unpacking liburi-perl (5.34-2build1) ... 210s Selecting previously unselected package libhtml-parser-perl:armhf. 210s Preparing to unpack .../139-libhtml-parser-perl_3.83-1build1_armhf.deb ... 210s Unpacking libhtml-parser-perl:armhf (3.83-1build1) ... 210s Selecting previously unselected package libhtml-tree-perl. 210s Preparing to unpack .../140-libhtml-tree-perl_5.07-3_all.deb ... 210s Unpacking libhtml-tree-perl (5.07-3) ... 210s Selecting previously unselected package libclone-perl:armhf. 210s Preparing to unpack .../141-libclone-perl_0.47-1_armhf.deb ... 210s Unpacking libclone-perl:armhf (0.47-1) ... 210s Selecting previously unselected package libio-html-perl. 210s Preparing to unpack .../142-libio-html-perl_1.004-3_all.deb ... 210s Unpacking libio-html-perl (1.004-3) ... 210s Selecting previously unselected package liblwp-mediatypes-perl. 210s Preparing to unpack .../143-liblwp-mediatypes-perl_6.04-2_all.deb ... 210s Unpacking liblwp-mediatypes-perl (6.04-2) ... 210s Selecting previously unselected package libhttp-message-perl. 210s Preparing to unpack .../144-libhttp-message-perl_7.01-1ubuntu1_all.deb ... 210s Unpacking libhttp-message-perl (7.01-1ubuntu1) ... 210s Selecting previously unselected package libhttp-cookies-perl. 210s Preparing to unpack .../145-libhttp-cookies-perl_6.11-1_all.deb ... 210s Unpacking libhttp-cookies-perl (6.11-1) ... 210s Selecting previously unselected package libhttp-negotiate-perl. 210s Preparing to unpack .../146-libhttp-negotiate-perl_6.01-2_all.deb ... 210s Unpacking libhttp-negotiate-perl (6.01-2) ... 210s Selecting previously unselected package perl-openssl-defaults:armhf. 210s Preparing to unpack .../147-perl-openssl-defaults_7build4_armhf.deb ... 210s Unpacking perl-openssl-defaults:armhf (7build4) ... 210s Selecting previously unselected package libnet-ssleay-perl:armhf. 211s Preparing to unpack .../148-libnet-ssleay-perl_1.94-3_armhf.deb ... 211s Unpacking libnet-ssleay-perl:armhf (1.94-3) ... 211s Selecting previously unselected package libio-socket-ssl-perl. 211s Preparing to unpack .../149-libio-socket-ssl-perl_2.098-1_all.deb ... 211s Unpacking libio-socket-ssl-perl (2.098-1) ... 211s Selecting previously unselected package libnet-http-perl. 211s Preparing to unpack .../150-libnet-http-perl_6.24-1build1_all.deb ... 211s Unpacking libnet-http-perl (6.24-1build1) ... 211s Selecting previously unselected package liblwp-protocol-https-perl. 211s Preparing to unpack .../151-liblwp-protocol-https-perl_6.14-1_all.deb ... 211s Unpacking liblwp-protocol-https-perl (6.14-1) ... 211s Selecting previously unselected package libwww-robotrules-perl. 211s Preparing to unpack .../152-libwww-robotrules-perl_6.02-1build1_all.deb ... 211s Unpacking libwww-robotrules-perl (6.02-1build1) ... 211s Selecting previously unselected package libwww-perl. 211s Preparing to unpack .../153-libwww-perl_6.81-1build1_all.deb ... 211s Unpacking libwww-perl (6.81-1build1) ... 211s Selecting previously unselected package liberror-perl. 211s Preparing to unpack .../154-liberror-perl_0.17030-1_all.deb ... 211s Unpacking liberror-perl (0.17030-1) ... 211s Selecting previously unselected package libparse-debcontrol-perl. 211s Preparing to unpack .../155-libparse-debcontrol-perl_2.005-6_all.deb ... 211s Unpacking libparse-debcontrol-perl (2.005-6) ... 211s Selecting previously unselected package libsoftware-copyright-perl. 211s Preparing to unpack .../156-libsoftware-copyright-perl_0.015-1_all.deb ... 211s Unpacking libsoftware-copyright-perl (0.015-1) ... 211s Selecting previously unselected package libalgorithm-c3-perl. 211s Preparing to unpack .../157-libalgorithm-c3-perl_0.11-2_all.deb ... 211s Unpacking libalgorithm-c3-perl (0.11-2) ... 211s Selecting previously unselected package libclass-c3-perl. 211s Preparing to unpack .../158-libclass-c3-perl_0.35-2_all.deb ... 211s Unpacking libclass-c3-perl (0.35-2) ... 211s Selecting previously unselected package libmro-compat-perl. 211s Preparing to unpack .../159-libmro-compat-perl_0.15-2_all.deb ... 211s Unpacking libmro-compat-perl (0.15-2) ... 211s Selecting previously unselected package libdata-section-perl. 211s Preparing to unpack .../160-libdata-section-perl_0.200008-1_all.deb ... 211s Unpacking libdata-section-perl (0.200008-1) ... 211s Selecting previously unselected package libtext-template-perl. 211s Preparing to unpack .../161-libtext-template-perl_1.61-1_all.deb ... 211s Unpacking libtext-template-perl (1.61-1) ... 211s Selecting previously unselected package libsoftware-license-perl. 211s Preparing to unpack .../162-libsoftware-license-perl_0.104007-1_all.deb ... 211s Unpacking libsoftware-license-perl (0.104007-1) ... 211s Selecting previously unselected package libsoftware-licensemoreutils-perl. 211s Preparing to unpack .../163-libsoftware-licensemoreutils-perl_1.009-1_all.deb ... 211s Unpacking libsoftware-licensemoreutils-perl (1.009-1) ... 211s Selecting previously unselected package libsort-versions-perl. 211s Preparing to unpack .../164-libsort-versions-perl_1.62-3_all.deb ... 211s Unpacking libsort-versions-perl (1.62-3) ... 211s Selecting previously unselected package libtext-reform-perl. 211s Preparing to unpack .../165-libtext-reform-perl_1.20-5_all.deb ... 211s Unpacking libtext-reform-perl (1.20-5) ... 211s Selecting previously unselected package libtext-autoformat-perl. 211s Preparing to unpack .../166-libtext-autoformat-perl_1.750000-2_all.deb ... 211s Unpacking libtext-autoformat-perl (1.750000-2) ... 212s Selecting previously unselected package libtext-levenshtein-damerau-perl. 212s Preparing to unpack .../167-libtext-levenshtein-damerau-perl_0.41-3_all.deb ... 212s Unpacking libtext-levenshtein-damerau-perl (0.41-3) ... 212s Selecting previously unselected package libtoml-tiny-perl. 212s Preparing to unpack .../168-libtoml-tiny-perl_0.20-1_all.deb ... 212s Unpacking libtoml-tiny-perl (0.20-1) ... 212s Selecting previously unselected package libclass-inspector-perl. 212s Preparing to unpack .../169-libclass-inspector-perl_1.36-3_all.deb ... 212s Unpacking libclass-inspector-perl (1.36-3) ... 212s Selecting previously unselected package libfile-sharedir-perl. 212s Preparing to unpack .../170-libfile-sharedir-perl_1.118-3_all.deb ... 212s Unpacking libfile-sharedir-perl (1.118-3) ... 212s Selecting previously unselected package libindirect-perl. 212s Preparing to unpack .../171-libindirect-perl_0.39-2build5_armhf.deb ... 212s Unpacking libindirect-perl (0.39-2build5) ... 212s Selecting previously unselected package libxs-parse-keyword-perl. 212s Preparing to unpack .../172-libxs-parse-keyword-perl_0.49-1_armhf.deb ... 212s Unpacking libxs-parse-keyword-perl (0.49-1) ... 212s Selecting previously unselected package libxs-parse-sublike-perl:armhf. 212s Preparing to unpack .../173-libxs-parse-sublike-perl_0.41-1_armhf.deb ... 212s Unpacking libxs-parse-sublike-perl:armhf (0.41-1) ... 212s Selecting previously unselected package libobject-pad-perl. 212s Preparing to unpack .../174-libobject-pad-perl_0.823-2_armhf.deb ... 212s Unpacking libobject-pad-perl (0.823-2) ... 212s Selecting previously unselected package libsyntax-keyword-try-perl. 212s Preparing to unpack .../175-libsyntax-keyword-try-perl_0.31-1_armhf.deb ... 212s Unpacking libsyntax-keyword-try-perl (0.31-1) ... 212s Selecting previously unselected package libio-interactive-perl. 212s Preparing to unpack .../176-libio-interactive-perl_1.027-1_all.deb ... 212s Unpacking libio-interactive-perl (1.027-1) ... 212s Selecting previously unselected package liblog-any-perl. 212s Preparing to unpack .../177-liblog-any-perl_1.718-1build1_all.deb ... 212s Unpacking liblog-any-perl (1.718-1build1) ... 212s Selecting previously unselected package liblog-any-adapter-screen-perl. 212s Preparing to unpack .../178-liblog-any-adapter-screen-perl_0.141-1_all.deb ... 212s Unpacking liblog-any-adapter-screen-perl (0.141-1) ... 212s Selecting previously unselected package libsub-exporter-progressive-perl. 212s Preparing to unpack .../179-libsub-exporter-progressive-perl_0.001013-3_all.deb ... 212s Unpacking libsub-exporter-progressive-perl (0.001013-3) ... 212s Selecting previously unselected package libvariable-magic-perl. 212s Preparing to unpack .../180-libvariable-magic-perl_0.64-1build1_armhf.deb ... 212s Unpacking libvariable-magic-perl (0.64-1build1) ... 212s Selecting previously unselected package libb-hooks-endofscope-perl. 212s Preparing to unpack .../181-libb-hooks-endofscope-perl_0.28-2_all.deb ... 212s Unpacking libb-hooks-endofscope-perl (0.28-2) ... 212s Selecting previously unselected package libsub-identify-perl. 212s Preparing to unpack .../182-libsub-identify-perl_0.14-4_armhf.deb ... 212s Unpacking libsub-identify-perl (0.14-4) ... 212s Selecting previously unselected package libsub-name-perl:armhf. 212s Preparing to unpack .../183-libsub-name-perl_0.28-1_armhf.deb ... 212s Unpacking libsub-name-perl:armhf (0.28-1) ... 212s Selecting previously unselected package libnamespace-clean-perl. 212s Preparing to unpack .../184-libnamespace-clean-perl_0.27-2_all.deb ... 212s Unpacking libnamespace-clean-perl (0.27-2) ... 212s Selecting previously unselected package libnumber-compare-perl. 212s Preparing to unpack .../185-libnumber-compare-perl_0.03-3_all.deb ... 212s Unpacking libnumber-compare-perl (0.03-3) ... 212s Selecting previously unselected package libtext-glob-perl. 212s Preparing to unpack .../186-libtext-glob-perl_0.11-3_all.deb ... 212s Unpacking libtext-glob-perl (0.11-3) ... 213s Selecting previously unselected package libpath-iterator-rule-perl. 213s Preparing to unpack .../187-libpath-iterator-rule-perl_1.015-2_all.deb ... 213s Unpacking libpath-iterator-rule-perl (1.015-2) ... 213s Selecting previously unselected package libpod-parser-perl. 213s Preparing to unpack .../188-libpod-parser-perl_1.67-1_all.deb ... 213s Adding 'diversion of /usr/bin/podselect to /usr/bin/podselect.bundled by libpod-parser-perl' 213s Adding 'diversion of /usr/share/man/man1/podselect.1.gz to /usr/share/man/man1/podselect.bundled.1.gz by libpod-parser-perl' 213s Unpacking libpod-parser-perl (1.67-1) ... 213s Selecting previously unselected package libpod-constants-perl. 213s Preparing to unpack .../189-libpod-constants-perl_0.19-2_all.deb ... 213s Unpacking libpod-constants-perl (0.19-2) ... 213s Selecting previously unselected package libset-intspan-perl. 213s Preparing to unpack .../190-libset-intspan-perl_1.19-3_all.deb ... 213s Unpacking libset-intspan-perl (1.19-3) ... 213s Selecting previously unselected package libstring-copyright-perl. 213s Preparing to unpack .../191-libstring-copyright-perl_0.003014-1_all.deb ... 213s Unpacking libstring-copyright-perl (0.003014-1) ... 213s Selecting previously unselected package libstring-escape-perl. 213s Preparing to unpack .../192-libstring-escape-perl_2010.002-3_all.deb ... 213s Unpacking libstring-escape-perl (2010.002-3) ... 213s Selecting previously unselected package libregexp-pattern-license-perl. 213s Preparing to unpack .../193-libregexp-pattern-license-perl_3.11.2-1_all.deb ... 213s Unpacking libregexp-pattern-license-perl (3.11.2-1) ... 213s Selecting previously unselected package libregexp-pattern-perl. 213s Preparing to unpack .../194-libregexp-pattern-perl_0.2.14-2_all.deb ... 213s Unpacking libregexp-pattern-perl (0.2.14-2) ... 213s Selecting previously unselected package libstring-license-perl. 213s Preparing to unpack .../195-libstring-license-perl_0.0.11-1ubuntu1_all.deb ... 213s Unpacking libstring-license-perl (0.0.11-1ubuntu1) ... 213s Selecting previously unselected package licensecheck. 213s Preparing to unpack .../196-licensecheck_3.3.9-1ubuntu2_all.deb ... 213s Unpacking licensecheck (3.3.9-1ubuntu2) ... 213s Selecting previously unselected package diffstat. 214s Preparing to unpack .../197-diffstat_1.68-1_armhf.deb ... 214s Unpacking diffstat (1.68-1) ... 214s Selecting previously unselected package libberkeleydb-perl:armhf. 214s Preparing to unpack .../198-libberkeleydb-perl_0.66-2_armhf.deb ... 214s Unpacking libberkeleydb-perl:armhf (0.66-2) ... 214s Selecting previously unselected package libclass-xsaccessor-perl. 214s Preparing to unpack .../199-libclass-xsaccessor-perl_1.19-4build6_armhf.deb ... 214s Unpacking libclass-xsaccessor-perl (1.19-4build6) ... 214s Selecting previously unselected package libconfig-tiny-perl. 214s Preparing to unpack .../200-libconfig-tiny-perl_2.30-1_all.deb ... 214s Unpacking libconfig-tiny-perl (2.30-1) ... 214s Selecting previously unselected package libconst-fast-perl. 214s Preparing to unpack .../201-libconst-fast-perl_0.014-2_all.deb ... 214s Unpacking libconst-fast-perl (0.014-2) ... 214s Selecting previously unselected package libcpanel-json-xs-perl:armhf. 214s Preparing to unpack .../202-libcpanel-json-xs-perl_4.40-1_armhf.deb ... 214s Unpacking libcpanel-json-xs-perl:armhf (4.40-1) ... 214s Selecting previously unselected package libaliased-perl. 214s Preparing to unpack .../203-libaliased-perl_0.34-3_all.deb ... 214s Unpacking libaliased-perl (0.34-3) ... 214s Selecting previously unselected package libclass-data-inheritable-perl. 214s Preparing to unpack .../204-libclass-data-inheritable-perl_0.10-1_all.deb ... 214s Unpacking libclass-data-inheritable-perl (0.10-1) ... 214s Selecting previously unselected package libdevel-stacktrace-perl. 214s Preparing to unpack .../205-libdevel-stacktrace-perl_2.0500-1_all.deb ... 214s Unpacking libdevel-stacktrace-perl (2.0500-1) ... 214s Selecting previously unselected package libexception-class-perl. 214s Preparing to unpack .../206-libexception-class-perl_1.45-1_all.deb ... 214s Unpacking libexception-class-perl (1.45-1) ... 214s Selecting previously unselected package libiterator-perl. 214s Preparing to unpack .../207-libiterator-perl_0.03+ds1-2_all.deb ... 214s Unpacking libiterator-perl (0.03+ds1-2) ... 214s Selecting previously unselected package libiterator-util-perl. 214s Preparing to unpack .../208-libiterator-util-perl_0.02+ds1-2_all.deb ... 214s Unpacking libiterator-util-perl (0.02+ds1-2) ... 214s Selecting previously unselected package libdata-dpath-perl. 214s Preparing to unpack .../209-libdata-dpath-perl_0.60-1_all.deb ... 214s Unpacking libdata-dpath-perl (0.60-1) ... 214s Selecting previously unselected package libnet-domain-tld-perl. 214s Preparing to unpack .../210-libnet-domain-tld-perl_1.75-4_all.deb ... 214s Unpacking libnet-domain-tld-perl (1.75-4) ... 214s Selecting previously unselected package libdata-validate-domain-perl. 214s Preparing to unpack .../211-libdata-validate-domain-perl_0.15-1_all.deb ... 214s Unpacking libdata-validate-domain-perl (0.15-1) ... 214s Selecting previously unselected package libnet-ipv6addr-perl. 214s Preparing to unpack .../212-libnet-ipv6addr-perl_1.02-1_all.deb ... 214s Unpacking libnet-ipv6addr-perl (1.02-1) ... 214s Selecting previously unselected package libnet-netmask-perl. 214s Preparing to unpack .../213-libnet-netmask-perl_2.0003-1build1_all.deb ... 214s Unpacking libnet-netmask-perl (2.0003-1build1) ... 214s Selecting previously unselected package libnetaddr-ip-perl. 214s Preparing to unpack .../214-libnetaddr-ip-perl_4.079+dfsg-2build5_armhf.deb ... 214s Unpacking libnetaddr-ip-perl (4.079+dfsg-2build5) ... 214s Selecting previously unselected package libdata-validate-ip-perl. 214s Preparing to unpack .../215-libdata-validate-ip-perl_0.31-1_all.deb ... 214s Unpacking libdata-validate-ip-perl (0.31-1) ... 215s Selecting previously unselected package libdata-validate-uri-perl. 215s Preparing to unpack .../216-libdata-validate-uri-perl_0.07-3_all.deb ... 215s Unpacking libdata-validate-uri-perl (0.07-3) ... 215s Selecting previously unselected package libdevel-size-perl. 215s Preparing to unpack .../217-libdevel-size-perl_0.85-1_armhf.deb ... 215s Unpacking libdevel-size-perl (0.85-1) ... 215s Selecting previously unselected package libemail-address-xs-perl. 215s Preparing to unpack .../218-libemail-address-xs-perl_1.05-1build5_armhf.deb ... 215s Unpacking libemail-address-xs-perl (1.05-1build5) ... 215s Selecting previously unselected package libipc-system-simple-perl. 215s Preparing to unpack .../219-libipc-system-simple-perl_1.30-2_all.deb ... 215s Unpacking libipc-system-simple-perl (1.30-2) ... 215s Selecting previously unselected package libfile-basedir-perl. 215s Preparing to unpack .../220-libfile-basedir-perl_0.09-2_all.deb ... 215s Unpacking libfile-basedir-perl (0.09-2) ... 215s Selecting previously unselected package libfile-find-rule-perl. 215s Preparing to unpack .../221-libfile-find-rule-perl_0.35-1build1_all.deb ... 215s Unpacking libfile-find-rule-perl (0.35-1build1) ... 215s Selecting previously unselected package libio-string-perl. 215s Preparing to unpack .../222-libio-string-perl_1.08-4_all.deb ... 215s Unpacking libio-string-perl (1.08-4) ... 215s Selecting previously unselected package libfont-ttf-perl. 215s Preparing to unpack .../223-libfont-ttf-perl_1.06-2_all.deb ... 215s Unpacking libfont-ttf-perl (1.06-2) ... 215s Selecting previously unselected package libhtml-html5-entities-perl. 215s Preparing to unpack .../224-libhtml-html5-entities-perl_0.004-3_all.deb ... 215s Unpacking libhtml-html5-entities-perl (0.004-3) ... 215s Selecting previously unselected package libhtml-tokeparser-simple-perl. 215s Preparing to unpack .../225-libhtml-tokeparser-simple-perl_3.16-4_all.deb ... 215s Unpacking libhtml-tokeparser-simple-perl (3.16-4) ... 215s Selecting previously unselected package libipc-run3-perl. 215s Preparing to unpack .../226-libipc-run3-perl_0.049-1_all.deb ... 215s Unpacking libipc-run3-perl (0.049-1) ... 215s Selecting previously unselected package libjson-maybexs-perl. 215s Preparing to unpack .../227-libjson-maybexs-perl_1.004008-1_all.deb ... 215s Unpacking libjson-maybexs-perl (1.004008-1) ... 215s Selecting previously unselected package liblist-compare-perl. 215s Preparing to unpack .../228-liblist-compare-perl_0.55-2_all.deb ... 215s Unpacking liblist-compare-perl (0.55-2) ... 215s Selecting previously unselected package liblist-someutils-perl. 215s Preparing to unpack .../229-liblist-someutils-perl_0.59-1_all.deb ... 215s Unpacking liblist-someutils-perl (0.59-1) ... 215s Selecting previously unselected package liblist-utilsby-perl. 215s Preparing to unpack .../230-liblist-utilsby-perl_0.12-2_all.deb ... 215s Unpacking liblist-utilsby-perl (0.12-2) ... 215s Selecting previously unselected package libmldbm-perl. 215s Preparing to unpack .../231-libmldbm-perl_2.05-4_all.deb ... 215s Unpacking libmldbm-perl (2.05-4) ... 215s Selecting previously unselected package libclass-method-modifiers-perl. 215s Preparing to unpack .../232-libclass-method-modifiers-perl_2.15-1_all.deb ... 215s Unpacking libclass-method-modifiers-perl (2.15-1) ... 215s Selecting previously unselected package libimport-into-perl. 215s Preparing to unpack .../233-libimport-into-perl_1.002005-2_all.deb ... 215s Unpacking libimport-into-perl (1.002005-2) ... 215s Selecting previously unselected package librole-tiny-perl. 216s Preparing to unpack .../234-librole-tiny-perl_2.002004-1_all.deb ... 216s Unpacking librole-tiny-perl (2.002004-1) ... 216s Selecting previously unselected package libsub-quote-perl. 216s Preparing to unpack .../235-libsub-quote-perl_2.006009-1ubuntu1_all.deb ... 216s Unpacking libsub-quote-perl (2.006009-1ubuntu1) ... 216s Selecting previously unselected package libmoo-perl. 216s Preparing to unpack .../236-libmoo-perl_2.005005-1_all.deb ... 216s Unpacking libmoo-perl (2.005005-1) ... 216s Selecting previously unselected package libstrictures-perl. 216s Preparing to unpack .../237-libstrictures-perl_2.000006-1build1_all.deb ... 216s Unpacking libstrictures-perl (2.000006-1build1) ... 216s Selecting previously unselected package libmoox-aliases-perl. 216s Preparing to unpack .../238-libmoox-aliases-perl_0.001006-2_all.deb ... 216s Unpacking libmoox-aliases-perl (0.001006-2) ... 216s Selecting previously unselected package libperlio-gzip-perl. 216s Preparing to unpack .../239-libperlio-gzip-perl_0.20-1build5_armhf.deb ... 216s Unpacking libperlio-gzip-perl (0.20-1build5) ... 216s Selecting previously unselected package libperlio-utf8-strict-perl. 216s Preparing to unpack .../240-libperlio-utf8-strict-perl_0.010-1build4_armhf.deb ... 216s Unpacking libperlio-utf8-strict-perl (0.010-1build4) ... 216s Selecting previously unselected package libproc-processtable-perl:armhf. 216s Preparing to unpack .../241-libproc-processtable-perl_0.637-1_armhf.deb ... 216s Unpacking libproc-processtable-perl:armhf (0.637-1) ... 216s Selecting previously unselected package libregexp-wildcards-perl. 216s Preparing to unpack .../242-libregexp-wildcards-perl_1.05-3_all.deb ... 216s Unpacking libregexp-wildcards-perl (1.05-3) ... 216s Selecting previously unselected package libsereal-decoder-perl. 216s Preparing to unpack .../243-libsereal-decoder-perl_5.004+ds-1build5_armhf.deb ... 216s Unpacking libsereal-decoder-perl (5.004+ds-1build5) ... 216s Selecting previously unselected package libsereal-encoder-perl. 216s Preparing to unpack .../244-libsereal-encoder-perl_5.004+ds-1build4_armhf.deb ... 216s Unpacking libsereal-encoder-perl (5.004+ds-1build4) ... 216s Selecting previously unselected package libterm-readkey-perl. 216s Preparing to unpack .../245-libterm-readkey-perl_2.38-2build5_armhf.deb ... 216s Unpacking libterm-readkey-perl (2.38-2build5) ... 216s Selecting previously unselected package libtext-levenshteinxs-perl. 216s Preparing to unpack .../246-libtext-levenshteinxs-perl_0.03-5build5_armhf.deb ... 216s Unpacking libtext-levenshteinxs-perl (0.03-5build5) ... 216s Selecting previously unselected package libmarkdown2:armhf. 216s Preparing to unpack .../247-libmarkdown2_2.2.7-2.1build1_armhf.deb ... 216s Unpacking libmarkdown2:armhf (2.2.7-2.1build1) ... 216s Selecting previously unselected package libtext-markdown-discount-perl. 216s Preparing to unpack .../248-libtext-markdown-discount-perl_0.18-1_armhf.deb ... 216s Unpacking libtext-markdown-discount-perl (0.18-1) ... 216s Selecting previously unselected package libdata-messagepack-perl. 216s Preparing to unpack .../249-libdata-messagepack-perl_1.02-3_armhf.deb ... 216s Unpacking libdata-messagepack-perl (1.02-3) ... 216s Selecting previously unselected package libtext-xslate-perl:armhf. 216s Preparing to unpack .../250-libtext-xslate-perl_3.5.9-2build1_armhf.deb ... 216s Unpacking libtext-xslate-perl:armhf (3.5.9-2build1) ... 216s Selecting previously unselected package libtime-duration-perl. 216s Preparing to unpack .../251-libtime-duration-perl_1.21-2_all.deb ... 216s Unpacking libtime-duration-perl (1.21-2) ... 216s Selecting previously unselected package libtime-moment-perl. 216s Preparing to unpack .../252-libtime-moment-perl_0.46-1_armhf.deb ... 216s Unpacking libtime-moment-perl (0.46-1) ... 216s Selecting previously unselected package libunicode-utf8-perl. 217s Preparing to unpack .../253-libunicode-utf8-perl_0.63-1_armhf.deb ... 217s Unpacking libunicode-utf8-perl (0.63-1) ... 217s Selecting previously unselected package libcgi-pm-perl. 217s Preparing to unpack .../254-libcgi-pm-perl_4.71-1build1_all.deb ... 217s Unpacking libcgi-pm-perl (4.71-1build1) ... 217s Selecting previously unselected package libhtml-form-perl. 217s Preparing to unpack .../255-libhtml-form-perl_6.13-1build1_all.deb ... 217s Unpacking libhtml-form-perl (6.13-1build1) ... 217s Selecting previously unselected package libwww-mechanize-perl. 217s Preparing to unpack .../256-libwww-mechanize-perl_2.20-1ubuntu1_all.deb ... 217s Unpacking libwww-mechanize-perl (2.20-1ubuntu1) ... 217s Selecting previously unselected package libxml-namespacesupport-perl. 217s Preparing to unpack .../257-libxml-namespacesupport-perl_1.12-2_all.deb ... 217s Unpacking libxml-namespacesupport-perl (1.12-2) ... 217s Selecting previously unselected package libxml-sax-base-perl. 217s Preparing to unpack .../258-libxml-sax-base-perl_1.09-3_all.deb ... 217s Unpacking libxml-sax-base-perl (1.09-3) ... 217s Selecting previously unselected package libxml-sax-perl. 217s Preparing to unpack .../259-libxml-sax-perl_1.02+dfsg-4_all.deb ... 217s Unpacking libxml-sax-perl (1.02+dfsg-4) ... 217s Selecting previously unselected package libxml-libxml-perl. 217s Preparing to unpack .../260-libxml-libxml-perl_2.0207+dfsg+really+2.0207-0ubuntu7_armhf.deb ... 217s Unpacking libxml-libxml-perl (2.0207+dfsg+really+2.0207-0ubuntu7) ... 217s Selecting previously unselected package lzip. 217s Preparing to unpack .../261-lzip_1.25-4_armhf.deb ... 217s Unpacking lzip (1.25-4) ... 217s Selecting previously unselected package lzop. 217s Preparing to unpack .../262-lzop_1.04-2build4_armhf.deb ... 217s Unpacking lzop (1.04-2build4) ... 217s Selecting previously unselected package patchutils. 217s Preparing to unpack .../263-patchutils_0.4.3-1_armhf.deb ... 217s Unpacking patchutils (0.4.3-1) ... 217s Selecting previously unselected package t1utils. 217s Preparing to unpack .../264-t1utils_1.41-4build4_armhf.deb ... 217s Unpacking t1utils (1.41-4build4) ... 217s Selecting previously unselected package unzip. 217s Preparing to unpack .../265-unzip_6.0-29ubuntu1_armhf.deb ... 217s Unpacking unzip (6.0-29ubuntu1) ... 217s Selecting previously unselected package lintian. 217s Preparing to unpack .../266-lintian_2.127.0ubuntu1_all.deb ... 217s Unpacking lintian (2.127.0ubuntu1) ... 218s Selecting previously unselected package libconfig-model-dpkg-perl. 218s Preparing to unpack .../267-libconfig-model-dpkg-perl_3.016_all.deb ... 218s Unpacking libconfig-model-dpkg-perl (3.016) ... 218s Selecting previously unselected package libconvert-binhex-perl. 218s Preparing to unpack .../268-libconvert-binhex-perl_1.125-3_all.deb ... 218s Unpacking libconvert-binhex-perl (1.125-3) ... 218s Selecting previously unselected package libnet-smtp-ssl-perl. 218s Preparing to unpack .../269-libnet-smtp-ssl-perl_1.04-2_all.deb ... 218s Unpacking libnet-smtp-ssl-perl (1.04-2) ... 218s Selecting previously unselected package libmailtools-perl. 218s Preparing to unpack .../270-libmailtools-perl_2.22-1_all.deb ... 218s Unpacking libmailtools-perl (2.22-1) ... 218s Selecting previously unselected package libmime-tools-perl. 218s Preparing to unpack .../271-libmime-tools-perl_5.515-1_all.deb ... 218s Unpacking libmime-tools-perl (5.515-1) ... 218s Selecting previously unselected package libb-keywords-perl. 218s Preparing to unpack .../272-libb-keywords-perl_1.29-1_all.deb ... 218s Unpacking libb-keywords-perl (1.29-1) ... 218s Selecting previously unselected package libclass-tiny-perl. 218s Preparing to unpack .../273-libclass-tiny-perl_1.008-2_all.deb ... 218s Unpacking libclass-tiny-perl (1.008-2) ... 218s Selecting previously unselected package liblingua-en-inflect-perl. 218s Preparing to unpack .../274-liblingua-en-inflect-perl_1.905-2_all.deb ... 218s Unpacking liblingua-en-inflect-perl (1.905-2) ... 218s Selecting previously unselected package libpod-spell-perl. 218s Preparing to unpack .../275-libpod-spell-perl_1.27-1_all.deb ... 218s Unpacking libpod-spell-perl (1.27-1) ... 218s Selecting previously unselected package libsafe-isa-perl. 218s Preparing to unpack .../276-libsafe-isa-perl_1.000010-1build1_all.deb ... 218s Unpacking libsafe-isa-perl (1.000010-1build1) ... 219s Selecting previously unselected package libtask-weaken-perl. 219s Preparing to unpack .../277-libtask-weaken-perl_1.06-2_all.deb ... 219s Unpacking libtask-weaken-perl (1.06-2) ... 219s Selecting previously unselected package libppi-perl. 219s Preparing to unpack .../278-libppi-perl_1.284-1_all.deb ... 219s Unpacking libppi-perl (1.284-1) ... 219s Selecting previously unselected package libreadonly-perl. 219s Preparing to unpack .../279-libreadonly-perl_2.050-3_all.deb ... 219s Unpacking libreadonly-perl (2.050-3) ... 219s Selecting previously unselected package libppix-quotelike-perl. 219s Preparing to unpack .../280-libppix-quotelike-perl_0.023-1_all.deb ... 219s Unpacking libppix-quotelike-perl (0.023-1) ... 219s Selecting previously unselected package libppix-regexp-perl. 219s Preparing to unpack .../281-libppix-regexp-perl_0.091-1_all.deb ... 219s Unpacking libppix-regexp-perl (0.091-1) ... 219s Selecting previously unselected package libppix-utils-perl. 219s Preparing to unpack .../282-libppix-utils-perl_0.003-2_all.deb ... 219s Unpacking libppix-utils-perl (0.003-2) ... 219s Selecting previously unselected package libstring-format-perl. 219s Preparing to unpack .../283-libstring-format-perl_1.18-1build1_all.deb ... 219s Unpacking libstring-format-perl (1.18-1build1) ... 219s Selecting previously unselected package perltidy. 219s Preparing to unpack .../284-perltidy_20250105-1build1_all.deb ... 219s Unpacking perltidy (20250105-1build1) ... 219s Selecting previously unselected package libperl-critic-perl. 219s Preparing to unpack .../285-libperl-critic-perl_1.156-1_all.deb ... 219s Unpacking libperl-critic-perl (1.156-1) ... 219s Selecting previously unselected package libtext-wrapper-perl. 219s Preparing to unpack .../286-libtext-wrapper-perl_1.05-4_all.deb ... 219s Unpacking libtext-wrapper-perl (1.05-4) ... 219s Selecting previously unselected package libsuitesparseconfig7:armhf. 219s Preparing to unpack .../287-libsuitesparseconfig7_1%3a7.12.1+dfsg-1_armhf.deb ... 219s Unpacking libsuitesparseconfig7:armhf (1:7.12.1+dfsg-1) ... 219s Selecting previously unselected package libamd3:armhf. 219s Preparing to unpack .../288-libamd3_1%3a7.12.1+dfsg-1_armhf.deb ... 219s Unpacking libamd3:armhf (1:7.12.1+dfsg-1) ... 219s Selecting previously unselected package libblas3:armhf. 219s Preparing to unpack .../289-libblas3_3.12.1-7ubuntu1_armhf.deb ... 219s Unpacking libblas3:armhf (3.12.1-7ubuntu1) ... 219s Selecting previously unselected package libgfortran5:armhf. 219s Preparing to unpack .../290-libgfortran5_15.2.0-12ubuntu1_armhf.deb ... 219s Unpacking libgfortran5:armhf (15.2.0-12ubuntu1) ... 219s Selecting previously unselected package liblapack3:armhf. 219s Preparing to unpack .../291-liblapack3_3.12.1-7ubuntu1_armhf.deb ... 219s Unpacking liblapack3:armhf (3.12.1-7ubuntu1) ... 220s Selecting previously unselected package libarpack2t64:armhf. 220s Preparing to unpack .../292-libarpack2t64_3.9.1-6_armhf.deb ... 220s Unpacking libarpack2t64:armhf (3.9.1-6) ... 220s Selecting previously unselected package libccolamd3:armhf. 220s Preparing to unpack .../293-libccolamd3_1%3a7.12.1+dfsg-1_armhf.deb ... 220s Unpacking libccolamd3:armhf (1:7.12.1+dfsg-1) ... 220s Selecting previously unselected package libcamd3:armhf. 220s Preparing to unpack .../294-libcamd3_1%3a7.12.1+dfsg-1_armhf.deb ... 220s Unpacking libcamd3:armhf (1:7.12.1+dfsg-1) ... 220s Selecting previously unselected package libcolamd3:armhf. 220s Preparing to unpack .../295-libcolamd3_1%3a7.12.1+dfsg-1_armhf.deb ... 220s Unpacking libcolamd3:armhf (1:7.12.1+dfsg-1) ... 220s Selecting previously unselected package libcholmod5:armhf. 220s Preparing to unpack .../296-libcholmod5_1%3a7.12.1+dfsg-1_armhf.deb ... 220s Unpacking libcholmod5:armhf (1:7.12.1+dfsg-1) ... 220s Selecting previously unselected package libcxsparse4:armhf. 220s Preparing to unpack .../297-libcxsparse4_1%3a7.12.1+dfsg-1_armhf.deb ... 220s Unpacking libcxsparse4:armhf (1:7.12.1+dfsg-1) ... 220s Selecting previously unselected package libfftw3-double3:armhf. 220s Preparing to unpack .../298-libfftw3-double3_3.3.10-2fakesync1build2_armhf.deb ... 220s Unpacking libfftw3-double3:armhf (3.3.10-2fakesync1build2) ... 220s Selecting previously unselected package libfftw3-single3:armhf. 220s Preparing to unpack .../299-libfftw3-single3_3.3.10-2fakesync1build2_armhf.deb ... 220s Unpacking libfftw3-single3:armhf (3.3.10-2fakesync1build2) ... 220s Selecting previously unselected package libxfixes3:armhf. 220s Preparing to unpack .../300-libxfixes3_1%3a6.0.0-2build2_armhf.deb ... 220s Unpacking libxfixes3:armhf (1:6.0.0-2build2) ... 220s Selecting previously unselected package libxcursor1:armhf. 220s Preparing to unpack .../301-libxcursor1_1%3a1.2.3-1build1_armhf.deb ... 220s Unpacking libxcursor1:armhf (1:1.2.3-1build1) ... 220s Selecting previously unselected package libxft2:armhf. 220s Preparing to unpack .../302-libxft2_2.3.6-1build2_armhf.deb ... 220s Unpacking libxft2:armhf (2.3.6-1build2) ... 220s Selecting previously unselected package libxinerama1:armhf. 220s Preparing to unpack .../303-libxinerama1_2%3a1.1.4-3build2_armhf.deb ... 220s Unpacking libxinerama1:armhf (2:1.1.4-3build2) ... 220s Selecting previously unselected package libfltk1.3t64:armhf. 220s Preparing to unpack .../304-libfltk1.3t64_1.3.11-3_armhf.deb ... 220s Unpacking libfltk1.3t64:armhf (1.3.11-3) ... 220s Selecting previously unselected package libglvnd0:armhf. 220s Preparing to unpack .../305-libglvnd0_1.7.0-3_armhf.deb ... 220s Unpacking libglvnd0:armhf (1.7.0-3) ... 220s Selecting previously unselected package libllvm21:armhf. 220s Preparing to unpack .../306-libllvm21_1%3a21.1.8-1ubuntu1_armhf.deb ... 220s Unpacking libllvm21:armhf (1:21.1.8-1ubuntu1) ... 222s Selecting previously unselected package libx11-xcb1:armhf. 222s Preparing to unpack .../307-libx11-xcb1_2%3a1.8.12-1build1_armhf.deb ... 222s Unpacking libx11-xcb1:armhf (2:1.8.12-1build1) ... 222s Selecting previously unselected package libxcb-dri3-0:armhf. 222s Preparing to unpack .../308-libxcb-dri3-0_1.17.0-2ubuntu1_armhf.deb ... 222s Unpacking libxcb-dri3-0:armhf (1.17.0-2ubuntu1) ... 222s Selecting previously unselected package libxcb-present0:armhf. 222s Preparing to unpack .../309-libxcb-present0_1.17.0-2ubuntu1_armhf.deb ... 222s Unpacking libxcb-present0:armhf (1.17.0-2ubuntu1) ... 222s Selecting previously unselected package libxcb-randr0:armhf. 222s Preparing to unpack .../310-libxcb-randr0_1.17.0-2ubuntu1_armhf.deb ... 222s Unpacking libxcb-randr0:armhf (1.17.0-2ubuntu1) ... 222s Selecting previously unselected package libxcb-sync1:armhf. 222s Preparing to unpack .../311-libxcb-sync1_1.17.0-2ubuntu1_armhf.deb ... 222s Unpacking libxcb-sync1:armhf (1.17.0-2ubuntu1) ... 222s Selecting previously unselected package libxcb-xfixes0:armhf. 222s Preparing to unpack .../312-libxcb-xfixes0_1.17.0-2ubuntu1_armhf.deb ... 222s Unpacking libxcb-xfixes0:armhf (1.17.0-2ubuntu1) ... 222s Selecting previously unselected package libxshmfence1:armhf. 222s Preparing to unpack .../313-libxshmfence1_1.3.3-1build1_armhf.deb ... 222s Unpacking libxshmfence1:armhf (1.3.3-1build1) ... 222s Selecting previously unselected package mesa-libgallium:armhf. 222s Preparing to unpack .../314-mesa-libgallium_25.3.3-1ubuntu1_armhf.deb ... 222s Unpacking mesa-libgallium:armhf (25.3.3-1ubuntu1) ... 222s Selecting previously unselected package libgbm1:armhf. 222s Preparing to unpack .../315-libgbm1_25.3.3-1ubuntu1_armhf.deb ... 222s Unpacking libgbm1:armhf (25.3.3-1ubuntu1) ... 222s Selecting previously unselected package libvulkan1:armhf. 222s Preparing to unpack .../316-libvulkan1_1.4.335.0-1_armhf.deb ... 222s Unpacking libvulkan1:armhf (1.4.335.0-1) ... 222s Selecting previously unselected package libgl1-mesa-dri:armhf. 223s Preparing to unpack .../317-libgl1-mesa-dri_25.3.3-1ubuntu1_armhf.deb ... 223s Unpacking libgl1-mesa-dri:armhf (25.3.3-1ubuntu1) ... 223s Selecting previously unselected package libxcb-glx0:armhf. 223s Preparing to unpack .../318-libxcb-glx0_1.17.0-2ubuntu1_armhf.deb ... 223s Unpacking libxcb-glx0:armhf (1.17.0-2ubuntu1) ... 223s Selecting previously unselected package libxxf86vm1:armhf. 223s Preparing to unpack .../319-libxxf86vm1_1%3a1.1.4-2_armhf.deb ... 223s Unpacking libxxf86vm1:armhf (1:1.1.4-2) ... 223s Selecting previously unselected package libglx-mesa0:armhf. 223s Preparing to unpack .../320-libglx-mesa0_25.3.3-1ubuntu1_armhf.deb ... 223s Unpacking libglx-mesa0:armhf (25.3.3-1ubuntu1) ... 223s Selecting previously unselected package libglx0:armhf. 223s Preparing to unpack .../321-libglx0_1.7.0-3_armhf.deb ... 223s Unpacking libglx0:armhf (1.7.0-3) ... 223s Selecting previously unselected package libgl1:armhf. 223s Preparing to unpack .../322-libgl1_1.7.0-3_armhf.deb ... 223s Unpacking libgl1:armhf (1.7.0-3) ... 223s Selecting previously unselected package libfltk-gl1.3t64:armhf. 223s Preparing to unpack .../323-libfltk-gl1.3t64_1.3.11-3_armhf.deb ... 223s Unpacking libfltk-gl1.3t64:armhf (1.3.11-3) ... 223s Selecting previously unselected package libgl2ps1.4:armhf. 223s Preparing to unpack .../324-libgl2ps1.4_1.4.2+dfsg1-4_armhf.deb ... 223s Unpacking libgl2ps1.4:armhf (1.4.2+dfsg1-4) ... 223s Selecting previously unselected package libltdl7:armhf. 223s Preparing to unpack .../325-libltdl7_2.5.4-9_armhf.deb ... 223s Unpacking libltdl7:armhf (2.5.4-9) ... 223s Selecting previously unselected package libglpk40:armhf. 223s Preparing to unpack .../326-libglpk40_5.0-2_armhf.deb ... 223s Unpacking libglpk40:armhf (5.0-2) ... 223s Selecting previously unselected package libopengl0:armhf. 223s Preparing to unpack .../327-libopengl0_1.7.0-3_armhf.deb ... 223s Unpacking libopengl0:armhf (1.7.0-3) ... 223s Selecting previously unselected package libglu1-mesa:armhf. 223s Preparing to unpack .../328-libglu1-mesa_9.0.2-1.1build2_armhf.deb ... 223s Unpacking libglu1-mesa:armhf (9.0.2-1.1build2) ... 223s Selecting previously unselected package liblcms2-2:armhf. 223s Preparing to unpack .../329-liblcms2-2_2.17-1_armhf.deb ... 223s Unpacking liblcms2-2:armhf (2.17-1) ... 223s Selecting previously unselected package libjxl0.11:armhf. 223s Preparing to unpack .../330-libjxl0.11_0.11.1-6ubuntu1_armhf.deb ... 223s Unpacking libjxl0.11:armhf (0.11.1-6ubuntu1) ... 223s Selecting previously unselected package libwmflite-0.2-7:armhf. 223s Preparing to unpack .../331-libwmflite-0.2-7_0.2.13-2_armhf.deb ... 223s Unpacking libwmflite-0.2-7:armhf (0.2.13-2) ... 223s Selecting previously unselected package libgraphicsmagick-q16-3t64. 223s Preparing to unpack .../332-libgraphicsmagick-q16-3t64_1.4+really1.3.45+hg17696-1build1_armhf.deb ... 223s Unpacking libgraphicsmagick-q16-3t64 (1.4+really1.3.45+hg17696-1build1) ... 224s Selecting previously unselected package libgraphicsmagick++-q16-12t64. 224s Preparing to unpack .../333-libgraphicsmagick++-q16-12t64_1.4+really1.3.45+hg17696-1build1_armhf.deb ... 224s Unpacking libgraphicsmagick++-q16-12t64 (1.4+really1.3.45+hg17696-1build1) ... 224s Selecting previously unselected package libsz2:armhf. 224s Preparing to unpack .../334-libsz2_1.1.5-1_armhf.deb ... 224s Unpacking libsz2:armhf (1.1.5-1) ... 224s Selecting previously unselected package libhdf5-310:armhf. 224s Preparing to unpack .../335-libhdf5-310_1.14.6+repack-2_armhf.deb ... 224s Unpacking libhdf5-310:armhf (1.14.6+repack-2) ... 224s Selecting previously unselected package libasound2-data. 224s Preparing to unpack .../336-libasound2-data_1.2.15.3-1ubuntu1_all.deb ... 224s Unpacking libasound2-data (1.2.15.3-1ubuntu1) ... 224s Selecting previously unselected package libasound2t64:armhf. 224s Preparing to unpack .../337-libasound2t64_1.2.15.3-1ubuntu1_armhf.deb ... 224s Unpacking libasound2t64:armhf (1.2.15.3-1ubuntu1) ... 224s Selecting previously unselected package libopus0:armhf. 224s Preparing to unpack .../338-libopus0_1.6.1-1_armhf.deb ... 224s Unpacking libopus0:armhf (1.6.1-1) ... 224s Selecting previously unselected package libsamplerate0:armhf. 224s Preparing to unpack .../339-libsamplerate0_0.2.2-4build2_armhf.deb ... 224s Unpacking libsamplerate0:armhf (0.2.2-4build2) ... 224s Selecting previously unselected package libjack-jackd2-0:armhf. 224s Preparing to unpack .../340-libjack-jackd2-0_1.9.22~dfsg-5_armhf.deb ... 224s Unpacking libjack-jackd2-0:armhf (1.9.22~dfsg-5) ... 224s Selecting previously unselected package libasyncns0:armhf. 224s Preparing to unpack .../341-libasyncns0_0.8-7_armhf.deb ... 224s Unpacking libasyncns0:armhf (0.8-7) ... 224s Selecting previously unselected package libogg0:armhf. 224s Preparing to unpack .../342-libogg0_1.3.6-2_armhf.deb ... 224s Unpacking libogg0:armhf (1.3.6-2) ... 224s Selecting previously unselected package libflac14:armhf. 224s Preparing to unpack .../343-libflac14_1.5.0+ds-5_armhf.deb ... 224s Unpacking libflac14:armhf (1.5.0+ds-5) ... 224s Selecting previously unselected package libmp3lame0:armhf. 224s Preparing to unpack .../344-libmp3lame0_3.100-6build2_armhf.deb ... 224s Unpacking libmp3lame0:armhf (3.100-6build2) ... 224s Selecting previously unselected package libmpg123-0t64:armhf. 224s Preparing to unpack .../345-libmpg123-0t64_1.33.3-2_armhf.deb ... 224s Unpacking libmpg123-0t64:armhf (1.33.3-2) ... 224s Selecting previously unselected package libvorbis0a:armhf. 224s Preparing to unpack .../346-libvorbis0a_1.3.7-3build1_armhf.deb ... 224s Unpacking libvorbis0a:armhf (1.3.7-3build1) ... 224s Selecting previously unselected package libvorbisenc2:armhf. 225s Preparing to unpack .../347-libvorbisenc2_1.3.7-3build1_armhf.deb ... 225s Unpacking libvorbisenc2:armhf (1.3.7-3build1) ... 225s Selecting previously unselected package libsndfile1:armhf. 225s Preparing to unpack .../348-libsndfile1_1.2.2-4_armhf.deb ... 225s Unpacking libsndfile1:armhf (1.2.2-4) ... 225s Selecting previously unselected package libpulse0:armhf. 225s Preparing to unpack .../349-libpulse0_1%3a17.0+dfsg1-2ubuntu4_armhf.deb ... 225s Unpacking libpulse0:armhf (1:17.0+dfsg1-2ubuntu4) ... 225s Selecting previously unselected package libportaudio2:armhf. 225s Preparing to unpack .../350-libportaudio2_19.7.0+git20251227.3270c9ae-0ubuntu1_armhf.deb ... 225s Unpacking libportaudio2:armhf (19.7.0+git20251227.3270c9ae-0ubuntu1) ... 225s Selecting previously unselected package libqhull-r8.0:armhf. 225s Preparing to unpack .../351-libqhull-r8.0_2020.2-8_armhf.deb ... 225s Unpacking libqhull-r8.0:armhf (2020.2-8) ... 225s Selecting previously unselected package libqrupdate1:armhf. 225s Preparing to unpack .../352-libqrupdate1_1.1.5-3_armhf.deb ... 225s Unpacking libqrupdate1:armhf (1.1.5-3) ... 225s Selecting previously unselected package libqscintilla2-qt6-l10n. 225s Preparing to unpack .../353-libqscintilla2-qt6-l10n_2.14.1+dfsg-2_all.deb ... 225s Unpacking libqscintilla2-qt6-l10n (2.14.1+dfsg-2) ... 225s Selecting previously unselected package libb2-1:armhf. 225s Preparing to unpack .../354-libb2-1_0.98.1-1.1build2_armhf.deb ... 225s Unpacking libb2-1:armhf (0.98.1-1.1build2) ... 225s Selecting previously unselected package libdouble-conversion3:armhf. 225s Preparing to unpack .../355-libdouble-conversion3_3.4.0-1_armhf.deb ... 225s Unpacking libdouble-conversion3:armhf (3.4.0-1) ... 225s Selecting previously unselected package libpcre2-16-0:armhf. 225s Preparing to unpack .../356-libpcre2-16-0_10.46-1_armhf.deb ... 225s Unpacking libpcre2-16-0:armhf (10.46-1) ... 225s Selecting previously unselected package libqt6core6t64:armhf. 225s Preparing to unpack .../357-libqt6core6t64_6.9.2+dfsg-3ubuntu2_armhf.deb ... 225s Unpacking libqt6core6t64:armhf (6.9.2+dfsg-3ubuntu2) ... 225s Selecting previously unselected package libwayland-client0:armhf. 225s Preparing to unpack .../358-libwayland-client0_1.24.0-2_armhf.deb ... 225s Unpacking libwayland-client0:armhf (1.24.0-2) ... 225s Selecting previously unselected package libegl-mesa0:armhf. 225s Preparing to unpack .../359-libegl-mesa0_25.3.3-1ubuntu1_armhf.deb ... 225s Unpacking libegl-mesa0:armhf (25.3.3-1ubuntu1) ... 225s Selecting previously unselected package libegl1:armhf. 225s Preparing to unpack .../360-libegl1_1.7.0-3_armhf.deb ... 225s Unpacking libegl1:armhf (1.7.0-3) ... 225s Selecting previously unselected package x11-common. 225s Preparing to unpack .../361-x11-common_1%3a7.7+24ubuntu1_all.deb ... 225s Unpacking x11-common (1:7.7+24ubuntu1) ... 225s Selecting previously unselected package libice6:armhf. 225s Preparing to unpack .../362-libice6_2%3a1.1.1-1build1_armhf.deb ... 225s Unpacking libice6:armhf (2:1.1.1-1build1) ... 225s Selecting previously unselected package libmtdev1t64:armhf. 225s Preparing to unpack .../363-libmtdev1t64_1.1.7-1build1_armhf.deb ... 225s Unpacking libmtdev1t64:armhf (1.1.7-1build1) ... 226s Selecting previously unselected package libwacom-common. 226s Preparing to unpack .../364-libwacom-common_2.16.1-1_all.deb ... 226s Unpacking libwacom-common (2.16.1-1) ... 226s Selecting previously unselected package libwacom9:armhf. 226s Preparing to unpack .../365-libwacom9_2.16.1-1_armhf.deb ... 226s Unpacking libwacom9:armhf (2.16.1-1) ... 226s Selecting previously unselected package libinput-bin. 226s Preparing to unpack .../366-libinput-bin_1.30.1-1_armhf.deb ... 226s Unpacking libinput-bin (1.30.1-1) ... 226s Selecting previously unselected package libinput10:armhf. 226s Preparing to unpack .../367-libinput10_1.30.1-1_armhf.deb ... 226s Unpacking libinput10:armhf (1.30.1-1) ... 226s Selecting previously unselected package libmd4c0:armhf. 226s Preparing to unpack .../368-libmd4c0_0.5.2-2build1_armhf.deb ... 226s Unpacking libmd4c0:armhf (0.5.2-2build1) ... 226s Selecting previously unselected package libqt6dbus6:armhf. 226s Preparing to unpack .../369-libqt6dbus6_6.9.2+dfsg-3ubuntu2_armhf.deb ... 226s Unpacking libqt6dbus6:armhf (6.9.2+dfsg-3ubuntu2) ... 226s Selecting previously unselected package libsm6:armhf. 226s Preparing to unpack .../370-libsm6_2%3a1.2.6-1_armhf.deb ... 226s Unpacking libsm6:armhf (2:1.2.6-1) ... 226s Selecting previously unselected package libts0t64:armhf. 226s Preparing to unpack .../371-libts0t64_1.22-1.1build2_armhf.deb ... 226s Unpacking libts0t64:armhf (1.22-1.1build2) ... 226s Selecting previously unselected package libxcb-util1:armhf. 226s Preparing to unpack .../372-libxcb-util1_0.4.1-1build1_armhf.deb ... 226s Unpacking libxcb-util1:armhf (0.4.1-1build1) ... 226s Selecting previously unselected package libxcb-image0:armhf. 226s Preparing to unpack .../373-libxcb-image0_0.4.0-2build2_armhf.deb ... 226s Unpacking libxcb-image0:armhf (0.4.0-2build2) ... 226s Selecting previously unselected package libxcb-render-util0:armhf. 226s Preparing to unpack .../374-libxcb-render-util0_0.3.10-1build1_armhf.deb ... 226s Unpacking libxcb-render-util0:armhf (0.3.10-1build1) ... 226s Selecting previously unselected package libxcb-cursor0:armhf. 226s Preparing to unpack .../375-libxcb-cursor0_0.1.5-1build1_armhf.deb ... 226s Unpacking libxcb-cursor0:armhf (0.1.5-1build1) ... 226s Selecting previously unselected package libxcb-icccm4:armhf. 226s Preparing to unpack .../376-libxcb-icccm4_0.4.2-1build1_armhf.deb ... 226s Unpacking libxcb-icccm4:armhf (0.4.2-1build1) ... 226s Selecting previously unselected package libxcb-keysyms1:armhf. 226s Preparing to unpack .../377-libxcb-keysyms1_0.4.1-1build1_armhf.deb ... 226s Unpacking libxcb-keysyms1:armhf (0.4.1-1build1) ... 227s Selecting previously unselected package libxcb-shape0:armhf. 227s Preparing to unpack .../378-libxcb-shape0_1.17.0-2ubuntu1_armhf.deb ... 227s Unpacking libxcb-shape0:armhf (1.17.0-2ubuntu1) ... 227s Selecting previously unselected package libxcb-xinput0:armhf. 227s Preparing to unpack .../379-libxcb-xinput0_1.17.0-2ubuntu1_armhf.deb ... 227s Unpacking libxcb-xinput0:armhf (1.17.0-2ubuntu1) ... 227s Selecting previously unselected package libxcb-xkb1:armhf. 227s Preparing to unpack .../380-libxcb-xkb1_1.17.0-2ubuntu1_armhf.deb ... 227s Unpacking libxcb-xkb1:armhf (1.17.0-2ubuntu1) ... 227s Selecting previously unselected package libxkbcommon-x11-0:armhf. 227s Preparing to unpack .../381-libxkbcommon-x11-0_1.12.3-1_armhf.deb ... 227s Unpacking libxkbcommon-x11-0:armhf (1.12.3-1) ... 227s Selecting previously unselected package libqt6gui6:armhf. 227s Preparing to unpack .../382-libqt6gui6_6.9.2+dfsg-3ubuntu2_armhf.deb ... 227s Unpacking libqt6gui6:armhf (6.9.2+dfsg-3ubuntu2) ... 227s Selecting previously unselected package libavahi-common-data:armhf. 227s Preparing to unpack .../383-libavahi-common-data_0.8-17ubuntu2_armhf.deb ... 227s Unpacking libavahi-common-data:armhf (0.8-17ubuntu2) ... 227s Selecting previously unselected package libavahi-common3:armhf. 227s Preparing to unpack .../384-libavahi-common3_0.8-17ubuntu2_armhf.deb ... 227s Unpacking libavahi-common3:armhf (0.8-17ubuntu2) ... 227s Selecting previously unselected package libavahi-client3:armhf. 227s Preparing to unpack .../385-libavahi-client3_0.8-17ubuntu2_armhf.deb ... 227s Unpacking libavahi-client3:armhf (0.8-17ubuntu2) ... 227s Selecting previously unselected package libcups2t64:armhf. 227s Preparing to unpack .../386-libcups2t64_2.4.16-1ubuntu1_armhf.deb ... 227s Unpacking libcups2t64:armhf (2.4.16-1ubuntu1) ... 227s Selecting previously unselected package libqt6widgets6:armhf. 227s Preparing to unpack .../387-libqt6widgets6_6.9.2+dfsg-3ubuntu2_armhf.deb ... 227s Unpacking libqt6widgets6:armhf (6.9.2+dfsg-3ubuntu2) ... 227s Selecting previously unselected package libqt6printsupport6:armhf. 227s Preparing to unpack .../388-libqt6printsupport6_6.9.2+dfsg-3ubuntu2_armhf.deb ... 227s Unpacking libqt6printsupport6:armhf (6.9.2+dfsg-3ubuntu2) ... 227s Selecting previously unselected package libqscintilla2-qt6-15:armhf. 227s Preparing to unpack .../389-libqscintilla2-qt6-15_2.14.1+dfsg-2_armhf.deb ... 227s Unpacking libqscintilla2-qt6-15:armhf (2.14.1+dfsg-2) ... 228s Selecting previously unselected package libqt6core5compat6:armhf. 228s Preparing to unpack .../390-libqt6core5compat6_6.9.2-3build1_armhf.deb ... 228s Unpacking libqt6core5compat6:armhf (6.9.2-3build1) ... 228s Selecting previously unselected package libqt6sql6:armhf. 228s Preparing to unpack .../391-libqt6sql6_6.9.2+dfsg-3ubuntu2_armhf.deb ... 228s Unpacking libqt6sql6:armhf (6.9.2+dfsg-3ubuntu2) ... 228s Selecting previously unselected package libqt6help6:armhf. 228s Preparing to unpack .../392-libqt6help6_6.9.2-5_armhf.deb ... 228s Unpacking libqt6help6:armhf (6.9.2-5) ... 228s Selecting previously unselected package libduktape207:armhf. 228s Preparing to unpack .../393-libduktape207_2.7.0+tests-0ubuntu4_armhf.deb ... 228s Unpacking libduktape207:armhf (2.7.0+tests-0ubuntu4) ... 228s Selecting previously unselected package libproxy1v5:armhf. 228s Preparing to unpack .../394-libproxy1v5_0.5.12-1_armhf.deb ... 228s Unpacking libproxy1v5:armhf (0.5.12-1) ... 228s Selecting previously unselected package libqt6network6:armhf. 228s Preparing to unpack .../395-libqt6network6_6.9.2+dfsg-3ubuntu2_armhf.deb ... 228s Unpacking libqt6network6:armhf (6.9.2+dfsg-3ubuntu2) ... 228s Selecting previously unselected package libqt6opengl6:armhf. 228s Preparing to unpack .../396-libqt6opengl6_6.9.2+dfsg-3ubuntu2_armhf.deb ... 228s Unpacking libqt6opengl6:armhf (6.9.2+dfsg-3ubuntu2) ... 228s Selecting previously unselected package libqt6openglwidgets6:armhf. 228s Preparing to unpack .../397-libqt6openglwidgets6_6.9.2+dfsg-3ubuntu2_armhf.deb ... 228s Unpacking libqt6openglwidgets6:armhf (6.9.2+dfsg-3ubuntu2) ... 229s Selecting previously unselected package libqt6xml6:armhf. 229s Preparing to unpack .../398-libqt6xml6_6.9.2+dfsg-3ubuntu2_armhf.deb ... 229s Unpacking libqt6xml6:armhf (6.9.2+dfsg-3ubuntu2) ... 229s Selecting previously unselected package libspqr4:armhf. 229s Preparing to unpack .../399-libspqr4_1%3a7.12.1+dfsg-1_armhf.deb ... 229s Unpacking libspqr4:armhf (1:7.12.1+dfsg-1) ... 229s Selecting previously unselected package libumfpack6:armhf. 229s Preparing to unpack .../400-libumfpack6_1%3a7.12.1+dfsg-1_armhf.deb ... 229s Unpacking libumfpack6:armhf (1:7.12.1+dfsg-1) ... 229s Selecting previously unselected package libtext-unidecode-perl. 229s Preparing to unpack .../401-libtext-unidecode-perl_1.30-3_all.deb ... 229s Unpacking libtext-unidecode-perl (1.30-3) ... 229s Selecting previously unselected package libintl-perl. 229s Preparing to unpack .../402-libintl-perl_1.35-1_all.deb ... 229s Unpacking libintl-perl (1.35-1) ... 229s Selecting previously unselected package texinfo-lib. 229s Preparing to unpack .../403-texinfo-lib_7.2-5_armhf.deb ... 229s Unpacking texinfo-lib (7.2-5) ... 229s Selecting previously unselected package tex-common. 229s Preparing to unpack .../404-tex-common_6.20_all.deb ... 229s Unpacking tex-common (6.20) ... 229s Selecting previously unselected package texinfo. 229s Preparing to unpack .../405-texinfo_7.2-5_all.deb ... 229s Unpacking texinfo (7.2-5) ... 229s Selecting previously unselected package octave-common. 229s Preparing to unpack .../406-octave-common_10.3.0-3_all.deb ... 229s Unpacking octave-common (10.3.0-3) ... 230s Selecting previously unselected package octave. 230s Preparing to unpack .../407-octave_10.3.0-3_armhf.deb ... 230s Unpacking octave (10.3.0-3) ... 230s Selecting previously unselected package libncurses-dev:armhf. 230s Preparing to unpack .../408-libncurses-dev_6.6+20251231-1_armhf.deb ... 230s Unpacking libncurses-dev:armhf (6.6+20251231-1) ... 230s Selecting previously unselected package libreadline-dev:armhf. 230s Preparing to unpack .../409-libreadline-dev_8.3-3_armhf.deb ... 230s Unpacking libreadline-dev:armhf (8.3-3) ... 230s Selecting previously unselected package libhdf5-fortran-310:armhf. 230s Preparing to unpack .../410-libhdf5-fortran-310_1.14.6+repack-2_armhf.deb ... 230s Unpacking libhdf5-fortran-310:armhf (1.14.6+repack-2) ... 230s Selecting previously unselected package libhdf5-hl-310:armhf. 230s Preparing to unpack .../411-libhdf5-hl-310_1.14.6+repack-2_armhf.deb ... 230s Unpacking libhdf5-hl-310:armhf (1.14.6+repack-2) ... 230s Selecting previously unselected package libhdf5-hl-fortran-310:armhf. 230s Preparing to unpack .../412-libhdf5-hl-fortran-310_1.14.6+repack-2_armhf.deb ... 230s Unpacking libhdf5-hl-fortran-310:armhf (1.14.6+repack-2) ... 230s Selecting previously unselected package libhdf5-cpp-310:armhf. 230s Preparing to unpack .../413-libhdf5-cpp-310_1.14.6+repack-2_armhf.deb ... 230s Unpacking libhdf5-cpp-310:armhf (1.14.6+repack-2) ... 230s Selecting previously unselected package libhdf5-hl-cpp-310:armhf. 230s Preparing to unpack .../414-libhdf5-hl-cpp-310_1.14.6+repack-2_armhf.deb ... 230s Unpacking libhdf5-hl-cpp-310:armhf (1.14.6+repack-2) ... 230s Selecting previously unselected package zlib1g-dev:armhf. 230s Preparing to unpack .../415-zlib1g-dev_1%3a1.3.dfsg+really1.3.1-1ubuntu2_armhf.deb ... 230s Unpacking zlib1g-dev:armhf (1:1.3.dfsg+really1.3.1-1ubuntu2) ... 230s Selecting previously unselected package libjpeg-turbo8-dev:armhf. 231s Preparing to unpack .../416-libjpeg-turbo8-dev_2.1.5-4ubuntu2_armhf.deb ... 231s Unpacking libjpeg-turbo8-dev:armhf (2.1.5-4ubuntu2) ... 231s Selecting previously unselected package libjpeg8-dev:armhf. 231s Preparing to unpack .../417-libjpeg8-dev_8c-2ubuntu11_armhf.deb ... 231s Unpacking libjpeg8-dev:armhf (8c-2ubuntu11) ... 231s Selecting previously unselected package libjpeg-dev:armhf. 231s Preparing to unpack .../418-libjpeg-dev_8c-2ubuntu11_armhf.deb ... 231s Unpacking libjpeg-dev:armhf (8c-2ubuntu11) ... 231s Selecting previously unselected package libaec0:armhf. 231s Preparing to unpack .../419-libaec0_1.1.5-1_armhf.deb ... 231s Unpacking libaec0:armhf (1.1.5-1) ... 231s Selecting previously unselected package libaec-dev:armhf. 231s Preparing to unpack .../420-libaec-dev_1.1.5-1_armhf.deb ... 231s Unpacking libaec-dev:armhf (1.1.5-1) ... 231s Selecting previously unselected package libbrotli-dev:armhf. 231s Preparing to unpack .../421-libbrotli-dev_1.1.0-2build6_armhf.deb ... 231s Unpacking libbrotli-dev:armhf (1.1.0-2build6) ... 231s Selecting previously unselected package libidn2-dev:armhf. 231s Preparing to unpack .../422-libidn2-dev_2.3.8-4_armhf.deb ... 231s Unpacking libidn2-dev:armhf (2.3.8-4) ... 231s Selecting previously unselected package comerr-dev:armhf. 231s Preparing to unpack .../423-comerr-dev_2.1-1.47.2-3ubuntu2_armhf.deb ... 231s Unpacking comerr-dev:armhf (2.1-1.47.2-3ubuntu2) ... 231s Selecting previously unselected package libgssrpc4t64:armhf. 231s Preparing to unpack .../424-libgssrpc4t64_1.22.1-2_armhf.deb ... 231s Unpacking libgssrpc4t64:armhf (1.22.1-2) ... 231s Selecting previously unselected package libkadm5clnt-mit12:armhf. 231s Preparing to unpack .../425-libkadm5clnt-mit12_1.22.1-2_armhf.deb ... 231s Unpacking libkadm5clnt-mit12:armhf (1.22.1-2) ... 231s Selecting previously unselected package libkdb5-10t64:armhf. 231s Preparing to unpack .../426-libkdb5-10t64_1.22.1-2_armhf.deb ... 231s Unpacking libkdb5-10t64:armhf (1.22.1-2) ... 231s Selecting previously unselected package libkadm5srv-mit12:armhf. 231s Preparing to unpack .../427-libkadm5srv-mit12_1.22.1-2_armhf.deb ... 231s Unpacking libkadm5srv-mit12:armhf (1.22.1-2) ... 231s Selecting previously unselected package krb5-multidev:armhf. 231s Preparing to unpack .../428-krb5-multidev_1.22.1-2_armhf.deb ... 231s Unpacking krb5-multidev:armhf (1.22.1-2) ... 231s Selecting previously unselected package libkrb5-dev:armhf. 231s Preparing to unpack .../429-libkrb5-dev_1.22.1-2_armhf.deb ... 231s Unpacking libkrb5-dev:armhf (1.22.1-2) ... 231s Selecting previously unselected package libldap-dev:armhf. 231s Preparing to unpack .../430-libldap-dev_2.6.10+dfsg-1ubuntu5_armhf.deb ... 231s Unpacking libldap-dev:armhf (2.6.10+dfsg-1ubuntu5) ... 231s Selecting previously unselected package libpkgconf3:armhf. 231s Preparing to unpack .../431-libpkgconf3_1.8.1-4build1_armhf.deb ... 231s Unpacking libpkgconf3:armhf (1.8.1-4build1) ... 232s Selecting previously unselected package pkgconf-bin. 232s Preparing to unpack .../432-pkgconf-bin_1.8.1-4build1_armhf.deb ... 232s Unpacking pkgconf-bin (1.8.1-4build1) ... 232s Selecting previously unselected package pkgconf:armhf. 232s Preparing to unpack .../433-pkgconf_1.8.1-4build1_armhf.deb ... 232s Unpacking pkgconf:armhf (1.8.1-4build1) ... 232s Selecting previously unselected package libnghttp2-dev:armhf. 232s Preparing to unpack .../434-libnghttp2-dev_1.64.0-1.1ubuntu1_armhf.deb ... 232s Unpacking libnghttp2-dev:armhf (1.64.0-1.1ubuntu1) ... 232s Selecting previously unselected package libpsl-dev:armhf. 232s Preparing to unpack .../435-libpsl-dev_0.21.2-1.1build2_armhf.deb ... 232s Unpacking libpsl-dev:armhf (0.21.2-1.1build2) ... 232s Selecting previously unselected package libgmpxx4ldbl:armhf. 232s Preparing to unpack .../436-libgmpxx4ldbl_2%3a6.3.0+dfsg-5ubuntu1_armhf.deb ... 232s Unpacking libgmpxx4ldbl:armhf (2:6.3.0+dfsg-5ubuntu1) ... 232s Selecting previously unselected package libgmp-dev:armhf. 232s Preparing to unpack .../437-libgmp-dev_2%3a6.3.0+dfsg-5ubuntu1_armhf.deb ... 232s Unpacking libgmp-dev:armhf (2:6.3.0+dfsg-5ubuntu1) ... 232s Selecting previously unselected package libevent-2.1-7t64:armhf. 232s Preparing to unpack .../438-libevent-2.1-7t64_2.1.12-stable-10build1_armhf.deb ... 232s Unpacking libevent-2.1-7t64:armhf (2.1.12-stable-10build1) ... 232s Selecting previously unselected package libunbound8:armhf. 232s Preparing to unpack .../439-libunbound8_1.24.2-1ubuntu1_armhf.deb ... 232s Unpacking libunbound8:armhf (1.24.2-1ubuntu1) ... 232s Selecting previously unselected package libgnutls-dane0t64:armhf. 232s Preparing to unpack .../440-libgnutls-dane0t64_3.8.10-3ubuntu1_armhf.deb ... 232s Unpacking libgnutls-dane0t64:armhf (3.8.10-3ubuntu1) ... 232s Selecting previously unselected package libgnutls-openssl27t64:armhf. 232s Preparing to unpack .../441-libgnutls-openssl27t64_3.8.10-3ubuntu1_armhf.deb ... 232s Unpacking libgnutls-openssl27t64:armhf (3.8.10-3ubuntu1) ... 232s Selecting previously unselected package libp11-kit-dev:armhf. 232s Preparing to unpack .../442-libp11-kit-dev_0.25.10-1_armhf.deb ... 232s Unpacking libp11-kit-dev:armhf (0.25.10-1) ... 232s Selecting previously unselected package libtasn1-6-dev:armhf. 232s Preparing to unpack .../443-libtasn1-6-dev_4.21.0-2_armhf.deb ... 232s Unpacking libtasn1-6-dev:armhf (4.21.0-2) ... 232s Selecting previously unselected package nettle-dev:armhf. 232s Preparing to unpack .../444-nettle-dev_3.10.2-1_armhf.deb ... 232s Unpacking nettle-dev:armhf (3.10.2-1) ... 232s Selecting previously unselected package libgnutls28-dev:armhf. 232s Preparing to unpack .../445-libgnutls28-dev_3.8.10-3ubuntu1_armhf.deb ... 232s Unpacking libgnutls28-dev:armhf (3.8.10-3ubuntu1) ... 232s Selecting previously unselected package librtmp-dev:armhf. 232s Preparing to unpack .../446-librtmp-dev_2.4+20151223.gitfa8646d.1-3_armhf.deb ... 232s Unpacking librtmp-dev:armhf (2.4+20151223.gitfa8646d.1-3) ... 233s Selecting previously unselected package libssl-dev:armhf. 233s Preparing to unpack .../447-libssl-dev_3.5.3-1ubuntu2_armhf.deb ... 233s Unpacking libssl-dev:armhf (3.5.3-1ubuntu2) ... 233s Selecting previously unselected package libssh2-1-dev:armhf. 233s Preparing to unpack .../448-libssh2-1-dev_1.11.1-1build1_armhf.deb ... 233s Unpacking libssh2-1-dev:armhf (1.11.1-1build1) ... 233s Selecting previously unselected package libzstd-dev:armhf. 233s Preparing to unpack .../449-libzstd-dev_1.5.7+dfsg-3_armhf.deb ... 233s Unpacking libzstd-dev:armhf (1.5.7+dfsg-3) ... 233s Selecting previously unselected package libcurl4-openssl-dev:armhf. 233s Preparing to unpack .../450-libcurl4-openssl-dev_8.18.0-1ubuntu1_armhf.deb ... 233s Unpacking libcurl4-openssl-dev:armhf (8.18.0-1ubuntu1) ... 233s Selecting previously unselected package hdf5-helpers. 233s Preparing to unpack .../451-hdf5-helpers_1.14.6+repack-2_armhf.deb ... 233s Unpacking hdf5-helpers (1.14.6+repack-2) ... 233s Selecting previously unselected package libhdf5-dev. 233s Preparing to unpack .../452-libhdf5-dev_1.14.6+repack-2_armhf.deb ... 233s Unpacking libhdf5-dev (1.14.6+repack-2) ... 233s Selecting previously unselected package xorg-sgml-doctools. 233s Preparing to unpack .../453-xorg-sgml-doctools_1%3a1.11-1.1build1_all.deb ... 233s Unpacking xorg-sgml-doctools (1:1.11-1.1build1) ... 233s Selecting previously unselected package x11proto-dev. 233s Preparing to unpack .../454-x11proto-dev_2025.1-1_all.deb ... 233s Unpacking x11proto-dev (2025.1-1) ... 233s Selecting previously unselected package libxau-dev:armhf. 233s Preparing to unpack .../455-libxau-dev_1%3a1.0.11-1build1_armhf.deb ... 233s Unpacking libxau-dev:armhf (1:1.0.11-1build1) ... 233s Selecting previously unselected package libxdmcp-dev:armhf. 233s Preparing to unpack .../456-libxdmcp-dev_1%3a1.1.5-2_armhf.deb ... 233s Unpacking libxdmcp-dev:armhf (1:1.1.5-2) ... 233s Selecting previously unselected package xtrans-dev. 233s Preparing to unpack .../457-xtrans-dev_1.6.0-1build1_all.deb ... 233s Unpacking xtrans-dev (1.6.0-1build1) ... 234s Selecting previously unselected package libxcb1-dev:armhf. 234s Preparing to unpack .../458-libxcb1-dev_1.17.0-2ubuntu1_armhf.deb ... 234s Unpacking libxcb1-dev:armhf (1.17.0-2ubuntu1) ... 234s Selecting previously unselected package libx11-dev:armhf. 234s Preparing to unpack .../459-libx11-dev_2%3a1.8.12-1build1_armhf.deb ... 234s Unpacking libx11-dev:armhf (2:1.8.12-1build1) ... 234s Selecting previously unselected package libglx-dev:armhf. 234s Preparing to unpack .../460-libglx-dev_1.7.0-3_armhf.deb ... 234s Unpacking libglx-dev:armhf (1.7.0-3) ... 234s Selecting previously unselected package libgl-dev:armhf. 234s Preparing to unpack .../461-libgl-dev_1.7.0-3_armhf.deb ... 234s Unpacking libgl-dev:armhf (1.7.0-3) ... 234s Selecting previously unselected package libblas-dev:armhf. 234s Preparing to unpack .../462-libblas-dev_3.12.1-7ubuntu1_armhf.deb ... 234s Unpacking libblas-dev:armhf (3.12.1-7ubuntu1) ... 234s Selecting previously unselected package liblapack-dev:armhf. 234s Preparing to unpack .../463-liblapack-dev_3.12.1-7ubuntu1_armhf.deb ... 234s Unpacking liblapack-dev:armhf (3.12.1-7ubuntu1) ... 234s Selecting previously unselected package libfftw3-bin. 234s Preparing to unpack .../464-libfftw3-bin_3.3.10-2fakesync1build2_armhf.deb ... 234s Unpacking libfftw3-bin (3.3.10-2fakesync1build2) ... 234s Selecting previously unselected package libfftw3-dev:armhf. 234s Preparing to unpack .../465-libfftw3-dev_3.3.10-2fakesync1build2_armhf.deb ... 234s Unpacking libfftw3-dev:armhf (3.3.10-2fakesync1build2) ... 234s Selecting previously unselected package libgfortran-15-dev:armhf. 234s Preparing to unpack .../466-libgfortran-15-dev_15.2.0-12ubuntu1_armhf.deb ... 234s Unpacking libgfortran-15-dev:armhf (15.2.0-12ubuntu1) ... 234s Selecting previously unselected package gfortran-15-arm-linux-gnueabihf. 234s Preparing to unpack .../467-gfortran-15-arm-linux-gnueabihf_15.2.0-12ubuntu1_armhf.deb ... 234s Unpacking gfortran-15-arm-linux-gnueabihf (15.2.0-12ubuntu1) ... 235s Selecting previously unselected package gfortran-15. 235s Preparing to unpack .../468-gfortran-15_15.2.0-12ubuntu1_armhf.deb ... 235s Unpacking gfortran-15 (15.2.0-12ubuntu1) ... 235s Selecting previously unselected package gfortran-arm-linux-gnueabihf. 235s Preparing to unpack .../469-gfortran-arm-linux-gnueabihf_4%3a15.2.0-4ubuntu1_armhf.deb ... 235s Unpacking gfortran-arm-linux-gnueabihf (4:15.2.0-4ubuntu1) ... 235s Selecting previously unselected package gfortran. 235s Preparing to unpack .../470-gfortran_4%3a15.2.0-4ubuntu1_armhf.deb ... 235s Unpacking gfortran (4:15.2.0-4ubuntu1) ... 235s Selecting previously unselected package libstdc++-15-dev:armhf. 235s Preparing to unpack .../471-libstdc++-15-dev_15.2.0-12ubuntu1_armhf.deb ... 235s Unpacking libstdc++-15-dev:armhf (15.2.0-12ubuntu1) ... 235s Selecting previously unselected package g++-15-arm-linux-gnueabihf. 235s Preparing to unpack .../472-g++-15-arm-linux-gnueabihf_15.2.0-12ubuntu1_armhf.deb ... 235s Unpacking g++-15-arm-linux-gnueabihf (15.2.0-12ubuntu1) ... 236s Selecting previously unselected package g++-15. 236s Preparing to unpack .../473-g++-15_15.2.0-12ubuntu1_armhf.deb ... 236s Unpacking g++-15 (15.2.0-12ubuntu1) ... 236s Selecting previously unselected package g++-arm-linux-gnueabihf. 236s Preparing to unpack .../474-g++-arm-linux-gnueabihf_4%3a15.2.0-4ubuntu1_armhf.deb ... 236s Unpacking g++-arm-linux-gnueabihf (4:15.2.0-4ubuntu1) ... 236s Selecting previously unselected package g++. 236s Preparing to unpack .../475-g++_4%3a15.2.0-4ubuntu1_armhf.deb ... 236s Unpacking g++ (4:15.2.0-4ubuntu1) ... 236s Selecting previously unselected package octave-dev. 236s Preparing to unpack .../476-octave-dev_10.3.0-3_armhf.deb ... 236s Unpacking octave-dev (10.3.0-3) ... 236s Selecting previously unselected package dh-octave. 236s Preparing to unpack .../477-dh-octave_1.14.0_all.deb ... 236s Unpacking dh-octave (1.14.0) ... 236s Selecting previously unselected package libfontenc1:armhf. 236s Preparing to unpack .../478-libfontenc1_1%3a1.1.8-1build2_armhf.deb ... 236s Unpacking libfontenc1:armhf (1:1.1.8-1build2) ... 236s Selecting previously unselected package libxt6t64:armhf. 236s Preparing to unpack .../479-libxt6t64_1%3a1.2.1-1.3_armhf.deb ... 236s Unpacking libxt6t64:armhf (1:1.2.1-1.3) ... 236s Selecting previously unselected package libxmu6:armhf. 236s Preparing to unpack .../480-libxmu6_2%3a1.1.3-4_armhf.deb ... 236s Unpacking libxmu6:armhf (2:1.1.3-4) ... 236s Selecting previously unselected package libxaw7:armhf. 236s Preparing to unpack .../481-libxaw7_2%3a1.0.16-1build1_armhf.deb ... 236s Unpacking libxaw7:armhf (2:1.0.16-1build1) ... 236s Selecting previously unselected package libxfont2:armhf. 236s Preparing to unpack .../482-libxfont2_1%3a2.0.6-2_armhf.deb ... 236s Unpacking libxfont2:armhf (1:2.0.6-2) ... 236s Selecting previously unselected package libxkbfile1:armhf. 236s Preparing to unpack .../483-libxkbfile1_1%3a1.1.0-1build5_armhf.deb ... 236s Unpacking libxkbfile1:armhf (1:1.1.0-1build5) ... 236s Selecting previously unselected package libxrandr2:armhf. 236s Preparing to unpack .../484-libxrandr2_2%3a1.5.4-1build1_armhf.deb ... 236s Unpacking libxrandr2:armhf (2:1.5.4-1build1) ... 236s Selecting previously unselected package octave-io:armhf. 236s Preparing to unpack .../485-octave-io_2.7.0-3_armhf.deb ... 236s Unpacking octave-io:armhf (2.7.0-3) ... 236s Selecting previously unselected package octave-statistics-common. 236s Preparing to unpack .../486-octave-statistics-common_1.7.6-2_all.deb ... 236s Unpacking octave-statistics-common (1.7.6-2) ... 237s Selecting previously unselected package octave-statistics. 237s Preparing to unpack .../487-octave-statistics_1.7.6-2_armhf.deb ... 237s Unpacking octave-statistics (1.7.6-2) ... 237s Selecting previously unselected package x11-xkb-utils. 237s Preparing to unpack .../488-x11-xkb-utils_7.7+9build1_armhf.deb ... 237s Unpacking x11-xkb-utils (7.7+9build1) ... 237s Selecting previously unselected package xserver-common. 237s Preparing to unpack .../489-xserver-common_2%3a21.1.21-1ubuntu1_all.deb ... 237s Unpacking xserver-common (2:21.1.21-1ubuntu1) ... 237s Selecting previously unselected package xvfb. 237s Preparing to unpack .../490-xvfb_2%3a21.1.21-1ubuntu1_armhf.deb ... 237s Unpacking xvfb (2:21.1.21-1ubuntu1) ... 237s Setting up libconfig-inifiles-perl (3.000003-4) ... 237s Setting up libapt-pkg-perl (0.1.43) ... 237s Setting up libmodule-pluggable-perl (5.2-5) ... 237s Setting up libgraphite2-3:armhf (1.3.14-11ubuntu1) ... 237s Setting up libstring-escape-perl (2010.002-3) ... 237s Setting up libgnutls-openssl27t64:armhf (3.8.10-3ubuntu1) ... 237s Setting up libxcb-dri3-0:armhf (1.17.0-2ubuntu1) ... 237s Setting up liblcms2-2:armhf (2.17-1) ... 237s Setting up libberkeleydb-perl:armhf (0.66-2) ... 237s Setting up libpixman-1-0:armhf (0.46.4-1) ... 237s Setting up libsharpyuv0:armhf (1.5.0-0.1build1) ... 237s Setting up libaom3:armhf (3.13.1-2) ... 237s Setting up liblingua-en-inflect-perl (1.905-2) ... 237s Setting up libx11-xcb1:armhf (2:1.8.12-1build1) ... 237s Setting up libfile-which-perl (1.27-2) ... 237s Setting up libdouble-conversion3:armhf (3.4.0-1) ... 237s Setting up libsafe-isa-perl (1.000010-1build1) ... 237s Setting up libtask-weaken-perl (1.06-2) ... 237s Setting up libunicode-utf8-perl (0.63-1) ... 237s Setting up libset-intspan-perl (1.19-3) ... 237s Setting up libxcb-xfixes0:armhf (1.17.0-2ubuntu1) ... 237s Setting up libogg0:armhf (1.3.6-2) ... 237s Setting up libmouse-perl:armhf (2.6.1-1) ... 237s Setting up libzstd-dev:armhf (1.5.7+dfsg-3) ... 237s Setting up liblerc4:armhf (4.0.0+ds-5ubuntu2) ... 237s Setting up libpod-pom-perl (2.01-4) ... 237s Setting up libxpm4:armhf (1:3.5.17-1build3) ... 237s Setting up hdf5-helpers (1.14.6+repack-2) ... 237s Setting up libwmflite-0.2-7:armhf (0.2.13-2) ... 237s Setting up libregexp-pattern-perl (0.2.14-2) ... 237s Setting up libdata-messagepack-perl (1.02-3) ... 237s Setting up libclass-inspector-perl (1.36-3) ... 237s Setting up libxcb-xinput0:armhf (1.17.0-2ubuntu1) ... 237s Setting up libxrender1:armhf (1:0.9.12-1) ... 237s Setting up libdynaloader-functions-perl (0.004-2) ... 237s Setting up libdatrie1:armhf (0.2.14-1) ... 237s Setting up libtext-glob-perl (0.11-3) ... 237s Setting up libclass-method-modifiers-perl (2.15-1) ... 237s Setting up liblist-compare-perl (0.55-2) ... 237s Setting up libxcb-render0:armhf (1.17.0-2ubuntu1) ... 237s Setting up libclone-perl:armhf (0.47-1) ... 237s Setting up libarchive-zip-perl (1.68-1) ... 237s Setting up libsub-identify-perl (0.14-4) ... 237s Setting up libcpanel-json-xs-perl:armhf (4.40-1) ... 237s Setting up libglvnd0:armhf (1.7.0-3) ... 237s Setting up libio-stringy-perl (2.113-2) ... 237s Setting up libhtml-tagset-perl (3.24-1) ... 237s Setting up libts0t64:armhf (1.22-1.1build2) ... 237s Setting up liblog-any-perl (1.718-1build1) ... 237s Setting up libyaml-pp-perl (0.39.0-1) ... 237s Setting up libxcb-glx0:armhf (1.17.0-2ubuntu1) ... 237s Setting up libdevel-size-perl (0.85-1) ... 237s Setting up unzip (6.0-29ubuntu1) ... 237s Setting up libdebhelper-perl (13.28ubuntu1) ... 237s Setting up libregexp-pattern-license-perl (3.11.2-1) ... 237s Setting up libconvert-binhex-perl (1.125-3) ... 237s Setting up liblwp-mediatypes-perl (6.04-2) ... 237s Setting up libyaml-libyaml-perl (0.904.0+ds-1) ... 237s Setting up fonts-freefont-otf (20211204+svn4273-4build1) ... 237s Setting up libio-interactive-perl (1.027-1) ... 237s Setting up libxcb-keysyms1:armhf (0.4.1-1build1) ... 237s Setting up libxcb-shape0:armhf (1.17.0-2ubuntu1) ... 237s Setting up x11-common (1:7.7+24ubuntu1) ... 238s Setting up libtry-tiny-perl (0.32-1) ... 238s Setting up libdeflate0:armhf (1.23-2) ... 238s Setting up perl-openssl-defaults:armhf (7build4) ... 238s Setting up libmldbm-perl (2.05-4) ... 238s Setting up linux-libc-dev:armhf (6.18.0-9.9) ... 238s Setting up libxml-namespacesupport-perl (1.12-2) ... 238s Setting up m4 (1.4.20-2) ... 238s Setting up libevent-2.1-7t64:armhf (2.1.12-stable-10build1) ... 238s Setting up libclone-choose-perl (0.010-2) ... 238s Setting up libqhull-r8.0:armhf (2020.2-8) ... 238s Setting up libxcb-render-util0:armhf (0.3.10-1build1) ... 238s Setting up libtime-moment-perl (0.46-1) ... 238s Setting up libencode-locale-perl (1.05-3) ... 238s Setting up libxcb-shm0:armhf (1.17.0-2ubuntu1) ... 238s Setting up libxcb-icccm4:armhf (0.4.2-1build1) ... 238s Setting up texinfo-lib (7.2-5) ... 238s Setting up libtext-wrapper-perl (1.05-4) ... 238s Setting up libmpg123-0t64:armhf (1.33.3-2) ... 238s Setting up libgomp1:armhf (15.2.0-12ubuntu1) ... 238s Setting up libconfig-tiny-perl (2.30-1) ... 238s Setting up libsereal-encoder-perl (5.004+ds-1build4) ... 238s Setting up liblist-utilsby-perl (0.12-2) ... 238s Setting up libyaml-tiny-perl (1.76-1) ... 238s Setting up libjbig0:armhf (2.1-6.1ubuntu3) ... 238s Setting up octave-common (10.3.0-3) ... 238s Setting up libregexp-common-perl (2024080801-1) ... 238s Setting up libpcre2-16-0:armhf (10.46-1) ... 238s Setting up libaec0:armhf (1.1.5-1) ... 238s Setting up libnet-netmask-perl (2.0003-1build1) ... 238s Setting up libopengl0:armhf (1.7.0-3) ... 238s Setting up libsub-install-perl (0.929-1) ... 238s Setting up libxcb-util1:armhf (0.4.1-1build1) ... 238s Setting up libpsl-dev:armhf (0.21.2-1.1build2) ... 238s Setting up libxxf86vm1:armhf (1:1.1.4-2) ... 238s Setting up libindirect-perl (0.39-2build5) ... 238s Setting up libfyaml0:armhf (0.9.3-1) ... 238s Setting up libxcb-xkb1:armhf (1.17.0-2ubuntu1) ... 238s Setting up libxcb-image0:armhf (0.4.0-2build2) ... 238s Setting up libnumber-compare-perl (0.03-3) ... 238s Setting up libdw1t64:armhf (0.194-1) ... 238s Setting up libxcb-present0:armhf (1.17.0-2ubuntu1) ... 238s Setting up liberror-perl (0.17030-1) ... 238s Setting up libasound2-data (1.2.15.3-1ubuntu1) ... 238s Setting up patchutils (0.4.3-1) ... 238s Setting up tex-common (6.20) ... 238s update-language: texlive-base not installed and configured, doing nothing! 238s Setting up libjson-maybexs-perl (1.004008-1) ... 238s Setting up libxml-sax-base-perl (1.09-3) ... 238s Setting up libio-string-perl (1.08-4) ... 238s Setting up libreadonly-perl (2.050-3) ... 238s Setting up libboolean-perl (0.46-3) ... 238s Setting up libnetaddr-ip-perl (4.079+dfsg-2build5) ... 238s Setting up xtrans-dev (1.6.0-1build1) ... 238s Setting up libfontenc1:armhf (1:1.1.8-1build2) ... 238s Setting up autotools-dev (20240727.1) ... 238s Setting up libblas3:armhf (3.12.1-7ubuntu1) ... 238s update-alternatives: using /usr/lib/arm-linux-gnueabihf/blas/libblas.so.3 to provide /usr/lib/arm-linux-gnueabihf/libblas.so.3 (libblas.so.3-arm-linux-gnueabihf) in auto mode 238s Setting up libclass-data-inheritable-perl (0.10-1) ... 238s Setting up libunbound8:armhf (1.24.2-1ubuntu1) ... 238s Setting up libpkgconf3:armhf (1.8.1-4build1) ... 238s Setting up libgmpxx4ldbl:armhf (2:6.3.0+dfsg-5ubuntu1) ... 238s Setting up libalgorithm-c3-perl (0.11-2) ... 238s Setting up rpcsvc-proto (1.4.3-1build1) ... 238s Setting up libasound2t64:armhf (1.2.15.3-1ubuntu1) ... 238s Setting up liblog-log4perl-perl (1.57-1) ... 238s Setting up libtext-reform-perl (1.20-5) ... 238s Setting up libclass-tiny-perl (1.008-2) ... 238s Setting up libgnutls-dane0t64:armhf (3.8.10-3ubuntu1) ... 238s Setting up libfreetype6:armhf (2.14.1+dfsg-2) ... 238s Setting up libfile-find-rule-perl (0.35-1build1) ... 238s Setting up libxfixes3:armhf (1:6.0.0-2build2) ... 238s Setting up libxcb-sync1:armhf (1.17.0-2ubuntu1) ... 238s Setting up libipc-system-simple-perl (1.30-2) ... 238s Setting up libio-tiecombine-perl (1.005-3) ... 238s Setting up libnet-domain-tld-perl (1.75-4) ... 238s Setting up libgssrpc4t64:armhf (1.22.1-2) ... 238s Setting up libperlio-utf8-strict-perl (0.010-1build4) ... 238s Setting up libldap-dev:armhf (2.6.10+dfsg-1ubuntu5) ... 238s Setting up libllvm21:armhf (1:21.1.8-1ubuntu1) ... 238s Setting up aglfn (1.7+git20191031.4036a9c-2build1) ... 238s Setting up libstring-format-perl (1.18-1build1) ... 238s Setting up libxcb-cursor0:armhf (0.1.5-1build1) ... 238s Setting up lzip (1.25-4) ... 238s update-alternatives: using /usr/bin/lzip.lzip to provide /usr/bin/lzip (lzip) in auto mode 238s update-alternatives: using /usr/bin/lzip.lzip to provide /usr/bin/lzip-compressor (lzip-compressor) in auto mode 238s update-alternatives: using /usr/bin/lzip.lzip to provide /usr/bin/lzip-decompressor (lzip-decompressor) in auto mode 238s Setting up libavahi-common-data:armhf (0.8-17ubuntu2) ... 238s Setting up libopus0:armhf (1.6.1-1) ... 238s Setting up t1utils (1.41-4build4) ... 238s Setting up libxinerama1:armhf (2:1.1.4-3build2) ... 238s Setting up diffstat (1.68-1) ... 238s Setting up libimagequant0:armhf (2.18.0-1build1) ... 238s Setting up libxkbcommon-x11-0:armhf (1.12.3-1) ... 238s Setting up libssl-dev:armhf (3.5.3-1ubuntu2) ... 238s Setting up libmpc3:armhf (1.3.1-2) ... 238s Setting up libvorbis0a:armhf (1.3.7-3build1) ... 238s Setting up libvariable-magic-perl (0.64-1build1) ... 238s Setting up libio-html-perl (1.004-3) ... 238s Setting up libxrandr2:armhf (2:1.5.4-1build1) ... 238s Setting up libtext-template-perl (1.61-1) ... 238s Setting up libpod-parser-perl (1.67-1) ... 238s Setting up autopoint (0.23.2-1) ... 238s Setting up libb-hooks-op-check-perl:armhf (0.22-3build2) ... 238s Setting up libflac14:armhf (1.5.0+ds-5) ... 238s Setting up liblist-moreutils-xs-perl (0.430-4build1) ... 238s Setting up pkgconf-bin (1.8.1-4build1) ... 238s Setting up libjpeg-turbo8:armhf (2.1.5-4ubuntu2) ... 238s Setting up libqscintilla2-qt6-l10n (2.14.1+dfsg-2) ... 238s Setting up libltdl7:armhf (2.5.4-9) ... 238s Setting up libidn2-dev:armhf (2.3.8-4) ... 238s Setting up libfftw3-double3:armhf (3.3.10-2fakesync1build2) ... 238s Setting up libb-keywords-perl (1.29-1) ... 238s Setting up libparams-util-perl (1.102-3build1) ... 238s Setting up libgfortran5:armhf (15.2.0-12ubuntu1) ... 238s Setting up libvulkan1:armhf (1.4.335.0-1) ... 238s Setting up libtime-duration-perl (1.21-2) ... 238s Setting up autoconf (2.72-3.1ubuntu1) ... 238s Setting up libtext-xslate-perl:armhf (3.5.9-2build1) ... 238s Setting up libsub-exporter-progressive-perl (0.001013-3) ... 238s Setting up libwebp7:armhf (1.5.0-0.1build1) ... 238s Setting up libarray-intspan-perl (2.004-2) ... 238s Setting up libcapture-tiny-perl (0.50-1) ... 238s Setting up libtimedate-perl (2.3300-2) ... 238s Setting up libexporter-lite-perl (0.09-2) ... 238s Setting up libubsan1:armhf (15.2.0-12ubuntu1) ... 238s Setting up libsub-name-perl:armhf (0.28-1) ... 238s Setting up dwz (0.16-2) ... 238s Setting up libdata-validate-domain-perl (0.15-1) ... 238s Setting up libproc-processtable-perl:armhf (0.637-1) ... 238s Setting up libparse-recdescent-perl (1.967015+dfsg-4) ... 238s Setting up libmtdev1t64:armhf (1.1.7-1build1) ... 238s Setting up libduktape207:armhf (2.7.0+tests-0ubuntu4) ... 238s Setting up libasyncns0:armhf (0.8-7) ... 238s Setting up libxshmfence1:armhf (1.3.3-1build1) ... 238s Setting up libcrypt-dev:armhf (1:4.5.1-1) ... 238s Setting up libxcb-randr0:armhf (1.17.0-2ubuntu1) ... 238s Setting up libpath-tiny-perl (0.148-1) ... 238s Setting up libasan8:armhf (15.2.0-12ubuntu1) ... 238s Setting up lzop (1.04-2build4) ... 238s Setting up libjson-perl (4.10000-1) ... 238s Setting up liblog-any-adapter-screen-perl (0.141-1) ... 238s Setting up librole-tiny-perl (2.002004-1) ... 238s Setting up libintl-perl (1.35-1) ... 238s Setting up debugedit (1:5.2-3build1) ... 238s Setting up libipc-run3-perl (0.049-1) ... 238s Setting up libmd4c0:armhf (0.5.2-2build1) ... 238s Setting up libregexp-wildcards-perl (1.05-3) ... 238s Setting up libmousex-strictconstructor-perl (0.02-3) ... 238s Setting up libfile-sharedir-perl (1.118-3) ... 238s Setting up libsub-uplevel-perl (0.2800-3) ... 238s Setting up libsuitesparseconfig7:armhf (1:7.12.1+dfsg-1) ... 238s Setting up liblua5.4-0:armhf (5.4.8-1) ... 238s Setting up libaliased-perl (0.34-3) ... 238s Setting up libharfbuzz0b:armhf (12.3.2-1) ... 238s Setting up libthai-data (0.1.30-1) ... 238s Setting up xorg-sgml-doctools (1:1.11-1.1build1) ... 238s Setting up libstrictures-perl (2.000006-1build1) ... 238s Setting up libsub-quote-perl (2.006009-1ubuntu1) ... 238s Setting up libdevel-stacktrace-perl (2.0500-1) ... 238s Setting up libclass-xsaccessor-perl (1.19-4build6) ... 238s Setting up libpod-spell-perl (1.27-1) ... 238s Setting up libtext-autoformat-perl (1.750000-2) ... 238s Setting up libglu1-mesa:armhf (9.0.2-1.1build2) ... 238s Setting up libtoml-tiny-perl (0.20-1) ... 238s Setting up libstemmer0d:armhf (3.0.1-1) ... 238s Setting up libxkbfile1:armhf (1:1.1.0-1build5) ... 238s Setting up libsort-versions-perl (1.62-3) ... 238s Setting up libexporter-tiny-perl (1.006003-1) ... 238s Setting up libterm-readkey-perl (2.38-2build5) ... 238s Setting up libisl23:armhf (0.27-1build1) ... 238s Setting up libtext-unidecode-perl (1.30-3) ... 238s Setting up libde265-0:armhf (1.0.16-1build1) ... 238s Setting up libc-dev-bin (2.42-2ubuntu5) ... 238s Setting up libfont-ttf-perl (1.06-2) ... 238s Setting up libfile-homedir-perl (1.006-2) ... 238s Setting up libsamplerate0:armhf (0.2.2-4build2) ... 238s Setting up libtasn1-6-dev:armhf (4.21.0-2) ... 238s Setting up libwebpmux3:armhf (1.5.0-0.1build1) ... 238s Setting up libtext-levenshteinxs-perl (0.03-5build5) ... 238s Setting up libperlio-gzip-perl (0.20-1build5) ... 238s Setting up cpp-15-arm-linux-gnueabihf (15.2.0-12ubuntu1) ... 238s Setting up libjxl0.11:armhf (0.11.1-6ubuntu1) ... 238s Setting up libxfont2:armhf (1:2.0.6-2) ... 238s Setting up libhtml-html5-entities-perl (0.004-3) ... 238s Setting up libtext-levenshtein-damerau-perl (0.41-3) ... 238s Setting up libsereal-decoder-perl (5.004+ds-1build5) ... 238s Setting up libmarkdown2:armhf (2.2.7-2.1build1) ... 238s Setting up libcc1-0:armhf (15.2.0-12ubuntu1) ... 238s Setting up liburi-perl (5.34-2build1) ... 238s Setting up libnet-ipv6addr-perl (1.02-1) ... 238s Setting up libbrotli-dev:armhf (1.1.0-2build6) ... 238s Setting up cpp-arm-linux-gnueabihf (4:15.2.0-4ubuntu1) ... 238s Setting up perltidy (20250105-1build1) ... 238s Setting up libp11-kit-dev:armhf (0.25.10-1) ... 238s Setting up libmp3lame0:armhf (3.100-6build2) ... 238s Setting up libblas-dev:armhf (3.12.1-7ubuntu1) ... 238s update-alternatives: using /usr/lib/arm-linux-gnueabihf/blas/libblas.so to provide /usr/lib/arm-linux-gnueabihf/libblas.so (libblas.so-arm-linux-gnueabihf) in auto mode 238s Setting up libsz2:armhf (1.1.5-1) ... 238s Setting up libvorbisenc2:armhf (1.3.7-3build1) ... 238s Setting up libkadm5clnt-mit12:armhf (1.22.1-2) ... 238s Setting up libdata-validate-ip-perl (0.31-1) ... 238s Setting up libwacom-common (2.16.1-1) ... 238s Setting up libmousex-nativetraits-perl (1.09-3) ... 238s Setting up libemail-address-xs-perl (1.05-1build5) ... 238s Setting up libwayland-client0:armhf (1.24.0-2) ... 238s Setting up libnet-ssleay-perl:armhf (1.94-3) ... 238s Setting up libjpeg8:armhf (8c-2ubuntu11) ... 238s Setting up automake (1:1.18.1-3build1) ... 238s update-alternatives: using /usr/bin/automake-1.18 to provide /usr/bin/automake (automake) in auto mode 238s Setting up libb2-1:armhf (0.98.1-1.1build2) ... 238s Setting up x11proto-dev (2025.1-1) ... 238s Setting up libfile-stripnondeterminism-perl (1.15.0-1build1) ... 238s Setting up gnuplot-data (6.0.2+dfsg1-2ubuntu1) ... 238s Setting up libice6:armhf (2:1.1.1-1build1) ... 238s Setting up libqt6core6t64:armhf (6.9.2+dfsg-3ubuntu2) ... 238s Setting up libhttp-date-perl (6.06-1) ... 238s Setting up mesa-libgallium:armhf (25.3.3-1ubuntu1) ... 238s Setting up liblapack3:armhf (3.12.1-7ubuntu1) ... 238s update-alternatives: using /usr/lib/arm-linux-gnueabihf/lapack/liblapack.so.3 to provide /usr/lib/arm-linux-gnueabihf/liblapack.so.3 (liblapack.so.3-arm-linux-gnueabihf) in auto mode 238s Setting up libproxy1v5:armhf (0.5.12-1) ... 238s Setting up libfile-basedir-perl (0.09-2) ... 238s Setting up gettext (0.23.2-1) ... 238s Setting up libarpack2t64:armhf (3.9.1-6) ... 238s Setting up libfftw3-single3:armhf (3.3.10-2fakesync1build2) ... 238s Setting up libgcc-15-dev:armhf (15.2.0-12ubuntu1) ... 238s Setting up libgmp-dev:armhf (2:6.3.0+dfsg-5ubuntu1) ... 238s Setting up libamd3:armhf (1:7.12.1+dfsg-1) ... 238s Setting up libfile-listing-perl (6.16-1) ... 238s Setting up libxau-dev:armhf (1:1.0.11-1build1) ... 238s Setting up nettle-dev:armhf (3.10.2-1) ... 238s Setting up gcc-15-arm-linux-gnueabihf (15.2.0-12ubuntu1) ... 238s Setting up libkdb5-10t64:armhf (1.22.1-2) ... 238s Setting up libgbm1:armhf (25.3.3-1ubuntu1) ... 238s Setting up libcolamd3:armhf (1:7.12.1+dfsg-1) ... 238s Setting up libfftw3-bin (3.3.10-2fakesync1build2) ... 238s Setting up libwacom9:armhf (2.16.1-1) ... 238s Setting up fontconfig-config (2.17.1-3ubuntu1) ... 239s Setting up liblist-moreutils-perl (0.430-2) ... 239s Setting up libxcursor1:armhf (1:1.2.3-1build1) ... 239s Setting up libpod-constants-perl (0.19-2) ... 239s Setting up libgl1-mesa-dri:armhf (25.3.3-1ubuntu1) ... 239s Setting up libhash-merge-perl (0.302-1) ... 239s Setting up libsoftware-copyright-perl (0.015-1) ... 239s Setting up libaec-dev:armhf (1.1.5-1) ... 239s Setting up libavahi-common3:armhf (0.8-17ubuntu2) ... 239s Setting up libcxsparse4:armhf (1:7.12.1+dfsg-1) ... 239s Setting up libnet-http-perl (6.24-1build1) ... 239s Setting up libpath-iterator-rule-perl (1.015-2) ... 239s Setting up libtext-markdown-discount-perl (0.18-1) ... 239s Setting up libappstream5:armhf (1.1.1-1) ... 239s Setting up libexception-class-perl (1.45-1) ... 239s Setting up libclass-c3-perl (0.35-2) ... 239s Setting up libqrupdate1:armhf (1.1.5-3) ... 239s Setting up libdevel-callchecker-perl:armhf (0.009-2) ... 239s Setting up libgfortran-15-dev:armhf (15.2.0-12ubuntu1) ... 239s Setting up libxml-sax-perl (1.02+dfsg-4) ... 239s update-perl-sax-parsers: Registering Perl SAX parser XML::SAX::PurePerl with priority 10... 239s update-perl-sax-parsers: Updating overall Perl SAX parser modules info file... 239s Creating config file /etc/perl/XML/SAX/ParserDetails.ini with new version 239s Setting up libcamd3:armhf (1:7.12.1+dfsg-1) ... 239s Setting up pkgconf:armhf (1.8.1-4build1) ... 239s Setting up libinput-bin (1.30.1-1) ... 239s Setting up libxs-parse-sublike-perl:armhf (0.41-1) ... 239s Setting up intltool-debian (0.35.0+20060710.6build1) ... 239s Setting up libthai0:armhf (0.1.30-1) ... 239s Setting up libxdmcp-dev:armhf (1:1.1.5-2) ... 239s Setting up libegl-mesa0:armhf (25.3.3-1ubuntu1) ... 239s Setting up libdata-validate-uri-perl (0.07-3) ... 239s Setting up libxs-parse-keyword-perl (0.49-1) ... 239s Setting up libtest-exception-perl (0.43-3) ... 239s Setting up appstream (1.1.1-1) ... 239s ✔ Metadata cache was updated successfully. 239s Setting up libqt6xml6:armhf (6.9.2+dfsg-3ubuntu2) ... 239s Setting up libglpk40:armhf (5.0-2) ... 239s Setting up libqt6sql6:armhf (6.9.2+dfsg-3ubuntu2) ... 239s Setting up libstring-copyright-perl (0.003014-1) ... 239s Setting up libppi-perl (1.284-1) ... 239s Setting up liblapack-dev:armhf (3.12.1-7ubuntu1) ... 239s update-alternatives: using /usr/lib/arm-linux-gnueabihf/lapack/liblapack.so to provide /usr/lib/arm-linux-gnueabihf/liblapack.so (liblapack.so-arm-linux-gnueabihf) in auto mode 239s Setting up libdata-optlist-perl (0.114-1) ... 239s Setting up libccolamd3:armhf (1:7.12.1+dfsg-1) ... 239s Setting up libxml-libxml-perl (2.0207+dfsg+really+2.0207-0ubuntu7) ... 239s update-perl-sax-parsers: Registering Perl SAX parser XML::LibXML::SAX::Parser with priority 50... 240s update-perl-sax-parsers: Registering Perl SAX parser XML::LibXML::SAX with priority 50... 240s update-perl-sax-parsers: Updating overall Perl SAX parser modules info file... 240s Replacing config file /etc/perl/XML/SAX/ParserDetails.ini with new version 240s Setting up dh-strip-nondeterminism (1.15.0-1build1) ... 240s Setting up libwww-robotrules-perl (6.02-1build1) ... 240s Setting up libsyntax-keyword-try-perl (0.31-1) ... 240s Setting up libjack-jackd2-0:armhf (1.9.22~dfsg-5) ... 240s Setting up libhdf5-310:armhf (1.14.6+repack-2) ... 240s Setting up cpp-15 (15.2.0-12ubuntu1) ... 240s Setting up libtiff6:armhf (4.7.0-3ubuntu3) ... 240s Setting up cpp (4:15.2.0-4ubuntu1) ... 240s Setting up libhtml-parser-perl:armhf (3.83-1build1) ... 240s Setting up libppix-regexp-perl (0.091-1) ... 240s Setting up libkadm5srv-mit12:armhf (1.22.1-2) ... 240s Setting up libegl1:armhf (1.7.0-3) ... 240s Setting up libc6-dev:armhf (2.42-2ubuntu5) ... 240s Setting up libqt6core5compat6:armhf (6.9.2-3build1) ... 240s Setting up libfontconfig1:armhf (2.17.1-3ubuntu1) ... 240s Setting up libsndfile1:armhf (1.2.2-4) ... 240s Setting up libmro-compat-perl (0.15-2) ... 240s Setting up libhdf5-fortran-310:armhf (1.14.6+repack-2) ... 240s Setting up libsm6:armhf (2:1.2.6-1) ... 240s Setting up libfftw3-dev:armhf (3.3.10-2fakesync1build2) ... 240s Setting up libavahi-client3:armhf (0.8-17ubuntu2) ... 240s Setting up libio-socket-ssl-perl (2.098-1) ... 240s Setting up libsub-exporter-perl (0.990-1) ... 240s Setting up libqt6dbus6:armhf (6.9.2+dfsg-3ubuntu2) ... 240s Setting up libppix-quotelike-perl (0.023-1) ... 240s Setting up libhttp-message-perl (7.01-1ubuntu1) ... 240s Setting up libhtml-form-perl (6.13-1build1) ... 240s Setting up libhdf5-cpp-310:armhf (1.14.6+repack-2) ... 240s Setting up gcc-arm-linux-gnueabihf (4:15.2.0-4ubuntu1) ... 240s Setting up libiterator-perl (0.03+ds1-2) ... 240s Setting up libgnutls28-dev:armhf (3.8.10-3ubuntu1) ... 240s Setting up libinput10:armhf (1.30.1-1) ... 240s Setting up libnghttp2-dev:armhf (1.64.0-1.1ubuntu1) ... 240s Setting up libhdf5-hl-310:armhf (1.14.6+repack-2) ... 240s Setting up libhttp-negotiate-perl (6.01-2) ... 240s Setting up fontconfig (2.17.1-3ubuntu1) ... 242s Regenerating fonts cache... done. 242s Setting up libjpeg-turbo8-dev:armhf (2.1.5-4ubuntu2) ... 242s Setting up libcarp-assert-more-perl (2.9.0-1) ... 242s Setting up libcholmod5:armhf (1:7.12.1+dfsg-1) ... 242s Setting up libxft2:armhf (2.3.6-1build2) ... 242s Setting up libncurses-dev:armhf (6.6+20251231-1) ... 242s Setting up libppix-utils-perl (0.003-2) ... 242s Setting up libglx-mesa0:armhf (25.3.3-1ubuntu1) ... 242s Setting up gfortran-15-arm-linux-gnueabihf (15.2.0-12ubuntu1) ... 242s Setting up libxcb1-dev:armhf (1.17.0-2ubuntu1) ... 242s Setting up libiterator-util-perl (0.02+ds1-2) ... 242s Setting up libglx0:armhf (1.7.0-3) ... 242s Setting up libhttp-cookies-perl (6.11-1) ... 242s Setting up libspqr4:armhf (1:7.12.1+dfsg-1) ... 242s Setting up libpulse0:armhf (1:17.0+dfsg1-2ubuntu4) ... 242s Setting up po-debconf (1.0.22) ... 242s Setting up libhtml-tree-perl (5.07-3) ... 242s Setting up libparams-classify-perl:armhf (0.015-2build6) ... 242s Setting up libpango-1.0-0:armhf (1.57.0-1) ... 242s Setting up libcgi-pm-perl (4.71-1build1) ... 242s Setting up libx11-dev:armhf (2:1.8.12-1build1) ... 242s Setting up libreadline-dev:armhf (8.3-3) ... 242s Setting up libcairo2:armhf (1.18.4-3) ... 242s Setting up gfortran-arm-linux-gnueabihf (4:15.2.0-4ubuntu1) ... 242s Setting up libobject-pad-perl (0.823-2) ... 242s Setting up gcc-15 (15.2.0-12ubuntu1) ... 242s Setting up libgl1:armhf (1.7.0-3) ... 242s Setting up libstdc++-15-dev:armhf (15.2.0-12ubuntu1) ... 242s Setting up libqt6gui6:armhf (6.9.2+dfsg-3ubuntu2) ... 242s Setting up libnet-smtp-ssl-perl (1.04-2) ... 242s Setting up libmodule-runtime-perl (0.018-1) ... 242s Setting up libmailtools-perl (2.22-1) ... 242s Setting up libconfig-model-perl (2.155-1) ... 242s Setting up libxt6t64:armhf (1:1.2.1-1.3) ... 242s Setting up comerr-dev:armhf (2.1-1.47.2-3ubuntu2) ... 242s Setting up texinfo (7.2-5) ... 242s Setting up zlib1g-dev:armhf (1:1.3.dfsg+really1.3.1-1ubuntu2) ... 242s Setting up libumfpack6:armhf (1:7.12.1+dfsg-1) ... 242s Setting up libconst-fast-perl (0.014-2) ... 242s Setting up libqt6network6:armhf (6.9.2+dfsg-3ubuntu2) ... 242s Setting up libdata-section-perl (0.200008-1) ... 242s Setting up libglx-dev:armhf (1.7.0-3) ... 242s Setting up libpangoft2-1.0-0:armhf (1.57.0-1) ... 242s Setting up libjpeg8-dev:armhf (8c-2ubuntu11) ... 242s Setting up libdata-dpath-perl (0.60-1) ... 242s Setting up libfltk1.3t64:armhf (1.3.11-3) ... 242s Setting up libcups2t64:armhf (2.4.16-1ubuntu1) ... 242s Setting up libgl-dev:armhf (1.7.0-3) ... 242s Setting up libstring-rewriteprefix-perl (0.009-1) ... 242s Setting up gfortran-15 (15.2.0-12ubuntu1) ... 242s Setting up libpangocairo-1.0-0:armhf (1.57.0-1) ... 242s Setting up krb5-multidev:armhf (1.22.1-2) ... 242s Setting up libhdf5-hl-cpp-310:armhf (1.14.6+repack-2) ... 242s Setting up libconfig-model-backend-yaml-perl (2.134-2) ... 242s Setting up libhdf5-hl-fortran-310:armhf (1.14.6+repack-2) ... 242s Setting up libportaudio2:armhf (19.7.0+git20251227.3270c9ae-0ubuntu1) ... 242s Setting up libxmu6:armhf (2:1.1.3-4) ... 242s Setting up libtool (2.5.4-9) ... 242s Setting up libmodule-implementation-perl (0.09-2) ... 242s Setting up libpackage-stash-perl (0.40-1) ... 242s Setting up libimport-into-perl (1.002005-2) ... 242s Setting up libmoo-perl (2.005005-1) ... 242s Setting up libqt6opengl6:armhf (6.9.2+dfsg-3ubuntu2) ... 242s Setting up libjpeg-dev:armhf (8c-2ubuntu11) ... 242s Setting up g++-15-arm-linux-gnueabihf (15.2.0-12ubuntu1) ... 242s Setting up liblist-someutils-perl (0.59-1) ... 242s Setting up libxaw7:armhf (2:1.0.16-1build1) ... 242s Setting up libmime-tools-perl (5.515-1) ... 242s Setting up libsoftware-license-perl (0.104007-1) ... 242s Setting up libclass-load-perl (0.25-2) ... 242s Setting up gcc (4:15.2.0-4ubuntu1) ... 242s Setting up libgl2ps1.4:armhf (1.4.2+dfsg1-4) ... 242s Setting up libqt6widgets6:armhf (6.9.2+dfsg-3ubuntu2) ... 242s Setting up dh-autoreconf (21) ... 242s Setting up libfltk-gl1.3t64:armhf (1.3.11-3) ... 242s Setting up libkrb5-dev:armhf (1.22.1-2) ... 242s Setting up librtmp-dev:armhf (2.4+20151223.gitfa8646d.1-3) ... 242s Setting up libssh2-1-dev:armhf (1.11.1-1build1) ... 242s Setting up libmoox-aliases-perl (0.001006-2) ... 242s Setting up libparams-validate-perl:armhf (1.31-2build4) ... 242s Setting up libqt6openglwidgets6:armhf (6.9.2+dfsg-3ubuntu2) ... 242s Setting up libb-hooks-endofscope-perl (0.28-2) ... 242s Setting up libperl-critic-perl (1.156-1) ... 242s Setting up g++-15 (15.2.0-12ubuntu1) ... 242s Setting up g++-arm-linux-gnueabihf (4:15.2.0-4ubuntu1) ... 242s Setting up libqt6printsupport6:armhf (6.9.2+dfsg-3ubuntu2) ... 242s Setting up libsoftware-licensemoreutils-perl (1.009-1) ... 242s Setting up x11-xkb-utils (7.7+9build1) ... 242s Setting up libqt6help6:armhf (6.9.2-5) ... 242s Setting up libqscintilla2-qt6-15:armhf (2.14.1+dfsg-2) ... 242s Setting up debhelper (13.28ubuntu1) ... 242s Setting up gfortran (4:15.2.0-4ubuntu1) ... 242s update-alternatives: using /usr/bin/gfortran to provide /usr/bin/f95 (f95) in auto mode 242s update-alternatives: warning: skip creation of /usr/share/man/man1/f95.1.gz because associated file /usr/share/man/man1/gfortran.1.gz (of link group f95) doesn't exist 242s update-alternatives: using /usr/bin/gfortran to provide /usr/bin/f77 (f77) in auto mode 242s update-alternatives: warning: skip creation of /usr/share/man/man1/f77.1.gz because associated file /usr/share/man/man1/gfortran.1.gz (of link group f77) doesn't exist 242s Setting up libcurl4-openssl-dev:armhf (8.18.0-1ubuntu1) ... 242s Setting up libhdf5-dev (1.14.6+repack-2) ... 242s update-alternatives: using /usr/lib/arm-linux-gnueabihf/pkgconfig/hdf5-serial.pc to provide /usr/lib/arm-linux-gnueabihf/pkgconfig/hdf5.pc (hdf5.pc) in auto mode 242s Setting up libnamespace-clean-perl (0.27-2) ... 242s Setting up libstring-license-perl (0.0.11-1ubuntu1) ... 242s Setting up libgetopt-long-descriptive-perl (0.116-2) ... 242s Setting up g++ (4:15.2.0-4ubuntu1) ... 242s update-alternatives: using /usr/bin/g++ to provide /usr/bin/c++ (c++) in auto mode 242s Setting up xserver-common (2:21.1.21-1ubuntu1) ... 242s Setting up licensecheck (3.3.9-1ubuntu2) ... 242s Setting up libapp-cmd-perl (0.338-1) ... 242s Setting up xvfb (2:21.1.21-1ubuntu1) ... 242s Setting up cme (1.044-2) ... 242s Setting up libheif-plugin-aomdec:armhf (1.21.2-1) ... 242s Setting up libwww-perl (6.81-1build1) ... 242s Setting up libheif1:armhf (1.21.2-1) ... 242s Setting up libparse-debcontrol-perl (2.005-6) ... 242s Setting up libhtml-tokeparser-simple-perl (3.16-4) ... 242s Setting up libwww-mechanize-perl (2.20-1ubuntu1) ... 242s Setting up libgd3:armhf (2.3.3-13ubuntu1) ... 242s Setting up gnuplot-nox (6.0.2+dfsg1-2ubuntu1) ... 242s update-alternatives: using /usr/bin/gnuplot-nox to provide /usr/bin/gnuplot (gnuplot) in auto mode 242s Setting up liblwp-protocol-https-perl (6.14-1) ... 242s Setting up libheif-plugin-libde265:armhf (1.21.2-1) ... 242s Setting up libgraphicsmagick-q16-3t64 (1.4+really1.3.45+hg17696-1build1) ... 242s Setting up lintian (2.127.0ubuntu1) ... 242s Setting up libgraphicsmagick++-q16-12t64 (1.4+really1.3.45+hg17696-1build1) ... 242s Setting up libconfig-model-dpkg-perl (3.016) ... 242s Setting up dh-octave-autopkgtest (1.14.0) ... 242s Setting up octave (10.3.0-3) ... 243s Setting up octave-dev (10.3.0-3) ... 243s Setting up octave-io:armhf (2.7.0-3) ... 243s Setting up octave-statistics-common (1.7.6-2) ... 243s Setting up octave-statistics (1.7.6-2) ... 243s Setting up dh-octave (1.14.0) ... 243s Processing triggers for libc-bin (2.42-2ubuntu5) ... 243s Processing triggers for man-db (2.13.1-1) ... 245s Processing triggers for udev (259-1ubuntu3) ... 245s Processing triggers for install-info (7.2-5) ... 258s autopkgtest [07:17:12]: test command1: DH_OCTAVE_TEST_ENV="xvfb-run -a" /usr/bin/dh_octave_check --use-installed-package 258s autopkgtest [07:17:12]: test command1: [----------------------- 260s Checking package... 263s Run the unit tests... 263s Checking m files ... 264s [inst/Classification/ClassificationDiscriminant.m] 264s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/Classification/ClassificationDiscriminant.m 264s ***** demo 264s ## Create discriminant classifier 264s ## Evaluate some model predictions on new data. 264s 264s load fisheriris 264s x = meas; 264s y = species; 264s xc = [min(x); mean(x); max(x)]; 264s obj = fitcdiscr (x, y); 264s [label, score, cost] = predict (obj, xc); 264s ***** demo 264s load fisheriris 264s model = fitcdiscr (meas, species); 264s X = mean (meas); 264s Y = {'versicolor'}; 264s ## Compute loss for discriminant model 264s L = loss (model, X, Y) 264s ***** demo 264s load fisheriris 264s mdl = fitcdiscr (meas, species); 264s X = mean (meas); 264s Y = {'versicolor'}; 264s ## Margin for discriminant model 264s m = margin (mdl, X, Y) 264s ***** demo 264s load fisheriris 264s x = meas; 264s y = species; 264s obj = fitcdiscr (x, y, "gamma", 0.4); 264s ## Cross-validation for discriminant model 264s CVMdl = crossval (obj) 264s ***** test 264s load fisheriris 264s x = meas; 264s y = species; 264s PredictorNames = {'Sepal Length', 'Sepal Width', 'Petal Length', 'Petal Width'}; 264s Mdl = ClassificationDiscriminant (x, y, "PredictorNames", PredictorNames); 264s sigma = [0.265008, 0.092721, 0.167514, 0.038401; ... 264s 0.092721, 0.115388, 0.055244, 0.032710; ... 264s 0.167514, 0.055244, 0.185188, 0.042665; ... 264s 0.038401, 0.032710, 0.042665, 0.041882]; 264s mu = [5.0060, 3.4280, 1.4620, 0.2460; ... 264s 5.9360, 2.7700, 4.2600, 1.3260; ... 264s 6.5880, 2.9740, 5.5520, 2.0260]; 264s xCentered = [ 9.4000e-02, 7.2000e-02, -6.2000e-02, -4.6000e-02; ... 264s -1.0600e-01, -4.2800e-01, -6.2000e-02, -4.6000e-02; ... 264s -3.0600e-01, -2.2800e-01, -1.6200e-01, -4.6000e-02]; 264s assert (class (Mdl), "ClassificationDiscriminant"); 264s assert ({Mdl.X, Mdl.Y, Mdl.NumObservations}, {x, y, 150}) 264s assert ({Mdl.DiscrimType, Mdl.ResponseName}, {"linear", "Y"}) 264s assert ({Mdl.Gamma, Mdl.MinGamma}, {0, 0}, 1e-15) 264s assert (Mdl.ClassNames, unique (species)) 264s assert (Mdl.Sigma, sigma, 1e-6) 264s assert (Mdl.Mu, mu, 1e-14) 264s assert (Mdl.XCentered([1:3],:), xCentered, 1e-14) 264s assert (Mdl.LogDetSigma, -9.9585, 1e-4) 264s assert (Mdl.PredictorNames, PredictorNames) 264s ***** test 264s load fisheriris 264s x = meas; 264s y = species; 264s Mdl = ClassificationDiscriminant (x, y, "Gamma", 0.5); 264s sigma = [0.265008, 0.046361, 0.083757, 0.019201; ... 264s 0.046361, 0.115388, 0.027622, 0.016355; ... 264s 0.083757, 0.027622, 0.185188, 0.021333; ... 264s 0.019201, 0.016355, 0.021333, 0.041882]; 264s mu = [5.0060, 3.4280, 1.4620, 0.2460; ... 264s 5.9360, 2.7700, 4.2600, 1.3260; ... 264s 6.5880, 2.9740, 5.5520, 2.0260]; 264s xCentered = [ 9.4000e-02, 7.2000e-02, -6.2000e-02, -4.6000e-02; ... 264s -1.0600e-01, -4.2800e-01, -6.2000e-02, -4.6000e-02; ... 264s -3.0600e-01, -2.2800e-01, -1.6200e-01, -4.6000e-02]; 264s assert (class (Mdl), "ClassificationDiscriminant"); 264s assert ({Mdl.X, Mdl.Y, Mdl.NumObservations}, {x, y, 150}) 264s assert ({Mdl.DiscrimType, Mdl.ResponseName}, {"linear", "Y"}) 264s assert ({Mdl.Gamma, Mdl.MinGamma}, {0.5, 0}) 264s assert (Mdl.ClassNames, unique (species)) 264s assert (Mdl.Sigma, sigma, 1e-6) 264s assert (Mdl.Mu, mu, 1e-14) 264s assert (Mdl.XCentered([1:3],:), xCentered, 1e-14) 264s assert (Mdl.LogDetSigma, -8.6884, 1e-4) 264s ***** shared X, Y, MODEL 264s X = rand (10,2); 264s Y = [ones(5,1);2*ones(5,1)]; 264s MODEL = ClassificationDiscriminant (X, Y); 264s ***** error ClassificationDiscriminant () 264s ***** error ... 264s ClassificationDiscriminant (ones(4, 1)) 264s ***** error ... 264s ClassificationDiscriminant (X, Y, "prior") 264s ***** error ... 264s ClassificationDiscriminant (ones (4,2), ones (1,4)) 264s ***** error ... 264s ClassificationDiscriminant (X, Y, "PredictorNames", ["A"]) 264s ***** error ... 264s ClassificationDiscriminant (X, Y, "PredictorNames", "A") 264s ***** error ... 264s ClassificationDiscriminant (X, Y, "PredictorNames", {"A", "B", "C"}) 264s ***** error ... 264s ClassificationDiscriminant (X, Y, "ResponseName", {"Y"}) 264s ***** error ... 264s ClassificationDiscriminant (X, Y, "ResponseName", 1) 264s ***** error ... 264s ClassificationDiscriminant (X, Y, "ClassNames", @(x)x) 264s ***** error ... 264s ClassificationDiscriminant (X, Y, "ClassNames", {1}) 264s ***** error ... 264s ClassificationDiscriminant (X, ones (10,1), "ClassNames", [1, 2]) 264s ***** error ... 264s ClassificationDiscriminant ([1;2;3;4;5], ['a';'b';'a';'a';'b'], "ClassNames", ['a';'c']) 264s ***** error ... 264s ClassificationDiscriminant ([1;2;3;4;5], {'a';'b';'a';'a';'b'}, "ClassNames", {'a','c'}) 264s ***** error ... 264s ClassificationDiscriminant (X, logical (ones (10,1)), "ClassNames", [true, false]) 264s ***** error ... 264s ClassificationDiscriminant (X, Y, "Prior", {"1", "2"}) 264s ***** error ... 264s ClassificationDiscriminant (X, ones (10,1), "Prior", [1 2]) 264s ***** error ... 264s ClassificationDiscriminant (X, Y, "Cost", [1, 2]) 264s ***** error ... 264s ClassificationDiscriminant (X, Y, "Cost", "string") 264s ***** error ... 264s ClassificationDiscriminant (X, Y, "Cost", {eye(2)}) 264s ***** error ... 264s ClassificationDiscriminant (X, Y, "Cost", ones (3)) 264s ***** error ... 264s ClassificationDiscriminant (ones (5,2), [1; 1; 2; 2; 2]) 264s ***** error ... 264s ClassificationDiscriminant (ones (5,2), [1; 1; 2; 2; 2], "PredictorNames", {"A", "B"}) 264s ***** error ... 264s ClassificationDiscriminant ([1,2;2,2;3,2;4,2;5,2], ones (5, 1)) 264s ***** error ... 264s ClassificationDiscriminant ([1,2;2,2;3,2;4,2;5,2], ones (5, 1), "PredictorNames", {"A", "B"}) 264s ***** test 264s load fisheriris 264s x = meas; 264s y = species; 264s Mdl = fitcdiscr (meas, species, "Gamma", 0.5); 264s [label, score, cost] = predict (Mdl, [2, 2, 2, 2]); 264s assert (label, {'versicolor'}) 264s assert (score, [0, 0.9999, 0.0001], 1e-4) 264s assert (cost, [1, 0.0001, 0.9999], 1e-4) 264s [label, score, cost] = predict (Mdl, [2.5, 2.5, 2.5, 2.5]); 264s assert (label, {'versicolor'}) 264s assert (score, [0, 0.6368, 0.3632], 1e-4) 264s assert (cost, [1, 0.3632, 0.6368], 1e-4) 264s ***** test 264s load fisheriris 264s x = meas; 264s y = species; 264s xc = [min(x); mean(x); max(x)]; 264s Mdl = fitcdiscr (x, y); 264s [label, score, cost] = predict (Mdl, xc); 264s l = {'setosa'; 'versicolor'; 'virginica'}; 264s s = [1, 0, 0; 0, 1, 0; 0, 0, 1]; 264s c = [0, 1, 1; 1, 0, 1; 1, 1, 0]; 264s assert (label, l) 264s assert (score, s, 1e-4) 264s assert (cost, c, 1e-4) 264s ***** error ... 264s predict (MODEL) 264s ***** error ... 264s predict (MODEL, []) 264s ***** error ... 264s predict (MODEL, 1) 264s ***** test 264s load fisheriris 264s model = fitcdiscr (meas, species); 264s x = mean (meas); 264s y = {'versicolor'}; 264s L = loss (model, x, y); 264s assert (L, 0) 264s ***** test 264s x = [1, 2; 3, 4; 5, 6]; 264s y = {'A'; 'B'; 'A'}; 264s model = fitcdiscr (x, y, "Gamma", 0.4); 264s x_test = [1, 6; 3, 3]; 264s y_test = {'A'; 'B'}; 264s L = loss (model, x_test, y_test); 264s assert (L, 0.3333, 1e-4) 264s ***** test 264s x = [1, 2; 3, 4; 5, 6; 7, 8]; 264s y = ['1'; '2'; '3'; '1']; 264s model = fitcdiscr (x, y, "gamma" , 0.5); 264s x_test = [3, 3]; 264s y_test = ['1']; 264s L = loss (model, x_test, y_test, 'LossFun', 'quadratic'); 264s assert (L, 0.2423, 1e-4) 264s ***** test 264s x = [1, 2; 3, 4; 5, 6; 7, 8]; 264s y = ['1'; '2'; '3'; '1']; 264s model = fitcdiscr (x, y, "gamma" , 0.5); 264s x_test = [3, 3; 5, 7]; 264s y_test = ['1'; '2']; 264s L = loss (model, x_test, y_test, 'LossFun', 'classifcost'); 264s assert (L, 0.3333, 1e-4) 264s ***** test 264s x = [1, 2; 3, 4; 5, 6; 7, 8]; 264s y = ['1'; '2'; '3'; '1']; 264s model = fitcdiscr (x, y, "gamma" , 0.5); 264s x_test = [3, 3; 5, 7]; 264s y_test = ['1'; '2']; 264s L = loss (model, x_test, y_test, 'LossFun', 'hinge'); 264s assert (L, 0.5886, 1e-4) 264s ***** test 264s x = [1, 2; 3, 4; 5, 6; 7, 8]; 264s y = ['1'; '2'; '3'; '1']; 264s model = fitcdiscr (x, y, "gamma" , 0.5); 264s x_test = [3, 3; 5, 7]; 264s y_test = ['1'; '2']; 264s W = [1; 2]; 264s L = loss (model, x_test, y_test, 'LossFun', 'logit', 'Weights', W); 264s assert (L, 0.5107, 1e-4) 264s ***** test 264s x = [1, 2; 3, 4; 5, 6]; 264s y = {'A'; 'B'; 'A'}; 264s model = fitcdiscr (x, y, "gamma" , 0.5); 264s x_with_nan = [1, 2; NaN, 4]; 264s y_test = {'A'; 'B'}; 264s L = loss (model, x_with_nan, y_test); 264s assert (L, 0.3333, 1e-4) 264s ***** test 264s x = [1, 2; 3, 4; 5, 6]; 264s y = {'A'; 'B'; 'A'}; 264s model = fitcdiscr (x, y); 264s x_with_nan = [1, 2; NaN, 4]; 264s y_test = {'A'; 'B'}; 264s L = loss (model, x_with_nan, y_test, 'LossFun', 'logit'); 264s assert (isnan (L)) 264s ***** test 264s x = [1, 2; 3, 4; 5, 6]; 264s y = {'A'; 'B'; 'A'}; 264s model = fitcdiscr (x, y); 264s customLossFun = @(C, S, W, Cost) sum (W .* sum (abs (C - S), 2)); 264s L = loss (model, x, y, 'LossFun', customLossFun); 264s assert (L, 0.8889, 1e-4) 264s ***** test 264s x = [1, 2; 3, 4; 5, 6]; 264s y = [1; 2; 1]; 264s model = fitcdiscr (x, y); 264s L = loss (model, x, y, 'LossFun', 'classiferror'); 264s assert (L, 0.3333, 1e-4) 264s ***** error ... 264s loss (MODEL) 264s ***** error ... 264s loss (MODEL, ones (4,2)) 264s ***** error ... 264s loss (MODEL, [], zeros (2)) 264s ***** error ... 264s loss (MODEL, 1, zeros (2)) 264s ***** error ... 264s loss (MODEL, ones (4,2), ones (4,1), 'LossFun') 264s ***** error ... 264s loss (MODEL, ones (4,2), ones (3,1)) 264s ***** error ... 264s loss (MODEL, ones (4,2), ones (4,1), 'LossFun', 'a') 264s ***** error ... 264s loss (MODEL, ones (4,2), ones (4,1), 'Weights', 'w') 264s load fisheriris 264s mdl = fitcdiscr (meas, species); 264s X = mean (meas); 264s Y = {'versicolor'}; 264s m = margin (mdl, X, Y); 264s assert (m, 1, 1e-6) 264s ***** test 264s X = [1, 2; 3, 4; 5, 6]; 264s Y = [1; 2; 1]; 264s mdl = fitcdiscr (X, Y, "gamma", 0.5); 264s m = margin (mdl, X, Y); 264s assert (m, [0.3333; -0.3333; 0.3333], 1e-4) 264s ***** error ... 264s margin (MODEL) 264s ***** error ... 264s margin (MODEL, ones (4,2)) 264s ***** error ... 264s margin (MODEL, [], zeros (2)) 264s ***** error ... 264s margin (MODEL, 1, zeros (2)) 264s ***** error ... 264s margin (MODEL, ones (4,2), ones (3,1)) 264s ***** shared x, y, obj 264s load fisheriris 264s x = meas; 264s y = species; 264s obj = fitcdiscr (x, y, "gamma", 0.4); 265s ***** test 265s CVMdl = crossval (obj); 265s assert (class (CVMdl), "ClassificationPartitionedModel") 265s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 265s assert (CVMdl.KFold == 10) 265s assert (class (CVMdl.Trained{1}), "CompactClassificationDiscriminant") 265s assert (CVMdl.CrossValidatedModel, "ClassificationDiscriminant") 266s ***** test 266s CVMdl = crossval (obj, "KFold", 3); 266s assert (class (CVMdl), "ClassificationPartitionedModel") 266s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 266s assert (CVMdl.KFold == 3) 266s assert (class (CVMdl.Trained{1}), "CompactClassificationDiscriminant") 266s assert (CVMdl.CrossValidatedModel, "ClassificationDiscriminant") 266s ***** test 266s CVMdl = crossval (obj, "HoldOut", 0.2); 266s assert (class (CVMdl), "ClassificationPartitionedModel") 266s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 266s assert (class (CVMdl.Trained{1}), "CompactClassificationDiscriminant") 266s assert (CVMdl.CrossValidatedModel, "ClassificationDiscriminant") 266s ***** test 266s CVMdl = crossval (obj, "LeaveOut", 'on'); 266s assert (class (CVMdl), "ClassificationPartitionedModel") 266s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 266s assert (class (CVMdl.Trained{1}), "CompactClassificationDiscriminant") 266s assert (CVMdl.CrossValidatedModel, "ClassificationDiscriminant") 267s ***** test 267s partition = cvpartition (y, 'KFold', 3); 267s CVMdl = crossval (obj, 'cvPartition', partition); 267s assert (class (CVMdl), "ClassificationPartitionedModel") 267s assert (CVMdl.KFold == 3) 267s assert (class (CVMdl.Trained{1}), "CompactClassificationDiscriminant") 267s assert (CVMdl.CrossValidatedModel, "ClassificationDiscriminant") 267s ***** error ... 267s crossval (obj, "kfold") 267s ***** error... 267s crossval (obj, "kfold", 12, "holdout", 0.2) 267s ***** error ... 267s crossval (obj, "kfold", 'a') 267s ***** error ... 267s crossval (obj, "holdout", 2) 267s ***** error ... 267s crossval (obj, "leaveout", 1) 267s ***** error ... 267s crossval (obj, "cvpartition", 1) 267s 67 tests, 67 passed, 0 known failure, 0 skipped 267s [inst/Classification/ClassificationGAM.m] 267s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/Classification/ClassificationGAM.m 267s ***** demo 267s ## Train a GAM classifier for binary classification 267s ## using specific data and plot the decision boundaries. 267s 267s ## Define specific data 267s X = [1, 2; 2, 3; 3, 3; 4, 5; 5, 5; ... 267s 6, 7; 7, 8; 8, 8; 9, 9; 10, 10]; 267s Y = [0; 0; 0; 0; 0; ... 267s 1; 1; 1; 1; 1]; 267s 267s ## Train the GAM model 267s obj = fitcgam (X, Y, "Interactions", "all") 267s 267s ## Create a grid of values for prediction 267s x1 = [min(X(:,1)):0.1:max(X(:,1))]; 267s x2 = [min(X(:,2)):0.1:max(X(:,2))]; 267s [x1G, x2G] = meshgrid (x1, x2); 267s XGrid = [x1G(:), x2G(:)]; 267s [labels, score] = predict (obj, XGrid); 267s ***** test 267s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 267s y = [0; 0; 1; 1]; 267s PredictorNames = {'Feature1', 'Feature2', 'Feature3'}; 267s a = ClassificationGAM (x, y, "PredictorNames", PredictorNames); 267s assert (class (a), "ClassificationGAM"); 267s assert ({a.X, a.Y, a.NumObservations}, {x, y, 4}) 267s assert ({a.NumPredictors, a.ResponseName}, {3, "Y"}) 267s assert (a.ClassNames, {'0'; '1'}) 267s assert (a.PredictorNames, PredictorNames) 267s assert (a.BaseModel.Intercept, 0) 269s ***** test 269s load fisheriris 269s inds = strcmp (species,'versicolor') | strcmp (species,'virginica'); 269s X = meas(inds, :); 269s Y = species(inds, :)'; 269s Y = strcmp (Y, 'virginica')'; 269s a = ClassificationGAM (X, Y, 'Formula', 'Y ~ x1 + x2 + x3 + x4 + x1:x2 + x2:x3'); 269s assert (class (a), "ClassificationGAM"); 269s assert ({a.X, a.Y, a.NumObservations}, {X, Y, 100}) 269s assert ({a.NumPredictors, a.ResponseName}, {4, "Y"}) 269s assert (a.ClassNames, {'0'; '1'}) 269s assert (a.Formula, 'Y ~ x1 + x2 + x3 + x4 + x1:x2 + x2:x3') 269s assert (a.PredictorNames, {'x1', 'x2', 'x3', 'x4'}) 269s assert (a.ModelwInt.Intercept, 0) 276s ***** test 276s X = [2, 3, 5; 4, 6, 8; 1, 2, 3; 7, 8, 9; 5, 4, 3]; 276s Y = [0; 1; 0; 1; 1]; 276s a = ClassificationGAM (X, Y, 'Knots', [4, 4, 4], 'Order', [3, 3, 3]); 276s assert (class (a), "ClassificationGAM"); 276s assert ({a.X, a.Y, a.NumObservations}, {X, Y, 5}) 276s assert ({a.NumPredictors, a.ResponseName}, {3, "Y"}) 276s assert (a.ClassNames, {'0'; '1'}) 276s assert (a.PredictorNames, {'x1', 'x2', 'x3'}) 276s assert (a.Knots, [4, 4, 4]) 276s assert (a.Order, [3, 3, 3]) 276s assert (a.DoF, [7, 7, 7]) 276s assert (a.BaseModel.Intercept, 0.4055, 1e-1) 278s ***** error ClassificationGAM () 278s ***** error ... 278s ClassificationGAM (ones(4, 1)) 278s ***** error ... 278s ClassificationGAM (ones (4,2), ones (1,4)) 278s ***** error ... 278s ClassificationGAM (ones (5,2), ones (5,1), "PredictorNames", ["A"]) 278s ***** error ... 278s ClassificationGAM (ones (5,2), ones (5,1), "PredictorNames", "A") 278s ***** error ... 278s ClassificationGAM (ones (5,2), ones (5,1), "PredictorNames", {"A", "B", "C"}) 279s ***** error ... 279s ClassificationGAM (ones (5,2), ones (5,1), "ResponseName", {"Y"}) 279s ***** error ... 279s ClassificationGAM (ones (5,2), ones (5,1), "ResponseName", 1) 279s ***** error ... 279s ClassificationGAM (ones(10,2), ones (10,1), "ClassNames", @(x)x) 279s ***** error ... 279s ClassificationGAM (ones(10,2), ones (10,1), "ClassNames", {1}) 279s ***** error ... 279s ClassificationGAM (ones(10,2), ones (10,1), "ClassNames", [1, 2]) 279s ***** error ... 279s ClassificationGAM (ones(5,2), ['a';'b';'a';'a';'b'], "ClassNames", ['a';'c']) 279s ***** error ... 279s ClassificationGAM (ones(5,2), {'a';'b';'a';'a';'b'}, "ClassNames", {'a','c'}) 279s ***** error ... 279s ClassificationGAM (ones(10,2), logical (ones (10,1)), "ClassNames", [true, false]) 279s ***** error ... 279s ClassificationGAM (ones (5,2), ones (5,1), "Cost", [1, 2]) 279s ***** error ... 279s ClassificationGAM (ones (5,2), ones (5,1), "Cost", "string") 279s ***** error ... 279s ClassificationGAM (ones (5,2), ones (5,1), "Cost", {eye(2)}) 279s ***** test 279s x = [1, 2; 3, 4; 5, 6; 7, 8; 9, 10]; 279s y = [1; 0; 1; 0; 1]; 279s a = ClassificationGAM (x, y, "interactions", "all"); 279s l = {'0'; '0'; '0'; '0'; '0'}; 279s s = [0.3760, 0.6240; 0.4259, 0.5741; 0.3760, 0.6240; ... 279s 0.4259, 0.5741; 0.3760, 0.6240]; 279s [labels, scores] = predict (a, x); 279s assert (class (a), "ClassificationGAM"); 279s assert ({a.X, a.Y, a.NumObservations}, {x, y, 5}) 279s assert ({a.NumPredictors, a.ResponseName}, {2, "Y"}) 279s assert (a.ClassNames, {'1'; '0'}) 279s assert (a.PredictorNames, {'x1', 'x2'}) 279s assert (a.ModelwInt.Intercept, 0.4055, 1e-1) 279s assert (labels, l) 279s assert (scores, s, 1e-1) 282s ***** test 282s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 282s y = [0; 0; 1; 1]; 282s interactions = [false, true, false; true, false, true; false, true, false]; 282s a = fitcgam (x, y, "learningrate", 0.2, "interactions", interactions); 282s [label, score] = predict (a, x, "includeinteractions", true); 282s l = {'0'; '0'; '1'; '1'}; 282s s = [0.5106, 0.4894; 0.5135, 0.4865; 0.4864, 0.5136; 0.4847, 0.5153]; 282s assert (class (a), "ClassificationGAM"); 282s assert ({a.X, a.Y, a.NumObservations}, {x, y, 4}) 282s assert ({a.NumPredictors, a.ResponseName}, {3, "Y"}) 282s assert (a.ClassNames, {'0'; '1'}) 282s assert (a.PredictorNames, {'x1', 'x2', 'x3'}) 282s assert (a.ModelwInt.Intercept, 0) 282s assert (label, l) 282s assert (score, s, 1e-1) 289s ***** error ... 289s predict (ClassificationGAM (ones (4,2), ones (4,1))) 290s ***** error ... 290s predict (ClassificationGAM (ones (4,2), ones (4,1)), []) 292s ***** error ... 292s predict (ClassificationGAM (ones (4,2), ones (4,1)), 1) 293s ***** shared x, y, obj 293s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1; 4, 5, 6]; 293s y = [0; 0; 1; 1; 0]; 293s obj = fitcgam (x, y); 296s ***** test 296s CVMdl = crossval (obj); 296s assert (class (CVMdl), "ClassificationPartitionedModel") 296s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 296s assert (CVMdl.KFold == 4) 296s assert (class (CVMdl.Trained{1}), "CompactClassificationGAM") 296s assert (CVMdl.CrossValidatedModel, "ClassificationGAM") 296s warning: One or more of the unique class values in the stratification variable is not present in one or more folds. 296s warning: called from 296s cvpartition at line 764 column 19 296s crossval at line 792 column 9 296s __test__ at line 3 column 2 296s test at line 685 column 11 296s /tmp/tmp.scCa8Po4At at line 22 column 2 296s 305s ***** test 305s CVMdl = crossval (obj, "KFold", 2); 305s assert (class (CVMdl), "ClassificationPartitionedModel") 305s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 305s assert (CVMdl.KFold == 2) 305s assert (class (CVMdl.Trained{1}), "CompactClassificationGAM") 305s assert (CVMdl.CrossValidatedModel, "ClassificationGAM") 309s ***** test 309s CVMdl = crossval (obj, "HoldOut", 0.2); 309s assert (class (CVMdl), "ClassificationPartitionedModel") 309s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 309s assert (class (CVMdl.Trained{1}), "CompactClassificationGAM") 309s assert (CVMdl.CrossValidatedModel, "ClassificationGAM") 311s ***** test 311s partition = cvpartition (y, 'KFold', 3); 311s CVMdl = crossval (obj, 'cvPartition', partition); 311s assert (class (CVMdl), "ClassificationPartitionedModel") 311s assert (CVMdl.KFold == 3) 311s assert (class (CVMdl.Trained{1}), "CompactClassificationGAM") 311s assert (CVMdl.CrossValidatedModel, "ClassificationGAM") 311s warning: One or more of the unique class values in the stratification variable is not present in one or more folds. 311s warning: called from 311s cvpartition at line 764 column 19 311s __test__ at line 3 column 2 311s test at line 685 column 11 311s /tmp/tmp.scCa8Po4At at line 22 column 2 311s 317s ***** error ... 317s crossval (obj, "kfold") 317s ***** error... 317s crossval (obj, "kfold", 12, "holdout", 0.2) 317s ***** error ... 317s crossval (obj, "kfold", 'a') 317s ***** error ... 317s crossval (obj, "holdout", 2) 317s ***** error ... 317s crossval (obj, "leaveout", 1) 317s ***** error ... 317s crossval (obj, "cvpartition", 1) 317s 35 tests, 35 passed, 0 known failure, 0 skipped 317s [inst/Classification/ClassificationKNN.m] 317s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/Classification/ClassificationKNN.m 317s ***** demo 317s ## Create a k-nearest neighbor classifier for Fisher's iris data with k = 5. 317s ## Evaluate some model predictions on new data. 317s 317s load fisheriris 317s x = meas; 317s y = species; 317s xc = [min(x); mean(x); max(x)]; 317s obj = fitcknn (x, y, "NumNeighbors", 5, "Standardize", 1); 317s [label, score, cost] = predict (obj, xc) 317s ***** demo 317s load fisheriris 317s x = meas; 317s y = species; 317s obj = fitcknn (x, y, "NumNeighbors", 5, "Standardize", 1); 317s 317s ## Create a cross-validated model 317s CVMdl = crossval (obj) 317s ***** demo 317s load fisheriris 317s x = meas; 317s y = species; 317s covMatrix = cov (x); 317s 317s ## Fit the k-NN model using the 'mahalanobis' distance 317s ## and the custom covariance matrix 317s obj = fitcknn(x, y, 'NumNeighbors', 5, 'Distance','mahalanobis', ... 317s 'Cov', covMatrix); 317s 317s ## Create a partition model using cvpartition 317s Partition = cvpartition (size (x, 1), 'kfold', 12); 317s 317s ## Create cross-validated model using 'cvPartition' name-value argument 317s CVMdl = crossval (obj, 'cvPartition', Partition) 317s 317s ## Access the trained model from first fold of cross-validation 317s CVMdl.Trained{1} 317s ***** demo 317s X = [1, 2; 3, 4; 5, 6]; 317s Y = {'A'; 'B'; 'A'}; 317s model = fitcknn (X, Y); 317s customLossFun = @(C, S, W, Cost) sum (W .* sum (abs (C - S), 2)); 317s ## Calculate loss using custom loss function 317s L = loss (model, X, Y, 'LossFun', customLossFun) 317s ***** demo 317s X = [1, 2; 3, 4; 5, 6]; 317s Y = {'A'; 'B'; 'A'}; 317s model = fitcknn (X, Y); 317s ## Calculate loss using 'mincost' loss function 317s L = loss (model, X, Y, 'LossFun', 'mincost') 317s ***** demo 317s X = [1, 2; 3, 4; 5, 6]; 317s Y = ['1'; '2'; '3']; 317s model = fitcknn (X, Y); 317s X_test = [3, 3; 5, 7]; 317s Y_test = ['1'; '2']; 317s ## Specify custom Weights 317s W = [1; 2]; 317s L = loss (model, X_test, Y_test, 'LossFun', 'logit', 'Weights', W); 317s ***** demo 317s load fisheriris 317s mdl = fitcknn (meas, species); 317s X = mean (meas); 317s Y = {'versicolor'}; 317s m = margin (mdl, X, Y) 317s ***** demo 317s X = [1, 2; 4, 5; 7, 8; 3, 2]; 317s Y = [2; 1; 3; 2]; 317s ## Train the model 317s mdl = fitcknn (X, Y); 317s ## Specify Vars and Labels 317s Vars = 1; 317s Labels = 2; 317s ## Calculate partialDependence 317s [pd, x, y] = partialDependence (mdl, Vars, Labels); 317s ***** demo 317s X = [1, 2; 4, 5; 7, 8; 3, 2]; 317s Y = [2; 1; 3; 2]; 317s ## Train the model 317s mdl = fitcknn (X, Y); 317s ## Specify Vars and Labels 317s Vars = 1; 317s Labels = 1; 317s queryPoints = [linspace(0, 1, 3)', linspace(0, 1, 3)']; 317s ## Calculate partialDependence using queryPoints 317s [pd, x, y] = partialDependence (mdl, Vars, Labels, 'QueryPoints', ... 317s queryPoints) 317s ***** test 317s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 317s y = ["a"; "a"; "b"; "b"]; 317s a = ClassificationKNN (x, y); 317s assert (class (a), "ClassificationKNN"); 317s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 1}) 317s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 317s assert ({a.BucketSize}, {50}) 318s ***** test 318s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 318s y = ["a"; "a"; "b"; "b"]; 318s a = ClassificationKNN (x, y, "NSMethod", "exhaustive"); 318s assert (class (a), "ClassificationKNN"); 318s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 1}) 318s assert ({a.NSMethod, a.Distance}, {"exhaustive", "euclidean"}) 318s assert ({a.BucketSize}, {50}) 318s ***** test 318s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 318s y = ["a"; "a"; "b"; "b"]; 318s k = 10; 318s a = ClassificationKNN (x, y, "NumNeighbors" ,k); 318s assert (class (a), "ClassificationKNN"); 318s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 10}) 318s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 318s assert ({a.BucketSize}, {50}) 318s ***** test 318s x = ones (4, 11); 318s y = ["a"; "a"; "b"; "b"]; 318s k = 10; 318s a = ClassificationKNN (x, y, "NumNeighbors" ,k); 318s assert (class (a), "ClassificationKNN"); 318s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 10}) 318s assert ({a.NSMethod, a.Distance}, {"exhaustive", "euclidean"}) 318s assert ({a.BucketSize}, {50}) 318s ***** test 318s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 318s y = ["a"; "a"; "b"; "b"]; 318s k = 10; 318s a = ClassificationKNN (x, y, "NumNeighbors" ,k, "NSMethod", "exhaustive"); 318s assert (class (a), "ClassificationKNN"); 318s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 10}) 318s assert ({a.NSMethod, a.Distance}, {"exhaustive", "euclidean"}) 318s assert ({a.BucketSize}, {50}) 318s ***** test 318s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 318s y = ["a"; "a"; "b"; "b"]; 318s k = 10; 318s a = ClassificationKNN (x, y, "NumNeighbors" ,k, "Distance", "hamming"); 318s assert (class (a), "ClassificationKNN"); 318s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 10}) 318s assert ({a.NSMethod, a.Distance}, {"exhaustive", "hamming"}) 318s assert ({a.BucketSize}, {50}) 318s ***** test 318s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 318s y = ["a"; "a"; "b"; "b"]; 318s weights = ones (4,1); 318s a = ClassificationKNN (x, y, "Standardize", 1); 318s assert (class (a), "ClassificationKNN"); 318s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 1}) 318s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 318s assert ({a.Standardize}, {true}) 318s assert ({a.Sigma}, {std(x, [], 1)}) 318s assert ({a.Mu}, {[3.75, 4.25, 4.75]}) 318s ***** test 318s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 318s y = ["a"; "a"; "b"; "b"]; 318s weights = ones (4,1); 318s a = ClassificationKNN (x, y, "Standardize", false); 318s assert (class (a), "ClassificationKNN"); 318s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 1}) 318s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 318s assert ({a.Standardize}, {false}) 318s assert ({a.Sigma}, {[]}) 318s assert ({a.Mu}, {[]}) 318s ***** test 318s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 318s y = ["a"; "a"; "b"; "b"]; 318s s = ones (1, 3); 318s a = ClassificationKNN (x, y, "Scale" , s, "Distance", "seuclidean"); 318s assert (class (a), "ClassificationKNN"); 318s assert ({a.DistParameter}, {s}) 318s assert ({a.NSMethod, a.Distance}, {"exhaustive", "seuclidean"}) 318s assert ({a.BucketSize}, {50}) 318s ***** test 318s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 318s y = ["a"; "a"; "b"; "b"]; 318s a = ClassificationKNN (x, y, "Exponent" , 5, "Distance", "minkowski"); 318s assert (class (a), "ClassificationKNN"); 318s assert (a.DistParameter, 5) 318s assert ({a.NSMethod, a.Distance}, {"kdtree", "minkowski"}) 318s ***** test 318s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 318s y = ["a"; "a"; "b"; "b"]; 318s a = ClassificationKNN (x, y, "Exponent" , 5, "Distance", "minkowski", ... 318s "NSMethod", "exhaustive"); 318s assert (class (a), "ClassificationKNN"); 318s assert (a.DistParameter, 5) 318s assert ({a.NSMethod, a.Distance}, {"exhaustive", "minkowski"}) 318s ***** test 318s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 318s y = ["a"; "a"; "b"; "b"]; 318s a = ClassificationKNN (x, y, "BucketSize" , 20, "distance", "mahalanobis"); 318s assert (class (a), "ClassificationKNN"); 318s assert ({a.NSMethod, a.Distance}, {"exhaustive", "mahalanobis"}) 318s assert ({a.BucketSize}, {20}) 318s ***** test 318s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 318s y = ["a"; "a"; "b"; "b"]; 318s a = ClassificationKNN (x, y, "IncludeTies", true); 318s assert (class (a), "ClassificationKNN"); 318s assert (a.IncludeTies, true); 318s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 318s ***** test 318s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 318s y = ["a"; "a"; "b"; "b"]; 318s a = ClassificationKNN (x, y); 318s assert (class (a), "ClassificationKNN"); 318s assert (a.IncludeTies, false); 318s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 318s ***** test 318s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 318s y = ["a"; "a"; "b"; "b"]; 318s a = ClassificationKNN (x, y); 318s assert (class (a), "ClassificationKNN") 318s assert (a.Prior, [0.5; 0.5]) 318s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 318s assert ({a.BucketSize}, {50}) 318s ***** test 318s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 318s y = ["a"; "a"; "b"; "b"]; 318s prior = [0.5; 0.5]; 318s a = ClassificationKNN (x, y, "Prior", "empirical"); 318s assert (class (a), "ClassificationKNN") 318s assert (a.Prior, prior) 318s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 318s assert ({a.BucketSize}, {50}) 318s ***** test 318s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 318s y = ["a"; "a"; "a"; "b"]; 318s prior = [0.75; 0.25]; 318s a = ClassificationKNN (x, y, "Prior", "empirical"); 318s assert (class (a), "ClassificationKNN") 318s assert (a.Prior, prior) 318s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 318s assert ({a.BucketSize}, {50}) 318s ***** test 318s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 318s y = ["a"; "a"; "a"; "b"]; 318s prior = [0.5; 0.5]; 318s a = ClassificationKNN (x, y, "Prior", "uniform"); 318s assert (class (a), "ClassificationKNN") 318s assert (a.Prior, prior) 318s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 318s assert ({a.BucketSize}, {50}) 318s ***** test 318s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 318s y = ["a"; "a"; "b"; "b"]; 318s cost = eye (2); 318s a = ClassificationKNN (x, y, "Cost", cost); 318s assert (class (a), "ClassificationKNN") 318s assert (a.Cost, [1, 0; 0, 1]) 318s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 318s assert ({a.BucketSize}, {50}) 318s ***** test 318s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 318s y = ["a"; "a"; "b"; "b"]; 318s cost = eye (2); 318s a = ClassificationKNN (x, y, "Cost", cost, "Distance", "hamming" ); 318s assert (class (a), "ClassificationKNN") 318s assert (a.Cost, [1, 0; 0, 1]) 318s assert ({a.NSMethod, a.Distance}, {"exhaustive", "hamming"}) 318s assert ({a.BucketSize}, {50}) 318s ***** test 318s x = [1, 2; 3, 4; 5,6; 5, 8]; 318s y = {'9'; '9'; '6'; '7'}; 318s a = ClassificationKNN (x, y); 318s assert (a.Prior, [0.25; 0.25; 0.5]) 318s ***** test 318s load fisheriris 318s x = meas; 318s y = species; 318s ClassNames = {'setosa', 'versicolor', 'virginica'}; 318s a = ClassificationKNN (x, y, 'ClassNames', ClassNames); 318s assert (a.ClassNames, ClassNames') 318s ***** error ClassificationKNN () 318s ***** error ... 318s ClassificationKNN (ones(4, 1)) 318s ***** error ... 318s ClassificationKNN (ones (4,2), ones (1,4)) 318s ***** error ... 318s ClassificationKNN (ones (5,3), ones (5,1), "standardize", "a") 318s ***** error ... 318s ClassificationKNN (ones (5,2), ones (5,1), "scale", [1 1], "standardize", true) 318s ***** error ... 318s ClassificationKNN (ones (5,2), ones (5,1), "PredictorNames", ["A"]) 318s ***** error ... 318s ClassificationKNN (ones (5,2), ones (5,1), "PredictorNames", "A") 318s ***** error ... 318s ClassificationKNN (ones (5,2), ones (5,1), "PredictorNames", {"A", "B", "C"}) 318s ***** error ... 318s ClassificationKNN (ones (5,2), ones (5,1), "ResponseName", {"Y"}) 318s ***** error ... 318s ClassificationKNN (ones (5,2), ones (5,1), "ResponseName", 1) 318s ***** error ... 318s ClassificationKNN (ones(10,2), ones (10,1), "ClassNames", @(x)x) 318s ***** error ... 318s ClassificationKNN (ones(10,2), ones (10,1), "ClassNames", {1}) 318s ***** error ... 318s ClassificationKNN (ones(10,2), ones (10,1), "ClassNames", [1, 2]) 318s ***** error ... 318s ClassificationKNN (ones(5,2), ['a';'b';'a';'a';'b'], "ClassNames", ['a';'c']) 318s ***** error ... 318s ClassificationKNN (ones(5,2), {'a';'b';'a';'a';'b'}, "ClassNames", {'a','c'}) 318s ***** error ... 318s ClassificationKNN (ones(10,2), logical (ones (10,1)), "ClassNames", [true, false]) 318s ***** error ... 318s ClassificationKNN (ones (5,2), ones (5,1), "BreakTies", 1) 318s ***** error ... 318s ClassificationKNN (ones (5,2), ones (5,1), "BreakTies", {"1"}) 318s ***** error ... 318s ClassificationKNN (ones (5,2), ones (5,1), "BreakTies", "some") 318s ***** error ... 318s ClassificationKNN (ones (5,2), ones (5,1), "Prior", {"1", "2"}) 318s ***** error ... 318s ClassificationKNN (ones (5,2), ones (5,1), "Cost", [1, 2]) 318s ***** error ... 318s ClassificationKNN (ones (5,2), ones (5,1), "Cost", "string") 318s ***** error ... 318s ClassificationKNN (ones (5,2), ones (5,1), "Cost", {eye(2)}) 318s ***** error ... 318s ClassificationKNN (ones (5,2), ones (5,1), "NumNeighbors", 0) 318s ***** error ... 318s ClassificationKNN (ones (5,2), ones (5,1), "NumNeighbors", 15.2) 318s ***** error ... 318s ClassificationKNN (ones (5,2), ones (5,1), "NumNeighbors", "asd") 318s ***** error ... 318s ClassificationKNN (ones (5,2), ones (5,1), "Distance", "somemetric") 318s ***** error ... 318s ClassificationKNN (ones (5,2), ones (5,1), "Distance", ... 318s @(v,m)sqrt(repmat(v,rows(m),1)-m,2)) 318s ***** error ... 318s ClassificationKNN (ones (5,2), ones (5,1), "Distance", ... 318s @(v,m)sqrt(sum(sumsq(repmat(v,rows(m),1)-m,2)))) 318s ***** error ... 318s ClassificationKNN (ones (5,2), ones (5,1), "Distance", [1 2 3]) 318s ***** error ... 318s ClassificationKNN (ones (5,2), ones (5,1), "Distance", {"mahalanobis"}) 318s ***** error ... 318s ClassificationKNN (ones (5,2), ones (5,1), "Distance", logical (5)) 318s ***** error ... 318s ClassificationKNN (ones (5,2), ones (5,1), "DistanceWeight", @(x)sum(x)) 318s ***** error ... 318s ClassificationKNN (ones (5,2), ones (5,1), "DistanceWeight", "text") 318s ***** error ... 318s ClassificationKNN (ones (5,2), ones (5,1), "DistanceWeight", [1 2 3]) 318s ***** error ... 318s ClassificationKNN (ones (5,2), ones (5,1), "Scale", "scale") 318s ***** error ... 318s ClassificationKNN (ones (5,2), ones (5,1), "Scale", {[1 2 3]}) 318s ***** error ... 318s ClassificationKNN (ones (5,2), ones (5,1), "standardize", true, "scale", [1 1]) 318s ***** error ... 318s ClassificationKNN (ones (5,2), ones (5,1), "Cov", ones (2), "Distance", "mahalanobis") 318s ***** error ... 318s ClassificationKNN (ones (5,2), ones (5,1), "scale", [1 1], "Cov", ones (2)) 318s ***** error ... 318s ClassificationKNN (ones (5,2), ones (5,1), "Exponent", 12.5) 318s ***** error ... 318s ClassificationKNN (ones (5,2), ones (5,1), "Exponent", -3) 318s ***** error ... 318s ClassificationKNN (ones (5,2), ones (5,1), "Exponent", "three") 318s ***** error ... 318s ClassificationKNN (ones (5,2), ones (5,1), "Exponent", {3}) 318s ***** error ... 318s ClassificationKNN (ones (5,2), ones (5,1), "NSMethod", {"kdtree"}) 318s ***** error ... 318s ClassificationKNN (ones (5,2), ones (5,1), "NSMethod", 3) 318s ***** error ... 318s ClassificationKNN (ones (5,2), ones (5,1), "NSMethod", "some") 318s ***** error ... 318s ClassificationKNN (ones (5,2), ones (5,1), "IncludeTies", "some") 318s ***** error ... 318s ClassificationKNN (ones (5,2), ones (5,1), "BucketSize", 42.5) 318s ***** error ... 318s ClassificationKNN (ones (5,2), ones (5,1), "BucketSize", -50) 318s ***** error ... 318s ClassificationKNN (ones (5,2), ones (5,1), "BucketSize", "some") 318s ***** error ... 318s ClassificationKNN (ones (5,2), ones (5,1), "BucketSize", {50}) 318s ***** error ... 318s ClassificationKNN (ones (5,2), ones (5,1), "some", "some") 318s ***** error ... 318s ClassificationKNN ([1;2;3;'a';4], ones (5,1)) 318s ***** error ... 318s ClassificationKNN ([1;2;3;Inf;4], ones (5,1)) 318s ***** error ... 318s ClassificationKNN (ones (5,2), ones (5,1), "Prior", [1 2]) 318s ***** error ... 318s ClassificationKNN (ones (5,2), ones (5,1), "Cost", [1 2; 1 3]) 318s ***** error ... 318s ClassificationKNN (ones (5,2), ones (5,1), "Scale", [1 1]) 318s ***** error ... 318s ClassificationKNN (ones (5,2), ones (5,1), "Scale", [1 1 1], "Distance", "seuclidean") 318s ***** error ... 318s ClassificationKNN (ones (5,2), ones (5,1), "Scale", [1 -1], "Distance", "seuclidean") 318s ***** error ... 318s ClassificationKNN (ones (5,2), ones (5,1), "Cov", eye (2)) 318s ***** error ... 318s ClassificationKNN (ones (5,2), ones (5,1), "Cov", eye (3), "Distance", "mahalanobis") 318s ***** error ... 318s ClassificationKNN (ones (5,2), ones (5,1), "Exponent", 3) 318s ***** error ... 318s ClassificationKNN (ones (5,2), ones (5,1), "Distance", "hamming", "NSMethod", "kdtree") 318s ***** shared x, y 318s load fisheriris 318s x = meas; 318s y = species; 318s ***** test 318s xc = [min(x); mean(x); max(x)]; 318s obj = fitcknn (x, y, "NumNeighbors", 5); 318s [l, s, c] = predict (obj, xc); 318s assert (l, {"setosa"; "versicolor"; "virginica"}) 318s assert (s, [1, 0, 0; 0, 1, 0; 0, 0, 1]) 318s assert (c, [0, 1, 1; 1, 0, 1; 1, 1, 0]) 318s ***** test 318s xc = [min(x); mean(x); max(x)]; 318s obj = fitcknn (x, y, "NumNeighbors", 5, "Standardize", 1); 318s [l, s, c] = predict (obj, xc); 318s assert (l, {"versicolor"; "versicolor"; "virginica"}) 318s assert (s, [0.4, 0.6, 0; 0, 1, 0; 0, 0, 1]) 318s assert (c, [0.6, 0.4, 1; 1, 0, 1; 1, 1, 0]) 318s ***** test 318s xc = [min(x); mean(x); max(x)]; 318s obj = fitcknn (x, y, "NumNeighbors", 10, "distance", "mahalanobis"); 318s [l, s, c] = predict (obj, xc); 318s assert (s, [0.3, 0.7, 0; 0, 0.9, 0.1; 0.2, 0.2, 0.6], 1e-4) 318s assert (c, [0.7, 0.3, 1; 1, 0.1, 0.9; 0.8, 0.8, 0.4], 1e-4) 318s ***** test 318s xc = [min(x); mean(x); max(x)]; 318s obj = fitcknn (x, y, "NumNeighbors", 10, "distance", "cosine"); 318s [l, s, c] = predict (obj, xc); 318s assert (l, {"setosa"; "versicolor"; "virginica"}) 318s assert (s, [1, 0, 0; 0, 1, 0; 0, 0.3, 0.7], 1e-4) 318s assert (c, [0, 1, 1; 1, 0, 1; 1, 0.7, 0.3], 1e-4) 318s ***** test 318s xc = [5.2, 4.1, 1.5, 0.1; 5.1, 3.8, 1.9, 0.4; ... 318s 5.1, 3.8, 1.5, 0.3; 4.9, 3.6, 1.4, 0.1]; 318s obj = fitcknn (x, y, "NumNeighbors", 5); 318s [l, s, c] = predict (obj, xc); 318s assert (l, {"setosa"; "setosa"; "setosa"; "setosa"}) 318s assert (s, [1, 0, 0; 1, 0, 0; 1, 0, 0; 1, 0, 0]) 318s assert (c, [0, 1, 1; 0, 1, 1; 0, 1, 1; 0, 1, 1]) 318s ***** test 318s xc = [5, 3, 5, 1.45]; 318s obj = fitcknn (x, y, "NumNeighbors", 5); 318s [l, s, c] = predict (obj, xc); 318s assert (l, {"versicolor"}) 318s assert (s, [0, 0.6, 0.4], 1e-4) 318s assert (c, [1, 0.4, 0.6], 1e-4) 318s ***** test 318s xc = [5, 3, 5, 1.45]; 318s obj = fitcknn (x, y, "NumNeighbors", 10, "distance", "minkowski", "Exponent", 5); 318s [l, s, c] = predict (obj, xc); 318s assert (l, {"versicolor"}) 318s assert (s, [0, 0.5, 0.5], 1e-4) 318s assert (c, [1, 0.5, 0.5], 1e-4) 318s ***** test 318s xc = [5, 3, 5, 1.45]; 318s obj = fitcknn (x, y, "NumNeighbors", 10, "distance", "jaccard"); 318s [l, s, c] = predict (obj, xc); 318s assert (l, {"setosa"}) 318s assert (s, [0.9, 0.1, 0], 1e-4) 318s assert (c, [0.1, 0.9, 1], 1e-4) 319s ***** test 319s xc = [5, 3, 5, 1.45]; 319s obj = fitcknn (x, y, "NumNeighbors", 10, "distance", "mahalanobis"); 319s [l, s, c] = predict (obj, xc); 319s assert (l, {"versicolor"}) 319s assert (s, [0.1000, 0.5000, 0.4000], 1e-4) 319s assert (c, [0.9000, 0.5000, 0.6000], 1e-4) 319s ***** test 319s xc = [5, 3, 5, 1.45]; 319s obj = fitcknn (x, y, "NumNeighbors", 5, "distance", "jaccard"); 319s [l, s, c] = predict (obj, xc); 319s assert (l, {"setosa"}) 319s assert (s, [0.8, 0.2, 0], 1e-4) 319s assert (c, [0.2, 0.8, 1], 1e-4) 319s ***** test 319s xc = [5, 3, 5, 1.45]; 319s obj = fitcknn (x, y, "NumNeighbors", 5, "distance", "seuclidean"); 319s [l, s, c] = predict (obj, xc); 319s assert (l, {"versicolor"}) 319s assert (s, [0, 1, 0], 1e-4) 319s assert (c, [1, 0, 1], 1e-4) 319s ***** test 319s xc = [5, 3, 5, 1.45]; 319s obj = fitcknn (x, y, "NumNeighbors", 10, "distance", "chebychev"); 319s [l, s, c] = predict (obj, xc); 319s assert (l, {"versicolor"}) 319s assert (s, [0, 0.7, 0.3], 1e-4) 319s assert (c, [1, 0.3, 0.7], 1e-4) 319s ***** test 319s xc = [5, 3, 5, 1.45]; 319s obj = fitcknn (x, y, "NumNeighbors", 10, "distance", "cityblock"); 319s [l, s, c] = predict (obj, xc); 319s assert (l, {"versicolor"}) 319s assert (s, [0, 0.6, 0.4], 1e-4) 319s assert (c, [1, 0.4, 0.6], 1e-4) 319s ***** test 319s xc = [5, 3, 5, 1.45]; 319s obj = fitcknn (x, y, "NumNeighbors", 10, "distance", "cosine"); 319s [l, s, c] = predict (obj, xc); 319s assert (l, {"virginica"}) 319s assert (s, [0, 0.1, 0.9], 1e-4) 319s assert (c, [1, 0.9, 0.1], 1e-4) 319s ***** test 319s xc = [5, 3, 5, 1.45]; 319s obj = fitcknn (x, y, "NumNeighbors", 10, "distance", "correlation"); 319s [l, s, c] = predict (obj, xc); 319s assert (l, {"virginica"}) 319s assert (s, [0, 0.1, 0.9], 1e-4) 319s assert (c, [1, 0.9, 0.1], 1e-4) 319s ***** test 319s xc = [5, 3, 5, 1.45]; 319s obj = fitcknn (x, y, "NumNeighbors", 30, "distance", "spearman"); 319s [l, s, c] = predict (obj, xc); 319s assert (l, {"versicolor"}) 319s assert (s, [0, 1, 0], 1e-4) 319s assert (c, [1, 0, 1], 1e-4) 319s ***** test 319s xc = [5, 3, 5, 1.45]; 319s obj = fitcknn (x, y, "NumNeighbors", 30, "distance", "hamming"); 319s [l, s, c] = predict (obj, xc); 319s assert (l, {"setosa"}) 319s assert (s, [0.4333, 0.3333, 0.2333], 1e-4) 319s assert (c, [0.5667, 0.6667, 0.7667], 1e-4) 319s ***** test 319s xc = [5, 3, 5, 1.45]; 319s obj = fitcknn (x, y, "NumNeighbors", 5, "distance", "hamming"); 319s [l, s, c] = predict (obj, xc); 319s assert (l, {"setosa"}) 319s assert (s, [0.8, 0.2, 0], 1e-4) 319s assert (c, [0.2, 0.8, 1], 1e-4) 319s ***** test 319s xc = [min(x); mean(x); max(x)]; 319s obj = fitcknn (x, y, "NumNeighbors", 10, "distance", "correlation"); 319s [l, s, c] = predict (obj, xc); 319s assert (l, {"setosa"; "versicolor"; "virginica"}) 319s assert (s, [1, 0, 0; 0, 1, 0; 0, 0.4, 0.6], 1e-4) 319s assert (c, [0, 1, 1; 1, 0, 1; 1, 0.6, 0.4], 1e-4) 319s ***** test 319s xc = [min(x); mean(x); max(x)]; 319s obj = fitcknn (x, y, "NumNeighbors", 10, "distance", "hamming"); 319s [l, s, c] = predict (obj, xc); 319s assert (l, {"setosa";"setosa";"setosa"}) 319s assert (s, [0.9, 0.1, 0; 1, 0, 0; 0.5, 0, 0.5], 1e-4) 319s assert (c, [0.1, 0.9, 1; 0, 1, 1; 0.5, 1, 0.5], 1e-4) 319s ***** error ... 319s predict (ClassificationKNN (ones (4,2), ones (4,1))) 319s ***** error ... 319s predict (ClassificationKNN (ones (4,2), ones (4,1)), []) 319s ***** error ... 319s predict (ClassificationKNN (ones (4,2), ones (4,1)), 1) 319s ***** test 319s load fisheriris 319s model = fitcknn (meas, species, 'NumNeighbors', 5); 319s X = mean (meas); 319s Y = {'versicolor'}; 319s L = loss (model, X, Y); 319s assert (L, 0) 319s ***** test 319s load fisheriris 319s model = fitcknn (meas, species, 'NumNeighbors', 5); 319s L = loss (model, meas, species, 'LossFun', 'binodeviance'); 319s assert (L, 0.1413, 1e-4) 319s ***** test 319s load fisheriris 319s model = fitcknn (meas, species); 319s L = loss (model, meas, species, 'LossFun', 'binodeviance'); 319s assert (L, 0.1269, 1e-4) 319s ***** test 319s X = [1, 2; 3, 4; 5, 6]; 319s Y = {'A'; 'B'; 'A'}; 319s model = fitcknn (X, Y); 319s X_test = [1, 6; 3, 3]; 319s Y_test = {'A'; 'B'}; 319s L = loss (model, X_test, Y_test); 319s assert (abs (L - 0.6667) > 1e-5) 319s ***** test 319s X = [1, 2; 3, 4; 5, 6]; 319s Y = {'A'; 'B'; 'A'}; 319s model = fitcknn (X, Y); 319s X_with_nan = [1, 2; NaN, 4]; 319s Y_test = {'A'; 'B'}; 319s L = loss (model, X_with_nan, Y_test); 319s assert (abs (L - 0.3333) < 1e-4) 319s ***** test 319s X = [1, 2; 3, 4; 5, 6]; 319s Y = {'A'; 'B'; 'A'}; 319s model = fitcknn (X, Y); 319s X_with_nan = [1, 2; NaN, 4]; 319s Y_test = {'A'; 'B'}; 319s L = loss (model, X_with_nan, Y_test, 'LossFun', 'logit'); 319s assert (isnan (L)) 319s ***** test 319s X = [1, 2; 3, 4; 5, 6]; 319s Y = {'A'; 'B'; 'A'}; 319s model = fitcknn (X, Y); 319s customLossFun = @(C, S, W, Cost) sum (W .* sum (abs (C - S), 2)); 319s L = loss (model, X, Y, 'LossFun', customLossFun); 319s assert (L, 0) 319s ***** test 319s X = [1, 2; 3, 4; 5, 6]; 319s Y = [1; 2; 1]; 319s model = fitcknn (X, Y); 319s L = loss (model, X, Y, 'LossFun', 'classiferror'); 319s assert (L, 0) 320s ***** test 320s X = [1, 2; 3, 4; 5, 6]; 320s Y = [true; false; true]; 320s model = fitcknn (X, Y); 320s L = loss (model, X, Y, 'LossFun', 'binodeviance'); 320s assert (abs (L - 0.1269) < 1e-4) 320s ***** test 320s X = [1, 2; 3, 4; 5, 6]; 320s Y = ['1'; '2'; '1']; 320s model = fitcknn (X, Y); 320s L = loss (model, X, Y, 'LossFun', 'classiferror'); 320s assert (L, 0) 320s ***** test 320s X = [1, 2; 3, 4; 5, 6]; 320s Y = ['1'; '2'; '3']; 320s model = fitcknn (X, Y); 320s X_test = [3, 3]; 320s Y_test = ['1']; 320s L = loss (model, X_test, Y_test, 'LossFun', 'quadratic'); 320s assert (L, 1) 320s ***** test 320s X = [1, 2; 3, 4; 5, 6]; 320s Y = ['1'; '2'; '3']; 320s model = fitcknn (X, Y); 320s X_test = [3, 3; 5, 7]; 320s Y_test = ['1'; '2']; 320s L = loss (model, X_test, Y_test, 'LossFun', 'classifcost'); 320s assert (L, 1) 320s ***** test 320s X = [1, 2; 3, 4; 5, 6]; 320s Y = ['1'; '2'; '3']; 320s model = fitcknn (X, Y); 320s X_test = [3, 3; 5, 7]; 320s Y_test = ['1'; '2']; 320s L = loss (model, X_test, Y_test, 'LossFun', 'hinge'); 320s assert (L, 1) 320s ***** test 320s X = [1, 2; 3, 4; 5, 6]; 320s Y = ['1'; '2'; '3']; 320s model = fitcknn (X, Y); 320s X_test = [3, 3; 5, 7]; 320s Y_test = ['1'; '2']; 320s W = [1; 2]; 320s L = loss (model, X_test, Y_test, 'LossFun', 'logit', 'Weights', W); 320s assert (abs (L - 0.6931) < 1e-4) 320s ***** error ... 320s loss (ClassificationKNN (ones (4,2), ones (4,1))) 320s ***** error ... 320s loss (ClassificationKNN (ones (4,2), ones (4,1)), ones (4,2)) 320s ***** error ... 320s loss (ClassificationKNN (ones (40,2), randi ([1, 2], 40, 1)), [], zeros (2)) 320s ***** error ... 320s loss (ClassificationKNN (ones (40,2), randi ([1, 2], 40, 1)), 1, zeros (2)) 320s ***** error ... 320s loss (ClassificationKNN (ones (4,2), ones (4,1)), ones (4,2), ... 320s ones (4,1), 'LossFun') 320s ***** error ... 320s loss (ClassificationKNN (ones (4,2), ones (4,1)), ones (4,2), ones (3,1)) 320s ***** error ... 320s loss (ClassificationKNN (ones (4,2), ones (4,1)), ones (4,2), ... 320s ones (4,1), 'LossFun', 'a') 320s ***** error ... 320s loss (ClassificationKNN (ones (4,2), ones (4,1)), ones (4,2), ... 320s ones (4,1), 'Weights', 'w') 320s ***** test 320s load fisheriris 320s mdl = fitcknn (meas, species, 'NumNeighbors', 5); 320s X = mean (meas); 320s Y = {'versicolor'}; 320s m = margin (mdl, X, Y); 320s assert (m, 1) 320s ***** test 320s X = [1, 2; 3, 4; 5, 6]; 320s Y = [1; 2; 3]; 320s mdl = fitcknn (X, Y); 320s m = margin (mdl, X, Y); 320s assert (m, [1; 1; 1]) 320s ***** test 320s X = [7, 8; 9, 10]; 320s Y = ['1'; '2']; 320s mdl = fitcknn (X, Y); 320s m = margin (mdl, X, Y); 320s assert (m, [1; 1]) 320s ***** test 320s X = [11, 12]; 320s Y = {'1'}; 320s mdl = fitcknn (X, Y); 320s m = margin (mdl, X, Y); 320s assert (isnan (m)) 320s ***** test 320s X = [1, 2; 3, 4; 5, 6]; 320s Y = [1; 2; 3]; 320s mdl = fitcknn (X, Y); 320s X1 = [15, 16]; 320s Y1 = [1]; 320s m = margin (mdl, X1, Y1); 320s assert (m, -1) 320s ***** error ... 320s margin (ClassificationKNN (ones (4,2), ones (4,1))) 320s ***** error ... 320s margin (ClassificationKNN (ones (4,2), ones (4,1)), ones (4,2)) 320s ***** error ... 320s margin (ClassificationKNN (ones (40,2), randi ([1, 2], 40, 1)), [], zeros (2)) 320s ***** error ... 320s margin (ClassificationKNN (ones (40,2), randi ([1, 2], 40, 1)), 1, zeros (2)) 320s ***** error ... 320s margin (ClassificationKNN (ones (4,2), ones (4,1)), ones (4,2), ones (3,1)) 320s ***** shared X, Y, mdl 320s X = [1, 2; 4, 5; 7, 8; 3, 2]; 320s Y = [2; 1; 3; 2]; 320s mdl = fitcknn (X, Y); 320s ***** test 320s Vars = 1; 320s Labels = 2; 320s [pd, x, y] = partialDependence (mdl, Vars, Labels); 320s pdm = [0.7500, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 320s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 320s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 320s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 320s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 320s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 320s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 320s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 320s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 320s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 320s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 320s 0.5000, 0.5000]; 320s assert (pd, pdm) 321s ***** test 321s Vars = 1; 321s Labels = 2; 321s [pd, x, y] = partialDependence (mdl, Vars, Labels, ... 321s 'NumObservationsToSample', 5); 321s pdm = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ... 321s 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ... 321s 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ... 321s 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ... 321s 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; 321s assert (abs (pdm - pd) < 1) 321s ***** test 321s Vars = 1; 321s Labels = 2; 321s [pd, x, y] = partialDependence (mdl, Vars, Labels, 'UseParallel', true); 321s pdm = [0.7500, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 321s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 321s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 321s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 321s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 321s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 321s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 321s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 321s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 321s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 321s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 321s 0.5000, 0.5000]; 321s assert (pd, pdm) 322s ***** test 322s Vars = [1, 2]; 322s Labels = 1; 322s queryPoints = {linspace(0, 1, 3)', linspace(0, 1, 3)'}; 322s [pd, x, y] = partialDependence (mdl, Vars, Labels, 'QueryPoints', ... 322s queryPoints, 'UseParallel', true); 322s pdm = [0, 0, 0; 0, 0, 0; 0, 0, 0]; 322s assert (pd, pdm) 322s ***** test 322s Vars = 1; 322s Labels = [1; 2]; 322s [pd, x, y] = partialDependence (mdl, Vars, Labels); 322s pdm = [0.2500, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 322s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 322s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 322s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 322s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 322s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.2500, 0.2500, 0.2500, ... 322s 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, ... 322s 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, ... 322s 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, ... 322s 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, ... 322s 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, ... 322s 0.2500, 0.2500; 0.7500, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 322s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 322s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 322s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 322s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 322s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 322s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 322s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 322s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 322s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 322s 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, 0.5000, ... 322s 0.5000, 0.5000, 0.5000]; 322s assert (pd, pdm) 322s ***** test 322s Vars = [1, 2]; 322s Labels = [1; 2]; 322s queryPoints = {linspace(0, 1, 3)', linspace(0, 1, 3)'}; 322s [pd, x, y] = partialDependence (mdl, Vars, Labels, 'QueryPoints', queryPoints); 322s pdm(:,:,1) = [0, 0, 0; 1, 1, 1]; 322s pdm(:,:,2) = [0, 0, 0; 1, 1, 1]; 322s pdm(:,:,3) = [0, 0, 0; 1, 1, 1]; 322s assert (pd, pdm) 323s ***** test 323s X1 = [1; 2; 4; 5; 7; 8; 3; 2]; 323s X2 = ['2'; '3'; '1'; '3'; '1'; '3'; '2'; '2']; 323s X = [X1, double(X2)]; 323s Y = [1; 2; 3; 3; 2; 1; 2; 1]; 323s mdl = fitcknn (X, Y, 'ClassNames', {'1', '2', '3'}); 323s Vars = 1; 323s Labels = 1; 323s [pd, x, y] = partialDependence (mdl, Vars, Labels); 323s pdm = [1.0000, 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, ... 323s 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, ... 323s 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ... 323s 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ... 323s 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.3750, ... 323s 0.3750, 0.3750, 0.3750, 0.3750, 0.3750, 0.3750, 0.3750, 0.3750, 0.3750, ... 323s 0.3750, 0.3750, 0.3750, 0.3750, 0.7500, 0.7500, 0.7500, 0.7500, 0.7500, ... 323s 0.7500, 0.7500, 0.7500]; 323s assert (pd, pdm) 324s ***** test 324s X1 = [1; 2; 4; 5; 7; 8; 3; 2]; 324s X2 = ['2'; '3'; '1'; '3'; '1'; '3'; '2'; '2']; 324s X = [X1, double(X2)]; 324s Y = [1; 2; 3; 3; 2; 1; 2; 1]; 324s predictorNames = {'Feature1', 'Feature2'}; 324s mdl = fitcknn (X, Y, 'PredictorNames', predictorNames); 324s Vars = 'Feature1'; 324s Labels = 1; 324s [pd, x, y] = partialDependence (mdl, Vars, Labels); 324s pdm = [1.0000, 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, ... 324s 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, ... 324s 0.6250, 0.6250, 0.6250, 0.6250, 0.6250, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ... 324s 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ... 324s 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.3750, ... 324s 0.3750, 0.3750, 0.3750, 0.3750, 0.3750, 0.3750, 0.3750, 0.3750, 0.3750, ... 324s 0.3750, 0.3750, 0.3750, 0.3750, 0.7500, 0.7500, 0.7500, 0.7500, 0.7500, ... 324s 0.7500, 0.7500, 0.7500]; 324s assert (pd, pdm) 325s ***** test 325s X1 = [1; 2; 4; 5; 7; 8; 3; 2]; 325s X2 = ['2'; '3'; '1'; '3'; '1'; '3'; '2'; '2']; 325s X = [X1, double(X2)]; 325s Y = [1; 2; 3; 3; 2; 1; 2; 1]; 325s predictorNames = {'Feature1', 'Feature2'}; 325s mdl = fitcknn (X, Y, 'PredictorNames', predictorNames); 325s new_X1 = [10; 5; 6; 8; 9; 20; 35; 6]; 325s new_X2 = ['2'; '2'; '1'; '2'; '1'; '3'; '3'; '2']; 325s new_X = [new_X1, double(new_X2)]; 325s Vars = 'Feature1'; 325s Labels = 1; 325s [pd, x, y] = partialDependence (mdl, Vars, Labels, new_X); 325s pdm = [0, 0, 0, 0, 0, 0.2500, 0.2500, 0.2500, 0.2500, 0.7500, 0.7500, ... 325s 0.7500, 0.7500, 0.7500, 0.7500, 1.0000, 1.0000, 1.0000, 1.0000, 1.0000, ... 325s 1.0000, 1.0000, 1.0000, 1.0000, 1.0000, 1.0000, 1.0000, 1.0000, 1.0000, ... 325s 1.0000, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ... 325s 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ... 325s 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]; 325s assert (pd, pdm) 326s ***** error ... 326s partialDependence (ClassificationKNN (ones (4,2), ones (4,1))) 326s ***** error ... 326s partialDependence (ClassificationKNN (ones (4,2), ones (4,1)), 1) 326s ***** error ... 326s partialDependence (ClassificationKNN (ones (4,2), ones (4,1)), 1, ... 326s ones (4,1), 'NumObservationsToSample') 326s ***** error ... 326s partialDependence (ClassificationKNN (ones (4,2), ones (4,1)), 1, ... 326s ones (4,1), 2) 326s ***** shared x, y, obj 326s load fisheriris 326s x = meas; 326s y = species; 326s covMatrix = cov (x); 326s obj = fitcknn (x, y, 'NumNeighbors', 5, 'Distance', ... 326s 'mahalanobis', 'Cov', covMatrix); 326s ***** test 326s CVMdl = crossval (obj); 326s assert (class (CVMdl), "ClassificationPartitionedModel") 326s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 326s assert (CVMdl.KFold == 10) 326s assert (CVMdl.ModelParameters.NumNeighbors == 5) 326s assert (strcmp (CVMdl.ModelParameters.Distance, "mahalanobis")) 326s assert (class (CVMdl.Trained{1}), "ClassificationKNN") 326s assert (!CVMdl.ModelParameters.Standardize) 326s ***** test 326s CVMdl = crossval (obj, "KFold", 5); 326s assert (class (CVMdl), "ClassificationPartitionedModel") 326s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 326s assert (CVMdl.KFold == 5) 326s assert (CVMdl.ModelParameters.NumNeighbors == 5) 326s assert (strcmp (CVMdl.ModelParameters.Distance, "mahalanobis")) 326s assert (class (CVMdl.Trained{1}), "ClassificationKNN") 326s assert (CVMdl.ModelParameters.Standardize == obj.Standardize) 326s ***** test 326s obj = fitcknn (x, y, "NumNeighbors", 5, "Distance", "cityblock"); 326s CVMdl = crossval (obj, "HoldOut", 0.2); 326s assert (class (CVMdl), "ClassificationPartitionedModel") 326s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 326s assert (CVMdl.ModelParameters.NumNeighbors == 5) 326s assert (strcmp (CVMdl.ModelParameters.Distance, "cityblock")) 326s assert (class (CVMdl.Trained{1}), "ClassificationKNN") 326s assert (CVMdl.ModelParameters.Standardize == obj.Standardize) 326s ***** test 326s obj = fitcknn (x, y, "NumNeighbors", 10, "Distance", "cityblock"); 326s CVMdl = crossval (obj, "LeaveOut", 'on'); 326s assert (class (CVMdl), "ClassificationPartitionedModel") 326s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 326s assert (CVMdl.ModelParameters.NumNeighbors == 10) 326s assert (strcmp (CVMdl.ModelParameters.Distance, "cityblock")) 326s assert (class (CVMdl.Trained{1}), "ClassificationKNN") 326s assert (CVMdl.ModelParameters.Standardize == obj.Standardize) 327s ***** test 327s obj = fitcknn (x, y, "NumNeighbors", 10, "Distance", "cityblock"); 327s partition = cvpartition (y, 'KFold', 3); 327s CVMdl = crossval (obj, 'cvPartition', partition); 327s assert (class (CVMdl), "ClassificationPartitionedModel") 327s assert (CVMdl.KFold == 3) 327s assert (CVMdl.ModelParameters.NumNeighbors == 10) 327s assert (strcmp (CVMdl.ModelParameters.Distance, "cityblock")) 327s assert (class (CVMdl.Trained{1}), "ClassificationKNN") 327s assert (CVMdl.ModelParameters.Standardize == obj.Standardize) 327s ***** error ... 327s crossval (ClassificationKNN (ones (4,2), ones (4,1)), "kfold") 327s ***** error... 327s crossval (ClassificationKNN (ones (4,2), ones (4,1)), "kfold", 12, "holdout", 0.2) 327s ***** error ... 327s crossval (ClassificationKNN (ones (4,2), ones (4,1)), "kfold", 'a') 327s ***** error ... 327s crossval (ClassificationKNN (ones (4,2), ones (4,1)), "holdout", 2) 327s ***** error ... 327s crossval (ClassificationKNN (ones (4,2), ones (4,1)), "leaveout", 1) 327s ***** error ... 327s crossval (ClassificationKNN (ones (4,2), ones (4,1)), "cvpartition", 1) 327s 165 tests, 165 passed, 0 known failure, 0 skipped 327s [inst/Classification/ClassificationNeuralNetwork.m] 327s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/Classification/ClassificationNeuralNetwork.m 327s ***** error ... 327s ClassificationNeuralNetwork () 327s ***** error ... 327s ClassificationNeuralNetwork (ones(10,2)) 327s ***** error ... 327s ClassificationNeuralNetwork (ones(10,2), ones (5,1)) 327s ***** error ... 327s ClassificationNeuralNetwork (ones (5,3), ones (5,1), "standardize", "a") 327s ***** error ... 327s ClassificationNeuralNetwork (ones (5,2), ones (5,1), "PredictorNames", ["A"]) 327s ***** error ... 327s ClassificationNeuralNetwork (ones (5,2), ones (5,1), "PredictorNames", "A") 327s ***** error ... 327s ClassificationNeuralNetwork (ones (5,2), ones (5,1), "PredictorNames", {"A", "B", "C"}) 327s ***** error ... 327s ClassificationNeuralNetwork (ones (5,2), ones (5,1), "ResponseName", {"Y"}) 327s ***** error ... 327s ClassificationNeuralNetwork (ones (5,2), ones (5,1), "ResponseName", 1) 327s ***** error ... 327s ClassificationNeuralNetwork (ones(10,2), ones (10,1), "ClassNames", @(x)x) 327s ***** error ... 327s ClassificationNeuralNetwork (ones(10,2), ones (10,1), "ClassNames", {1}) 327s ***** error ... 327s ClassificationNeuralNetwork (ones(10,2), ones (10,1), "ClassNames", [1, 2]) 327s ***** error ... 327s ClassificationNeuralNetwork (ones(5,2), ['a';'b';'a';'a';'b'], "ClassNames", ['a';'c']) 327s ***** error ... 327s ClassificationNeuralNetwork (ones(5,2), {'a';'b';'a';'a';'b'}, "ClassNames", {'a','c'}) 327s ***** error ... 327s ClassificationNeuralNetwork (ones(10,2), logical (ones (10,1)), "ClassNames", [true, false]) 327s ***** error ... 327s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "LayerSizes", -1) 327s ***** error ... 327s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "LayerSizes", 0.5) 327s ***** error ... 327s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "LayerSizes", [1,-2]) 327s ***** error ... 327s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "LayerSizes", [10,20,30.5]) 327s ***** error ... 327s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "LearningRate", -0.1) 327s ***** error ... 327s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "LearningRate", [0.1, 0.01]) 327s ***** error ... 327s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "LearningRate", "a") 327s ***** error ... 327s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "Activations", 123) 327s ***** error ... 327s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "Activations", "unsupported_type") 327s ***** error ... 327s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "LayerSizes", [10, 5], ... 327s "Activations", {"sigmoid", "unsupported_type"}) 327s ***** error ... 327s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "Activations", {"sigmoid", "relu", "softmax"}) 327s ***** error ... 327s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "OutputLayerActivation", 123) 327s ***** error ... 327s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "OutputLayerActivation", "unsupported_type") 327s ***** error ... 327s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "IterationLimit", -1) 327s ***** error ... 327s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "IterationLimit", 0.5) 327s ***** error ... 327s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "IterationLimit", [1,2]) 327s ***** error ... 327s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "ScoreTransform", [1,2]) 327s ***** error ... 327s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "ScoreTransform", "unsupported_type") 327s ***** error ... 327s ClassificationNeuralNetwork (ones(10,2), ones(10,1), "some", "some") 327s ***** error ... 327s ClassificationNeuralNetwork ([1;2;3;'a';4], ones (5,1)) 327s ***** error ... 327s ClassificationNeuralNetwork ([1;2;3;Inf;4], ones (5,1)) 327s ***** shared x, y, objST, Mdl 327s load fisheriris 327s x = meas; 327s y = grp2idx (species); 327s Mdl = fitcnet (x, y, "IterationLimit", 100); 327s ***** error ... 327s Mdl.ScoreTransform = "a"; 327s ***** error ... 327s predict (Mdl) 327s ***** error ... 327s predict (Mdl, []) 327s ***** error ... 327s predict (Mdl, 1) 327s ***** test 327s CVMdl = crossval (Mdl, "KFold", 5); 327s assert (class (CVMdl), "ClassificationPartitionedModel") 327s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 327s assert (CVMdl.KFold == 5) 327s assert (class (CVMdl.Trained{1}), "CompactClassificationNeuralNetwork") 327s assert (CVMdl.CrossValidatedModel, "ClassificationNeuralNetwork") 328s ***** test 328s CVMdl = crossval (Mdl, "HoldOut", 0.2); 328s assert (class (CVMdl), "ClassificationPartitionedModel") 328s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 328s assert (class (CVMdl.Trained{1}), "CompactClassificationNeuralNetwork") 328s assert (CVMdl.CrossValidatedModel, "ClassificationNeuralNetwork") 328s ***** error ... 328s crossval (Mdl, "KFold") 328s ***** error ... 328s crossval (Mdl, "KFold", 5, "leaveout", 'on') 328s ***** error ... 328s crossval (Mdl, "KFold", 'a') 328s ***** error ... 328s crossval (Mdl, "KFold", 1) 328s ***** error ... 328s crossval (Mdl, "KFold", -1) 328s ***** error ... 328s crossval (Mdl, "KFold", 11.5) 328s ***** error ... 328s crossval (Mdl, "KFold", [1,2]) 328s ***** error ... 328s crossval (Mdl, "Holdout", 'a') 328s ***** error ... 328s crossval (Mdl, "Holdout", 11.5) 328s ***** error ... 328s crossval (Mdl, "Holdout", -1) 328s ***** error ... 328s crossval (Mdl, "Holdout", 0) 328s ***** error ... 328s crossval (Mdl, "Holdout", 1) 328s ***** error ... 328s crossval (Mdl, "Leaveout", 1) 328s ***** error ... 328s crossval (Mdl, "CVPartition", 1) 328s ***** error ... 328s crossval (Mdl, "CVPartition", 'a') 328s ***** error ... 328s crossval (Mdl, "some", "some") 328s 58 tests, 58 passed, 0 known failure, 0 skipped 328s [inst/Classification/ClassificationPartitionedModel.m] 328s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/Classification/ClassificationPartitionedModel.m 328s ***** demo 328s 328s load fisheriris 328s x = meas; 328s y = species; 328s 328s ## Create a KNN classifier model 328s obj = fitcknn (x, y, "NumNeighbors", 5, "Standardize", 1); 328s 328s ## Create a partition for 5-fold cross-validation 328s partition = cvpartition (y, "KFold", 5); 328s 328s ## Create the ClassificationPartitionedModel object 328s cvModel = crossval (obj, 'cvPartition', partition) 328s ***** demo 328s 328s load fisheriris 328s x = meas; 328s y = species; 328s 328s ## Create a KNN classifier model 328s obj = fitcknn (x, y, "NumNeighbors", 5, "Standardize", 1); 328s 328s ## Create the ClassificationPartitionedModel object 328s cvModel = crossval (obj); 328s 328s ## Predict the class labels for the observations not used for training 328s [label, score, cost] = kfoldPredict (cvModel); 328s fprintf ("Cross-validated accuracy = %1.2f%% (%d/%d)\n", ... 328s sum (strcmp (label, y)) / numel (y) *100, ... 328s sum (strcmp (label, y)), numel (y)) 328s ***** test 328s load fisheriris 328s a = fitcdiscr (meas, species, "gamma", 0.3); 328s cvModel = crossval (a, "KFold", 5); 328s assert (class (cvModel), "ClassificationPartitionedModel"); 328s assert (cvModel.NumObservations, 150); 328s assert (numel (cvModel.Trained), 5); 328s assert (class (cvModel.Trained{1}), "CompactClassificationDiscriminant"); 328s assert (cvModel.CrossValidatedModel, "ClassificationDiscriminant"); 328s assert (cvModel.KFold, 5); 328s ***** test 328s load fisheriris 328s a = fitcdiscr (meas, species, "gamma", 0.5, "fillcoeffs", "off"); 328s cvModel = crossval (a, "HoldOut", 0.3); 328s assert (class (cvModel), "ClassificationPartitionedModel"); 328s assert ({cvModel.X, cvModel.Y}, {meas, species}); 328s assert (cvModel.NumObservations, 150); 328s assert (numel (cvModel.Trained), 1); 328s assert (class (cvModel.Trained{1}), "CompactClassificationDiscriminant"); 328s assert (cvModel.CrossValidatedModel, "ClassificationDiscriminant"); 328s ***** test 328s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 328s y = ["a"; "a"; "b"; "b"]; 328s a = fitcgam (x, y, "Interactions", "all"); 328s cvModel = crossval (a, "KFold", 2); 328s assert (class (cvModel), "ClassificationPartitionedModel"); 328s assert (cvModel.NumObservations, 4); 328s assert (numel (cvModel.Trained), 2); 328s assert (class (cvModel.Trained{1}), "CompactClassificationGAM"); 328s assert (cvModel.CrossValidatedModel, "ClassificationGAM"); 328s assert (cvModel.KFold, 2); 346s ***** test 346s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 346s y = ["a"; "a"; "b"; "b"]; 346s a = fitcgam (x, y); 346s cvModel = crossval (a, "LeaveOut", "on"); 346s assert (class (cvModel), "ClassificationPartitionedModel"); 346s assert ({cvModel.X, cvModel.Y}, {x, y}); 346s assert (cvModel.NumObservations, 4); 346s assert (numel (cvModel.Trained), 4); 346s assert (class (cvModel.Trained{1}), "CompactClassificationGAM"); 346s assert (cvModel.CrossValidatedModel, "ClassificationGAM"); 358s ***** test 358s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 358s y = ["a"; "a"; "b"; "b"]; 358s a = fitcknn (x, y); 358s partition = cvpartition (y, "KFold", 2); 358s cvModel = ClassificationPartitionedModel (a, partition); 358s assert (class (cvModel), "ClassificationPartitionedModel"); 358s assert (class (cvModel.Trained{1}), "ClassificationKNN"); 358s assert (cvModel.NumObservations, 4); 358s assert (cvModel.ModelParameters.NumNeighbors, 1); 358s assert (cvModel.ModelParameters.NSMethod, "kdtree"); 358s assert (cvModel.ModelParameters.Distance, "euclidean"); 358s assert (! cvModel.ModelParameters.Standardize); 358s ***** test 358s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 358s y = ["a"; "a"; "b"; "b"]; 358s a = fitcknn (x, y, "NSMethod", "exhaustive"); 358s partition = cvpartition (y, "HoldOut", 0.2); 358s cvModel = ClassificationPartitionedModel (a, partition); 358s assert (class (cvModel), "ClassificationPartitionedModel"); 358s assert (class (cvModel.Trained{1}), "ClassificationKNN"); 358s assert ({cvModel.X, cvModel.Y}, {x, y}); 358s assert (cvModel.NumObservations, 4); 358s assert (cvModel.ModelParameters.NumNeighbors, 1); 358s assert (cvModel.ModelParameters.NSMethod, "exhaustive"); 358s assert (cvModel.ModelParameters.Distance, "euclidean"); 358s assert (! cvModel.ModelParameters.Standardize); 358s ***** test 358s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 358s y = ["a"; "a"; "b"; "b"]; 358s k = 2; 358s a = fitcknn (x, y, "NumNeighbors" ,k); 358s partition = cvpartition (numel (y), "LeaveOut"); 358s cvModel = ClassificationPartitionedModel (a, partition); 358s assert (class (cvModel), "ClassificationPartitionedModel"); 358s assert (class (cvModel.Trained{1}), "ClassificationKNN"); 358s assert ({cvModel.X, cvModel.Y}, {x, y}); 358s assert (cvModel.NumObservations, 4); 358s assert (cvModel.ModelParameters.NumNeighbors, k); 358s assert (cvModel.ModelParameters.NSMethod, "kdtree"); 358s assert (cvModel.ModelParameters.Distance, "euclidean"); 358s assert (! cvModel.ModelParameters.Standardize); 358s ***** test 358s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 358s y = {"a"; "a"; "b"; "b"}; 358s a = fitcnet (x, y, "IterationLimit", 50); 358s cvModel = crossval (a, "KFold", 2); 358s assert (class (cvModel), "ClassificationPartitionedModel"); 358s assert (cvModel.NumObservations, 4); 358s assert (numel (cvModel.Trained), 2); 358s assert (class (cvModel.Trained{1}), "CompactClassificationNeuralNetwork"); 358s assert (cvModel.CrossValidatedModel, "ClassificationNeuralNetwork"); 358s assert (cvModel.KFold, 2); 358s ***** test 358s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 358s y = {"a"; "a"; "b"; "b"}; 358s a = fitcnet (x, y, "LayerSizes", [5, 3]); 358s cvModel = crossval (a, "LeaveOut", "on"); 358s assert (class (cvModel), "ClassificationPartitionedModel"); 358s assert ({cvModel.X, cvModel.Y}, {x, y}); 358s assert (cvModel.NumObservations, 4); 358s assert (numel (cvModel.Trained), 4); 358s assert (class (cvModel.Trained{1}), "CompactClassificationNeuralNetwork"); 358s assert (cvModel.CrossValidatedModel, "ClassificationNeuralNetwork"); 358s ***** test 358s load fisheriris 358s inds = ! strcmp (species, 'setosa'); 358s x = meas(inds, 3:4); 358s y = grp2idx (species(inds)); 358s SVMModel = fitcsvm (x,y); 358s CVMdl = crossval (SVMModel, "KFold", 5); 358s assert (class (CVMdl), "ClassificationPartitionedModel") 358s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 358s assert (CVMdl.KFold == 5) 358s assert (class (CVMdl.Trained{1}), "CompactClassificationSVM") 358s assert (CVMdl.CrossValidatedModel, "ClassificationSVM"); 358s ***** test 358s load fisheriris 358s inds = ! strcmp (species, 'setosa'); 358s x = meas(inds, 3:4); 358s y = grp2idx (species(inds)); 358s obj = fitcsvm (x, y); 358s CVMdl = crossval (obj, "HoldOut", 0.2); 358s assert (class (CVMdl), "ClassificationPartitionedModel") 358s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 358s assert (class (CVMdl.Trained{1}), "CompactClassificationSVM") 358s assert (CVMdl.CrossValidatedModel, "ClassificationSVM"); 358s ***** test 358s load fisheriris 358s inds = ! strcmp (species, 'setosa'); 358s x = meas(inds, 3:4); 358s y = grp2idx (species(inds)); 358s obj = fitcsvm (x, y); 358s CVMdl = crossval (obj, "LeaveOut", 'on'); 358s assert (class (CVMdl), "ClassificationPartitionedModel") 358s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 358s assert (class (CVMdl.Trained{1}), "CompactClassificationSVM") 358s assert (CVMdl.CrossValidatedModel, "ClassificationSVM"); 359s ***** error ... 359s ClassificationPartitionedModel () 359s ***** error ... 359s ClassificationPartitionedModel (ClassificationKNN (ones (4,2), ones (4,1))) 359s ***** error ... 359s ClassificationPartitionedModel (RegressionGAM (ones (40,2), ... 359s randi ([1, 2], 40, 1)), cvpartition (randi ([1, 2], 40, 1), 'Holdout', 0.3)) 360s ***** error ... 360s ClassificationPartitionedModel (ClassificationKNN (ones (4,2), ... 360s ones (4,1)), 'Holdout') 360s ***** test 360s load fisheriris 360s a = fitcdiscr (meas, species, "gamma", 0.5, "fillcoeffs", "off"); 360s cvModel = crossval (a, "Kfold", 4); 360s [label, score, cost] = kfoldPredict (cvModel); 360s assert (class(cvModel), "ClassificationPartitionedModel"); 360s assert ({cvModel.X, cvModel.Y}, {meas, species}); 360s assert (cvModel.NumObservations, 150); 360s ***** # assert (label, {"b"; "b"; "a"; "a"}); 360s ***** # assert (score, [4.5380e-01, 5.4620e-01; 2.4404e-01, 7.5596e-01; ... 360s ***** # 9.9392e-01, 6.0844e-03; 9.9820e-01, 1.8000e-03], 1e-4); 360s ***** # assert (cost, [5.4620e-01, 4.5380e-01; 7.5596e-01, 2.4404e-01; ... 360s ***** # 6.0844e-03, 9.9392e-01; 1.8000e-03, 9.9820e-01], 1e-4); 360s ***** test 360s x = ones(4, 11); 360s y = {"a"; "a"; "b"; "b"}; 360s k = 3; 360s a = fitcknn (x, y, "NumNeighbors", k); 360s partition = cvpartition (numel (y), "LeaveOut"); 360s cvModel = ClassificationPartitionedModel (a, partition); 360s [label, score, cost] = kfoldPredict (cvModel); 360s assert (class(cvModel), "ClassificationPartitionedModel"); 360s assert ({cvModel.X, cvModel.Y}, {x, y}); 360s assert (cvModel.NumObservations, 4); 360s assert (cvModel.ModelParameters.NumNeighbors, k); 360s assert (cvModel.ModelParameters.NSMethod, "exhaustive"); 360s assert (cvModel.ModelParameters.Distance, "euclidean"); 360s assert (! cvModel.ModelParameters.Standardize); 360s assert (label, {"b"; "b"; "a"; "a"}); 360s assert (score, [0.3333, 0.6667; 0.3333, 0.6667; 0.6667, 0.3333; ... 360s 0.6667, 0.3333], 1e-4); 360s assert (cost, [0.6667, 0.3333; 0.6667, 0.3333; 0.3333, 0.6667; ... 360s 0.3333, 0.6667], 1e-4); 360s ***** error ... 360s [label, score, cost] = kfoldPredict (crossval (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)))) 360s ***** error ... 360s [label, score, cost] = kfoldPredict (crossval (ClassificationNeuralNetwork (ones (40,2), randi ([1, 2], 40, 1)))) 362s 20 tests, 20 passed, 0 known failure, 0 skipped 362s [inst/Classification/ClassificationSVM.m] 363s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/Classification/ClassificationSVM.m 363s ***** demo 363s ## Create a Support Vector Machine classifier and determine margin for test 363s ## data. 363s load fisheriris 363s rng(1); ## For reproducibility 363s 363s ## Select indices of the non-setosa species 363s inds = !strcmp(species, 'setosa'); 363s 363s ## Select features and labels for non-setosa species 363s X = meas(inds, 3:4); 363s Y = grp2idx(species(inds)); 363s 363s ## Convert labels to +1 and -1 363s unique_classes = unique(Y); 363s Y(Y == unique_classes(1)) = -1; 363s Y(Y == unique_classes(2)) = 1; 363s 363s ## Partition data for training and testing 363s cv = cvpartition(Y, 'HoldOut', 0.15); 363s X_train = X(training(cv), :); 363s Y_train = Y(training(cv)); 363s X_test = X(test(cv), :); 363s Y_test = Y(test(cv)); 363s 363s ## Train the SVM model 363s CVSVMModel = fitcsvm(X_train, Y_train); 363s 363s ## Calculate margins 363s m = margin(CVSVMModel, X_test, Y_test); 363s disp(m); 363s ***** demo 363s ## Create a Support Vector Machine classifier and determine loss for test 363s ## data. 363s load fisheriris 363s rng(1); ## For reproducibility 363s 363s ## Select indices of the non-setosa species 363s inds = !strcmp(species, 'setosa'); 363s 363s ## Select features and labels for non-setosa species 363s X = meas(inds, 3:4); 363s Y = grp2idx(species(inds)); 363s 363s ## Convert labels to +1 and -1 363s unique_classes = unique(Y); 363s Y(Y == unique_classes(1)) = -1; 363s Y(Y == unique_classes(2)) = 1; 363s 363s ## Randomly partition the data into training and testing sets 363s cv = cvpartition(Y, 'HoldOut', 0.3); # 30% data for testing, 60% for training 363s 363s X_train = X(training(cv), :); 363s Y_train = Y(training(cv)); 363s 363s X_test = X(test(cv), :); 363s Y_test = Y(test(cv)); 363s 363s ## Train the SVM model 363s SVMModel = fitcsvm(X_train, Y_train); 363s 363s ## Calculate loss 363s 363s L = loss(SVMModel,X_test,Y_test,'LossFun','binodeviance') 363s L = loss(SVMModel,X_test,Y_test,'LossFun','classiferror') 363s L = loss(SVMModel,X_test,Y_test,'LossFun','exponential') 363s L = loss(SVMModel,X_test,Y_test,'LossFun','hinge') 363s L = loss(SVMModel,X_test,Y_test,'LossFun','logit') 363s L = loss(SVMModel,X_test,Y_test,'LossFun','quadratic') 363s ***** test 363s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1; 4, 5, 6; 7, 8, 9; ... 363s 3, 2, 1; 4, 5, 6; 7, 8, 9; 3, 2, 1; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 363s y = [1; 2; 3; 4; 2; 3; 4; 2; 3; 4; 2; 3; 4]; 363s a = ClassificationSVM (x, y, "ClassNames", [1, 2]); 363s assert (class (a), "ClassificationSVM"); 363s assert (a.RowsUsed, [1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0]'); 363s assert ({a.X, a.Y}, {x, y}) 363s assert (a.NumObservations, 5) 363s assert ({a.ResponseName, a.PredictorNames}, {"Y", {"x1", "x2", "x3"}}) 363s assert ({a.ClassNames, a.ModelParameters.SVMtype}, {[1; 2], "c_svc"}) 363s ***** test 363s x = [1, 2; 2, 3; 3, 4; 4, 5; 2, 3; 3, 4; 2, 3; 3, 4; 2, 3; 3, 4]; 363s y = [1; 1; -1; -1; 1; -1; -1; -1; -1; -1]; 363s a = ClassificationSVM (x, y); 363s assert (class (a), "ClassificationSVM"); 363s assert ({a.X, a.Y, a.ModelParameters.KernelFunction}, {x, y, "linear"}) 363s assert (a.ModelParameters.BoxConstraint, 1) 363s assert (a.ClassNames, [1; -1]) 363s assert (a.ModelParameters.KernelOffset, 0) 363s ***** test 363s x = [1, 2; 2, 3; 3, 4; 4, 5; 2, 3; 3, 4; 2, 3; 3, 4; 2, 3; 3, 4]; 363s y = [1; 1; -1; -1; 1; -1; -1; -1; -1; -1]; 363s a = ClassificationSVM (x, y, "KernelFunction", "rbf", "BoxConstraint", 2, ... 363s "KernelOffset", 2); 363s assert (class (a), "ClassificationSVM"); 363s assert ({a.X, a.Y, a.ModelParameters.KernelFunction}, {x, y, "rbf"}) 363s assert (a.ModelParameters.BoxConstraint, 2) 363s assert (a.ModelParameters.KernelOffset, 2) 363s ***** test 363s x = [1, 2; 2, 3; 3, 4; 4, 5; 2, 3; 3, 4; 2, 3; 3, 4; 2, 3; 3, 4]; 363s y = [1; 1; -1; -1; 1; -1; -1; -1; -1; -1]; 363s a = ClassificationSVM (x, y, "KernelFunction", "polynomial", ... 363s "PolynomialOrder", 3); 363s assert (class (a), "ClassificationSVM"); 363s assert ({a.X, a.Y, a.ModelParameters.KernelFunction}, {x, y, "polynomial"}) 363s assert (a.ModelParameters.PolynomialOrder, 3) 363s ***** error ClassificationSVM () 363s ***** error ... 363s ClassificationSVM (ones(10,2)) 363s ***** error ... 363s ClassificationSVM (ones(10,2), ones (5,1)) 363s ***** error ... 363s ClassificationSVM (ones(10,2), ones (10,1), "Standardize", 'a') 363s ***** error ... 363s ClassificationSVM (ones(10,2), ones (10,1), "PredictorNames", ['x1';'x2']) 363s ***** error ... 363s ClassificationSVM (ones(10,2), ones (10,1), "PredictorNames", {'x1','x2','x3'}) 363s ***** error ... 363s ClassificationSVM (ones(10,2), ones (10,1), "ResponseName", {'Y'}) 363s ***** error ... 363s ClassificationSVM (ones(10,2), ones (10,1), "ResponseName", 21) 363s ***** error ... 363s ClassificationSVM (ones(10,2), ones (10,1), "ClassNames", @(x)x) 363s ***** error ... 363s ClassificationSVM (ones(10,2), ones (10,1), "ClassNames", {1}) 363s ***** error ... 363s ClassificationSVM (ones(10,2), ones (10,1), "ClassNames", [1, 2]) 363s ***** error ... 363s ClassificationSVM (ones(5,2), ['a';'b';'a';'a';'b'], "ClassNames", ['a';'c']) 363s ***** error ... 363s ClassificationSVM (ones(5,2), {'a';'b';'a';'a';'b'}, "ClassNames", {'a','c'}) 363s ***** error ... 363s ClassificationSVM (ones(10,2), logical (ones (10,1)), "ClassNames", [true, false]) 363s ***** error ... 363s ClassificationSVM (ones(10,2), ones(10,1), "Prior", {"asd"}) 363s ***** error ... 363s ClassificationSVM (ones(10,2), ones(10,1), "Prior", ones (2)) 363s ***** error ... 363s ClassificationSVM (ones(10,2), ones(10,1), "Cost", [1:4]) 363s ***** error ... 363s ClassificationSVM (ones(10,2), ones(10,1), "Cost", {0,1;1,0}) 363s ***** error ... 363s ClassificationSVM (ones(10,2), ones(10,1), "Cost", 'a') 363s ***** error ... 363s ClassificationSVM (ones(10,2), ones(10,1), "svmtype", 123) 363s ***** error ... 363s ClassificationSVM (ones(10,2), ones(10,1), "svmtype", 'some_type') 363s ***** error ... 363s ClassificationSVM (ones(10,2), ones(10,1), "OutlierFraction", -1) 363s ***** error ... 363s ClassificationSVM (ones(10,2), ones(10,1), "KernelFunction", 123) 363s ***** error ... 363s ClassificationSVM (ones(10,2), ones(10,1), "KernelFunction", "fcn") 363s ***** error ... 363s ClassificationSVM (ones(10,2), ones(10,1), "PolynomialOrder", -1) 363s ***** error ... 363s ClassificationSVM (ones(10,2), ones(10,1), "PolynomialOrder", 0.5) 363s ***** error ... 363s ClassificationSVM (ones(10,2), ones(10,1), "PolynomialOrder", [1,2]) 363s ***** error ... 363s ClassificationSVM (ones(10,2), ones (10,1), "KernelScale", -1) 363s ***** error ... 363s ClassificationSVM (ones(10,2), ones (10,1), "KernelScale", 0) 363s ***** error ... 363s ClassificationSVM (ones(10,2), ones (10,1), "KernelScale", [1, 2]) 363s ***** error ... 363s ClassificationSVM (ones(10,2), ones (10,1), "KernelScale", "invalid") 363s ***** error ... 363s ClassificationSVM (ones(10,2), ones(10,1), "KernelOffset", -1) 363s ***** error ... 363s ClassificationSVM (ones(10,2), ones(10,1), "KernelOffset", [1,2]) 363s ***** error ... 363s ClassificationSVM (ones(10,2), ones (10,1), "BoxConstraint", -1) 363s ***** error ... 363s ClassificationSVM (ones(10,2), ones (10,1), "BoxConstraint", 0) 363s ***** error ... 363s ClassificationSVM (ones(10,2), ones (10,1), "BoxConstraint", [1, 2]) 363s ***** error ... 363s ClassificationSVM (ones(10,2), ones (10,1), "BoxConstraint", "invalid") 363s ***** error ... 363s ClassificationSVM (ones(10,2), ones(10,1), "nu", -0.5) 363s ***** error ... 363s ClassificationSVM (ones(10,2), ones(10,1), "nu", 0) 363s ***** error ... 363s ClassificationSVM (ones(10,2), ones(10,1), "nu", 1.5) 363s ***** error ... 363s ClassificationSVM (ones(10,2), ones(10,1), "CacheSize", -1) 363s ***** error ... 363s ClassificationSVM (ones(10,2), ones(10,1), "CacheSize", [1,2]) 363s ***** error ... 363s ClassificationSVM (ones(10,2), ones(10,1), "Tolerance", -0.1) 363s ***** error ... 363s ClassificationSVM (ones(10,2), ones(10,1), "Tolerance", [0.1,0.2]) 363s ***** error ... 363s ClassificationSVM (ones(10,2), ones(10,1), "shrinking", 2) 363s ***** error ... 363s ClassificationSVM (ones(10,2), ones(10,1), "shrinking", -1) 363s ***** error ... 363s ClassificationSVM (ones(10,2), ones(10,1), "shrinking", [1 0]) 363s ***** error ... 363s ClassificationSVM (ones(10,2), ones(10,1), "invalid_name", 'c_svc') 363s ***** error ... 363s ClassificationSVM (ones(10,2), ones(10,1), "SVMtype", 'c_svc') 363s ***** error ... 363s ClassificationSVM (ones(10,2), [1;1;1;1;2;2;2;2;3;3]) 363s ***** error ... 363s ClassificationSVM ([ones(9,2);2,Inf], ones(10,1)) 363s ***** error ... 363s ClassificationSVM (ones (5,2), ones (5,1), "Prior", [0,1]) 363s ***** error ... 363s ClassificationSVM (ones (5,2), [1;1;2;2;3], "ClassNames", [1,2], "Prior", [0,0.4,0.6]) 363s ***** error ... 363s ClassificationSVM (ones (5,2), [1;1;2;2;3], "ClassNames", [1,2], "Cost", ones (3)) 363s ***** shared x, y, x_train, x_test, y_train, y_test, objST 363s load fisheriris 363s inds = ! strcmp (species, 'setosa'); 363s x = meas(inds, 3:4); 363s y = grp2idx (species(inds)); 363s ***** test 363s xc = [min(x); mean(x); max(x)]; 363s obj = fitcsvm (x, y, 'KernelFunction', 'rbf', 'Tolerance', 1e-7); 363s assert (isempty (obj.Alpha), true) 363s assert (sum (obj.IsSupportVector), numel (obj.Beta)) 363s [label, score] = predict (obj, xc); 363s assert (label, [1; 2; 2]); 363s assert (score(:,1), [0.99285; -0.080296; -0.93694], 2e-5); 363s assert (score(:,1), -score(:,2), eps) 363s obj = fitPosterior (obj); 363s [label, probs] = predict (obj, xc); 363s assert (probs(:,2), [0.97555; 0.428164; 0.030385], 3e-2); 363s assert (probs(:,1) + probs(:,2), [1; 1; 1], 0.05) 363s ***** test 363s obj = fitcsvm (x, y); 363s assert (isempty (obj.Beta), true) 363s assert (sum (obj.IsSupportVector), numel (obj.Alpha)) 363s assert (numel (obj.Alpha), 24) 363s assert (obj.Bias, -14.415, 1e-3) 363s xc = [min(x); mean(x); max(x)]; 363s label = predict (obj, xc); 363s assert (label, [1; 2; 2]); 363s ***** error ... 363s predict (ClassificationSVM (ones (40,2), ones (40,1))) 363s ***** error ... 363s predict (ClassificationSVM (ones (40,2), ones (40,1)), []) 363s ***** error ... 363s predict (ClassificationSVM (ones (40,2), ones (40,1)), 1) 363s ***** test 363s objST = fitcsvm (x, y); 363s objST.ScoreTransform = "a"; 363s ***** error ... 363s [labels, scores] = predict (objST, x); 363s ***** error ... 363s [labels, scores] = resubPredict (objST); 363s ***** test 363s rand ("seed", 1); 363s CVSVMModel = fitcsvm (x, y, 'KernelFunction', 'rbf', 'HoldOut', 0.15, ... 363s 'Tolerance', 1e-7); 363s obj = CVSVMModel.Trained{1}; 363s testInds = test (CVSVMModel.Partition); 363s expected_margin = [2.0000; 0.8579; 1.6690; 3.4141; 3.4552; ... 363s 2.6605; 3.5251; -4.0000; -6.3411; -6.4511; ... 363s -3.0532; -7.5054; -1.6700; -5.6227; -7.3640]; 363s computed_margin = margin (obj, x(testInds,:), y(testInds,:)); 363s assert (computed_margin, expected_margin, 1e-4); 363s ***** error ... 363s margin (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1))) 363s ***** error ... 363s margin (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), zeros (2)) 363s ***** error ... 363s margin (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), [], zeros (2)) 363s ***** error ... 363s margin (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), 1, zeros (2)) 363s ***** error ... 363s margin (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), zeros (2), []) 363s ***** error ... 363s margin (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), zeros (2), 1) 363s ***** test 363s rand ("seed", 1); 363s CVSVMModel = fitcsvm (x, y, 'KernelFunction', 'rbf', 'HoldOut', 0.15); 363s obj = CVSVMModel.Trained{1}; 363s testInds = test (CVSVMModel.Partition); 363s L1 = loss (obj, x(testInds,:), y(testInds,:), 'LossFun', 'binodeviance'); 363s L2 = loss (obj, x(testInds,:), y(testInds,:), 'LossFun', 'classiferror'); 363s L3 = loss (obj, x(testInds,:), y(testInds,:), 'LossFun', 'exponential'); 363s L4 = loss (obj, x(testInds,:), y(testInds,:), 'LossFun', 'hinge'); 363s L5 = loss (obj, x(testInds,:), y(testInds,:), 'LossFun', 'logit'); 363s L6 = loss (obj, x(testInds,:), y(testInds,:), 'LossFun', 'quadratic'); 363s assert (L1, 2.8711, 1e-4); 363s assert (L2, 0.5333, 1e-4); 363s assert (L3, 10.9685, 1e-4); 363s assert (L4, 1.9827, 1e-4); 363s assert (L5, 1.5849, 1e-4); 363s assert (L6, 7.6739, 1e-4); 363s ***** error ... 363s loss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1))) 363s ***** error ... 363s loss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), zeros (2)) 363s ***** error ... 363s loss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), zeros (2), ... 363s ones(2,1), "LossFun") 363s ***** error ... 363s loss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), [], zeros (2)) 363s ***** error ... 363s loss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), 1, zeros (2)) 363s ***** error ... 363s loss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), zeros (2), []) 364s ***** error ... 364s loss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), zeros (2), 1) 364s ***** error ... 364s loss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), zeros (2), ... 364s ones (2,1), "LossFun", 1) 364s ***** error ... 364s loss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), zeros (2), ... 364s ones (2,1), "LossFun", "some") 364s ***** error ... 364s loss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), zeros (2), ... 364s ones (2,1), "Weights", ['a','b']) 364s ***** error ... 364s loss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), zeros (2), ... 364s ones (2,1), "Weights", 'a') 364s ***** error ... 364s loss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), zeros (2), ... 364s ones (2,1), "Weights", [1,2,3]) 364s ***** error ... 364s loss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), zeros (2), ... 364s ones (2,1), "Weights", 3) 364s ***** error ... 364s loss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), zeros (2), ... 364s ones (2,1), "some", "some") 364s ***** error ... 364s resubLoss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), "LossFun") 364s ***** error ... 364s resubLoss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), "LossFun", 1) 364s ***** error ... 364s resubLoss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), "LossFun", "some") 364s ***** error ... 364s resubLoss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), "Weights", ['a','b']) 364s ***** error ... 364s resubLoss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), "Weights", 'a') 364s ***** error ... 364s resubLoss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), "Weights", [1,2,3]) 364s ***** error ... 364s resubLoss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), "Weights", 3) 364s ***** error ... 364s resubLoss (ClassificationSVM (ones (40,2), randi ([1, 2], 40, 1)), "some", "some") 364s ***** test 364s SVMModel = fitcsvm (x, y); 364s CVMdl = crossval (SVMModel, "KFold", 5); 364s assert (class (CVMdl), "ClassificationPartitionedModel") 364s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 364s assert (CVMdl.KFold == 5) 364s assert (class (CVMdl.Trained{1}), "CompactClassificationSVM") 364s assert (CVMdl.CrossValidatedModel, "ClassificationSVM") 364s ***** test 364s obj = fitcsvm (x, y); 364s CVMdl = crossval (obj, "HoldOut", 0.2); 364s assert (class (CVMdl), "ClassificationPartitionedModel") 364s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 364s assert (class (CVMdl.Trained{1}), "CompactClassificationSVM") 364s assert (CVMdl.CrossValidatedModel, "ClassificationSVM") 364s ***** test 364s obj = fitcsvm (x, y); 364s CVMdl = crossval (obj, "LeaveOut", 'on'); 364s assert (class (CVMdl), "ClassificationPartitionedModel") 364s assert ({CVMdl.X, CVMdl.Y}, {x, y}) 364s assert (class (CVMdl.Trained{1}), "CompactClassificationSVM") 364s assert (CVMdl.CrossValidatedModel, "ClassificationSVM") 365s ***** error ... 365s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), "KFold") 365s ***** error ... 365s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), ... 365s "KFold", 5, "leaveout", 'on') 365s ***** error ... 365s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), "KFold", 'a') 365s ***** error ... 365s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), "KFold", 1) 365s ***** error ... 365s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), "KFold", -1) 365s ***** error ... 365s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), "KFold", 11.5) 365s ***** error ... 365s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), "KFold", [1,2]) 365s ***** error ... 365s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), "Holdout", 'a') 365s ***** error ... 365s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), "Holdout", 11.5) 365s ***** error ... 365s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), "Holdout", -1) 365s ***** error ... 365s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), "Holdout", 0) 365s ***** error ... 365s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), "Holdout", 1) 365s ***** error ... 365s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), "Leaveout", 1) 365s ***** error ... 365s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), "CVPartition", 1) 365s ***** error ... 365s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), "CVPartition", 'a') 365s ***** error ... 365s crossval (ClassificationSVM (ones (40,2),randi([1, 2], 40, 1)), "some", "some") 365s 115 tests, 115 passed, 0 known failure, 0 skipped 365s [inst/Classification/CompactClassificationDiscriminant.m] 365s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/Classification/CompactClassificationDiscriminant.m 365s ***** demo 365s ## Create a discriminant analysis classifier and its compact version 365s # and compare their size 365s 365s load fisheriris 365s X = meas; 365s Y = species; 365s 365s Mdl = fitcdiscr (X, Y, 'ClassNames', unique (species)) 365s CMdl = crossval (Mdl) 365s ***** test 365s load fisheriris 365s x = meas; 365s y = species; 365s PredictorNames = {'Sepal Length', 'Sepal Width', 'Petal Length', 'Petal Width'}; 365s Mdl = fitcdiscr (x, y, "PredictorNames", PredictorNames); 365s CMdl = compact (Mdl); 365s sigma = [0.265008, 0.092721, 0.167514, 0.038401; ... 365s 0.092721, 0.115388, 0.055244, 0.032710; ... 365s 0.167514, 0.055244, 0.185188, 0.042665; ... 365s 0.038401, 0.032710, 0.042665, 0.041882]; 365s mu = [5.0060, 3.4280, 1.4620, 0.2460; ... 365s 5.9360, 2.7700, 4.2600, 1.3260; ... 365s 6.5880, 2.9740, 5.5520, 2.0260]; 365s xCentered = [ 9.4000e-02, 7.2000e-02, -6.2000e-02, -4.6000e-02; ... 365s -1.0600e-01, -4.2800e-01, -6.2000e-02, -4.6000e-02; ... 365s -3.0600e-01, -2.2800e-01, -1.6200e-01, -4.6000e-02]; 365s assert (class (CMdl), "CompactClassificationDiscriminant"); 365s assert ({CMdl.DiscrimType, CMdl.ResponseName}, {"linear", "Y"}) 365s assert ({CMdl.Gamma, CMdl.MinGamma}, {0, 0}, 1e-15) 365s assert (CMdl.ClassNames, unique (species)) 365s assert (CMdl.Sigma, sigma, 1e-6) 365s assert (CMdl.Mu, mu, 1e-14) 365s assert (CMdl.LogDetSigma, -9.9585, 1e-4) 365s assert (CMdl.PredictorNames, PredictorNames) 366s ***** test 366s load fisheriris 366s x = meas; 366s y = species; 366s Mdl = fitcdiscr (x, y, "Gamma", 0.5); 366s CMdl = compact (Mdl); 366s sigma = [0.265008, 0.046361, 0.083757, 0.019201; ... 366s 0.046361, 0.115388, 0.027622, 0.016355; ... 366s 0.083757, 0.027622, 0.185188, 0.021333; ... 366s 0.019201, 0.016355, 0.021333, 0.041882]; 366s mu = [5.0060, 3.4280, 1.4620, 0.2460; ... 366s 5.9360, 2.7700, 4.2600, 1.3260; ... 366s 6.5880, 2.9740, 5.5520, 2.0260]; 366s xCentered = [ 9.4000e-02, 7.2000e-02, -6.2000e-02, -4.6000e-02; ... 366s -1.0600e-01, -4.2800e-01, -6.2000e-02, -4.6000e-02; ... 366s -3.0600e-01, -2.2800e-01, -1.6200e-01, -4.6000e-02]; 366s assert (class (CMdl), "CompactClassificationDiscriminant"); 366s assert ({CMdl.DiscrimType, CMdl.ResponseName}, {"linear", "Y"}) 366s assert ({CMdl.Gamma, CMdl.MinGamma}, {0.5, 0}) 366s assert (CMdl.ClassNames, unique (species)) 366s assert (CMdl.Sigma, sigma, 1e-6) 366s assert (CMdl.Mu, mu, 1e-14) 366s assert (CMdl.LogDetSigma, -8.6884, 1e-4) 366s ***** error ... 366s CompactClassificationDiscriminant (1) 366s ***** test 366s load fisheriris 366s x = meas; 366s y = species; 366s Mdl = fitcdiscr (meas, species, "Gamma", 0.5); 366s CMdl = compact (Mdl); 366s [label, score, cost] = predict (CMdl, [2, 2, 2, 2]); 366s assert (label, {'versicolor'}) 366s assert (score, [0, 0.9999, 0.0001], 1e-4) 366s assert (cost, [1, 0.0001, 0.9999], 1e-4) 366s [label, score, cost] = predict (CMdl, [2.5, 2.5, 2.5, 2.5]); 366s assert (label, {'versicolor'}) 366s assert (score, [0, 0.6368, 0.3632], 1e-4) 366s assert (cost, [1, 0.3632, 0.6368], 1e-4) 366s ***** test 366s load fisheriris 366s x = meas; 366s y = species; 366s xc = [min(x); mean(x); max(x)]; 366s Mdl = fitcdiscr (x, y); 366s CMdl = compact (Mdl); 366s [label, score, cost] = predict (CMdl, xc); 366s l = {'setosa'; 'versicolor'; 'virginica'}; 366s s = [1, 0, 0; 0, 1, 0; 0, 0, 1]; 366s c = [0, 1, 1; 1, 0, 1; 1, 1, 0]; 366s assert (label, l) 366s assert (score, s, 1e-4) 366s assert (cost, c, 1e-4) 366s ***** shared MODEL 366s X = rand (10,2); 366s Y = [ones(5,1);2*ones(5,1)]; 366s MODEL = compact (ClassificationDiscriminant (X, Y)); 366s ***** error ... 366s predict (MODEL) 366s ***** error ... 366s predict (MODEL, []) 366s ***** error ... 366s predict (MODEL, 1) 366s ***** test 366s load fisheriris 366s model = fitcdiscr (meas, species); 366s x = mean (meas); 366s y = {'versicolor'}; 366s L = loss (model, x, y); 366s assert (L, 0) 366s ***** test 366s x = [1, 2; 3, 4; 5, 6]; 366s y = {'A'; 'B'; 'A'}; 366s model = fitcdiscr (x, y, "Gamma", 0.4); 366s x_test = [1, 6; 3, 3]; 366s y_test = {'A'; 'B'}; 366s L = loss (model, x_test, y_test); 366s assert (L, 0.3333, 1e-4) 366s ***** test 366s x = [1, 2; 3, 4; 5, 6; 7, 8]; 366s y = ['1'; '2'; '3'; '1']; 366s model = fitcdiscr (x, y, "gamma" , 0.5); 366s x_test = [3, 3]; 366s y_test = ['1']; 366s L = loss (model, x_test, y_test, 'LossFun', 'quadratic'); 366s assert (L, 0.2423, 1e-4) 366s ***** test 366s x = [1, 2; 3, 4; 5, 6; 7, 8]; 366s y = ['1'; '2'; '3'; '1']; 366s model = fitcdiscr (x, y, "gamma" , 0.5); 366s x_test = [3, 3; 5, 7]; 366s y_test = ['1'; '2']; 366s L = loss (model, x_test, y_test, 'LossFun', 'classifcost'); 366s assert (L, 0.3333, 1e-4) 366s ***** test 366s x = [1, 2; 3, 4; 5, 6; 7, 8]; 366s y = ['1'; '2'; '3'; '1']; 366s model = fitcdiscr (x, y, "gamma" , 0.5); 366s x_test = [3, 3; 5, 7]; 366s y_test = ['1'; '2']; 366s L = loss (model, x_test, y_test, 'LossFun', 'hinge'); 366s assert (L, 0.5886, 1e-4) 366s ***** test 366s x = [1, 2; 3, 4; 5, 6; 7, 8]; 366s y = ['1'; '2'; '3'; '1']; 366s model = fitcdiscr (x, y, "gamma" , 0.5); 366s x_test = [3, 3; 5, 7]; 366s y_test = ['1'; '2']; 366s W = [1; 2]; 366s L = loss (model, x_test, y_test, 'LossFun', 'logit', 'Weights', W); 366s assert (L, 0.5107, 1e-4) 366s ***** test 366s x = [1, 2; 3, 4; 5, 6]; 366s y = {'A'; 'B'; 'A'}; 366s model = fitcdiscr (x, y, "gamma" , 0.5); 366s x_with_nan = [1, 2; NaN, 4]; 366s y_test = {'A'; 'B'}; 366s L = loss (model, x_with_nan, y_test); 366s assert (L, 0.3333, 1e-4) 366s ***** test 366s x = [1, 2; 3, 4; 5, 6]; 366s y = {'A'; 'B'; 'A'}; 366s model = fitcdiscr (x, y); 366s x_with_nan = [1, 2; NaN, 4]; 366s y_test = {'A'; 'B'}; 366s L = loss (model, x_with_nan, y_test, 'LossFun', 'logit'); 366s assert (isnan (L)) 366s ***** test 366s x = [1, 2; 3, 4; 5, 6]; 366s y = {'A'; 'B'; 'A'}; 366s model = fitcdiscr (x, y); 366s customLossFun = @(C, S, W, Cost) sum (W .* sum (abs (C - S), 2)); 366s L = loss (model, x, y, 'LossFun', customLossFun); 366s assert (L, 0.8889, 1e-4) 366s ***** test 366s x = [1, 2; 3, 4; 5, 6]; 366s y = [1; 2; 1]; 366s model = fitcdiscr (x, y); 366s L = loss (model, x, y, 'LossFun', 'classiferror'); 366s assert (L, 0.3333, 1e-4) 366s ***** error ... 366s loss (MODEL) 366s ***** error ... 366s loss (MODEL, ones (4,2)) 366s ***** error ... 366s loss (MODEL, ones (4,2), ones (4,1), 'LossFun') 366s ***** error ... 366s loss (MODEL, ones (4,2), ones (3,1)) 366s ***** error ... 366s loss (MODEL, ones (4,2), ones (4,1), 'LossFun', 'a') 366s ***** error ... 366s loss (MODEL, ones (4,2), ones (4,1), 'Weights', 'w') 366s load fisheriris 366s mdl = fitcdiscr (meas, species); 366s X = mean (meas); 366s Y = {'versicolor'}; 366s m = margin (mdl, X, Y); 366s assert (m, 1, 1e-6) 366s ***** test 366s X = [1, 2; 3, 4; 5, 6]; 366s Y = [1; 2; 1]; 366s mdl = fitcdiscr (X, Y, "gamma", 0.5); 366s m = margin (mdl, X, Y); 366s assert (m, [0.3333; -0.3333; 0.3333], 1e-4) 366s ***** error ... 366s margin (MODEL) 366s ***** error ... 366s margin (MODEL, ones (4,2)) 366s ***** error ... 366s margin (MODEL, ones (4,2), ones (3,1)) 366s 28 tests, 28 passed, 0 known failure, 0 skipped 366s [inst/Classification/CompactClassificationGAM.m] 366s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/Classification/CompactClassificationGAM.m 366s ***** demo 366s ## Create a generalized additive model classifier and its compact version 366s # and compare their size 366s 366s load fisheriris 366s X = meas; 366s Y = species; 366s 366s Mdl = fitcdiscr (X, Y, 'ClassNames', unique (species)) 366s CMdl = crossval (Mdl) 366s ***** test 366s Mdl = CompactClassificationGAM (); 366s assert (class (Mdl), "CompactClassificationGAM") 366s ***** test 366s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 366s y = [0; 0; 1; 1]; 366s PredictorNames = {'Feature1', 'Feature2', 'Feature3'}; 366s Mdl = fitcgam (x, y, "PredictorNames", PredictorNames); 366s CMdl = compact (Mdl); 366s assert (class (CMdl), "CompactClassificationGAM"); 366s assert ({CMdl.NumPredictors, CMdl.ResponseName}, {3, "Y"}) 366s assert (CMdl.ClassNames, {'0'; '1'}) 366s assert (CMdl.PredictorNames, PredictorNames) 366s assert (CMdl.BaseModel.Intercept, 0) 368s ***** test 368s load fisheriris 368s inds = strcmp (species,'versicolor') | strcmp (species,'virginica'); 368s X = meas(inds, :); 368s Y = species(inds, :)'; 368s Y = strcmp (Y, 'virginica')'; 368s Mdl = fitcgam (X, Y, 'Formula', 'Y ~ x1 + x2 + x3 + x4 + x1:x2 + x2:x3'); 368s CMdl = compact (Mdl); 368s assert (class (CMdl), "CompactClassificationGAM"); 368s assert ({CMdl.NumPredictors, CMdl.ResponseName}, {4, "Y"}) 368s assert (CMdl.ClassNames, {'0'; '1'}) 368s assert (CMdl.Formula, 'Y ~ x1 + x2 + x3 + x4 + x1:x2 + x2:x3') 368s assert (CMdl.PredictorNames, {'x1', 'x2', 'x3', 'x4'}) 368s assert (CMdl.ModelwInt.Intercept, 0) 376s ***** test 376s X = [2, 3, 5; 4, 6, 8; 1, 2, 3; 7, 8, 9; 5, 4, 3]; 376s Y = [0; 1; 0; 1; 1]; 376s Mdl = fitcgam (X, Y, 'Knots', [4, 4, 4], 'Order', [3, 3, 3]); 376s CMdl = compact (Mdl); 376s assert (class (CMdl), "CompactClassificationGAM"); 376s assert ({CMdl.NumPredictors, CMdl.ResponseName}, {3, "Y"}) 376s assert (CMdl.ClassNames, {'0'; '1'}) 376s assert (CMdl.PredictorNames, {'x1', 'x2', 'x3'}) 376s assert (CMdl.Knots, [4, 4, 4]) 376s assert (CMdl.Order, [3, 3, 3]) 376s assert (CMdl.DoF, [7, 7, 7]) 376s assert (CMdl.BaseModel.Intercept, 0.4055, 1e-1) 378s ***** error ... 378s CompactClassificationGAM (1) 378s ***** test 378s x = [1, 2; 3, 4; 5, 6; 7, 8; 9, 10]; 378s y = [1; 0; 1; 0; 1]; 378s Mdl = fitcgam (x, y, "interactions", "all"); 378s CMdl = compact (Mdl); 378s l = {'0'; '0'; '0'; '0'; '0'}; 378s s = [0.3760, 0.6240; 0.4259, 0.5741; 0.3760, 0.6240; ... 378s 0.4259, 0.5741; 0.3760, 0.6240]; 378s [labels, scores] = predict (CMdl, x); 378s assert (class (CMdl), "CompactClassificationGAM"); 378s assert ({CMdl.NumPredictors, CMdl.ResponseName}, {2, "Y"}) 378s assert (CMdl.ClassNames, {'1'; '0'}) 378s assert (CMdl.PredictorNames, {'x1', 'x2'}) 378s assert (CMdl.ModelwInt.Intercept, 0.4055, 1e-1) 378s assert (labels, l) 378s assert (scores, s, 1e-1) 382s ***** test 382s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 382s y = [0; 0; 1; 1]; 382s interactions = [false, true, false; true, false, true; false, true, false]; 382s Mdl = fitcgam (x, y, "learningrate", 0.2, "interactions", interactions); 382s CMdl = compact (Mdl); 382s [label, score] = predict (CMdl, x, "includeinteractions", true); 382s l = {'0'; '0'; '1'; '1'}; 382s s = [0.5106, 0.4894; 0.5135, 0.4865; 0.4864, 0.5136; 0.4847, 0.5153]; 382s assert (class (CMdl), "CompactClassificationGAM"); 382s assert ({CMdl.NumPredictors, CMdl.ResponseName}, {3, "Y"}) 382s assert (CMdl.ClassNames, {'0'; '1'}) 382s assert (CMdl.PredictorNames, {'x1', 'x2', 'x3'}) 382s assert (CMdl.ModelwInt.Intercept, 0) 382s assert (label, l) 382s assert (score, s, 1e-1) 389s ***** shared CMdl 389s Mdl = fitcgam (ones (4,2), ones (4,1)); 389s CMdl = compact (Mdl); 391s ***** error ... 391s predict (CMdl) 391s ***** error ... 391s predict (CMdl, []) 391s ***** error ... 391s predict (CMdl, 1) 391s 10 tests, 10 passed, 0 known failure, 0 skipped 391s [inst/Classification/CompactClassificationNeuralNetwork.m] 391s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/Classification/CompactClassificationNeuralNetwork.m 391s ***** demo 391s ## Create a neural network classifier and its compact version 391s # and compare their size 391s 391s load fisheriris 391s X = meas; 391s Y = species; 391s 391s Mdl = fitcnet (X, Y, 'ClassNames', unique (species)) 391s CMdl = crossval (Mdl) 391s ***** error ... 391s CompactClassificationDiscriminant (1) 391s ***** shared x, y, CMdl 391s load fisheriris 391s x = meas; 391s y = grp2idx (species); 391s Mdl = fitcnet (x, y, "IterationLimit", 100); 391s CMdl = compact (Mdl); 391s ***** error ... 391s predict (CMdl) 391s ***** error ... 391s predict (CMdl, []) 391s ***** error ... 391s predict (CMdl, 1) 391s ***** error ... 391s CMdl.ScoreTransform = "a"; 391s 5 tests, 5 passed, 0 known failure, 0 skipped 391s [inst/Classification/CompactClassificationSVM.m] 391s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/Classification/CompactClassificationSVM.m 391s ***** demo 391s ## Create a support vectors machine classifier and its compact version 391s # and compare their size 391s 391s load fisheriris 391s X = meas; 391s Y = species; 391s 391s Mdl = fitcsvm (X, Y, 'ClassNames', unique (species)) 391s CMdl = crossval (Mdl) 391s ***** error ... 391s CompactClassificationSVM (1) 391s ***** shared x, y, CMdl 391s load fisheriris 391s inds = ! strcmp (species, 'setosa'); 391s x = meas(inds, 3:4); 391s y = grp2idx (species(inds)); 391s ***** test 391s xc = [min(x); mean(x); max(x)]; 391s Mdl = fitcsvm (x, y, 'KernelFunction', 'rbf', 'Tolerance', 1e-7); 391s CMdl = compact (Mdl); 391s assert (isempty (CMdl.Alpha), true) 391s assert (sum (CMdl.IsSupportVector), numel (CMdl.Beta)) 391s [label, score] = predict (CMdl, xc); 391s assert (label, [1; 2; 2]); 391s assert (score(:,1), [0.99285; -0.080296; -0.93694], 1e-5); 391s assert (score(:,1), -score(:,2), eps) 391s ***** test 391s Mdl = fitcsvm (x, y); 391s CMdl = compact (Mdl); 391s assert (isempty (CMdl.Beta), true) 391s assert (sum (CMdl.IsSupportVector), numel (CMdl.Alpha)) 391s assert (numel (CMdl.Alpha), 24) 391s assert (CMdl.Bias, -14.415, 1e-3) 391s xc = [min(x); mean(x); max(x)]; 391s label = predict (CMdl, xc); 391s assert (label, [1; 2; 2]); 391s ***** error ... 391s predict (CMdl) 391s ***** error ... 391s predict (CMdl, []) 391s ***** error ... 391s predict (CMdl, 1) 391s ***** test 391s CMdl.ScoreTransform = "a"; 391s ***** error ... 391s [labels, scores] = predict (CMdl, x); 391s ***** test 391s rand ("seed", 1); 391s C = cvpartition (y, 'HoldOut', 0.15); 391s Mdl = fitcsvm (x(training (C),:), y(training (C)), ... 391s 'KernelFunction', 'rbf', 'Tolerance', 1e-7); 391s CMdl = compact (Mdl); 391s testInds = test (C); 391s expected_margin = [2.0000; 0.8579; 1.6690; 3.4141; 3.4552; ... 391s 2.6605; 3.5251; -4.0000; -6.3411; -6.4511; ... 391s -3.0532; -7.5054; -1.6700; -5.6227; -7.3640]; 391s computed_margin = margin (CMdl, x(testInds,:), y(testInds,:)); 391s assert (computed_margin, expected_margin, 1e-4); 391s ***** error ... 391s margin (CMdl) 391s ***** error ... 391s margin (CMdl, zeros (2)) 391s ***** error ... 391s margin (CMdl, [], 1) 391s ***** error ... 391s margin (CMdl, 1, 1) 391s ***** error ... 391s margin (CMdl, [1, 2], []) 391s ***** error ... 391s margin (CMdl, [1, 2], [1; 2]) 391s ***** test 391s rand ("seed", 1); 391s C = cvpartition (y, 'HoldOut', 0.15); 391s Mdl = fitcsvm (x(training (C),:), y(training (C)), ... 391s 'KernelFunction', 'rbf', 'Tolerance', 1e-7); 391s CMdl = compact (Mdl); 391s testInds = test (C); 391s L1 = loss (CMdl, x(testInds,:), y(testInds,:), 'LossFun', 'binodeviance'); 391s L2 = loss (CMdl, x(testInds,:), y(testInds,:), 'LossFun', 'classiferror'); 391s L3 = loss (CMdl, x(testInds,:), y(testInds,:), 'LossFun', 'exponential'); 391s L4 = loss (CMdl, x(testInds,:), y(testInds,:), 'LossFun', 'hinge'); 391s L5 = loss (CMdl, x(testInds,:), y(testInds,:), 'LossFun', 'logit'); 391s L6 = loss (CMdl, x(testInds,:), y(testInds,:), 'LossFun', 'quadratic'); 391s assert (L1, 2.8711, 1e-4); 391s assert (L2, 0.5333, 1e-4); 391s assert (L3, 10.9685, 1e-4); 391s assert (L4, 1.9827, 1e-4); 391s assert (L5, 1.5849, 1e-4); 391s assert (L6, 7.6739, 1e-4); 391s ***** error ... 391s loss (CMdl) 391s ***** error ... 391s loss (CMdl, zeros (2)) 391s ***** error ... 391s loss (CMdl, [1, 2], 1, "LossFun") 391s ***** error ... 391s loss (CMdl, [], zeros (2)) 391s ***** error ... 391s loss (CMdl, 1, zeros (2)) 391s ***** error ... 391s loss (CMdl, [1, 2], []) 391s ***** error ... 391s loss (CMdl, [1, 2], [1; 2]) 391s ***** error ... 391s loss (CMdl, [1, 2], 1, "LossFun", 1) 391s ***** error ... 391s loss (CMdl, [1, 2], 1, "LossFun", "some") 391s ***** error ... 391s loss (CMdl, [1, 2], 1, "Weights", ['a', 'b']) 391s ***** error ... 391s loss (CMdl, [1, 2], 1, "Weights", 'a') 391s ***** error ... 391s loss (CMdl, [1, 2], 1, "Weights", [1, 2]) 391s ***** error ... 391s loss (CMdl, [1, 2], 1, "some", "some") 391s 29 tests, 29 passed, 0 known failure, 0 skipped 391s [inst/Classification/ConfusionMatrixChart.m] 391s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/Classification/ConfusionMatrixChart.m 391s ***** demo 391s ## Create a simple ConfusionMatrixChart Object 391s 391s cm = ConfusionMatrixChart (gca, [1 2; 1 2], {"A","B"}, {"XLabel","LABEL A"}) 391s NormalizedValues = cm.NormalizedValues 391s ClassLabels = cm.ClassLabels 391s ***** test 391s hf = figure ("visible", "off"); 391s unwind_protect 391s cm = ConfusionMatrixChart (gca, [1 2; 1 2], {"A","B"}, {"XLabel","LABEL A"}); 391s assert (isa (cm, "ConfusionMatrixChart"), true); 391s unwind_protect_cleanup 391s close (hf); 391s end_unwind_protect 391s warning: using the gnuplot graphics toolkit is discouraged 391s 391s The gnuplot graphics toolkit is not actively maintained and has a number 391s of limitations that are unlikely to be fixed. Communication with gnuplot 391s uses a one-directional pipe and limited information is passed back to the 391s Octave interpreter so most changes made interactively in the plot window 391s will not be reflected in the graphics properties managed by Octave. For 391s example, if the plot window is closed with a mouse click, Octave will not 391s be notified and will not update its internal list of open figure windows. 391s The qt toolkit is recommended instead. 391s 1 test, 1 passed, 0 known failure, 0 skipped 391s [inst/Clustering/CalinskiHarabaszEvaluation.m] 391s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/Clustering/CalinskiHarabaszEvaluation.m 391s ***** test 391s load fisheriris 391s eva = evalclusters (meas, "kmeans", "calinskiharabasz", "KList", [1:6]); 391s assert (class (eva), "CalinskiHarabaszEvaluation"); 392s 1 test, 1 passed, 0 known failure, 0 skipped 392s [inst/Clustering/ClusterCriterion.m] 392s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/Clustering/ClusterCriterion.m 392s ***** error ... 392s ClusterCriterion ("1", "kmeans", [1:6]) 392s ***** error ... 392s ClusterCriterion ([1, 2, 1, 3, 2, 4, 3], "k", [1:6]) 392s ***** error ... 392s ClusterCriterion ([1, 2, 1; 3, 2, 4], 1, [1:6]) 392s ***** error ... 392s ClusterCriterion ([1, 2, 1; 3, 2, 4], ones (2, 2, 2), [1:6]) 392s 4 tests, 4 passed, 0 known failure, 0 skipped 392s [inst/Clustering/DaviesBouldinEvaluation.m] 392s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/Clustering/DaviesBouldinEvaluation.m 392s ***** test 392s load fisheriris 392s eva = evalclusters (meas, "kmeans", "DaviesBouldin", "KList", [1:6]); 392s assert (class (eva), "DaviesBouldinEvaluation"); 392s 1 test, 1 passed, 0 known failure, 0 skipped 392s [inst/Clustering/ExhaustiveSearcher.m] 392s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/Clustering/ExhaustiveSearcher.m 392s ***** demo 392s ## Demo to verify implementation using fisheriris dataset 392s load fisheriris 392s rng('default'); 392s numSamples = size (meas, 1); 392s queryIndices = [20, 95, 123, 136, 138]; 392s dataPoints = meas(~ismember (1:numSamples, queryIndices), :); 392s queryPoints = meas(queryIndices, :); 392s searchModel = ExhaustiveSearcher (dataPoints, 'Distance', 'mahalanobis') 392s mahalanobisParam = searchModel.DistParameter 392s searchRadius = 3; 392s nearestNeighbors = knnsearch (searchModel, queryPoints, "K", 2) 392s neighborsInRange = rangesearch (searchModel, queryPoints, searchRadius) 392s ***** demo 392s ## Create an ExhaustiveSearcher with Euclidean distance 392s X = [1, 2; 3, 4; 5, 6]; 392s obj = ExhaustiveSearcher (X); 392s ## Find the nearest neighbor to [2, 3] 392s Y = [2, 3]; 392s [idx, D] = knnsearch (obj, Y); 392s disp ("Nearest neighbor index:"); disp (idx); 392s disp ("Distance:"); disp (D); 392s ## Find all points within radius 2 392s [idx, D] = rangesearch (obj, Y, 2); 392s disp ("Indices within radius:"); disp (idx); 392s disp ("Distances:"); disp (D); 392s ***** demo 392s ## Create an ExhaustiveSearcher with Minkowski distance (P=1) 392s X = [0, 0; 1, 0; 0, 1]; 392s obj = ExhaustiveSearcher (X, "Distance", "minkowski", "P", 1); 392s ## Find the 2 nearest neighbors to [0.5, 0.5] 392s Y = [0.5, 0.5]; 392s [idx, D] = knnsearch (obj, Y, "K", 2); 392s disp ("Nearest neighbor indices:"); disp (idx); 392s disp ("Distances:"); disp (D); 392s ***** demo 392s rng(42); 392s disp('Demonstrating ExhaustiveSearcher'); 392s 392s n = 100; 392s mu1 = [0.3, 0.3]; 392s mu2 = [0.7, 0.7]; 392s sigma = 0.1; 392s X1 = mu1 + sigma * randn(n/2, 2); 392s X2 = mu2 + sigma * randn(n/2, 2); 392s X = [X1; X2]; 392s 392s obj = ExhaustiveSearcher(X); 392s 392s Y = [0.3, 0.3; 0.7, 0.7; 0.5, 0.5]; 392s 392s K = 5; 392s [idx, D] = knnsearch(obj, Y, "K", K); 392s 392s disp('For the first query point:'); 392s disp(['Query point: ', num2str(Y(1,:))]); 392s disp('Indices of nearest neighbors:'); 392s disp(idx(1,:)); 392s disp('Distances:'); 392s disp(D(1,:)); 392s 392s figure; 392s scatter(X(:,1), X(:,2), 36, 'b', 'filled'); % Training points 392s hold on; 392s scatter(Y(:,1), Y(:,2), 36, 'r', 'filled'); % Query points 392s for i = 1:size(Y,1) 392s query = Y(i,:); 392s neighbors = X(idx(i,:), :); 392s for j = 1:K 392s plot([query(1), neighbors(j,1)], [query(2), neighbors(j,2)], 'k-'); 392s end 392s end 392s hold off; 392s title('K Nearest Neighbors with ExhaustiveSearcher'); 392s xlabel('X1'); 392s ylabel('X2'); 392s 392s r = 0.15; 392s [idx, D] = rangesearch(obj, Y, r); 392s 392s disp('For the first query point in rangesearch:'); 392s disp(['Query point: ', num2str(Y(1,:))]); 392s disp('Indices of points within radius:'); 392s disp(idx{1}); 392s disp('Distances:'); 392s disp(D{1}); 392s 392s figure; 392s scatter(X(:,1), X(:,2), 36, 'b', 'filled'); 392s hold on; 392s scatter(Y(:,1), Y(:,2), 36, 'r', 'filled'); 392s theta = linspace(0, 2*pi, 100); 392s for i = 1:size(Y,1) 392s center = Y(i,:); 392s x_circle = center(1) + r * cos(theta); 392s y_circle = center(2) + r * sin(theta); 392s plot(x_circle, y_circle, 'g-'); 392s % Highlight points within radius 392s if ~isempty(idx{i}) 392s in_radius = X(idx{i}, :); 392s scatter(in_radius(:,1), in_radius(:,2), 36, 'g', 'filled'); 392s end 392s end 392s hold off; 392s title('Points within Radius with ExhaustiveSearcher'); 392s xlabel('X1'); 392s ylabel('X2'); 392s ***** test 392s ## Basic constructor with default Euclidean 392s X = [1, 2; 3, 4; 5, 6]; 392s obj = ExhaustiveSearcher (X); 392s assert (obj.X, X) 392s assert (obj.Distance, "euclidean") 392s assert (isempty (obj.DistParameter)) 392s ***** test 392s ## Minkowski distance with custom P 392s X = [1, 2; 3, 4]; 392s obj = ExhaustiveSearcher (X, "Distance", "minkowski", "P", 3); 392s assert (obj.Distance, "minkowski") 392s assert (obj.DistParameter, 3) 392s ***** test 392s ## Seuclidean distance with custom Scale 392s X = [1, 2; 3, 4; 5, 6]; 392s S = [1, 2]; 392s obj = ExhaustiveSearcher (X, "Distance", "seuclidean", "Scale", S); 392s assert (obj.Distance, "seuclidean") 392s assert (obj.DistParameter, S) 392s ***** test 392s ## Mahalanobis distance with custom Cov 392s X = [1, 2; 3, 4; 5, 6]; 392s C = [1, 0; 0, 1]; 392s obj = ExhaustiveSearcher (X, "Distance", "mahalanobis", "Cov", C); 392s assert (obj.Distance, "mahalanobis") 392s assert (obj.DistParameter, C) 392s ***** test 392s ## knnsearch with Euclidean distance 392s X = [1, 2; 3, 4; 5, 6]; 392s obj = ExhaustiveSearcher (X); 392s Y = [2, 3]; 392s [idx, D] = knnsearch (obj, Y, "K", 1); 392s assert (idx, 1) 392s assert (D, sqrt(2), 1e-10) 392s ***** test 392s ## knnsearch with Cityblock distance 392s X = [0, 0; 1, 1; 2, 2]; 392s obj = ExhaustiveSearcher (X, "Distance", "cityblock"); 392s Y = [1, 0]; 392s [idx, D] = knnsearch (obj, Y, "K", 1); 392s assert (idx, 1) 392s assert (D, 1, 1e-10) 392s ***** test 392s ## knnsearch with Chebychev distance 392s X = [1, 1; 2, 3; 4, 2]; 392s obj = ExhaustiveSearcher (X, "Distance", "chebychev"); 392s Y = [2, 2]; 392s [idx, D] = knnsearch (obj, Y); 392s assert (idx, 1) 392s assert (D, 1, 1e-10) 392s ***** test 392s ## knnsearch with Cosine distance 392s X = [1, 0; 0, 1; 1, 1]; 392s obj = ExhaustiveSearcher (X, "Distance", "cosine"); 392s Y = [1, 0.5]; 392s [idx, D] = knnsearch (obj, Y); 392s assert (idx, 3) 392s assert (D < 0.1, true) 392s ***** test 392s ## knnsearch with Minkowski P=1 (Manhattan) 392s X = [0, 0; 1, 0; 0, 1]; 392s obj = ExhaustiveSearcher (X, "Distance", "minkowski", "P", 1); 392s Y = [0.5, 0.5]; 392s [idx, D] = knnsearch (obj, Y, "K", 2, "IncludeTies", true); 392s assert (iscell (idx)) 392s assert (idx{1}, [1, 2, 3]) 392s assert (D{1}, [1, 1, 1], 1e-10) 392s ***** test 392s ## rangesearch with Seuclidean 392s X = [1, 1; 2, 2; 3, 3]; 392s S = [1, 1]; 392s obj = ExhaustiveSearcher (X, "Distance", "seuclidean", "Scale", S); 392s Y = [0, 0]; 392s [idx, D] = rangesearch (obj, Y, 2); 392s assert (idx{1}, [1]) 392s assert (D{1}, [sqrt(2)], 1e-10) 392s ***** test 392s ## rangesearch with Mahalanobis 392s X = [1, 1; 2, 2; 3, 3]; 392s C = [1, 0; 0, 1]; 392s obj = ExhaustiveSearcher (X, "Distance", "mahalanobis", "Cov", C); 392s Y = [0, 0]; 392s [idx, D] = rangesearch (obj, Y, 3, "SortIndices", false); 392s assert (idx{1}, [1, 2]) 392s assert (D{1}, [sqrt(2), sqrt(8)], 1e-10) 392s ***** test 392s ## rangesearch with Hamming distance 392s X = [0, 1; 1, 0; 1, 1]; 392s obj = ExhaustiveSearcher (X, "Distance", "hamming"); 392s Y = [0, 0]; 392s [idx, D] = rangesearch (obj, Y, 0.5); 392s assert (idx{1}, [1, 2]) 392s assert (D{1}, [0.5, 0.5], 1e-10) 392s ***** test 392s ## Custom distance function 392s X = [1, 2; 3, 4]; 392s custom_dist = @(x, y) sum(abs(x - y)); 392s obj = ExhaustiveSearcher (X, "Distance", custom_dist); 392s Y = [2, 3]; 392s [idx, D] = knnsearch (obj, Y); 392s assert (idx, 1) 392s assert (D, 2, 1e-10) 392s ***** test 392s ## Euclidean with high-dimensional data 392s X = [1, 2, 3; 4, 5, 6; 7, 8, 9; 10, 11, 12]; 392s obj = ExhaustiveSearcher (X); 392s Y = [5, 6, 7]; 392s [idx, D] = knnsearch (obj, Y); 392s assert (idx, 2) 392s assert (D, sqrt(3), 1e-10) 392s ***** test 392s ## Minkowski P=3 with scaled data 392s X = [0, 1; 2, 3; 4, 5] * 10; 392s obj = ExhaustiveSearcher (X, "Distance", "minkowski", "P", 3); 392s Y = [20, 30]; 392s [idx, D] = knnsearch (obj, Y); 392s assert (idx, 2) 392s assert (D, 0, 1e-10) 392s ***** test 392s ## Seuclidean with custom scales on diverse data 392s X = [1, 10; 2, 20; 3, 30]; 392s S = [1, 5]; 392s obj = ExhaustiveSearcher (X, "Distance", "seuclidean", "Scale", S); 392s Y = [1.5, 15]; 392s [idx, D] = knnsearch (obj, Y); 392s assert (idx, 1) 392s assert (D, sqrt((0.5/1)^2 + (5/5)^2), 1e-10) 392s ***** test 392s ## Mahalanobis with correlated data 392s X = [1, 1; 2, 1.5; 3, 2]; 392s C = [1, 0.5; 0.5, 1]; 392s obj = ExhaustiveSearcher (X, "Distance", "mahalanobis", "Cov", C); 392s Y = [2, 1.5]; 392s [idx, D] = knnsearch (obj, Y); 392s assert (idx, 2) 392s assert (D, 0, 1e-10) 392s ***** test 392s ## Cityblock with sparse data 392s X = [0, 0, 1; 1, 0, 0; 0, 1, 0]; 392s obj = ExhaustiveSearcher (X, "Distance", "cityblock"); 392s Y = [0, 0, 0]; 392s [idx, D] = rangesearch (obj, Y, 1); 392s assert (idx{1}, [1, 2, 3]) 392s assert (D{1}, [1, 1, 1], 1e-10) 392s ***** test 392s ## Chebychev with extreme values 392s X = [0, 100; 50, 50; 100, 0]; 392s obj = ExhaustiveSearcher (X, "Distance", "chebychev"); 392s Y = [60, 60]; 392s [idx, D] = knnsearch (obj, Y); 392s assert (idx, 2) 392s assert (D, 10, 1e-10) 392s ***** test 392s ## Cosine with normalized data 392s X = [1, 0; 0, 1; 1/sqrt(2), 1/sqrt(2)]; 392s obj = ExhaustiveSearcher (X, "Distance", "cosine"); 392s Y = [1, 1]; 392s [idx, D] = knnsearch (obj, Y); 392s assert (idx, 3) 392s assert (D < 0.1, true) 392s ***** test 392s ## Correlation with time-series-like data 392s X = [1, 2, 3; 2, 4, 6; 1, 1, 1]; 392s obj = ExhaustiveSearcher (X, "Distance", "correlation"); 392s Y = [1.5, 3, 4.5]; 392s [idx, D] = knnsearch (obj, Y); 392s assert (idx, 1) 392s assert (D < 0.1, true) 392s ***** test 392s ## Spearman with ranked data 392s X = [1, 2, 3; 3, 2, 1; 2, 1, 3]; 392s obj = ExhaustiveSearcher (X, "Distance", "spearman"); 392s Y = [1, 2, 3]; 392s [idx, D] = knnsearch (obj, Y); 392s assert (idx, 1) 392s assert (D, 0, 1e-10) 392s ***** test 392s ## Jaccard with binary sparse data 392s X = [1, 0, 0; 0, 1, 0; 1, 1, 0]; 392s obj = ExhaustiveSearcher (X, "Distance", "jaccard"); 392s Y = [1, 0, 0]; 392s [idx, D] = knnsearch (obj, Y); 392s assert (idx, 1) 392s assert (D, 0, 1e-10) 392s ***** test 392s obj = ExhaustiveSearcher (ones(3,2)); 392s assert (obj.X, ones(3,2)) 392s assert (obj.Distance, "euclidean") 392s assert (isempty (obj.DistParameter)) 392s ***** test 392s obj = ExhaustiveSearcher (ones(3,2)); 392s obj.Distance = "minkowski"; 392s assert (obj.Distance, "minkowski") 392s ***** test 392s obj = ExhaustiveSearcher (ones(3,2), "Distance", "minkowski"); 392s obj.DistParameter = 3; 392s assert (obj.DistParameter, 3) 392s ***** test 392s obj = ExhaustiveSearcher (ones(3,2), "Distance", "seuclidean"); 392s obj.DistParameter = [1, 2]; 392s assert (obj.DistParameter, [1, 2]) 392s ***** test 392s obj = ExhaustiveSearcher (ones(3,2), "Distance", "mahalanobis"); 392s obj.DistParameter = eye(2); 392s assert (obj.DistParameter, eye(2)) 392s ***** error ... 392s ExhaustiveSearcher () 392s ***** error ... 392s ExhaustiveSearcher (ones(3,2), "Distance") 392s ***** error ... 392s ExhaustiveSearcher ("abc") 392s ***** error ... 392s ExhaustiveSearcher ([1; Inf; 3]) 392s ***** error ... 392s ExhaustiveSearcher (ones(3,2), "foo", "bar") 392s ***** error ... 392s ExhaustiveSearcher (ones(3,2), "Distance", "invalid") 392s ***** error ... 392s ExhaustiveSearcher (ones(3,2), "Distance", @(x) x) 392s ***** error ... 392s ExhaustiveSearcher (ones(3,2), "Distance", 1) 392s ***** error ... 392s ExhaustiveSearcher (ones(3,2), "Distance", "minkowski", "P", -1) 392s ***** error ... 392s ExhaustiveSearcher (ones(3,2), "Distance", "seuclidean", "Scale", [-1, 1]) 392s ***** error ... 392s ExhaustiveSearcher (ones(3,2), "Distance", "mahalanobis", "Cov", ones(3,3)) 392s ***** error ... 392s ExhaustiveSearcher (ones(3,2), "Distance", "mahalanobis", "Cov", -eye(2)) 392s ***** error ... 392s knnsearch (ExhaustiveSearcher (ones(3,2))) 392s ***** error ... 392s knnsearch (ExhaustiveSearcher (ones(3,2)), ones(3,2), "IncludeTies") 392s ***** error ... 392s knnsearch (ExhaustiveSearcher (ones(3,2)), "abc") 392s ***** error ... 392s knnsearch (ExhaustiveSearcher (ones(3,2)), ones(3,3)) 392s ***** error ... 392s knnsearch (ExhaustiveSearcher (ones(3,2)), ones(3,2), "K", 0) 392s ***** error ... 392s knnsearch (ExhaustiveSearcher (ones(3,2)), ones(3,2), "foo", "bar") 392s ***** error ... 392s knnsearch (ExhaustiveSearcher (ones(3,2)), ones(3,2), "IncludeTies", 1) 392s ***** error ... 392s rangesearch (ExhaustiveSearcher (ones(3,2))) 392s ***** error ... 392s rangesearch (ExhaustiveSearcher (ones(3,2)), ones(3,2), 1, "SortIndices") 392s ***** error ... 392s rangesearch (ExhaustiveSearcher (ones(3,2)), "abc", 1) 392s ***** error ... 392s rangesearch (ExhaustiveSearcher (ones(3,2)), ones(3,3), 1) 392s ***** error ... 392s rangesearch (ExhaustiveSearcher (ones(3,2)), ones(3,2), -1) 392s ***** error ... 392s rangesearch (ExhaustiveSearcher (ones(3,2)), ones(3,2), 1, "foo", "bar") 392s ***** error ... 392s rangesearch (ExhaustiveSearcher (ones(3,2)), ones(3,2), 1, "SortIndices", 1) 392s ***** error ... 392s obj = ExhaustiveSearcher (ones(3,2)); obj(1) 392s ***** error ... 392s obj = ExhaustiveSearcher (ones(3,2)); obj{1} 392s ***** error ... 392s obj = ExhaustiveSearcher (ones(3,2)); obj.(1) 392s ***** error ... 392s obj = ExhaustiveSearcher (ones(3,2)); obj.invalid 392s ***** error ... 392s obj = ExhaustiveSearcher (ones(3,2)); obj(1) = 1 392s ***** error ... 392s obj = ExhaustiveSearcher (ones(3,2)); obj{1} = 1 392s ***** error ... 392s obj = ExhaustiveSearcher (ones(3,2)); obj.X.Y = 1 392s ***** error ... 392s obj = ExhaustiveSearcher (ones(3,2)); obj.(1) = 1 392s ***** error ... 392s obj = ExhaustiveSearcher (ones(3,2)); obj.X = 1 392s ***** error ... 392s obj = ExhaustiveSearcher (ones(3,2)); obj.Distance = "invalid" 392s ***** error ... 392s obj = ExhaustiveSearcher (ones(3,2)); obj.Distance = @(x) x 392s ***** error ... 392s obj = ExhaustiveSearcher (ones(3,2)); obj.Distance = @(x, y) [1; 1] 392s ***** error ... 392s obj = ExhaustiveSearcher (ones(3,2)); obj.Distance = 1 392s ***** error ... 392s obj = ExhaustiveSearcher (ones(3,2), "Distance", "minkowski"); obj.DistParameter = -1 392s ***** error ... 392s obj = ExhaustiveSearcher (ones(3,2), "Distance", "seuclidean"); obj.DistParameter = [-1, 1] 392s ***** error ... 392s obj = ExhaustiveSearcher (ones(3,2), "Distance", "mahalanobis"); obj.DistParameter = ones(3,3) 392s ***** error ... 392s obj = ExhaustiveSearcher (ones(3,2), "Distance", "mahalanobis"); obj.DistParameter = -eye(2) 392s ***** error ... 392s obj = ExhaustiveSearcher (ones(3,2), "Distance", "euclidean"); obj.DistParameter = 1 392s ***** error ... 392s obj = ExhaustiveSearcher (ones(3,2)); obj.invalid = 1 392s 73 tests, 73 passed, 0 known failure, 0 skipped 392s [inst/Clustering/GapEvaluation.m] 392s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/Clustering/GapEvaluation.m 392s ***** test 392s load fisheriris 392s eva = evalclusters (meas([1:50],:), "kmeans", "gap", "KList", [1:3], ... 392s "referencedistribution", "uniform"); 392s assert (class (eva), "GapEvaluation"); 397s 1 test, 1 passed, 0 known failure, 0 skipped 397s [inst/Clustering/KDTreeSearcher.m] 397s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/Clustering/KDTreeSearcher.m 397s ***** demo 397s ## Demo to verify implementation using fisheriris dataset 397s load fisheriris 397s numSamples = size (meas, 1); 397s queryIndices = [1, 23, 46, 63, 109]; 397s dataIndices = ~ismember (1:numSamples, queryIndices); 397s queryPoints = meas(queryIndices, :); 397s dataPoints = meas(dataIndices, :); 397s searchRadius = 0.3; 397s kdTree = KDTreeSearcher (dataPoints, 'Distance', 'minkowski') 397s nearestNeighbors = knnsearch (kdTree, queryPoints, "K", 2) 397s neighborsInRange = rangesearch (kdTree, queryPoints, searchRadius) 397s ***** demo 397s ## Create a KDTreeSearcher with Euclidean distance 397s X = [1, 2; 3, 4; 5, 6]; 397s obj = KDTreeSearcher (X); 397s ## Find the nearest neighbor to [2, 3] 397s Y = [2, 3]; 397s [idx, D] = knnsearch (obj, Y, "K", 1); 397s disp ("Nearest neighbor index:"); 397s disp (idx); 397s disp ("Distance:"); 397s disp (D); 397s ## Find all points within radius 2 397s [idx, D] = rangesearch (obj, Y, 2); 397s disp ("Indices within radius:"); 397s disp (idx); 397s disp ("Distances:"); 397s disp (D); 397s ***** demo 397s ## Create a KDTreeSearcher with Minkowski distance (P=3) 397s X = [0, 0; 1, 0; 2, 0]; 397s obj = KDTreeSearcher (X, "Distance", "minkowski", "P", 3); 397s ## Find the nearest neighbor to [1, 0] 397s Y = [1, 0]; 397s [idx, D] = knnsearch (obj, Y, "K", 1); 397s disp ("Nearest neighbor index:"); 397s disp (idx); 397s disp ("Distance:"); 397s disp (D); 397s ***** demo 397s rng(42); 397s disp('Demonstrating KDTreeSearcher'); 397s 397s n = 100; 397s mu1 = [0.3, 0.3]; 397s mu2 = [0.7, 0.7]; 397s sigma = 0.1; 397s X1 = mu1 + sigma * randn (n / 2, 2); 397s X2 = mu2 + sigma * randn (n / 2, 2); 397s X = [X1; X2]; 397s 397s obj = KDTreeSearcher(X); 397s 397s Y = [0.3, 0.3; 0.7, 0.7; 0.5, 0.5]; 397s 397s K = 5; 397s [idx, D] = knnsearch (obj, Y, "K", K); 397s 397s disp ('For the first query point:'); 397s disp (['Query point: ', num2str(Y(1,:))]); 397s disp ('Indices of nearest neighbors:'); 397s disp (idx(1,:)); 397s disp ('Distances:'); 397s disp (D(1,:)); 397s 397s figure; 397s scatter (X(:,1), X(:,2), 36, 'b', 'filled'); # Training points 397s hold on; 397s scatter (Y(:,1), Y(:,2), 36, 'r', 'filled'); # Query points 397s for i = 1:size (Y, 1) 397s query = Y(i,:); 397s neighbors = X(idx(i,:), :); 397s for j = 1:K 397s plot ([query(1), neighbors(j,1)], [query(2), neighbors(j,2)], 'k-'); 397s endfor 397s endfor 397s hold off; 397s title ('K Nearest Neighbors with KDTreeSearcher'); 397s xlabel ('X1'); 397s ylabel ('X2'); 397s 397s r = 0.15; 397s [idx, D] = rangesearch (obj, Y, r); 397s 397s disp ('For the first query point in rangesearch:'); 397s disp (['Query point: ', num2str(Y(1,:))]); 397s disp ('Indices of points within radius:'); 397s disp (idx{1}); 397s disp ('Distances:'); 397s disp (D{1}); 397s 397s figure; 397s scatter (X(:,1), X(:,2), 36, 'b', 'filled'); 397s hold on; 397s scatter (Y(:,1), Y(:,2), 36, 'r', 'filled'); 397s theta = linspace (0, 2 * pi, 100); 397s for i = 1:size (Y, 1) 397s center = Y(i,:); 397s x_circle = center(1) + r * cos (theta); 397s y_circle = center(2) + r * sin (theta); 397s plot (x_circle, y_circle, 'g-'); 397s ## Highlight points within radius 397s if (! isempty (idx{i})) 397s in_radius = X(idx{i}, :); 397s scatter (in_radius(:,1), in_radius(:,2), 36, 'g', 'filled'); 397s endif 397s endfor 397s hold off 397s title ('Points within Radius with KDTreeSearcher'); 397s xlabel ('X1'); 397s ylabel ('X2'); 397s ***** test 397s load fisheriris 397s X = meas; 397s obj = KDTreeSearcher (X); 397s Y = X(1:5,:); 397s [idx, D] = knnsearch (obj, Y, "K", 3); 397s assert (idx, [[1, 18, 5]; [2, 35, 46]; [3, 48, 4]; [4, 48, 30]; [5, 38, 1]]) 397s assert (D, [[0, 0.1000, 0.1414]; [0, 0.1414, 0.1414]; [0, 0.1414, 0.2449]; 397s [0, 0.1414, 0.1732]; [0, 0.1414, 0.1414]], 5e-5) 397s ***** test 397s load fisheriris 397s X = meas; 397s obj = KDTreeSearcher (X, "Distance", "minkowski", "P", 3); 397s Y = X(10:15,:); 397s [idx, D] = knnsearch (obj, Y, "K", 2); 397s assert (idx, [[10, 35]; [11, 49]; [12, 30]; [13, 2]; [14, 39]; [15, 34]]) 397s assert (D, [[0, 0.1000]; [0, 0.1000]; [0, 0.2080]; [0, 0.1260]; [0, 0.2154]; 397s [0, 0.3503]], 5e-5) 397s ***** test 397s load fisheriris 397s X = meas; 397s obj = KDTreeSearcher (X, "Distance", "cityblock"); 397s Y = X(20:25,:); 397s [idx, D] = knnsearch (obj, Y, "K", 1); 397s assert (idx, [20; 21; 22; 23; 24; 25]) 397s assert (D, [0; 0; 0; 0; 0; 0]) 398s ***** test 398s load fisheriris 398s X = meas; 398s obj = KDTreeSearcher (X, "Distance", "chebychev"); 398s Y = X(30:35,:); 398s [idx, D] = knnsearch (obj, Y, "K", 4); 398s assert (idx, [[30, 31, 4, 12]; [31, 30, 10, 35]; [32, 21, 37, 28]; 398s [33, 20, 34, 47]; [34, 16, 15, 33]; [35, 10, 2, 26]]) 398s assert (D, [[0, 0.1000, 0.1000, 0.2000]; [0, 0.1000, 0.1000, 0.1000]; 398s [0, 0.2000, 0.2000, 0.2000]; [0, 0.3000, 0.3000, 0.3000]; 398s [0, 0.2000, 0.3000, 0.3000]; [0, 0.1000, 0.1000, 0.1000]], 5e-15) 398s ***** test 398s load fisheriris 398s X = meas; 398s obj = KDTreeSearcher (X, "BucketSize", 20); 398s Y = X(40:45,:); 398s [idx, D] = knnsearch (obj, Y, "K", 2); 398s assert (idx, [[40, 8]; [41, 18]; [42, 9]; [43, 39]; [44, 27]; [45, 47]]) 398s assert (D, [[0, 0.1000]; [0, 0.1414]; [0, 0.6245]; [0, 0.2000]; [0, 0.2236]; 398s [0, 0.3606]], 4.7e-5) 398s ***** test 398s load fisheriris 398s X = meas; 398s obj = KDTreeSearcher (X); 398s Y = X(50:55,:); 398s [idx, D] = knnsearch (obj, Y, "K", 3, "IncludeTies", true); 398s assert (idx, {[50; 8; 40]; [51; 53; 87]; [52; 57; 76]; [53; 51; 87]; [54; ... 398s 90; 81]; [55; 59; 76]}) 398s assert (D, {[0; 0.1414; 0.1732]; [0; 0.2646; 0.3317]; [0; 0.2646; 0.3162]; 398s [0; 0.2646; 0.2828]; [0; 0.2000; 0.3000]; [0; 0.2449; 0.3162]}, 5e-5) 398s ***** test 398s load fisheriris 398s X = meas; 398s obj = KDTreeSearcher (X); 398s Y = X(60:65,:); 398s [idx, D] = rangesearch (obj, Y, 0.4); 398s assert (idx, {[60; 90]; [61; 94]; [62; 97; 79; 96; 100; 89; 98; 72]; [63]; 398s [64; 92; 74; 79]; [65]}) 398s assert (D, {[0; 0.3873]; [0; 0.3606]; 398s [0; 0.3000; 0.3317; 0.3606; 0.3606; 0.3742; 0.3873; 0.4000]; [0]; 398s [0; 0.1414; 0.2236; 0.2449]; [0]}, 5e-5) 398s ***** test 398s load fisheriris 398s X = meas; 398s obj = KDTreeSearcher (X, "Distance", "cityblock"); 398s Y = X(70:72,:); 398s [idx, D] = rangesearch (obj, Y, 1.0); 398s assert (idx, {[70; 81; 90; 82; 83; 93; 54; 68; 95; 80; 91; 100; 60; 65; ... 398s 89; 63]; [71; 139; 128; 150; 127; 57; 86; 64; 79; 92; 124]; 398s [72; 100; 98; 83; 93; 97; 75; 68; 62; 89; 95; 74; 56; 90; ... 398s 79; 92; 96; 64; 63; 65]}) 398s assert (D, {[0; 0.3000; 0.4000; 0.5000; 0.5000; 0.5000; 0.6000; 0.7000; ... 398s 0.7000; 0.7000; 0.8000; 0.8000; 0.9000; 0.9000; 0.9000; 0.9000]; 398s [0; 0.3000; 0.5000; 0.5000; 0.7000; 0.8000; 0.8000; 1.0000; ... 398s 1.0000; 1.0000; 1]; [0; 0.5000; 0.5000; 0.6000; 0.6000; ... 398s 0.7000; 0.7000; 0.8000; 0.8000; 0.8000; 0.8000; 0.8000; ... 398s 0.9000; 0.9000; 0.9000; 0.9000; 0.9000; 0.9000; 1.0000; 1]}, 5e-5) 398s ***** test 398s load fisheriris 398s X = meas; 398s obj = KDTreeSearcher (X, "Distance", "minkowski", "P", 3); 398s Y = X(80:85,:); 398s [idx, D] = rangesearch (obj, Y, 0.8); 398s assert (idx, {[80; 82; 81; 65; 70; 83; 93; 90; 54; 63; 68; 72; 100; 60; ... 398s 89; 99; 95; 94; 97; 96]; [81; 82; 70; 54; 90; 93; 80; 83; ... 398s 60; 68; 95; 100; 65; 63; 97; 61; 91; 94; 89; 96; 72; 58; ... 398s 62; 56]; [82; 81; 70; 80; 54; 90; 93; 83; 68; 60; 65; 63; ... 398s 100; 95; 94; 61; 58; 97; 89; 72; 96; 91; 99]; [83; 93; ... 398s 100; 68; 70; 72; 95; 90; 97; 65; 89; 96; 81; 82; 80; 62; ... 398s 54; 98; 63; 91; 56; 60; 79; 67; 75; 88; 85; 92; 69]; [84; ... 398s 134; 102; 143; 150; 124; 128; 73; 127; 139; 147; 64; 112; ... 398s 114; 120; 74; 135; 122; 71; 92; 104; 138; 148; 117; 79; ... 398s 55; 56; 57; 67; 111; 129; 69; 78; 59; 52; 133; 85; 88; ... 398s 87]; [85; 67; 56; 97; 95; 89; 96; 91; 100; 62; 71; 122; ... 398s 79; 60; 107; 90; 139; 93; 68; 86; 83; 92; 64; 150; 102; ... 398s 143; 74; 114; 70; 128; 84; 54; 72]}) 398s assert (D, {[0; 0.2884; 0.3530; 0.3826; 0.4062; 0.4198; 0.5117; 0.5440; 0.5718; 398s 0.6000; 0.6018; 0.6073; 0.6308; 0.6333; 0.6753; 0.7000; 0.7192; 398s 0.7230; 0.7350; 0.7459]; 398s [0; 0.1260; 0.1442; 0.2571; 0.2571; 0.3530; 0.3530; 0.3826; 0.4344; 398s 0.4344; 0.4642; 0.4747; 0.5217; 0.5217; 0.5896; 0.6009; 0.6082; 398s 0.6316; 0.6316; 0.6611; 0.6664; 0.6993; 0.7417; 0.7507]; 398s [0; 0.1260; 0.2224; 0.2884; 0.3803; 0.3803; 0.4121; 0.4121; 0.4905; 398s 0.5013; 0.5360; 0.5429; 0.5463; 0.5646; 0.5749; 0.5819; 0.6542; 398s 0.6581; 0.6753; 0.6938; 0.7094; 0.7107; 0.7423]; 398s [0; 0.1260; 0.2224; 0.2520; 0.2571; 0.3107; 0.3302; 0.3332; 0.3332; 398s 0.3530; 0.3530; 0.3803; 0.3826; 0.4121; 0.4198; 0.4344; 0.4531; 398s 0.5155; 0.5217; 0.5348; 0.6028; 0.6073; 0.6374; 0.6527; 0.6611; 398s 0.6804; 0.6938; 0.7399; 0.7560]; 398s [0; 0.3072; 0.3271; 0.3271; 0.3302; 0.3503; 0.3530; 0.3530; 0.3530; 398s 0.3958; 0.3979; 0.4327; 0.4626; 0.4642; 0.5027; 0.5066; 0.5130; 398s 0.5155; 0.5440; 0.5440; 0.5518; 0.5848; 0.6009; 0.6073; 0.6082; 398s 0.6316; 0.6471; 0.6746; 0.6753; 0.6797; 0.6804; 0.7047; 0.7192; 398s 0.7218; 0.7405; 0.7405; 0.7719; 0.7725; 0.7786]; 398s [0; 0.2000; 0.3503; 0.3979; 0.4121; 0.4309; 0.4327; 0.4531; 0.4747; 398s 0.5337; 0.5718; 0.5896; 0.6009; 0.6316; 0.6366; 0.6374; 0.6463; 398s 0.6542; 0.6542; 0.6550; 0.6938; 0.7014; 0.7067; 0.7166; 0.7186; 398s 0.7186; 0.7281; 0.7380; 0.7447; 0.7571; 0.7719; 0.7813; 0.7851]}, 5e-5) 398s ***** test 398s load fisheriris 398s X = meas; 398s obj = KDTreeSearcher (X, "Distance", "chebychev"); 398s Y = X(90,:); 398s [idx, D] = rangesearch (obj, Y, 0.7); 398s assert (idx, {[90; 70; 54; 81; 95; 60; 83; 93; 100; 68; 82; 65; 97; 91; ... 398s 56; 61; 62; 63; 67; 79; 80; 85; 89; 96; 72; 92; 107]}) 398s assert (D, {[0; 0.2000; 0.2000; 0.2000; 0.2000; 0.3000; 0.3000; 0.3000; ... 398s 0.3000; 0.3000; 0.3000; 0.4000; 0.4000; 0.4000; 0.5000; ... 398s 0.5000; 0.5000; 0.5000; 0.5000; 0.5000; 0.5000; 0.5000; ... 398s 0.5000; 0.5000; 0.6000; 0.6000; 0.6000]}, 5e-16) 398s ***** test 398s ## Constructor with single-point dataset 398s X = [0, 0]; 398s obj = KDTreeSearcher (X); 398s assert (obj.X, X); 398s assert (obj.Distance, "euclidean"); 398s assert (isempty (obj.DistParameter)); 398s assert (obj.BucketSize, 50); 398s ***** test 398s ## Constructor with duplicate points 398s X = [0, 0; 0, 0; 1, 0]; 398s obj = KDTreeSearcher (X, "Distance", "cityblock"); 398s assert (obj.X, X); 398s assert (obj.Distance, "cityblock"); 398s ***** test 398s ## Constructor with 3D data 398s X = [0, 0, 0; 1, 0, 0; 0, 1, 0]; 398s obj = KDTreeSearcher (X, "Distance", "minkowski", "P", 3); 398s assert (obj.X, X); 398s assert (obj.DistParameter, 3); 398s ***** test 398s ## knnsearch with grid, K = 1 398s X = [0, 0; 0, 1; 1, 0; 1, 1]; 398s obj = KDTreeSearcher (X, "Distance", "euclidean"); 398s Y = [0.5, 0.5]; 398s [idx, D] = knnsearch (obj, Y, "K", 1); 398s D_true = pdist2 (X, Y, "euclidean"); 398s assert (D, min (D_true), 1e-10); 398s assert (any (idx == find (D_true == min (D_true)))); 398s ***** test 398s ## knnsearch with IncludeTies, all points equidistant 398s X = [0, 0; 0, 1; 1, 0; 1, 1]; 398s obj = KDTreeSearcher (X); 398s Y = [0.5, 0.5]; 398s [idx, D] = knnsearch (obj, Y, "K", 1, "IncludeTies", true); 398s D_true = pdist2 (X, Y, "euclidean"); 398s expected_idx = find (D_true == min (D_true)); 398s assert (sort (idx{1}(:)), sort (expected_idx)); 398s assert (D{1}(:)', repmat (min (D_true), 1, 4), 1e-10); 398s ***** test 398s ## rangesearch with line dataset 398s X = [0, 0; 1, 0; 2, 0; 3, 0]; 398s obj = KDTreeSearcher (X); 398s Y = [1.5, 0]; 398s r = 1; 398s [idx, D] = rangesearch (obj, Y, r); 398s D_true = pdist2 (X, Y, "euclidean"); 398s expected_idx = find (D_true <= r); 398s assert (sort (idx{1}(:)), sort (expected_idx)); 398s assert (D{1}, sort (D_true(expected_idx)), 1e-10); 398s ***** test 398s ## knnsearch with duplicates 398s X = [0, 0; 0, 0; 1, 0]; 398s obj = KDTreeSearcher (X, "Distance", "cityblock"); 398s Y = [0, 0]; 398s [idx, D] = knnsearch (obj, Y, "K", 1, "IncludeTies", true); 398s assert (sort (idx{1}(:))', [1, 2]); 398s assert (D{1}', [0, 0], 1e-10); 398s ***** test 398s ## rangesearch with 3D data 398s X = [0, 0, 0; 1, 0, 0; 0, 1, 0]; 398s obj = KDTreeSearcher (X, "Distance", "cityblock"); 398s Y = [0, 0, 0]; 398s r = 1; 398s [idx, D] = rangesearch (obj, Y, r); 398s assert (sort (idx{1}(:))', [1, 2, 3]); 398s assert (D{1}', [0, 1, 1], 1e-10); 398s ***** test 398s ## knnsearch with P = 2 (Euclidean equivalent) 398s X = [0, 0; 1, 1]; 398s obj = KDTreeSearcher (X, "Distance", "minkowski", "P", 2); 398s Y = [0, 1]; 398s [idx, D] = knnsearch (obj, Y, "K", 1); 398s assert (idx, 1); 398s assert (D, 1, 1e-10); 398s ***** test 398s ## rangesearch with P = 3 398s X = [0, 0; 1, 0; 0, 1]; 398s obj = KDTreeSearcher (X, "Distance", "minkowski", "P", 3); 398s Y = [0.5, 0.5]; 398s r = 0.8; 398s [idx, D] = rangesearch (obj, Y, r); 398s D_true = pdist2 (X, Y, "minkowski", 3); 398s expected_idx = find (D_true <= r); 398s assert (sort (idx{1}(:)), sort (expected_idx)); 398s assert (D{1}, sort (D_true(expected_idx)), 1e-10); 398s ***** test 398s ## knnsearch with P = 4, random data 398s X = rand (5, 2); 398s obj = KDTreeSearcher (X, "Distance", "minkowski", "P", 4); 398s Y = rand (1, 2); 398s [idx, D] = knnsearch (obj, Y, "K", 3); 398s D_true = pdist2 (X, Y, "minkowski", 4); 398s [sorted_D, sort_idx] = sort (D_true); 398s assert (idx', sort_idx(1:3)); 398s assert (D', sorted_D(1:3), 1e-10); 398s ***** test 398s ## knnsearch with all same points 398s X = [1, 1; 1, 1; 1, 1]; 398s obj = KDTreeSearcher (X, "Distance", "chebychev"); 398s Y = [1, 1]; 398s [idx, D] = knnsearch (obj, Y, "K", 1, "IncludeTies", true); 398s assert (sort (idx{1}(:))', [1, 2, 3]); 398s assert (D{1}', [0, 0, 0], 1e-10); 398s ***** test 398s ## rangesearch with grid 398s X = [0, 0; 0, 1; 1, 0; 1, 1]; 398s obj = KDTreeSearcher (X, "Distance", "chebychev"); 398s Y = [0.5, 0.5]; 398s r = 0.5; 398s [idx, D] = rangesearch (obj, Y, r); 398s D_true = pdist2 (X, Y, "chebychev"); 398s expected_idx = find (D_true <= r); 398s assert (sort (idx{1}(:)), sort (expected_idx)); 398s assert (D{1}, D_true(expected_idx), 1e-10); 398s ***** test 398s ## Changing Distance and verifying search 398s X = [0,0; 1,0]; 398s obj = KDTreeSearcher(X, "Distance", "euclidean"); 398s Y = [0,1]; 398s [idx, D] = knnsearch(obj, Y, "K", 1); 398s assert(D, 1, 1e-10); 398s obj.Distance = "chebychev"; 398s [idx, D] = knnsearch(obj, Y, "K", 1); 398s assert(D, 1, 1e-10); 398s ***** test 398s ## Changing DistParameter for minkowski 398s X = [0,0; 1,0]; 398s obj = KDTreeSearcher(X, "Distance", "minkowski", "P", 1); 398s Y = [0,1]; 398s [idx, D] = knnsearch(obj, Y, "K", 1); 398s assert(D, 1, 1e-10); 398s obj.DistParameter = 3; 398s [idx, D] = knnsearch(obj, Y, "K", 1); 398s assert(D, 1, 1e-10); 398s ***** test 398s ## Different BucketSize values 398s X = rand(20,2); 398s obj1 = KDTreeSearcher(X, "BucketSize", 5); 398s obj2 = KDTreeSearcher(X, "BucketSize", 15); 398s Y = rand(1,2); 398s [idx1, D1] = knnsearch(obj1, Y, "K", 3); 398s [idx2, D2] = knnsearch(obj2, Y, "K", 3); 398s assert(idx1, idx2); 398s assert(D1, D2, 1e-10); 398s ***** test 398s ## Basic constructor with default Euclidean 398s X = [1, 2; 3, 4; 5, 6]; 398s obj = KDTreeSearcher (X); 398s assert (obj.X, X); 398s assert (obj.Distance, "euclidean"); 398s assert (isempty (obj.DistParameter)); 398s assert (obj.BucketSize, 50); 398s ***** test 398s ## Minkowski distance with custom P 398s X = [0, 0; 1, 1; 2, 2]; 398s obj = KDTreeSearcher (X, "Distance", "minkowski", "P", 3); 398s assert (obj.Distance, "minkowski"); 398s assert (obj.DistParameter, 3); 398s ***** test 398s ## Cityblock distance 398s X = [0, 0; 1, 0; 0, 1]; 398s obj = KDTreeSearcher (X, "Distance", "cityblock"); 398s assert (obj.Distance, "cityblock"); 398s assert (isempty (obj.DistParameter)); 398s ***** test 398s ## Chebychev distance 398s X = [1, 1; 2, 3; 4, 2]; 398s obj = KDTreeSearcher (X, "Distance", "chebychev"); 398s assert (obj.Distance, "chebychev"); 398s assert (isempty (obj.DistParameter)); 398s ***** test 398s ## knnsearch with Euclidean distance 398s X = [1, 2; 3, 4; 5, 6]; 398s obj = KDTreeSearcher (X); 398s Y = [2, 3]; 398s [idx, D] = knnsearch (obj, Y, "K", 1); 398s assert (idx, 1); 398s assert (D, sqrt(2), 1e-10); 398s ***** test 398s ## knnsearch with Cityblock distance 398s X = [0, 0; 1, 1; 2, 2]; 398s obj = KDTreeSearcher (X, "Distance", "cityblock"); 398s Y = [1, 0]; 398s [idx, D] = knnsearch (obj, Y, "K", 1); 398s assert (ismember (idx, [1, 2])); 398s assert (D, 1, 1e-10); 398s ***** test 398s ## knnsearch with Chebychev distance 398s X = [1, 1; 2, 3; 4, 2]; 398s obj = KDTreeSearcher (X, "Distance", "chebychev"); 398s Y = [2, 2]; 398s [idx, D] = knnsearch (obj, Y, "K", 1); 398s assert (ismember (idx, [1, 2])); 398s assert (D, 1, 1e-10); 398s ***** test 398s ## knnsearch with Minkowski P=3 398s X = [0, 0; 1, 0; 2, 0]; 398s obj = KDTreeSearcher (X, "Distance", "minkowski", "P", 3); 398s Y = [1, 0]; 398s [idx, D] = knnsearch (obj, Y, "K", 1); 398s assert (idx, 2); 398s assert (D, 0, 1e-10); 398s ***** test 398s ## knnsearch with IncludeTies 398s X = [0, 0; 1, 0; 0, 1]; 398s obj = KDTreeSearcher (X); 398s Y = [0.5, 0]; 398s [idx, D] = knnsearch (obj, Y, "K", 1, "IncludeTies", true); 398s assert (iscell (idx)); 398s assert (sort (idx{1}(:))', [1, 2]); 398s assert (sort (D{1}(:)), [0.5; 0.5], 1e-10); 398s ***** test 398s ## rangesearch with Euclidean 398s X = [1, 1; 2, 2; 3, 3]; 398s obj = KDTreeSearcher (X); 398s Y = [0, 0]; 398s [idx, D] = rangesearch (obj, Y, 2); 398s assert (idx{1}, [1]); 398s assert (D{1}, [sqrt(2)], 1e-10); 398s ***** test 398s ## rangesearch with Cityblock 398s X = [0, 0; 1, 1; 2, 2]; 398s obj = KDTreeSearcher (X, "Distance", "cityblock"); 398s Y = [0, 0]; 398s [idx, D] = rangesearch (obj, Y, 1); 398s assert (idx{1}, [1]); 398s assert (D{1}, [0], 1e-10); 398s ***** test 398s ## rangesearch with Chebychev 398s X = [1, 1; 2, 3; 4, 2]; 398s obj = KDTreeSearcher (X, "Distance", "chebychev"); 398s Y = [2, 2]; 398s [idx, D] = rangesearch (obj, Y, 1); 398s assert (sort (idx{1}(:))', [1, 2]); 398s assert (sort (D{1}(:))', [1, 1], 1e-10); 398s ***** test 398s ## rangesearch with Minkowski P=3 398s X = [0, 0; 1, 0; 2, 0]; 398s obj = KDTreeSearcher (X, "Distance", "minkowski", "P", 3); 398s Y = [1, 0]; 398s [idx, D] = rangesearch (obj, Y, 1); 398s assert (sort (idx{1}(:))', [1, 2, 3]); 398s assert (sort (D{1}(:))', [0, 1, 1], 1e-10); 398s ***** test 398s ## Diverse dataset with Euclidean 398s X = [0, 10; 5, 5; 10, 0]; 398s obj = KDTreeSearcher (X); 398s Y = [5, 5]; 398s [idx, D] = knnsearch (obj, Y, "K", 1); 398s assert (idx, 2); 398s assert (D, 0, 1e-10); 398s ***** test 398s ## High-dimensional data with Cityblock 398s X = [1, 2, 3; 4, 5, 6; 7, 8, 9]; 398s obj = KDTreeSearcher (X, "Distance", "cityblock"); 398s Y = [4, 5, 6]; 398s [idx, D] = knnsearch (obj, Y, "K", 1); 398s assert (idx, 2); 398s assert (D, 0, 1e-10); 398s ***** error ... 398s KDTreeSearcher () 398s ***** error ... 398s KDTreeSearcher (ones(3,2), "Distance") 398s ***** error ... 398s KDTreeSearcher ("abc") 398s ***** error ... 398s KDTreeSearcher ([1; Inf; 3]) 398s ***** error ... 398s KDTreeSearcher (ones(3,2), "foo", "bar") 398s ***** error ... 398s KDTreeSearcher (ones(3,2), "Distance", "invalid") 398s ***** error ... 398s KDTreeSearcher (ones(3,2), "Distance", 1) 398s ***** error ... 398s KDTreeSearcher (ones(3,2), "Distance", "minkowski", "P", -1) 398s ***** error ... 398s KDTreeSearcher (ones(3,2), "BucketSize", 0) 398s ***** error ... 398s KDTreeSearcher(ones(3,2), "BucketSize", -1) 398s ***** error ... 398s knnsearch (KDTreeSearcher (ones(3,2))) 398s ***** error ... 398s knnsearch (KDTreeSearcher (ones(3,2)), ones(3,2), "K", 1, "IncludeTies") 398s ***** error ... 398s knnsearch (KDTreeSearcher (ones(3,2)), "abc", "K", 1) 398s ***** error ... 398s knnsearch (KDTreeSearcher (ones(3,2)), ones(3,3), "K", 1) 398s ***** error ... 398s knnsearch (KDTreeSearcher (ones(3,2)), ones(3,2), "K", 0) 398s ***** error ... 398s obj = KDTreeSearcher(ones(3,2)); knnsearch(obj, ones(1,2), "K", Inf) 398s ***** error ... 398s knnsearch (KDTreeSearcher (ones(3,2)), ones(3,2), "K", 1, "foo", "bar") 398s ***** error ... 398s knnsearch (KDTreeSearcher (ones(3,2)), ones(3,2), "K", 1, "IncludeTies", 1) 398s ***** error ... 398s knnsearch (KDTreeSearcher (ones(3,2)), ones(3,2), "K", 1, "SortIndices", 1) 398s ***** error ... 398s rangesearch (KDTreeSearcher (ones(3,2))) 398s ***** error ... 398s rangesearch (KDTreeSearcher (ones(3,2)), ones(3,2), 1, "SortIndices") 398s ***** error ... 398s rangesearch (KDTreeSearcher (ones(3,2)), "abc", 1) 398s ***** error ... 398s rangesearch (KDTreeSearcher (ones(3,2)), ones(3,3), 1) 398s ***** error ... 398s rangesearch (KDTreeSearcher (ones(3,2)), ones(3,2), -1) 398s ***** error ... 398s obj = KDTreeSearcher(ones(3,2)); rangesearch(obj, ones(1,2), Inf) 398s ***** error ... 398s rangesearch (KDTreeSearcher (ones(3,2)), ones(3,2), 1, "foo", "bar") 398s ***** error ... 398s rangesearch (KDTreeSearcher (ones(3,2)), ones(3,2), 1, "SortIndices", 1) 398s ***** error ... 398s obj = KDTreeSearcher (ones(3,2)); obj(1) 398s ***** error ... 398s obj = KDTreeSearcher (ones(3,2)); obj{1} 398s ***** error ... 398s obj = KDTreeSearcher (ones(3,2)); obj.invalid 398s ***** error ... 398s obj = KDTreeSearcher (ones(3,2)); obj(1) = 1 398s ***** error ... 398s obj = KDTreeSearcher (ones(3,2)); obj{1} = 1 398s ***** error ... 398s obj = KDTreeSearcher (ones(3,2)); obj.X.Y = 1 398s ***** error ... 398s obj = KDTreeSearcher (ones(3,2)); obj.X = 1 398s ***** error ... 398s obj = KDTreeSearcher (ones(3,2)); obj.KDTree = 1 398s ***** error ... 398s obj = KDTreeSearcher (ones(3,2)); obj.Distance = "invalid" 398s ***** error ... 398s obj = KDTreeSearcher (ones(3,2)); obj.Distance = 1 398s ***** error ... 398s obj = KDTreeSearcher (ones(3,2), "Distance", "minkowski"); obj.DistParameter = -1 398s ***** error ... 398s obj = KDTreeSearcher (ones(3,2)); obj.DistParameter = 1 398s ***** error ... 398s obj = KDTreeSearcher (ones(3,2)); obj.BucketSize = 0 398s ***** error ... 398s obj = KDTreeSearcher(ones(3,2)); obj.BucketSize = -1 398s ***** error ... 398s obj = KDTreeSearcher(ones(3,2)); obj.BucketSize = 1.5 398s ***** error ... 398s obj = KDTreeSearcher (ones(3,2)); obj.invalid = 1 398s 84 tests, 84 passed, 0 known failure, 0 skipped 398s [inst/Clustering/SilhouetteEvaluation.m] 398s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/Clustering/SilhouetteEvaluation.m 398s ***** test 398s load fisheriris 398s eva = evalclusters (meas, "kmeans", "silhouette", "KList", [1:6]); 398s assert (class (eva), "SilhouetteEvaluation"); 399s 1 test, 1 passed, 0 known failure, 0 skipped 399s [inst/Clustering/cvpartition.m] 399s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/Clustering/cvpartition.m 399s ***** test 399s custom = [1, 1, 1, 2, 2, 2, 1, 2, 3, 2, 3, 3, 2, 1, 3]'; 399s cv = cvpartition ('CustomPartition', custom); 399s assert (cv.Type, 'kfold'); 399s assert (cv.NumObservations, 15); 399s assert (cv.NumTestSets, 3); 399s assert (cv.TrainSize, [10, 9, 11]); 399s assert (cv.TestSize, [5, 6, 4]); 399s assert (cv.IsCustom, true); 399s assert (cv.IsGrouped, false); 399s assert (cv.IsStratified, false); 399s idx = training (cv, 1); 399s assert (idx, custom != 1); 399s idx = test (cv, 1); 399s assert (idx, custom == 1); 399s idx = training (cv, 2); 399s assert (idx, custom != 2); 399s idx = test (cv, 2); 399s assert (idx, custom == 2); 399s idx = training (cv, 3); 399s assert (idx, custom != 3); 399s idx = test (cv, 3); 399s assert (idx, custom == 3); 399s idx1 = training (cv, 'all'); 399s idx2 = test (cv, 'all'); 399s assert (idx1, ! idx2); 399s ***** test 399s custom = logical ([1, 1, 1, 0, 0, 0, 1, 0, 1, 1])'; 399s cv = cvpartition ('CustomPartition', custom); 399s assert (cv.Type, 'holdout'); 399s assert (cv.NumObservations, 10); 399s assert (cv.NumTestSets, 1); 399s assert (cv.TrainSize, 4); 399s assert (cv.TestSize, 6); 399s assert (cv.IsCustom, true); 399s assert (cv.IsGrouped, false); 399s assert (cv.IsStratified, false); 399s idx = training (cv, 1); 399s assert (idx, custom != 1); 399s assert (idx, training (cv, 'all')); 399s idx = test (cv, 1); 399s assert (idx, custom == 1); 399s assert (idx, test (cv, 'all')); 399s ***** test 399s custom = logical ([1, 0, 0; 0, 1, 0; 1, 0, 0; 0, 0, 1]); 399s cv = cvpartition ('CustomPartition', custom); 399s assert (cv.Type, 'kfold'); 399s assert (cv.NumObservations, 4); 399s assert (cv.NumTestSets, 3); 399s assert (cv.TrainSize, [2, 3, 3]); 399s assert (cv.TestSize, [2, 1, 1]); 399s assert (cv.IsCustom, true); 399s assert (cv.IsGrouped, false); 399s assert (cv.IsStratified, false); 399s idx = training (cv, 1); 399s assert (idx, custom(:,1) == false); 399s idx = test (cv, 1); 399s assert (idx, custom(:,1) == true); 399s idx = training (cv, 2); 399s assert (idx, custom(:,2) == false); 399s idx = test (cv, 2); 399s assert (idx, custom(:,2) == true); 399s assert (! custom, training (cv, 'all')); 399s assert (custom, test (cv, 'all')); 399s ***** test 399s cv = cvpartition ('CustomPartition', [1:8]); 399s assert (cv.Type, 'leaveout'); 399s assert (cv.NumObservations, 8); 399s assert (cv.NumTestSets, 8); 399s assert (cv.TrainSize, [7, 7, 7, 7, 7, 7, 7, 7]); 399s assert (cv.TestSize, [1, 1, 1, 1, 1, 1, 1, 1]); 399s assert (cv.IsCustom, true); 399s assert (cv.IsGrouped, false); 399s assert (cv.IsStratified, false); 399s assert (class (training (cv, 1)), 'logical'); 399s assert (sum (training (cv, 1)), 7); 399s assert (sum (training (cv, 'all')), cv.TrainSize); 399s assert (class (test (cv, 1)), 'logical'); 399s assert (sum (test (cv, 1)), 1); 399s assert (sum (test (cv, 'all')), cv.TestSize); 399s assert (! training (cv, 'all'), test (cv, 'all')); 399s ***** test 399s cv = cvpartition ('CustomPartition', logical (eye (8))); 399s assert (cv.Type, 'leaveout'); 399s assert (cv.NumObservations, 8); 399s assert (cv.NumTestSets, 8); 399s assert (cv.TrainSize, [7, 7, 7, 7, 7, 7, 7, 7]); 399s assert (cv.TestSize, [1, 1, 1, 1, 1, 1, 1, 1]); 399s assert (cv.IsCustom, true); 399s assert (cv.IsGrouped, false); 399s assert (cv.IsStratified, false); 399s assert (class (training (cv, 1)), 'logical'); 399s assert (sum (training (cv, 1)), 7); 399s assert (sum (training (cv, 'all')), cv.TrainSize); 399s assert (class (test (cv, 1)), 'logical'); 399s assert (sum (test (cv, 1)), 1); 399s assert (sum (test (cv, 'all')), cv.TestSize); 399s assert (! training (cv, 'all'), test (cv, 'all')); 399s ***** test 399s cv = cvpartition (10, 'resubstitution'); 399s assert (cv.Type, 'resubstitution'); 399s assert (cv.NumObservations, 10); 399s assert (cv.NumTestSets, 1); 399s assert (cv.TrainSize, 10); 399s assert (cv.TestSize, 10); 399s assert (cv.IsCustom, false); 399s assert (cv.IsGrouped, false); 399s assert (cv.IsStratified, false); 399s assert (class (training (cv, 1)), 'logical'); 399s assert (sum (training (cv, 1)), 10); 399s assert (training (cv, 'all'), logical (ones (10, 1))); 399s assert (class (test (cv, 1)), 'logical'); 399s assert (sum (test (cv, 1)), 10); 399s assert (test (cv, 'all'), logical (ones (10, 1))); 399s assert (test (cv), training (cv)); 399s ***** test 399s cv = cvpartition (10, 'leaveout'); 399s assert (cv.Type, 'leaveout'); 399s assert (cv.NumObservations, 10); 399s assert (cv.NumTestSets, 10); 399s assert (cv.TrainSize, ones (1, 10) * 9); 399s assert (cv.TestSize, ones (1, 10)); 399s assert (cv.IsCustom, false); 399s assert (cv.IsGrouped, false); 399s assert (cv.IsStratified, false); 399s assert (class (training (cv, 1)), 'logical'); 399s assert (sum (training (cv, 1)), 9); 399s assert (training (cv, 'all'), ! logical (eye (10))); 399s assert (class (test (cv, 1)), 'logical'); 399s assert (sum (test (cv, 1)), 1); 399s assert (test (cv, 'all'), logical (eye (10))); 399s assert (test (cv), ! training (cv)); 399s assert (test (cv, 'all'), ! training (cv, 'all')); 399s ***** test 399s rand ('seed', 5); # for reproducibility 399s cv = cvpartition (10, 'holdout', 0.3); 399s assert (cv.Type, 'holdout'); 399s assert (cv.NumObservations, 10); 399s assert (cv.NumTestSets, 1); 399s assert (cv.TrainSize, 7); 399s assert (cv.TestSize, 3); 399s assert (cv.IsCustom, false); 399s assert (cv.IsGrouped, false); 399s assert (cv.IsStratified, false); 399s assert (class (training (cv, 1)), 'logical'); 399s assert (sum (training (cv, 1)), 7); 399s assert (training (cv, 'all'), logical ([1, 0, 1, 1, 0, 1, 1, 1, 0, 1])'); 399s assert (class (test (cv, 1)), 'logical'); 399s assert (sum (test (cv, 1)), 3); 399s assert (test (cv, 'all'), logical ([0, 1, 0, 0, 1, 0, 0, 0, 1, 0])'); 399s assert (test (cv), ! training (cv)); 399s assert (test (cv, 'all'), ! training (cv, 'all')); 399s ***** test 399s cv = cvpartition (10, 'holdout', 4); 399s assert (cv.Type, 'holdout'); 399s assert (cv.NumObservations, 10); 399s assert (cv.NumTestSets, 1); 399s assert (cv.TrainSize, 6); 399s assert (cv.TestSize, 4); 399s assert (cv.IsCustom, false); 399s assert (cv.IsGrouped, false); 399s assert (cv.IsStratified, false); 399s assert (class (training (cv, 1)), 'logical'); 399s assert (sum (training (cv, 1)), 6); 399s assert (class (test (cv, 1)), 'logical'); 399s assert (sum (test (cv, 1)), 4); 399s assert (test (cv), ! training (cv)); 399s assert (test (cv, 'all'), ! training (cv, 'all')); 399s ***** test 399s cv = cvpartition (5, 'kfold'); 399s assert (cv.Type, 'kfold'); 399s assert (cv.NumObservations, 5); 399s assert (cv.NumTestSets, 5); 399s ***** test 399s cv = cvpartition (20, 'kfold'); 399s assert (cv.Type, 'kfold'); 399s assert (cv.NumObservations, 20); 399s assert (cv.NumTestSets, 10); 399s ***** test 399s cv = cvpartition (10, 'kfold', 5); 399s assert (cv.Type, 'kfold'); 399s assert (cv.NumObservations, 10); 399s assert (cv.NumTestSets, 5); 399s assert (cv.TrainSize, [8, 8, 8, 8, 8]); 399s assert (cv.TestSize, [2, 2, 2, 2, 2]); 399s assert (cv.IsCustom, false); 399s assert (cv.IsGrouped, false); 399s assert (cv.IsStratified, false); 399s assert (test (cv, 1), ! training (cv, 1)); 399s assert (test (cv, 'all'), ! training (cv, 'all')); 399s assert (size (test (cv, 'all')), [10, 5]); 399s ***** test 399s grpvar = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 5, 5]; 399s rand ('seed', 5); 399s cv = cvpartition (12, 'kfold', 5, 'GroupingVariables', grpvar); 399s assert (cv.Type, 'kfold'); 399s assert (cv.NumObservations, 12); 399s assert (cv.NumTestSets, 5); 399s assert (cv.TrainSize, [10, 10, 10, 8, 10]); 399s assert (cv.TestSize, [2, 2, 2, 4, 2]); 399s assert (cv.IsCustom, false); 399s assert (cv.IsGrouped, true); 399s assert (cv.IsStratified, false); 399s assert (test (cv, 1), ! training (cv, 1)); 399s assert (test (cv, 'all'), ! training (cv, 'all')); 399s assert (size (test (cv, 'all')), [12, 5]); 399s assert (sum (test (cv, 'all')), [2, 2, 2, 4, 2]); 399s assert (sum (training (cv, 'all')), [10, 10, 10, 8, 10]); 399s ***** test 399s grpvar = [1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 3, 3]; 399s rand ('seed', 5); 399s cv = cvpartition (12, 'kfold', 3, 'GroupingVariables', grpvar); 399s assert (cv.Type, 'kfold'); 399s assert (cv.NumObservations, 12); 399s assert (cv.NumTestSets, 3); 399s assert (cv.TrainSize, [9, 10, 5]); 399s assert (cv.TestSize, [3, 2, 7]); 399s assert (cv.IsCustom, false); 399s assert (cv.IsGrouped, true); 399s assert (cv.IsStratified, false); 399s assert (test (cv, 1), ! training (cv, 1)); 399s assert (test (cv, 'all'), ! training (cv, 'all')); 399s assert (size (test (cv, 'all')), [12, 3]); 399s assert (sum (test (cv, 'all')), [3, 2, 7]); 399s assert (sum (training (cv, 'all')), [9, 10, 5]); 399s ***** test 399s grpvar = [1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3]; 399s rand ('seed', 5); 399s cv = cvpartition (12, 'kfold', 2, 'GroupingVariables', grpvar); 399s assert (cv.Type, 'kfold'); 399s assert (cv.NumObservations, 12); 399s assert (cv.NumTestSets, 2); 399s assert (cv.TrainSize, [6, 6]); 399s assert (cv.TestSize, [6, 6]); 399s assert (cv.IsCustom, false); 399s assert (cv.IsGrouped, true); 399s assert (cv.IsStratified, false); 399s assert (test (cv, 1), ! training (cv, 1)); 399s assert (test (cv, 'all'), ! training (cv, 'all')); 399s assert (size (test (cv, 'all')), [12, 2]); 399s assert (sum (test (cv, 'all')), [6, 6]); 399s assert (sum (training (cv, 'all')), [6, 6]); 399s ***** test 399s grpvar = [1, 1, 1, 2, 2, 2, 2, NaN, 2, 3, 3, 3]; 399s rand ('seed', 5); 399s cv = cvpartition (12, 'kfold', 2, 'GroupingVariables', grpvar); 399s assert (cv.Type, 'kfold'); 399s assert (cv.NumObservations, 11); 399s assert (cv.NumTestSets, 2); 399s assert (cv.TrainSize, [6, 5]); 399s assert (cv.TestSize, [5, 6]); 399s assert (cv.IsCustom, false); 399s assert (cv.IsGrouped, true); 399s assert (cv.IsStratified, false); 399s assert (test (cv, 1), ! training (cv, 1)); 399s assert (test (cv, 'all'), ! training (cv, 'all')); 399s assert (size (test (cv, 'all')), [11, 2]); 399s assert (sum (test (cv, 'all')), [5, 6]); 399s assert (sum (training (cv, 'all')), [6, 5]); 399s ***** test 399s grpvar = [1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 3, 3]; 399s rand ('seed', 5); 399s cv = cvpartition (12, 'kfold', 2, 'GroupingVariables', grpvar); 399s assert (cv.Type, 'kfold'); 399s assert (cv.NumObservations, 12); 399s assert (cv.NumTestSets, 2); 399s assert (cv.TrainSize, [5, 7]); 399s assert (cv.TestSize, [7, 5]); 399s assert (cv.IsCustom, false); 399s assert (cv.IsGrouped, true); 399s assert (cv.IsStratified, false); 399s assert (test (cv, 1), ! training (cv, 1)); 399s assert (test (cv, 'all'), ! training (cv, 'all')); 399s assert (size (test (cv, 'all')), [12, 2]); 399s assert (sum (test (cv, 'all')), [7, 5]); 399s assert (sum (training (cv, 'all')), [5, 7]); 399s assert (test (cv, 1)', grpvar == 2); 399s assert (test (cv, 2)', grpvar != 2); 399s ***** test 399s grpvar = [1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3]; 399s rand ('seed', 5); 399s cv = cvpartition (12, 'kfold', 2, 'GroupingVariables', grpvar); 399s assert (cv.Type, 'kfold'); 399s assert (cv.NumObservations, 12); 399s assert (cv.NumTestSets, 2); 399s assert (cv.TrainSize, [7, 5]); 399s assert (cv.TestSize, [5, 7]); 399s assert (cv.IsCustom, false); 399s assert (cv.IsGrouped, true); 399s assert (cv.IsStratified, false); 399s assert (test (cv, 1), ! training (cv, 1)); 399s assert (test (cv, 'all'), ! training (cv, 'all')); 399s assert (size (test (cv, 'all')), [12, 2]); 399s assert (sum (test (cv, 'all')), [5, 7]); 399s assert (sum (training (cv, 'all')), [7, 5]); 399s assert (test (cv, 1)', grpvar == 2); 399s assert (test (cv, 2)', grpvar != 2); 399s ***** test 399s grpvar = [1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3]; 399s rand ('seed', 5); 399s cv = cvpartition (12, 'kfold', 2, 'GroupingVariables', grpvar); 399s assert (cv.Type, 'kfold'); 399s assert (cv.NumObservations, 12); 399s assert (cv.NumTestSets, 2); 399s assert (cv.TrainSize, [7, 5]); 399s assert (cv.TestSize, [5, 7]); 399s assert (cv.IsCustom, false); 399s assert (cv.IsGrouped, true); 399s assert (cv.IsStratified, false); 399s assert (test (cv, 1), ! training (cv, 1)); 399s assert (test (cv, 'all'), ! training (cv, 'all')); 399s assert (size (test (cv, 'all')), [12, 2]); 399s assert (sum (test (cv, 'all')), [5, 7]); 399s assert (sum (training (cv, 'all')), [7, 5]); 399s assert (test (cv, 1)', grpvar == 3); 399s assert (test (cv, 2)', grpvar != 3); 399s ***** test 399s rand ('seed', 5); 399s cv = cvpartition ([1, 1, 1, 1, 1, 2, 2, 2, 2, 2], 'holdout', 3); 399s assert (cv.Type, 'holdout'); 399s assert (cv.NumObservations, 10); 399s assert (cv.NumTestSets, 1); 399s assert (cv.TrainSize, 7); 399s assert (cv.TestSize, 3); 399s assert (cv.IsCustom, false); 399s assert (cv.IsGrouped, false); 399s assert (cv.IsStratified, true); 399s assert (test (cv, 1), ! training (cv, 1)); 399s assert (test (cv), logical ([0, 0, 0, 0, 1, 0, 1, 0, 0, 1])'); 399s ***** test 399s cv = cvpartition ([1, 1, 1, 1, 1, 2, 2, 2, 2, 2], 'holdout', 4); 399s assert (cv.Type, 'holdout'); 399s assert (cv.NumObservations, 10); 399s assert (cv.NumTestSets, 1); 399s assert (cv.TrainSize, 6); 399s assert (cv.TestSize, 4); 399s assert (cv.IsCustom, false); 399s assert (cv.IsGrouped, false); 399s assert (cv.IsStratified, true); 399s assert (test (cv, 1), ! training (cv, 1)); 399s assert (sum (test (cv)(1:5)), 2); 399s assert (sum (test (cv)(6:10)), 2); 399s ***** test 399s grpvar = [1, 1, 1, 1, 1, 2, 2, 2, 2, 2]; 399s rand ('seed', 5); 399s cv = cvpartition (grpvar, 'holdout', 4, 'Stratify', false); 399s assert (cv.Type, 'holdout'); 399s assert (cv.NumObservations, 10); 399s assert (cv.NumTestSets, 1); 399s assert (cv.TrainSize, 6); 399s assert (cv.TestSize, 4); 399s assert (cv.IsCustom, false); 399s assert (cv.IsGrouped, false); 399s assert (cv.IsStratified, false); 399s assert (test (cv, 1), ! training (cv, 1)); 399s assert (sum (test (cv)(1:5)), 3); 399s assert (sum (test (cv)(6:10)), 1); 399s ***** test 399s cv = cvpartition ([1 1 1 1 1 2 2 2 2 1], 'kfold', 2); 399s assert (cv.Type, 'kfold'); 399s assert (cv.NumObservations, 10); 399s assert (cv.NumTestSets, 2); 399s assert (cv.TrainSize, [5, 5]); 399s assert (cv.TestSize, [5, 5]); 399s assert (cv.IsCustom, false); 399s assert (cv.IsGrouped, false); 399s assert (cv.IsStratified, true); 399s assert (test (cv, 1), ! training (cv, 1)); 399s assert (test (cv, 'all'), ! training (cv, 'all')); 399s assert (sum (test (cv, 1)(1:5)), 3); 399s assert (sum (test (cv, 2)(1:5)), 2); 399s assert (sum (test (cv, 1)(6:10)), 2); 399s assert (sum (test (cv, 2)(6:10)), 3); 399s ***** test 399s grpvar = [1 1 1 1 1 2 2 2 2 1]; 399s rand ('seed', 5); 399s cv = cvpartition (grpvar, 'kfold', 2, 'Stratify', false); 399s assert (cv.Type, 'kfold'); 399s assert (cv.NumObservations, 10); 399s assert (cv.NumTestSets, 2); 399s assert (cv.TrainSize, [5, 5]); 399s assert (cv.TestSize, [5, 5]); 399s assert (cv.IsCustom, false); 399s assert (cv.IsGrouped, false); 399s assert (cv.IsStratified, false); 399s assert (test (cv, 1), ! training (cv, 1)); 399s assert (test (cv, 'all'), ! training (cv, 'all')); 399s assert (sum (test (cv, 1)(1:5)), 4); 399s assert (sum (test (cv, 2)(1:5)), 1); 399s assert (sum (test (cv, 1)(6:10)), 1); 399s assert (sum (test (cv, 2)(6:10)), 4); 400s ***** error cvpartition (2) 400s ***** error cvpartition (1, 2, 3, 4, 5, 6) 400s ***** error ... 400s cvpartition ("CustomPartition", 'a') 400s ***** error ... 400s cvpartition ("CustomPartition", [2, 3; 2, 3]) 400s ***** error ... 400s cvpartition ("CustomPartition", false (3, 3, 3)) 400s ***** error ... 400s cvpartition ("CustomPartition", [false, true; true, true; true, false]) 400s ***** error ... 400s cvpartition ("CustomPartition", false (3, 5)) 400s ***** error ... 400s cvpartition (-20, "LeaveOut") 400s ***** error ... 400s cvpartition (20.5, "LeaveOut") 400s ***** error ... 400s cvpartition (20, "HoldOut", [0.2, 0.3]) 400s ***** error ... 400s cvpartition (20, "HoldOut", 'a') 400s ***** error ... 400s cvpartition (20, "HoldOut", 0) 400s ***** error ... 400s cvpartition (20, "HoldOut", -0.1) 400s ***** error ... 400s cvpartition (20, "HoldOut", 21) 400s ***** error ... 400s cvpartition (20, "kfold", [2, 3]) 400s ***** error ... 400s cvpartition (20, "kfold", 'a') 400s ***** error ... 400s cvpartition (20, "kfold", 2.5) 400s ***** error ... 400s cvpartition (20, "kfold", 21) 400s ***** error ... 400s cvpartition (10, "kfold", 3, "Group") 400s ***** error ... 400s cvpartition (10, "kfold", 3, "GroupingVariables") 400s ***** error ... 400s cvpartition (10, "kfold", 3, "GroupingVariables", ones (3, 3, 3)) 400s ***** error ... 400s cvpartition (10, "kfold", 3, "GroupingVariables", {'a', 'a', 'a', 'b', 'b'}) 400s ***** warning ... 400s cvpartition (5, "kfold", 3, "GroupingVariables", {'a', 'a', 'a', 'b', 'b'}); 400s ***** error ... 400s cvpartition (20, "some") 400s ***** error ... 400s cvpartition ([1, 1, 1, 2, 2], "kfold", 2, "strat") 400s ***** error ... 400s cvpartition ([1, 1, 1, 2, 2], "kfold", 2, "stratify") 400s ***** error ... 400s cvpartition ([1, 1, 1, 2, 2], "kfold", 2, "stratify", [true, true]) 400s ***** error ... 400s cvpartition ([1, 1, 1, 2, 2], "kfold", 2, "stratify", 'no') 400s ***** error ... 400s cvpartition ([1, 1, 1, 2, 2], "holdout", 'a') 400s ***** error ... 400s cvpartition ([1, 1, 1, 2, 2], "holdout", 'a', "stratify", true) 400s ***** error ... 400s cvpartition ([1, 1, 1, 2, 2], "holdout", [0.2, 0.3]) 400s ***** error ... 400s cvpartition ([1, 1, 1, 2, 2], "holdout", [0.2, 0.3], "stratify", true) 400s ***** error ... 400s cvpartition ([1, 1, 1, 2, 2], "holdout", 0) 400s ***** error ... 400s cvpartition ([1, 1, 1, 2, 2], "holdout", 0, "stratify", true) 400s ***** error ... 400s cvpartition ([1, 1, 1, 2, 2], "holdout", -0.1) 400s ***** error ... 400s cvpartition ([1, 1, 1, 2, 2], "holdout", -0.1, "stratify", true) 400s ***** error ... 400s cvpartition ([1, 1, 1, 2, 2], "holdout", 1.2) 400s ***** error ... 400s cvpartition ([1, 1, 1, 2, 2], "holdout", 1.2, "stratify", false) 400s ***** error ... 400s cvpartition ([1, 1, 1, 2, 2], "holdout", 6) 400s ***** error ... 400s cvpartition ([1, 1, 1, 2, 2], "holdout", 6, "stratify", false) 400s ***** error ... 400s cvpartition ([1, 1, 1, 2, 2], "kfold", 'a') 400s ***** error ... 400s cvpartition ([1, 1, 1, 2, 2], "kfold", 'a', "stratify", true) 400s ***** error ... 400s cvpartition ([1, 1, 1, 2, 2], "kfold", [2, 3]) 400s ***** error ... 400s cvpartition ([1, 1, 1, 2, 2], "kfold", [2, 3], "stratify", false) 400s ***** error ...\ 400s cvpartition ([1, 1, 1, 2, 2], "kfold", 0) 400s ***** error ...\ 400s cvpartition ([1, 1, 1, 2, 2], "kfold", 0, "stratify", true) 400s ***** error ...\ 400s cvpartition ([1, 1, 1, 2, 2], "kfold", 1.5) 400s ***** error ...\ 400s cvpartition ([1, 1, 1, 2, 2], "kfold", 1.5, "stratify", true) 400s ***** error ...\ 400s cvpartition ([1, 1, 1, 2, 2], "kfold", 5) 400s ***** error ...\ 400s cvpartition ([1, 1, 1, 2, 2], "kfold", 5, "stratify", true) 400s ***** error ... 400s cvpartition ([1, 1, 1, 2, 2], "leaveout") 400s ***** error ... 400s cvpartition ([1, 1, 1, 2, 2], "resubstitution") 400s ***** error ... 400s cvpartition ([1, 1, 1, 2, 2], "some") 400s ***** error ... 400s cvpartition ({1, 1; 2, 2}, "kfold") 400s ***** error ... 400s repartition (cvpartition ('CustomPartition', [1,1,2,2,3,3])) 400s ***** error ... 400s repartition (cvpartition ([1 1 1 1 1 2 2 2 2 1], 'kfold', 2, 'Stratify', true), 'legacy') 400s ***** error ... 400s repartition (cvpartition (20, 'Leaveout', 0.2), 'legacy') 400s ***** error ... 400s repartition (cvpartition (20, 'Leaveout', 0.2), 'asd') 400s ***** error ... 400s repartition (cvpartition (20, 'Leaveout', 0.2), 2+i) 400s ***** error ... 400s repartition (cvpartition (20, 'KFold', 5), [34, 56; 2, 3]) 400s ***** error ... 400s test (cvpartition (20, "kfold"), 2, 3) 400s ***** error ... 400s test (cvpartition (20, "kfold"), 0) 400s ***** error ... 400s test (cvpartition (20, "kfold"), 1.5) 400s ***** error ... 400s test (cvpartition (20, "kfold"), [1, 1.5]) 400s ***** error ... 400s test (cvpartition (20, "kfold"), [2, 3; 2, 3]) 400s ***** error ... 400s test (cvpartition (20, "kfold"), 21) 400s ***** error ... 400s test (cvpartition (20, "kfold"), [18, 21]) 400s ***** error ... 400s training (cvpartition (20, "kfold"), 2, 3) 400s ***** error ... 400s training (cvpartition (20, "kfold"), 0) 400s ***** error ... 400s training (cvpartition (20, "kfold"), 1.5) 400s ***** error ... 400s training (cvpartition (20, "kfold"), [1, 1.5]) 400s ***** error ... 400s training (cvpartition (20, "kfold"), [2, 3; 2, 3]) 400s ***** error ... 400s training (cvpartition (20, "kfold"), 21) 400s ***** error ... 400s training (cvpartition (20, "kfold"), [18, 21]) 400s 98 tests, 98 passed, 0 known failure, 0 skipped 400s [inst/Clustering/hnswSearcher.m] 400s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/Clustering/hnswSearcher.m 400s ***** demo 400s ## Create an hnswSearcher with Euclidean distance 400s X = [1, 2; 3, 4; 5, 6]; 400s obj = hnswSearcher (X); 400s ## Find the nearest neighbor to [2, 3] 400s Y = [2, 3]; 400s [idx, D] = knnsearch (obj, Y, "K", 1); 400s disp ("Nearest neighbor index:"); 400s disp (idx); 400s disp ("Distance:"); 400s disp (D); 400s ***** demo 400s ## Create an hnswSearcher with Minkowski distance (P=3) 400s X = [0, 0; 1, 0; 2, 0]; 400s obj = hnswSearcher (X, "Distance", "minkowski", "P", 3); 400s ## Find the nearest neighbor to [1, 0] 400s Y = [1, 0]; 400s [idx, D] = knnsearch (obj, Y, "K", 1); 400s disp ("Nearest neighbor index:"); 400s disp (idx); 400s disp ("Distance:"); 400s disp (D); 400s ***** test 400s load fisheriris 400s X = meas; 400s obj = hnswSearcher (X, "Distance", "chebychev"); 400s Y = X(30:35,:); 400s [idx, D] = knnsearch (obj, Y, "K", 4); 400s assert (idx, [[30 31 4 12]; [31 30 10 35]; [32 21 37 28]; [33 47 20 34]; ... 400s [34 16 33 15]; [35 10 26 2]]) 400s assert (D, [[0 0.1000 0.1000 0.2000]; [0 0.1000 0.1000 0.1000]; [0 0.2000 ... 400s 0.2000 0.2000]; [0 0.3000 0.3000 0.3000]; [0 0.2000 0.3000 ... 400s 0.3000]; [0 0.1000 0.1000 0.1000]], 5e-15) 408s ***** test 408s load fisheriris 408s X = meas; 408s C = cov (X); 408s obj = hnswSearcher (X, "Distance", "mahalanobis", "Cov", C); 408s Y = X(120:125,:); 408s [idx, D] = knnsearch (obj, Y, "K", 2); 408s assert (idx(1, :), [120 82]) 408s assert (idx(4, :), [123 106]) 408s assert (idx(5, :), [124 127]) 408s assert (idx(6, :), [125 57]) 408s assert (D(1, :), [0 0.7734], 1e-4) 408s assert (D(4, :), [0 0.8452], 1e-4) 408s assert (D(5, :), [0 0.4152], 1e-4) 408s assert (D(6, :), [0 0.7322], 1e-4) 418s ***** test 418s ## Basic constructor with default Euclidean 418s X = [1, 2; 3, 4; 5, 6]; 418s obj = hnswSearcher (X); 418s assert (obj.X, X); 418s assert (obj.Distance, "euclidean"); 418s assert (isempty (obj.DistParameter)); 418s ***** test 418s ## Minkowski distance with custom P 418s X = [0, 0; 1, 1; 2, 2]; 418s obj = hnswSearcher (X, "Distance", "minkowski", "P", 3); 418s assert (obj.Distance, "minkowski"); 418s assert (obj.DistParameter, 3); 418s ***** test 418s ## Seuclidean distance with custom Scale 418s X = [1, 2; 3, 4; 5, 6]; 418s S = [1, 2]; 418s obj = hnswSearcher (X, "Distance", "seuclidean", "Scale", S); 418s assert (obj.Distance, "seuclidean"); 418s assert (obj.DistParameter, S); 418s ***** test 418s ## Mahalanobis distance with custom Cov 418s X = [1, 2; 3, 4; 5, 6]; 418s C = [1, 0; 0, 1]; 418s obj = hnswSearcher (X, "Distance", "mahalanobis", "Cov", C); 418s assert (obj.Distance, "mahalanobis"); 418s assert (obj.DistParameter, C); 418s ***** test 418s ## knnsearch with Euclidean distance 418s X = [1, 2; 3, 4; 5, 6]; 418s obj = hnswSearcher (X); 418s Y = [2, 3]; 418s [idx, D] = knnsearch (obj, Y, "K", 1); 418s assert (ismember (idx, [2])); 418s assert (abs (D - sqrt(2)) < 1e-2); 418s ***** test 418s ## knnsearch with Cityblock distance 418s X = [0, 0; 1, 1; 2, 2]; 418s obj = hnswSearcher (X, "Distance", "cityblock"); 418s Y = [1, 0]; 418s [idx, D] = knnsearch (obj, Y, "K", 1); 418s assert (ismember (idx, [1, 2])); 418s assert (abs (D - 1) < 1e-2); 418s ***** test 418s ## knnsearch with Chebychev distance 418s X = [1, 1; 2, 3; 4, 2]; 418s obj = hnswSearcher (X, "Distance", "chebychev"); 418s Y = [2, 2]; 418s [idx, D] = knnsearch (obj, Y, "K", 1); 418s assert (ismember (idx, [1, 2])); 418s assert (abs (D - 1) < 1e-2); 418s ***** test 418s ## knnsearch with Minkowski P=3 418s X = [0, 0; 1, 0; 2, 0]; 418s obj = hnswSearcher (X, "Distance", "minkowski", "P", 3); 418s Y = [1, 0]; 418s [idx, D] = knnsearch (obj, Y, "K", 1); 418s assert (ismember (idx, [2])); 418s assert (abs (D - 0) < 1e-2); 418s ***** test 418s ## Diverse dataset with Euclidean 418s X = [0, 10; 5, 5; 10, 0]; 418s obj = hnswSearcher (X); 418s Y = [5, 5]; 418s [idx, D] = knnsearch (obj, Y, "K", 1); 418s assert (ismember (idx, [2])); 418s assert (abs (D - 0) < 1e-2); 418s ***** test 418s ## High-dimensional data with Cityblock 418s X = [1, 2, 3; 4, 5, 6; 7, 8, 9]; 418s obj = hnswSearcher (X, "Distance", "cityblock"); 418s Y = [4, 5, 6]; 418s [idx, D] = knnsearch (obj, Y, "K", 1); 418s assert (ismember (idx, [2])); 418s assert (abs (D - 0) < 1e-2); 418s ***** error ... 418s hnswSearcher () 418s ***** error ... 418s hnswSearcher (ones(3,2), "Distance") 418s ***** error ... 418s hnswSearcher ([]) 418s ***** error ... 418s hnswSearcher ("abc") 418s ***** error ... 418s hnswSearcher ([1; Inf; 3]) 418s ***** error ... 418s hnswSearcher (ones(3,2), "foo", "bar") 418s ***** error ... 418s hnswSearcher (ones(3,2), "Distance", "invalid") 418s ***** error ... 418s hnswSearcher (ones(3,2), "Distance", 1) 418s ***** error ... 418s hnswSearcher (ones(3,2), "Distance", "minkowski", "P", -1) 418s ***** error ... 418s hnswSearcher (ones(3,2), "Distance", "seuclidean", "Scale", [-1, 1]) 418s ***** error ... 418s hnswSearcher (ones(3,2), "Distance", "mahalanobis", "Cov", ones(3,3)) 418s ***** error ... 418s hnswSearcher (ones(3,2), "Distance", "mahalanobis", "Cov", [1, 2; 3, 4]) 418s ***** error ... 418s hnswSearcher (ones(3,2), "Distance", "mahalanobis", "Cov", -eye(2)) 418s ***** error ... 418s hnswSearcher (ones(3,2), "MaxNumLinksPerNode", 0) 418s ***** error ... 418s hnswSearcher (ones(3,2), "TrainSetSize", -1) 418s ***** error ... 418s hnswSearcher (ones(3,2), "TrainSetSize", 4) 418s ***** error ... 418s hnswSearcher (ones(3,2), "MaxNumLinksPerNode", 200, "TrainSetSize", 100) 418s ***** error ... 418s knnsearch (hnswSearcher (ones(3,2))) 418s ***** error ... 418s knnsearch (hnswSearcher (ones(3,2)), ones(3,2), "K") 418s ***** error ... 418s knnsearch (hnswSearcher (ones(3,2)), []) 418s ***** error ... 418s knnsearch (hnswSearcher (ones(3,2)), "abc") 418s ***** error ... 418s knnsearch (hnswSearcher (ones(3,2)), ones(3,3)) 418s ***** error ... 418s knnsearch (hnswSearcher (ones(3,2)), ones(3,2), "K", 0) 418s ***** error ... 418s knnsearch (hnswSearcher (ones(3,2)), ones(3,2), "foo", "bar") 418s ***** error ... 418s obj = hnswSearcher (ones(3,2)); obj(1) 418s ***** error ... 418s obj = hnswSearcher (ones(3,2)); obj{1} 418s ***** error ... 418s obj = hnswSearcher (ones(3,2)); obj.invalid 418s ***** error ... 418s obj = hnswSearcher (ones(3,2)); obj(1) = 1 418s ***** error ... 418s obj = hnswSearcher (ones(3,2)); obj{1} = 1 418s ***** error ... 418s obj = hnswSearcher (ones(3,2)); obj.X = 1 418s ***** error ... 418s obj = hnswSearcher (ones(3,2)); obj.HNSWGraph = 1 418s ***** error ... 418s obj = hnswSearcher (ones(3,2)); obj.Distance = "invalid" 418s ***** error ... 418s obj = hnswSearcher (ones(3,2)); obj.Distance = 1 418s ***** error ... 418s obj = hnswSearcher (ones(3,2), "Distance", "minkowski"); obj.DistParameter = -1 418s ***** error ... 418s obj = hnswSearcher (ones(3,2), "Distance", "seuclidean"); obj.DistParameter = [-1, 1] 418s ***** error ... 418s obj = hnswSearcher (ones(3,2), "Distance", "mahalanobis"); obj.DistParameter = ones(3,3) 418s ***** error ... 418s obj = hnswSearcher (ones(3,2), "Distance", "mahalanobis"); obj.DistParameter = -eye(2) 418s ***** error ... 418s obj = hnswSearcher (ones(3,2)); obj.DistParameter = 1 418s ***** error ... 418s obj = hnswSearcher (ones(3,2)); obj.MaxNumLinksPerNode = 0 418s ***** error ... 418s obj = hnswSearcher (ones(3,2)); obj.TrainSetSize = -1 418s ***** error ... 418s obj = hnswSearcher (ones(3,2)); obj.efSearch = 1.5 418s ***** error ... 418s obj = hnswSearcher (ones(3,2)); obj.invalid = 1 418s 54 tests, 54 passed, 0 known failure, 0 skipped 418s [inst/Regression/RegressionGAM.m] 418s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/Regression/RegressionGAM.m 418s ***** demo 418s ## Train a RegressionGAM Model for synthetic values 418s f1 = @(x) cos (3 * x); 418s f2 = @(x) x .^ 3; 418s x1 = 2 * rand (50, 1) - 1; 418s x2 = 2 * rand (50, 1) - 1; 418s y = f1(x1) + f2(x2); 418s y = y + y .* 0.2 .* rand (50,1); 418s X = [x1, x2]; 418s a = fitrgam (X, y, "tol", 1e-3) 418s ***** demo 418s ## Declare two different functions 418s f1 = @(x) cos (3 * x); 418s f2 = @(x) x .^ 3; 418s 418s ## Generate 80 samples for f1 and f2 418s x = [-4*pi:0.1*pi:4*pi-0.1*pi]'; 418s X1 = f1 (x); 418s X2 = f2 (x); 418s 418s ## Create a synthetic response by adding noise 418s rand ("seed", 3); 418s Ytrue = X1 + X2; 418s Y = Ytrue + Ytrue .* 0.2 .* rand (80,1); 418s 418s ## Assemble predictor data 418s X = [X1, X2]; 418s 418s ## Train the GAM and test on the same data 418s a = fitrgam (X, Y, "order", [5, 5]); 418s [ypred, ySDsd, yInt] = predict (a, X); 418s 418s ## Plot the results 418s figure 418s [sortedY, indY] = sort (Ytrue); 418s plot (sortedY, "r-"); 418s xlim ([0, 80]); 418s hold on 418s plot (ypred(indY), "g+") 418s plot (yInt(indY,1), "k:") 418s plot (yInt(indY,2), "k:") 418s xlabel ("Predictor samples"); 418s ylabel ("Response"); 418s title ("actual vs predicted values for function f1(x) = cos (3x) "); 418s legend ({"Theoretical Response", "Predicted Response", "Prediction Intervals"}); 418s 418s ## Use 30% Holdout partitioning for training and testing data 418s C = cvpartition (80, "HoldOut", 0.3); 418s [ypred, ySDsd, yInt] = predict (a, X(test(C),:)); 418s 418s ## Plot the results 418s figure 418s [sortedY, indY] = sort (Ytrue(test(C))); 418s plot (sortedY, 'r-'); 418s xlim ([0, sum(test(C))]); 418s hold on 418s plot (ypred(indY), "g+") 418s plot (yInt(indY,1),'k:') 418s plot (yInt(indY,2),'k:') 418s xlabel ("Predictor samples"); 418s ylabel ("Response"); 418s title ("actual vs predicted values for function f1(x) = cos (3x) "); 418s legend ({"Theoretical Response", "Predicted Response", "Prediction Intervals"}); 418s ***** test 418s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 418s y = [1; 2; 3; 4]; 418s a = RegressionGAM (x, y); 418s assert ({a.X, a.Y}, {x, y}) 418s assert ({a.BaseModel.Intercept}, {2.5000}) 418s assert ({a.Knots, a.Order, a.DoF}, {[5, 5, 5], [3, 3, 3], [8, 8, 8]}) 418s assert ({a.NumObservations, a.NumPredictors}, {4, 3}) 418s assert ({a.ResponseName, a.PredictorNames}, {"Y", {"x1", "x2", "x3"}}) 418s assert ({a.Formula}, {[]}) 418s ***** test 418s x = [1, 2, 3, 4; 4, 5, 6, 7; 7, 8, 9, 1; 3, 2, 1, 2]; 418s y = [1; 2; 3; 4]; 418s pnames = {"A", "B", "C", "D"}; 418s formula = "Y ~ A + B + C + D + A:C"; 418s intMat = logical ([1,0,0,0;0,1,0,0;0,0,1,0;0,0,0,1;1,0,1,0]); 418s a = RegressionGAM (x, y, "predictors", pnames, "formula", formula); 418s assert ({a.IntMatrix}, {intMat}) 418s assert ({a.ResponseName, a.PredictorNames}, {"Y", pnames}) 418s assert ({a.Formula}, {formula}) 419s ***** error RegressionGAM () 419s ***** error RegressionGAM (ones(10,2)) 419s ***** error ... 419s RegressionGAM (ones(10,2), ones (5,1)) 419s ***** error ... 419s RegressionGAM ([1;2;3;"a";4], ones (5,1)) 419s ***** error ... 419s RegressionGAM (ones(10,2), ones (10,1), "some", "some") 419s ***** error 419s RegressionGAM (ones(10,2), ones (10,1), "formula", {"y~x1+x2"}) 419s ***** error 419s RegressionGAM (ones(10,2), ones (10,1), "formula", [0, 1, 0]) 419s ***** error ... 419s RegressionGAM (ones(10,2), ones (10,1), "formula", "something") 419s ***** error ... 419s RegressionGAM (ones(10,2), ones (10,1), "formula", "something~") 419s ***** error ... 419s RegressionGAM (ones(10,2), ones (10,1), "formula", "something~") 419s ***** error ... 419s RegressionGAM (ones(10,2), ones (10,1), "formula", "something~x1:") 419s ***** error ... 419s RegressionGAM (ones(10,2), ones (10,1), "interactions", "some") 419s ***** error ... 419s RegressionGAM (ones(10,2), ones (10,1), "interactions", -1) 419s ***** error ... 419s RegressionGAM (ones(10,2), ones (10,1), "interactions", [1 2 3 4]) 419s ***** error ... 419s RegressionGAM (ones(10,2), ones (10,1), "interactions", 3) 419s ***** error ... 419s RegressionGAM (ones(10,2), ones (10,1), "formula", "y ~ x1 + x2", "interactions", 1) 419s ***** error ... 419s RegressionGAM (ones(10,2), ones (10,1), "interactions", 1, "formula", "y ~ x1 + x2") 419s ***** error ... 419s RegressionGAM (ones(10,2), ones (10,1), "knots", "a") 419s ***** error ... 419s RegressionGAM (ones(10,2), ones (10,1), "order", 3, "dof", 2, "knots", 5) 419s ***** error ... 419s RegressionGAM (ones(10,2), ones (10,1), "dof", 'a') 419s ***** error ... 419s RegressionGAM (ones(10,2), ones (10,1), "knots", 5, "order", 3, "dof", 2) 419s ***** error ... 419s RegressionGAM (ones(10,2), ones (10,1), "order", 'a') 419s ***** error ... 419s RegressionGAM (ones(10,2), ones (10,1), "knots", 5, "dof", 2, "order", 2) 419s ***** error ... 419s RegressionGAM (ones(10,2), ones (10,1), "tol", -1) 419s ***** error ... 419s RegressionGAM (ones(10,2), ones (10,1), "responsename", -1) 419s ***** error ... 419s RegressionGAM (ones(10,2), ones (10,1), "predictors", -1) 419s ***** error ... 419s RegressionGAM (ones(10,2), ones (10,1), "predictors", ['a','b','c']) 419s ***** error ... 419s RegressionGAM (ones(10,2), ones (10,1), "predictors", {'a','b','c'}) 419s ***** error ... 419s predict (RegressionGAM (ones(10,1), ones(10,1))) 419s ***** error ... 419s predict (RegressionGAM (ones(10,1), ones(10,1)), []) 419s ***** error ... 419s predict (RegressionGAM(ones(10,2), ones(10,1)), 2) 419s ***** error ... 419s predict (RegressionGAM(ones(10,2), ones(10,1)), ones (10,2), "some", "some") 419s ***** error ... 419s predict (RegressionGAM(ones(10,2), ones(10,1)), ones (10,2), "includeinteractions", "some") 419s ***** error ... 419s predict (RegressionGAM(ones(10,2), ones(10,1)), ones (10,2), "includeinteractions", 5) 419s ***** error ... 419s predict (RegressionGAM(ones(10,2), ones(10,1)), ones (10,2), "alpha", 5) 419s ***** error ... 419s predict (RegressionGAM(ones(10,2), ones(10,1)), ones (10,2), "alpha", -1) 419s ***** error ... 419s predict (RegressionGAM(ones(10,2), ones(10,1)), ones (10,2), "alpha", 'a') 419s 39 tests, 39 passed, 0 known failure, 0 skipped 419s [inst/adtest.m] 419s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/adtest.m 419s ***** error adtest (); 419s ***** error adtest (ones (20,2)); 419s ***** error adtest ([1+i,0-3i]); 419s ***** error ... 419s adtest (ones (20,1), "Distribution", "normal"); 419s ***** error ... 419s adtest (rand (20,1), "Distribution", {"normal", 5, 3}); 419s ***** error ... 419s adtest (rand (20,1), "Distribution", {"norm", 5}); 419s ***** error ... 419s adtest (rand (20,1), "Distribution", {"exp", 5, 4}); 419s ***** error ... 419s adtest (rand (20,1), "Distribution", {"ev", 5}); 419s ***** error ... 419s adtest (rand (20,1), "Distribution", {"logn", 5, 3, 2}); 419s ***** error ... 419s adtest (rand (20,1), "Distribution", {"Weibull", 5}); 419s ***** error ... 419s adtest (rand (20,1), "Distribution", 35); 419s ***** error ... 419s adtest (rand (20,1), "Name", "norm"); 419s ***** error ... 419s adtest (rand (20,1), "Name", {"norm", 75, 10}); 419s ***** error ... 419s adtest (rand (20,1), "Distribution", "norm", "Asymptotic", true); 419s ***** error ... 419s adtest (rand (20,1), "MCTol", 0.001, "Asymptotic", true); 419s ***** error ... 419s adtest (rand (20,1), "Distribution", {"norm", 5, 3}, "MCTol", 0.001, ... 419s "Asymptotic", true); 419s ***** error ... 419s [h, pval, ADstat, CV] = adtest (ones (20,1), "Distribution", {"norm",5,3},... 419s "Alpha", 0.000000001); 419s ***** error ... 419s [h, pval, ADstat, CV] = adtest (ones (20,1), "Distribution", {"norm",5,3},... 419s "Alpha", 0.999999999); 419s ***** error ... 419s adtest (10); 419s ***** warning ... 419s randn ("seed", 34); 419s adtest (ones (20,1), "Alpha", 0.000001); 419s ***** warning ... 419s randn ("seed", 34); 419s adtest (normrnd(0,1,100,1), "Alpha", 0.99999); 419s ***** warning ... 419s randn ("seed", 34); 419s adtest (normrnd(0,1,100,1), "Alpha", 0.00001); 419s ***** test 419s load examgrades 419s x = grades(:,1); 419s [h, pval, adstat, cv] = adtest (x); 419s assert (h, false); 419s assert (pval, 0.1854, 1e-4); 419s assert (adstat, 0.5194, 1e-4); 419s assert (cv, 0.7470, 1e-4); 419s ***** test 419s load examgrades 419s x = grades(:,1); 419s [h, pval, adstat, cv] = adtest (x, "Distribution", "ev"); 419s assert (h, false); 419s assert (pval, 0.071363, 1e-6); 419s ***** test 419s load examgrades 419s x = grades(:,1); 419s [h, pval, adstat, cv] = adtest (x, "Distribution", {"norm", 75, 10}); 419s assert (h, false); 419s assert (pval, 0.4687, 1e-4); 419s 25 tests, 25 passed, 0 known failure, 0 skipped 419s [inst/anova1.m] 419s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/anova1.m 419s ***** demo 419s x = meshgrid (1:6); 419s randn ("seed", 15); # for reproducibility 419s x = x + normrnd (0, 1, 6, 6); 419s anova1 (x, [], 'off'); 419s ***** demo 419s x = meshgrid (1:6); 419s randn ("seed", 15); # for reproducibility 419s x = x + normrnd (0, 1, 6, 6); 419s [p, atab] = anova1(x); 419s ***** demo 419s x = ones (50, 4) .* [-2, 0, 1, 5]; 419s randn ("seed", 13); # for reproducibility 419s x = x + normrnd (0, 2, 50, 4); 419s groups = {"A", "B", "C", "D"}; 419s anova1 (x, groups); 419s ***** demo 419s y = [54 87 45; 23 98 39; 45 64 51; 54 77 49; 45 89 50; 47 NaN 55]; 419s g = [1 2 3 ; 1 2 3 ; 1 2 3 ; 1 2 3 ; 1 2 3 ; 1 2 3 ]; 419s anova1 (y(:), g(:), "on", "unequal"); 419s ***** test 419s data = [1.006, 0.996, 0.998, 1.000, 0.992, 0.993, 1.002, 0.999, 0.994, 1.000, ... 419s 0.998, 1.006, 1.000, 1.002, 0.997, 0.998, 0.996, 1.000, 1.006, 0.988, ... 419s 0.991, 0.987, 0.997, 0.999, 0.995, 0.994, 1.000, 0.999, 0.996, 0.996, ... 419s 1.005, 1.002, 0.994, 1.000, 0.995, 0.994, 0.998, 0.996, 1.002, 0.996, ... 419s 0.998, 0.998, 0.982, 0.990, 1.002, 0.984, 0.996, 0.993, 0.980, 0.996, ... 419s 1.009, 1.013, 1.009, 0.997, 0.988, 1.002, 0.995, 0.998, 0.981, 0.996, ... 419s 0.990, 1.004, 0.996, 1.001, 0.998, 1.000, 1.018, 1.010, 0.996, 1.002, ... 419s 0.998, 1.000, 1.006, 1.000, 1.002, 0.996, 0.998, 0.996, 1.002, 1.006, ... 419s 1.002, 0.998, 0.996, 0.995, 0.996, 1.004, 1.004, 0.998, 0.999, 0.991, ... 419s 0.991, 0.995, 0.984, 0.994, 0.997, 0.997, 0.991, 0.998, 1.004, 0.997]; 419s group = [1:10] .* ones (10,10); 419s group = group(:); 419s [p, tbl] = anova1 (data, group, "off"); 419s assert (p, 0.022661, 1e-6); 419s assert (tbl{2,5}, 2.2969, 1e-4); 419s assert (tbl{2,3}, 9, 0); 419s assert (tbl{4,2}, 0.003903, 1e-6); 419s data = reshape (data, 10, 10); 419s [p, tbl, stats] = anova1 (data, [], "off"); 419s assert (p, 0.022661, 1e-6); 419s assert (tbl{2,5}, 2.2969, 1e-4); 419s assert (tbl{2,3}, 9, 0); 419s assert (tbl{4,2}, 0.003903, 1e-6); 419s means = [0.998, 0.9991, 0.9954, 0.9982, 0.9919, 0.9988, 1.0015, 1.0004, 0.9983, 0.9948]; 419s N = 10 * ones (1, 10); 419s assert (stats.means, means, 1e-6); 419s assert (length (stats.gnames), 10, 0); 419s assert (stats.n, N, 0); 419s ***** test 419s y = [54 87 45; 23 98 39; 45 64 51; 54 77 49; 45 89 50; 47 NaN 55]; 419s g = [1 2 3 ; 1 2 3 ; 1 2 3 ; 1 2 3 ; 1 2 3 ; 1 2 3 ]; 419s [p, tbl] = anova1 (y(:), g(:), "off", "equal"); 419s assert (p, 0.00004163, 1e-6); 419s assert (tbl{2,5}, 22.573418, 1e-6); 419s assert (tbl{2,3}, 2, 0); 419s assert (tbl{3,3}, 14, 0); 419s [p, tbl] = anova1 (y(:), g(:), "off", "unequal"); 419s assert (p, 0.00208877, 1e-8); 419s assert (tbl{2,5}, 15.523192, 1e-6); 419s assert (tbl{2,3}, 2, 0); 419s assert (tbl{2,4}, 7.5786897, 1e-6); 419s 2 tests, 2 passed, 0 known failure, 0 skipped 419s [inst/anova2.m] 419s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/anova2.m 419s ***** demo 419s 419s # Factorial (Crossed) Two-way ANOVA with Interaction 419s 419s popcorn = [5.5, 4.5, 3.5; 5.5, 4.5, 4.0; 6.0, 4.0, 3.0; ... 419s 6.5, 5.0, 4.0; 7.0, 5.5, 5.0; 7.0, 5.0, 4.5]; 419s 419s [p, atab, stats] = anova2(popcorn, 3, "on"); 419s ***** demo 419s 419s # One-way Repeated Measures ANOVA (Rows are a crossed random factor) 419s 419s data = [54, 43, 78, 111; 419s 23, 34, 37, 41; 419s 45, 65, 99, 78; 419s 31, 33, 36, 35; 419s 15, 25, 30, 26]; 419s 419s [p, atab, stats] = anova2 (data, 1, "on", "linear"); 419s ***** demo 419s 419s # Balanced Nested One-way ANOVA (Rows are a nested random factor) 419s 419s data = [4.5924 7.3809 21.322; -0.5488 9.2085 25.0426; ... 419s 6.1605 13.1147 22.66; 2.3374 15.2654 24.1283; ... 419s 5.1873 12.4188 16.5927; 3.3579 14.3951 10.2129; ... 419s 6.3092 8.5986 9.8934; 3.2831 3.4945 10.0203]; 419s 419s [p, atab, stats] = anova2 (data, 4, "on", "nested"); 419s ***** test 419s ## Test for anova2 ("interaction") 419s ## comparison with results from Matlab for column effect 419s popcorn = [5.5, 4.5, 3.5; 5.5, 4.5, 4.0; 6.0, 4.0, 3.0; ... 419s 6.5, 5.0, 4.0; 7.0, 5.5, 5.0; 7.0, 5.0, 4.5]; 419s [p, atab, stats] = anova2 (popcorn, 3, "off"); 419s assert (p(1), 7.678957383294716e-07, 1e-14); 419s assert (p(2), 0.0001003738963050171, 1e-14); 419s assert (p(3), 0.7462153966366274, 1e-14); 419s assert (atab{2,5}, 56.700, 1e-14); 419s assert (atab{2,3}, 2, 0); 419s assert (atab{4,2}, 0.08333333333333348, 1e-14); 419s assert (atab{5,4}, 0.1388888888888889, 1e-14); 419s assert (atab{5,2}, 1.666666666666667, 1e-14); 419s assert (atab{6,2}, 22); 419s assert (stats.source, "anova2"); 419s assert (stats.colmeans, [6.25, 4.75, 4]); 419s assert (stats.inter, 1, 0); 419s assert (stats.pval, 0.7462153966366274, 1e-14); 419s assert (stats.df, 12); 419s ***** test 419s ## Test for anova2 ("linear") - comparison with results from GraphPad Prism 8 419s data = [54, 43, 78, 111; 419s 23, 34, 37, 41; 419s 45, 65, 99, 78; 419s 31, 33, 36, 35; 419s 15, 25, 30, 26]; 419s [p, atab, stats] = anova2 (data, 1, "off", "linear"); 419s assert (atab{2,2}, 2174.95, 1e-10); 419s assert (atab{3,2}, 8371.7, 1e-10); 419s assert (atab{4,2}, 2404.3, 1e-10); 419s assert (atab{5,2}, 12950.95, 1e-10); 419s assert (atab{2,4}, 724.983333333333, 1e-10); 419s assert (atab{3,4}, 2092.925, 1e-10); 419s assert (atab{4,4}, 200.358333333333, 1e-10); 419s assert (atab{2,5}, 3.61843363972882, 1e-10); 419s assert (atab{3,5}, 10.445909412303, 1e-10); 419s assert (atab{2,6}, 0.087266112738617, 1e-10); 419s assert (atab{3,6}, 0.000698397753556, 1e-10); 419s ***** test 419s ## Test for anova2 ("nested") - comparison with results from GraphPad Prism 8 419s data = [4.5924 7.3809 21.322; -0.5488 9.2085 25.0426; ... 419s 6.1605 13.1147 22.66; 2.3374 15.2654 24.1283; ... 419s 5.1873 12.4188 16.5927; 3.3579 14.3951 10.2129; ... 419s 6.3092 8.5986 9.8934; 3.2831 3.4945 10.0203]; 419s [p, atab, stats] = anova2 (data, 4, "off", "nested"); 419s assert (atab{2,2}, 745.360306290833, 1e-10); 419s assert (atab{3,2}, 278.01854140125, 1e-10); 419s assert (atab{4,2}, 180.180377467501, 1e-10); 419s assert (atab{5,2}, 1203.55922515958, 1e-10); 419s assert (atab{2,4}, 372.680153145417, 1e-10); 419s assert (atab{3,4}, 92.67284713375, 1e-10); 419s assert (atab{4,4}, 10.0100209704167, 1e-10); 419s assert (atab{2,5}, 4.02146005730833, 1e-10); 419s assert (atab{3,5}, 9.25800729165627, 1e-10); 419s assert (atab{2,6}, 0.141597630656771, 1e-10); 419s assert (atab{3,6}, 0.000636643812875719, 1e-10); 419s 3 tests, 3 passed, 0 known failure, 0 skipped 419s [inst/anovan.m] 420s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/anovan.m 420s ***** demo 420s 420s # Two-sample unpaired test on independent samples (equivalent to Student's 420s # t-test). Note that the absolute value of t-statistic can be obtained by 420s # taking the square root of the reported F statistic. In this example, 420s # t = sqrt (1.44) = 1.20. 420s 420s score = [54 23 45 54 45 43 34 65 77 46 65]'; 420s gender = {"male" "male" "male" "male" "male" "female" "female" "female" ... 420s "female" "female" "female"}'; 420s 420s [P, ATAB, STATS] = anovan (score, gender, "display", "on", "varnames", "gender"); 420s ***** demo 420s 420s # Two-sample paired test on dependent or matched samples equivalent to a 420s # paired t-test. As for the first example, the t-statistic can be obtained by 420s # taking the square root of the reported F statistic. Note that the interaction 420s # between treatment x subject was dropped from the full model by assigning 420s # subject as a random factor ('). 420s 420s score = [4.5 5.6; 3.7 6.4; 5.3 6.4; 5.4 6.0; 3.9 5.7]'; 420s treatment = {"before" "after"; "before" "after"; "before" "after"; 420s "before" "after"; "before" "after"}'; 420s subject = {"GS" "GS"; "JM" "JM"; "HM" "HM"; "JW" "JW"; "PS" "PS"}'; 420s 420s [P, ATAB, STATS] = anovan (score(:), {treatment(:), subject(:)}, ... 420s "model", "full", "random", 2, "sstype", 2, ... 420s "varnames", {"treatment", "subject"}, ... 420s "display", "on"); 420s ***** demo 420s 420s # One-way ANOVA on the data from a study on the strength of structural beams, 420s # in Hogg and Ledolter (1987) Engineering Statistics. New York: MacMillan 420s 420s strength = [82 86 79 83 84 85 86 87 74 82 ... 420s 78 75 76 77 79 79 77 78 82 79]'; 420s alloy = {"st","st","st","st","st","st","st","st", ... 420s "al1","al1","al1","al1","al1","al1", ... 420s "al2","al2","al2","al2","al2","al2"}'; 420s 420s [P, ATAB, STATS] = anovan (strength, alloy, "display", "on", ... 420s "varnames", "alloy"); 420s ***** demo 420s 420s # One-way repeated measures ANOVA on the data from a study on the number of 420s # words recalled by 10 subjects for three time conditions, in Loftus & Masson 420s # (1994) Psychon Bull Rev. 1(4):476-490, Table 2. Note that the interaction 420s # between seconds x subject was dropped from the full model by assigning 420s # subject as a random factor ('). 420s 420s words = [10 13 13; 6 8 8; 11 14 14; 22 23 25; 16 18 20; ... 420s 15 17 17; 1 1 4; 12 15 17; 9 12 12; 8 9 12]; 420s seconds = [1 2 5; 1 2 5; 1 2 5; 1 2 5; 1 2 5; ... 420s 1 2 5; 1 2 5; 1 2 5; 1 2 5; 1 2 5;]; 420s subject = [ 1 1 1; 2 2 2; 3 3 3; 4 4 4; 5 5 5; ... 420s 6 6 6; 7 7 7; 8 8 8; 9 9 9; 10 10 10]; 420s 420s [P, ATAB, STATS] = anovan (words(:), {seconds(:), subject(:)}, ... 420s "model", "full", "random", 2, "sstype", 2, ... 420s "display", "on", "varnames", {"seconds", "subject"}); 420s ***** demo 420s 420s # Balanced two-way ANOVA with interaction on the data from a study of popcorn 420s # brands and popper types, in Hogg and Ledolter (1987) Engineering Statistics. 420s # New York: MacMillan 420s 420s popcorn = [5.5, 4.5, 3.5; 5.5, 4.5, 4.0; 6.0, 4.0, 3.0; ... 420s 6.5, 5.0, 4.0; 7.0, 5.5, 5.0; 7.0, 5.0, 4.5]; 420s brands = {"Gourmet", "National", "Generic"; ... 420s "Gourmet", "National", "Generic"; ... 420s "Gourmet", "National", "Generic"; ... 420s "Gourmet", "National", "Generic"; ... 420s "Gourmet", "National", "Generic"; ... 420s "Gourmet", "National", "Generic"}; 420s popper = {"oil", "oil", "oil"; "oil", "oil", "oil"; "oil", "oil", "oil"; ... 420s "air", "air", "air"; "air", "air", "air"; "air", "air", "air"}; 420s 420s [P, ATAB, STATS] = anovan (popcorn(:), {brands(:), popper(:)}, ... 420s "display", "on", "model", "full", ... 420s "varnames", {"brands", "popper"}); 420s ***** demo 420s 420s # Unbalanced two-way ANOVA (2x2) on the data from a study on the effects of 420s # gender and having a college degree on salaries of company employees, 420s # in Maxwell, Delaney and Kelly (2018): Chapter 7, Table 15 420s 420s salary = [24 26 25 24 27 24 27 23 15 17 20 16, ... 420s 25 29 27 19 18 21 20 21 22 19]'; 420s gender = {"f" "f" "f" "f" "f" "f" "f" "f" "f" "f" "f" "f"... 420s "m" "m" "m" "m" "m" "m" "m" "m" "m" "m"}'; 420s degree = [1 1 1 1 1 1 1 1 0 0 0 0 1 1 1 0 0 0 0 0 0 0]'; 420s 420s [P, ATAB, STATS] = anovan (salary, {gender, degree}, "model", "full", ... 420s "sstype", 3, "display", "on", "varnames", ... 420s {"gender", "degree"}); 420s ***** demo 420s 420s # Unbalanced two-way ANOVA (3x2) on the data from a study of the effect of 420s # adding sugar and/or milk on the tendency of coffee to make people babble, 420s # in from Navarro (2019): 16.10 420s 420s sugar = {"real" "fake" "fake" "real" "real" "real" "none" "none" "none" ... 420s "fake" "fake" "fake" "real" "real" "real" "none" "none" "fake"}'; 420s milk = {"yes" "no" "no" "yes" "yes" "no" "yes" "yes" "yes" ... 420s "no" "no" "yes" "no" "no" "no" "no" "no" "yes"}'; 420s babble = [4.6 4.4 3.9 5.6 5.1 5.5 3.9 3.5 3.7... 420s 5.6 4.7 5.9 6.0 5.4 6.6 5.8 5.3 5.7]'; 420s 420s [P, ATAB, STATS] = anovan (babble, {sugar, milk}, "model", "full", ... 420s "sstype", 3, "display", "on", ... 420s "varnames", {"sugar", "milk"}); 420s ***** demo 420s 420s # Unbalanced three-way ANOVA (3x2x2) on the data from a study of the effects 420s # of three different drugs, biofeedback and diet on patient blood pressure, 420s # adapted* from Maxwell, Delaney and Kelly (2018): Chapter 8, Table 12 420s # * Missing values introduced to make the sample sizes unequal to test the 420s # calculation of different types of sums-of-squares 420s 420s drug = {"X" "X" "X" "X" "X" "X" "X" "X" "X" "X" "X" "X" ... 420s "X" "X" "X" "X" "X" "X" "X" "X" "X" "X" "X" "X"; 420s "Y" "Y" "Y" "Y" "Y" "Y" "Y" "Y" "Y" "Y" "Y" "Y" ... 420s "Y" "Y" "Y" "Y" "Y" "Y" "Y" "Y" "Y" "Y" "Y" "Y"; 420s "Z" "Z" "Z" "Z" "Z" "Z" "Z" "Z" "Z" "Z" "Z" "Z" ... 420s "Z" "Z" "Z" "Z" "Z" "Z" "Z" "Z" "Z" "Z" "Z" "Z"}; 420s feedback = [1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0; 420s 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0; 420s 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0]; 420s diet = [0 0 0 0 0 0 1 1 1 1 1 1 0 0 0 0 0 0 1 1 1 1 1 1; 420s 0 0 0 0 0 0 1 1 1 1 1 1 0 0 0 0 0 0 1 1 1 1 1 1; 420s 0 0 0 0 0 0 1 1 1 1 1 1 0 0 0 0 0 0 1 1 1 1 1 1]; 420s BP = [170 175 165 180 160 158 161 173 157 152 181 190 ... 420s 173 194 197 190 176 198 164 190 169 164 176 175; 420s 186 194 201 215 219 209 164 166 159 182 187 174 ... 420s 189 194 217 206 199 195 171 173 196 199 180 NaN; 420s 180 187 199 170 204 194 162 184 183 156 180 173 ... 420s 202 228 190 206 224 204 205 199 170 160 NaN NaN]; 420s 420s [P, ATAB, STATS] = anovan (BP(:), {drug(:), feedback(:), diet(:)}, ... 420s "model", "full", "sstype", 3, ... 420s "display", "on", ... 420s "varnames", {"drug", "feedback", "diet"}); 420s ***** demo 420s 420s # Balanced three-way ANOVA (2x2x2) with one of the factors being a blocking 420s # factor. The data is from a randomized block design study on the effects 420s # of antioxidant treatment on glutathione-S-transferase (GST) levels in 420s # different mouse strains, from Festing (2014), ILAR Journal, 55(3):427-476. 420s # Note that all interactions involving block were dropped from the full model 420s # by assigning block as a random factor ('). 420s 420s measurement = [444 614 423 625 408 856 447 719 ... 420s 764 831 586 782 609 1002 606 766]'; 420s strain= {"NIH","NIH","BALB/C","BALB/C","A/J","A/J","129/Ola","129/Ola", ... 420s "NIH","NIH","BALB/C","BALB/C","A/J","A/J","129/Ola","129/Ola"}'; 420s treatment={"C" "T" "C" "T" "C" "T" "C" "T" "C" "T" "C" "T" "C" "T" "C" "T"}'; 420s block = [1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2]'; 420s 420s [P, ATAB, STATS] = anovan (measurement/10, {strain, treatment, block}, ... 420s "sstype", 2, "model", "full", "random", 3, ... 420s "display", "on", ... 420s "varnames", {"strain", "treatment", "block"}); 420s ***** demo 420s 420s # One-way ANCOVA on data from a study of the additive effects of species 420s # and temperature on chirpy pulses of crickets, from Stitch, The Worst Stats 420s # Text eveR 420s 420s pulse = [67.9 65.1 77.3 78.7 79.4 80.4 85.8 86.6 87.5 89.1 ... 420s 98.6 100.8 99.3 101.7 44.3 47.2 47.6 49.6 50.3 51.8 ... 420s 60 58.5 58.9 60.7 69.8 70.9 76.2 76.1 77 77.7 84.7]'; 420s temp = [20.8 20.8 24 24 24 24 26.2 26.2 26.2 26.2 28.4 ... 420s 29 30.4 30.4 17.2 18.3 18.3 18.3 18.9 18.9 20.4 ... 420s 21 21 22.1 23.5 24.2 25.9 26.5 26.5 26.5 28.6]'; 420s species = {"ex" "ex" "ex" "ex" "ex" "ex" "ex" "ex" "ex" "ex" "ex" ... 420s "ex" "ex" "ex" "niv" "niv" "niv" "niv" "niv" "niv" "niv" ... 420s "niv" "niv" "niv" "niv" "niv" "niv" "niv" "niv" "niv" "niv"}; 420s 420s [P, ATAB, STATS] = anovan (pulse, {species, temp}, "model", "linear", ... 420s "continuous", 2, "sstype", "h", "display", "on", ... 420s "varnames", {"species", "temp"}); 420s ***** demo 420s 420s # Factorial ANCOVA on data from a study of the effects of treatment and 420s # exercise on stress reduction score after adjusting for age. Data from R 420s # datarium package). 420s 420s score = [95.6 82.2 97.2 96.4 81.4 83.6 89.4 83.8 83.3 85.7 ... 420s 97.2 78.2 78.9 91.8 86.9 84.1 88.6 89.8 87.3 85.4 ... 420s 81.8 65.8 68.1 70.0 69.9 75.1 72.3 70.9 71.5 72.5 ... 420s 84.9 96.1 94.6 82.5 90.7 87.0 86.8 93.3 87.6 92.4 ... 420s 100. 80.5 92.9 84.0 88.4 91.1 85.7 91.3 92.3 87.9 ... 420s 91.7 88.6 75.8 75.7 75.3 82.4 80.1 86.0 81.8 82.5]'; 420s treatment = {"yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" ... 420s "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" ... 420s "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" ... 420s "no" "no" "no" "no" "no" "no" "no" "no" "no" "no" ... 420s "no" "no" "no" "no" "no" "no" "no" "no" "no" "no" ... 420s "no" "no" "no" "no" "no" "no" "no" "no" "no" "no"}'; 420s exercise = {"lo" "lo" "lo" "lo" "lo" "lo" "lo" "lo" "lo" "lo" ... 420s "mid" "mid" "mid" "mid" "mid" "mid" "mid" "mid" "mid" "mid" ... 420s "hi" "hi" "hi" "hi" "hi" "hi" "hi" "hi" "hi" "hi" ... 420s "lo" "lo" "lo" "lo" "lo" "lo" "lo" "lo" "lo" "lo" ... 420s "mid" "mid" "mid" "mid" "mid" "mid" "mid" "mid" "mid" "mid" ... 420s "hi" "hi" "hi" "hi" "hi" "hi" "hi" "hi" "hi" "hi"}'; 420s age = [59 65 70 66 61 65 57 61 58 55 62 61 60 59 55 57 60 63 62 57 ... 420s 58 56 57 59 59 60 55 53 55 58 68 62 61 54 59 63 60 67 60 67 ... 420s 75 54 57 62 65 60 58 61 65 57 56 58 58 58 52 53 60 62 61 61]'; 420s 420s [P, ATAB, STATS] = anovan (score, {treatment, exercise, age}, ... 420s "model", [1 0 0; 0 1 0; 0 0 1; 1 1 0], ... 420s "continuous", 3, "sstype", "h", "display", "on", ... 420s "varnames", {"treatment", "exercise", "age"}); 420s ***** demo 420s 420s # Unbalanced one-way ANOVA with custom, orthogonal contrasts. The statistics 420s # relating to the contrasts are shown in the table of model parameters, and 420s # can be retrieved from the STATS.coeffs output. 420s 420s dv = [ 8.706 10.362 11.552 6.941 10.983 10.092 6.421 14.943 15.931 ... 420s 22.968 18.590 16.567 15.944 21.637 14.492 17.965 18.851 22.891 ... 420s 22.028 16.884 17.252 18.325 25.435 19.141 21.238 22.196 18.038 ... 420s 22.628 31.163 26.053 24.419 32.145 28.966 30.207 29.142 33.212 ... 420s 25.694 ]'; 420s g = [1 1 1 1 1 1 1 1 2 2 2 2 2 3 3 3 3 3 3 3 3 ... 420s 4 4 4 4 4 4 4 5 5 5 5 5 5 5 5 5]'; 420s C = [ 0.4001601 0.3333333 0.5 0.0 420s 0.4001601 0.3333333 -0.5 0.0 420s 0.4001601 -0.6666667 0.0 0.0 420s -0.6002401 0.0000000 0.0 0.5 420s -0.6002401 0.0000000 0.0 -0.5]; 420s 420s [P,ATAB, STATS] = anovan (dv, g, "contrasts", C, "varnames", "score", ... 420s "alpha", 0.05, "display", "on"); 420s ***** demo 420s 420s # One-way ANOVA with the linear model fit by weighted least squares to 420s # account for heteroskedasticity. In this example, the variance appears 420s # proportional to the outcome, so weights have been estimated by initially 420s # fitting the model without weights and regressing the absolute residuals on 420s # the fitted values. Although this data could have been analysed by Welch's 420s # ANOVA test, the approach here can generalize to ANOVA models with more than 420s # one factor. 420s 420s g = [1, 1, 1, 1, 1, 1, 1, 1, ... 420s 2, 2, 2, 2, 2, 2, 2, 2, ... 420s 3, 3, 3, 3, 3, 3, 3, 3]'; 420s y = [13, 16, 16, 7, 11, 5, 1, 9, ... 420s 10, 25, 66, 43, 47, 56, 6, 39, ... 420s 11, 39, 26, 35, 25, 14, 24, 17]'; 420s 420s [P,ATAB,STATS] = anovan(y, g, "display", "off"); 420s fitted = STATS.X * STATS.coeffs(:,1); # fitted values 420s b = polyfit (fitted, abs (STATS.resid), 1); 420s v = polyval (b, fitted); # Variance as a function of the fitted values 420s figure("Name", "Regression of the absolute residuals on the fitted values"); 420s plot (fitted, abs (STATS.resid),'ob');hold on; plot(fitted,v,'-r'); hold off; 420s xlabel("Fitted values"); ylabel("Absolute residuals"); 420s 420s [P,ATAB,STATS] = anovan (y, g, "weights", v.^-1); 420s ***** test 420s score = [54 23 45 54 45 43 34 65 77 46 65]'; 420s gender = {'male' 'male' 'male' 'male' 'male' 'female' 'female' 'female' ... 420s 'female' 'female' 'female'}'; 420s 420s [P, T, STATS] = anovan (score,gender,'display','off'); 420s assert (P(1), 0.2612876773271042, 1e-09); # compared to p calculated by MATLAB anovan 420s assert (sqrt(T{2,6}), abs(1.198608733288208), 1e-09); # compared to abs(t) calculated from sqrt(F) by MATLAB anovan 420s assert (P(1), 0.2612876773271047, 1e-09); # compared to p calculated by MATLAB ttest2 420s assert (sqrt(T{2,6}), abs(-1.198608733288208), 1e-09); # compared to abs(t) calculated by MATLAB ttest2 420s ***** test 420s score = [4.5 5.6; 3.7 6.4; 5.3 6.4; 5.4 6.0; 3.9 5.7]'; 420s treatment = {'before' 'after'; 'before' 'after'; 'before' 'after'; 420s 'before' 'after'; 'before' 'after'}'; 420s subject = {'GS' 'GS'; 'JM' 'JM'; 'HM' 'HM'; 'JW' 'JW'; 'PS' 'PS'}'; 420s 420s [P, ATAB, STATS] = anovan (score(:),{treatment(:),subject(:)},'display','off','sstype',2); 420s assert (P(1), 0.016004356735364, 1e-09); # compared to p calculated by MATLAB anovan 420s assert (sqrt(ATAB{2,6}), abs(4.00941576558195), 1e-09); # compared to abs(t) calculated from sqrt(F) by MATLAB anovan 420s assert (P(1), 0.016004356735364, 1e-09); # compared to p calculated by MATLAB ttest2 420s assert (sqrt(ATAB{2,6}), abs(-4.00941576558195), 1e-09); # compared to abs(t) calculated by MATLAB ttest2 420s ***** test 420s strength = [82 86 79 83 84 85 86 87 74 82 ... 420s 78 75 76 77 79 79 77 78 82 79]'; 420s alloy = {'st','st','st','st','st','st','st','st', ... 420s 'al1','al1','al1','al1','al1','al1', ... 420s 'al2','al2','al2','al2','al2','al2'}'; 420s 420s [P, ATAB, STATS] = anovan (strength,{alloy},'display','off'); 420s assert (P(1), 0.000152643638830491, 1e-09); 420s assert (ATAB{2,6}, 15.4, 1e-09); 420s ***** test 420s words = [10 13 13; 6 8 8; 11 14 14; 22 23 25; 16 18 20; ... 420s 15 17 17; 1 1 4; 12 15 17; 9 12 12; 8 9 12]; 420s subject = [ 1 1 1; 2 2 2; 3 3 3; 4 4 4; 5 5 5; ... 420s 6 6 6; 7 7 7; 8 8 8; 9 9 9; 10 10 10]; 420s seconds = [1 2 5; 1 2 5; 1 2 5; 1 2 5; 1 2 5; ... 420s 1 2 5; 1 2 5; 1 2 5; 1 2 5; 1 2 5;]; 420s 420s [P, ATAB, STATS] = anovan (words(:),{seconds(:),subject(:)},'model','full','random',2,'sstype',2,'display','off'); 420s assert (P(1), 1.51865926758752e-07, 1e-09); 420s assert (ATAB{2,2}, 52.2666666666667, 1e-09); 420s assert (ATAB{3,2}, 942.533333333333, 1e-09); 420s assert (ATAB{4,2}, 11.0666666666667, 1e-09); 420s ***** test 420s popcorn = [5.5, 4.5, 3.5; 5.5, 4.5, 4.0; 6.0, 4.0, 3.0; ... 420s 6.5, 5.0, 4.0; 7.0, 5.5, 5.0; 7.0, 5.0, 4.5]; 420s brands = {'Gourmet', 'National', 'Generic'; ... 420s 'Gourmet', 'National', 'Generic'; ... 420s 'Gourmet', 'National', 'Generic'; ... 420s 'Gourmet', 'National', 'Generic'; ... 420s 'Gourmet', 'National', 'Generic'; ... 420s 'Gourmet', 'National', 'Generic'}; 420s popper = {'oil', 'oil', 'oil'; 'oil', 'oil', 'oil'; 'oil', 'oil', 'oil'; ... 420s 'air', 'air', 'air'; 'air', 'air', 'air'; 'air', 'air', 'air'}; 420s 420s [P, ATAB, STATS] = anovan (popcorn(:),{brands(:),popper(:)},'display','off','model','full'); 420s assert (P(1), 7.67895738278171e-07, 1e-09); 420s assert (P(2), 0.000100373896304998, 1e-09); 420s assert (P(3), 0.746215396636649, 1e-09); 420s assert (ATAB{2,6}, 56.7, 1e-09); 420s assert (ATAB{3,6}, 32.4, 1e-09); 420s assert (ATAB{4,6}, 0.29999999999997, 1e-09); 420s ***** test 420s salary = [24 26 25 24 27 24 27 23 15 17 20 16, ... 420s 25 29 27 19 18 21 20 21 22 19]'; 420s gender = {'f' 'f' 'f' 'f' 'f' 'f' 'f' 'f' 'f' 'f' 'f' 'f'... 420s 'm' 'm' 'm' 'm' 'm' 'm' 'm' 'm' 'm' 'm'}'; 420s degree = [1 1 1 1 1 1 1 1 0 0 0 0 1 1 1 0 0 0 0 0 0 0]'; 420s 420s [P, ATAB, STATS] = anovan (salary,{gender,degree},'model','full','sstype',1,'display','off'); 420s assert (P(1), 0.747462549227232, 1e-09); 420s assert (P(2), 1.03809316857694e-08, 1e-09); 420s assert (P(3), 0.523689833702691, 1e-09); 420s assert (ATAB{2,2}, 0.296969696969699, 1e-09); 420s assert (ATAB{3,2}, 272.391841491841, 1e-09); 420s assert (ATAB{4,2}, 1.17482517482512, 1e-09); 420s assert (ATAB{5,2}, 50.0000000000001, 1e-09); 420s [P, ATAB, STATS] = anovan (salary,{degree,gender},'model','full','sstype',1,'display','off'); 420s assert (P(1), 2.53445097305047e-08, 1e-09); 420s assert (P(2), 0.00388133678528749, 1e-09); 420s assert (P(3), 0.523689833702671, 1e-09); 420s assert (ATAB{2,2}, 242.227272727273, 1e-09); 420s assert (ATAB{3,2}, 30.4615384615384, 1e-09); 420s assert (ATAB{4,2}, 1.17482517482523, 1e-09); 420s assert (ATAB{5,2}, 50.0000000000001, 1e-09); 420s [P, ATAB, STATS] = anovan (salary,{gender,degree},'model','full','sstype',2,'display','off'); 420s assert (P(1), 0.00388133678528743, 1e-09); 420s assert (P(2), 1.03809316857694e-08, 1e-09); 420s assert (P(3), 0.523689833702691, 1e-09); 420s assert (ATAB{2,2}, 30.4615384615385, 1e-09); 420s assert (ATAB{3,2}, 272.391841491841, 1e-09); 420s assert (ATAB{4,2}, 1.17482517482512, 1e-09); 420s assert (ATAB{5,2}, 50.0000000000001, 1e-09); 420s [P, ATAB, STATS] = anovan (salary,{gender,degree},'model','full','sstype',3,'display','off'); 420s assert (P(1), 0.00442898146583742, 1e-09); 420s assert (P(2), 1.30634252053587e-08, 1e-09); 420s assert (P(3), 0.523689833702691, 1e-09); 420s assert (ATAB{2,2}, 29.3706293706294, 1e-09); 420s assert (ATAB{3,2}, 264.335664335664, 1e-09); 420s assert (ATAB{4,2}, 1.17482517482512, 1e-09); 420s assert (ATAB{5,2}, 50.0000000000001, 1e-09); 420s ***** test 420s sugar = {'real' 'fake' 'fake' 'real' 'real' 'real' 'none' 'none' 'none' ... 420s 'fake' 'fake' 'fake' 'real' 'real' 'real' 'none' 'none' 'fake'}'; 420s milk = {'yes' 'no' 'no' 'yes' 'yes' 'no' 'yes' 'yes' 'yes' ... 420s 'no' 'no' 'yes' 'no' 'no' 'no' 'no' 'no' 'yes'}'; 420s babble = [4.6 4.4 3.9 5.6 5.1 5.5 3.9 3.5 3.7... 420s 5.6 4.7 5.9 6.0 5.4 6.6 5.8 5.3 5.7]'; 420s 420s [P, ATAB, STATS] = anovan (babble,{sugar,milk},'model','full','sstype',1,'display','off'); 420s assert (P(1), 0.0108632139833963, 1e-09); 420s assert (P(2), 0.0810606976703546, 1e-09); 420s assert (P(3), 0.00175433329935627, 1e-09); 420s assert (ATAB{2,2}, 3.55752380952381, 1e-09); 420s assert (ATAB{3,2}, 0.956108477471702, 1e-09); 420s assert (ATAB{4,2}, 5.94386771300448, 1e-09); 420s assert (ATAB{5,2}, 3.1625, 1e-09); 420s [P, ATAB, STATS] = anovan (babble,{milk,sugar},'model','full','sstype',1,'display','off'); 420s assert (P(1), 0.0373333189297505, 1e-09); 420s assert (P(2), 0.017075098787169, 1e-09); 420s assert (P(3), 0.00175433329935627, 1e-09); 420s assert (ATAB{2,2}, 1.444, 1e-09); 420s assert (ATAB{3,2}, 3.06963228699552, 1e-09); 420s assert (ATAB{4,2}, 5.94386771300448, 1e-09); 420s assert (ATAB{5,2}, 3.1625, 1e-09); 420s [P, ATAB, STATS] = anovan (babble,{sugar,milk},'model','full','sstype',2,'display','off'); 420s assert (P(1), 0.017075098787169, 1e-09); 420s assert (P(2), 0.0810606976703546, 1e-09); 420s assert (P(3), 0.00175433329935627, 1e-09); 420s assert (ATAB{2,2}, 3.06963228699552, 1e-09); 420s assert (ATAB{3,2}, 0.956108477471702, 1e-09); 420s assert (ATAB{4,2}, 5.94386771300448, 1e-09); 420s assert (ATAB{5,2}, 3.1625, 1e-09); 420s [P, ATAB, STATS] = anovan (babble,{sugar,milk},'model','full','sstype',3,'display','off'); 420s assert (P(1), 0.0454263063473954, 1e-09); 420s assert (P(2), 0.0746719907091438, 1e-09); 420s assert (P(3), 0.00175433329935627, 1e-09); 420s assert (ATAB{2,2}, 2.13184977578476, 1e-09); 420s assert (ATAB{3,2}, 1.00413461538462, 1e-09); 420s assert (ATAB{4,2}, 5.94386771300448, 1e-09); 420s assert (ATAB{5,2}, 3.1625, 1e-09); 420s ***** test 420s drug = {'X' 'X' 'X' 'X' 'X' 'X' 'X' 'X' 'X' 'X' 'X' 'X' ... 420s 'X' 'X' 'X' 'X' 'X' 'X' 'X' 'X' 'X' 'X' 'X' 'X'; 420s 'Y' 'Y' 'Y' 'Y' 'Y' 'Y' 'Y' 'Y' 'Y' 'Y' 'Y' 'Y' ... 420s 'Y' 'Y' 'Y' 'Y' 'Y' 'Y' 'Y' 'Y' 'Y' 'Y' 'Y' 'Y'; 420s 'Z' 'Z' 'Z' 'Z' 'Z' 'Z' 'Z' 'Z' 'Z' 'Z' 'Z' 'Z' ... 420s 'Z' 'Z' 'Z' 'Z' 'Z' 'Z' 'Z' 'Z' 'Z' 'Z' 'Z' 'Z'}; 420s feedback = [1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0; 420s 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0; 420s 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0]; 420s diet = [0 0 0 0 0 0 1 1 1 1 1 1 0 0 0 0 0 0 1 1 1 1 1 1; 420s 0 0 0 0 0 0 1 1 1 1 1 1 0 0 0 0 0 0 1 1 1 1 1 1; 420s 0 0 0 0 0 0 1 1 1 1 1 1 0 0 0 0 0 0 1 1 1 1 1 1]; 420s BP = [170 175 165 180 160 158 161 173 157 152 181 190 ... 420s 173 194 197 190 176 198 164 190 169 164 176 175; 420s 186 194 201 215 219 209 164 166 159 182 187 174 ... 420s 189 194 217 206 199 195 171 173 196 199 180 NaN; 420s 180 187 199 170 204 194 162 184 183 156 180 173 ... 420s 202 228 190 206 224 204 205 199 170 160 NaN NaN]; 420s 420s [P, ATAB, STATS] = anovan (BP(:),{drug(:),feedback(:),diet(:)},'model','full','sstype', 1,'display','off'); 420s assert (P(1), 7.02561843825325e-05, 1e-09); 420s assert (P(2), 0.000425806013389362, 1e-09); 420s assert (P(3), 6.16780773446401e-07, 1e-09); 420s assert (P(4), 0.261347622678438, 1e-09); 420s assert (P(5), 0.0542278432357043, 1e-09); 420s assert (P(6), 0.590353225626655, 1e-09); 420s assert (P(7), 0.0861628249564267, 1e-09); 420s assert (ATAB{2,2}, 3614.70355731226, 1e-09); 420s assert (ATAB{3,2}, 2227.46639771024, 1e-09); 420s assert (ATAB{4,2}, 5008.25614451819, 1e-09); 420s assert (ATAB{5,2}, 437.066007908781, 1e-09); 420s assert (ATAB{6,2}, 976.180770397332, 1e-09); 420s assert (ATAB{7,2}, 46.616653365254, 1e-09); 420s assert (ATAB{8,2}, 814.345251396648, 1e-09); 420s assert (ATAB{9,2}, 9065.8, 1e-09); 420s [P, ATAB, STATS] = anovan (BP(:),{drug(:),feedback(:),diet(:)},'model','full','sstype',2,'display','off'); 420s assert (P(1), 9.4879638470754e-05, 1e-09); 420s assert (P(2), 0.00124177666315809, 1e-09); 420s assert (P(3), 6.86162012732911e-07, 1e-09); 420s assert (P(4), 0.260856132341256, 1e-09); 420s assert (P(5), 0.0523758623892078, 1e-09); 420s assert (P(6), 0.590353225626655, 1e-09); 420s assert (P(7), 0.0861628249564267, 1e-09); 420s assert (ATAB{2,2}, 3481.72176560122, 1e-09); 420s assert (ATAB{3,2}, 1837.08812970469, 1e-09); 420s assert (ATAB{4,2}, 4957.20277938622, 1e-09); 420s assert (ATAB{5,2}, 437.693674777847, 1e-09); 420s assert (ATAB{6,2}, 988.431929811402, 1e-09); 420s assert (ATAB{7,2}, 46.616653365254, 1e-09); 420s assert (ATAB{8,2}, 814.345251396648, 1e-09); 420s assert (ATAB{9,2}, 9065.8, 1e-09); 420s [P, ATAB, STATS] = anovan (BP(:),{drug(:),feedback(:),diet(:)},'model','full','sstype', 3,'display','off'); 420s assert (P(1), 0.000106518678028207, 1e-09); 420s assert (P(2), 0.00125371366571508, 1e-09); 420s assert (P(3), 5.30813260778464e-07, 1e-09); 420s assert (P(4), 0.308353667232981, 1e-09); 420s assert (P(5), 0.0562901327343161, 1e-09); 420s assert (P(6), 0.599091042141092, 1e-09); 420s assert (P(7), 0.0861628249564267, 1e-09); 420s assert (ATAB{2,2}, 3430.88156424581, 1e-09); 420s assert (ATAB{3,2}, 1833.68031496063, 1e-09); 420s assert (ATAB{4,2}, 5080.48346456693, 1e-09); 420s assert (ATAB{5,2}, 382.07709497207, 1e-09); 420s assert (ATAB{6,2}, 963.037988826813, 1e-09); 420s assert (ATAB{7,2}, 44.4519685039322, 1e-09); 420s assert (ATAB{8,2}, 814.345251396648, 1e-09); 420s assert (ATAB{9,2}, 9065.8, 1e-09); 420s ***** test 420s measurement = [444 614 423 625 408 856 447 719 ... 420s 764 831 586 782 609 1002 606 766]'; 420s strain= {'NIH','NIH','BALB/C','BALB/C','A/J','A/J','129/Ola','129/Ola', ... 420s 'NIH','NIH','BALB/C','BALB/C','A/J','A/J','129/Ola','129/Ola'}'; 420s treatment={'C' 'T' 'C' 'T' 'C' 'T' 'C' 'T' 'C' 'T' 'C' 'T' 'C' 'T' 'C' 'T'}'; 420s block = [1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2]'; 420s 420s [P, ATAB, STATS] = anovan (measurement/10,{strain,treatment,block},'model','full','random',3,'display','off'); 420s assert (P(1), 0.0914352969909372, 1e-09); 420s assert (P(2), 5.04077373924908e-05, 1e-09); 420s assert (P(4), 0.0283196918836667, 1e-09); 420s assert (ATAB{2,2}, 286.132500000002, 1e-09); 420s assert (ATAB{3,2}, 2275.29, 1e-09); 420s assert (ATAB{4,2}, 1242.5625, 1e-09); 420s assert (ATAB{5,2}, 495.905000000001, 1e-09); 420s assert (ATAB{6,2}, 207.007499999999, 1e-09); 420s ***** test 420s pulse = [67.9 65.1 77.3 78.7 79.4 80.4 85.8 86.6 87.5 89.1 ... 420s 98.6 100.8 99.3 101.7 44.3 47.2 47.6 49.6 50.3 51.8 ... 420s 60 58.5 58.9 60.7 69.8 70.9 76.2 76.1 77 77.7 84.7]'; 420s temp = [20.8 20.8 24 24 24 24 26.2 26.2 26.2 26.2 28.4 ... 420s 29 30.4 30.4 17.2 18.3 18.3 18.3 18.9 18.9 20.4 ... 420s 21 21 22.1 23.5 24.2 25.9 26.5 26.5 26.5 28.6]'; 420s species = {'ex' 'ex' 'ex' 'ex' 'ex' 'ex' 'ex' 'ex' 'ex' 'ex' 'ex' ... 420s 'ex' 'ex' 'ex' 'niv' 'niv' 'niv' 'niv' 'niv' 'niv' 'niv' ... 420s 'niv' 'niv' 'niv' 'niv' 'niv' 'niv' 'niv' 'niv' 'niv' 'niv'}; 420s 420s [P, ATAB, STATS] = anovan (pulse,{species,temp},'model','linear','continuous',2,'sstype','h','display','off'); 420s assert (P(1), 6.27153318786007e-14, 1e-09); 420s assert (P(2), 2.48773241196644e-25, 1e-09); 420s assert (ATAB{2,2}, 598.003953318404, 1e-09); 420s assert (ATAB{3,2}, 4376.08256843712, 1e-09); 420s assert (ATAB{4,2}, 89.3498685376726, 1e-09); 420s assert (ATAB{2,6}, 187.399388123951, 1e-09); 420s assert (ATAB{3,6}, 1371.35413763454, 1e-09); 420s ***** test 420s score = [95.6 82.2 97.2 96.4 81.4 83.6 89.4 83.8 83.3 85.7 ... 420s 97.2 78.2 78.9 91.8 86.9 84.1 88.6 89.8 87.3 85.4 ... 420s 81.8 65.8 68.1 70.0 69.9 75.1 72.3 70.9 71.5 72.5 ... 420s 84.9 96.1 94.6 82.5 90.7 87.0 86.8 93.3 87.6 92.4 ... 420s 100. 80.5 92.9 84.0 88.4 91.1 85.7 91.3 92.3 87.9 ... 420s 91.7 88.6 75.8 75.7 75.3 82.4 80.1 86.0 81.8 82.5]'; 420s treatment = {'yes' 'yes' 'yes' 'yes' 'yes' 'yes' 'yes' 'yes' 'yes' 'yes' ... 420s 'yes' 'yes' 'yes' 'yes' 'yes' 'yes' 'yes' 'yes' 'yes' 'yes' ... 420s 'yes' 'yes' 'yes' 'yes' 'yes' 'yes' 'yes' 'yes' 'yes' 'yes' ... 420s 'no' 'no' 'no' 'no' 'no' 'no' 'no' 'no' 'no' 'no' ... 420s 'no' 'no' 'no' 'no' 'no' 'no' 'no' 'no' 'no' 'no' ... 420s 'no' 'no' 'no' 'no' 'no' 'no' 'no' 'no' 'no' 'no'}'; 420s exercise = {'lo' 'lo' 'lo' 'lo' 'lo' 'lo' 'lo' 'lo' 'lo' 'lo' ... 420s 'mid' 'mid' 'mid' 'mid' 'mid' 'mid' 'mid' 'mid' 'mid' 'mid' ... 420s 'hi' 'hi' 'hi' 'hi' 'hi' 'hi' 'hi' 'hi' 'hi' 'hi' ... 420s 'lo' 'lo' 'lo' 'lo' 'lo' 'lo' 'lo' 'lo' 'lo' 'lo' ... 420s 'mid' 'mid' 'mid' 'mid' 'mid' 'mid' 'mid' 'mid' 'mid' 'mid' ... 420s 'hi' 'hi' 'hi' 'hi' 'hi' 'hi' 'hi' 'hi' 'hi' 'hi'}'; 420s age = [59 65 70 66 61 65 57 61 58 55 62 61 60 59 55 57 60 63 62 57 ... 420s 58 56 57 59 59 60 55 53 55 58 68 62 61 54 59 63 60 67 60 67 ... 420s 75 54 57 62 65 60 58 61 65 57 56 58 58 58 52 53 60 62 61 61]'; 420s 420s [P, ATAB, STATS] = anovan (score,{treatment,exercise,age},'model','full','continuous',3,'sstype','h','display','off'); 420s assert (P(5), 0.9245630968248468, 1e-09); 420s assert (P(6), 0.791115159521822, 1e-09); 420s assert (P(7), 0.9296668751457956, 1e-09); 420s [P, ATAB, STATS] = anovan (score,{treatment,exercise,age},'model',[1 0 0; 0 1 0; 0 0 1; 1 1 0],'continuous',3,'sstype','h','display','off'); 420s assert (P(1), 0.00158132928938933, 1e-09); 420s assert (P(2), 2.12537505039986e-07, 1e-09); 420s assert (P(3), 0.00390292555160047, 1e-09); 420s assert (P(4), 0.0164086580775543, 1e-09); 420s assert (ATAB{2,6}, 11.0956027650549, 1e-09); 420s assert (ATAB{3,6}, 20.8195665467178, 1e-09); 420s assert (ATAB{4,6}, 9.10966630720186, 1e-09); 420s assert (ATAB{5,6}, 4.4457923698584, 1e-09); 421s ***** test 421s dv = [ 8.706 10.362 11.552 6.941 10.983 10.092 6.421 14.943 15.931 ... 421s 22.968 18.590 16.567 15.944 21.637 14.492 17.965 18.851 22.891 ... 421s 22.028 16.884 17.252 18.325 25.435 19.141 21.238 22.196 18.038 ... 421s 22.628 31.163 26.053 24.419 32.145 28.966 30.207 29.142 33.212 ... 421s 25.694 ]'; 421s g = [1 1 1 1 1 1 1 1 2 2 2 2 2 3 3 3 3 3 3 3 3 4 4 4 4 4 4 4 5 5 5 5 5 5 5 5 5]'; 421s C = [ 0.4001601 0.3333333 0.5 0.0 421s 0.4001601 0.3333333 -0.5 0.0 421s 0.4001601 -0.6666667 0.0 0.0 421s -0.6002401 0.0000000 0.0 0.5 421s -0.6002401 0.0000000 0.0 -0.5]; 421s 421s [P,ATAB,STATS] = anovan (dv,g,'contrasts',{C},'display','off'); 421s assert (STATS.coeffs(1,1), 19.4001, 1e-04); 421s assert (STATS.coeffs(2,1), -9.3297, 1e-04); 421s assert (STATS.coeffs(3,1), -5.0000, 1e-04); 421s assert (STATS.coeffs(4,1), -8.0000, 1e-04); 421s assert (STATS.coeffs(5,1), -8.0000, 1e-04); 421s assert (STATS.coeffs(1,2), 0.4831, 1e-04); 421s assert (STATS.coeffs(2,2), 0.9694, 1e-04); 421s assert (STATS.coeffs(3,2), 1.3073, 1e-04); 421s assert (STATS.coeffs(4,2), 1.6411, 1e-04); 421s assert (STATS.coeffs(5,2), 1.4507, 1e-04); 421s assert (STATS.coeffs(1,5), 40.161, 1e-03); 421s assert (STATS.coeffs(2,5), -9.624, 1e-03); 421s assert (STATS.coeffs(3,5), -3.825, 1e-03); 421s assert (STATS.coeffs(4,5), -4.875, 1e-03); 421s assert (STATS.coeffs(5,5), -5.515, 1e-03); 421s assert (STATS.coeffs(2,6), 5.74e-11, 1e-12); 421s assert (STATS.coeffs(3,6), 0.000572, 1e-06); 421s assert (STATS.coeffs(4,6), 2.86e-05, 1e-07); 421s assert (STATS.coeffs(5,6), 4.44e-06, 1e-08); 421s 12 tests, 12 passed, 0 known failure, 0 skipped 421s [inst/bar3.m] 421s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/bar3.m 421s ***** demo 421s ## Plotting 5 bars in the same series. 421s 421s z = [50; 40; 30; 20; 10]; 421s bar3 (z); 421s ***** demo 421s ## Plotting 5 bars in different groups. 421s 421s z = [50, 40, 30, 20, 10]; 421s bar3 (z); 421s ***** demo 421s ## A 3D bar graph with each series corresponding to a column in z. 421s 421s z = [1, 4, 7; 2, 5, 8; 3, 6, 9; 4, 7, 10]; 421s bar3 (z); 421s ***** demo 421s ## Specify y-axis locations as tick names. y must be a column vector! 421s 421s y = [1950, 1960, 1970, 1980, 1990]'; 421s z = [16, 8, 4, 2, 1]'; 421s bar3 (y, z); 421s ***** demo 421s ## Plot 3 series as a grouped plot without any space between the grouped bars 421s 421s z = [70 50 33 10; 75 55 35 15; 80 60 40 20]; 421s bar3 (z, 1, 'grouped'); 421s ***** demo 421s ## Plot a stacked style 3D bar graph 421s 421s z = [19, 30, 21, 30; 40, 16, 32, 12]; 421s b = bar3 (z, 0.5, 'stacked'); 421s ***** error bar3 ("A") 421s ***** error bar3 ({2,3,4,5}) 421s ***** error ... 421s bar3 ([1,2,3]', ones (2)) 421s ***** error ... 421s bar3 ([1:5], 1.2) 421s ***** error ... 421s bar3 ([1:5]', ones (5), 1.2) 421s ***** error ... 421s bar3 ([1:5]', ones (5), [0.8, 0.7]) 421s ***** error ... 421s bar3 (ones (5), 'width') 421s ***** error ... 421s bar3 (ones (5), 'width', 1.2) 421s ***** error ... 421s bar3 (ones (5), 'width', [0.8, 0.8, 0.8]) 421s ***** error ... 421s bar3 (ones (5), 'color') 421s ***** error ... 421s bar3 (ones (5), 'color', [0.8, 0.8]) 421s ***** error ... 421s bar3 (ones (5), 'color', "brown") 421s ***** error ... 421s bar3 (ones (5), 'color', {"r", "k", "c", "m", "brown"}) 421s ***** error ... 421s bar3 (ones (5), 'xlabel') 421s ***** error ... 421s bar3 (ones (5), 'xlabel', 4) 421s ***** error ... 421s bar3 (ones (5), 'ylabel') 421s ***** error ... 421s bar3 (ones (5), 'ylabel', 4) 421s ***** error bar3 (ones (5), 'this', 4) 421s ***** error ... 421s bar3 (ones (5), 'xlabel', {"A", "B", "C"}) 421s ***** error ... 421s bar3 (ones (5), 'ylabel', {"A", "B", "C"}) 421s 20 tests, 20 passed, 0 known failure, 0 skipped 421s [inst/bar3h.m] 421s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/bar3h.m 421s ***** demo 421s ## Plotting 5 bars in the same series. 421s 421s y = [50; 40; 30; 20; 10]; 421s bar3h (y); 421s ***** demo 421s ## Plotting 5 bars in different groups. 421s 421s y = [50, 40, 30, 20, 10]; 421s bar3h (y); 421s ***** demo 421s ## A 3D bar graph with each series corresponding to a column in y. 421s 421s y = [1, 4, 7; 2, 5, 8; 3, 6, 9; 4, 7, 10]; 421s bar3h (y); 421s ***** demo 421s ## Specify z-axis locations as tick names. z must be a column vector! 421s 421s z = [1950, 1960, 1970, 1980, 1990]'; 421s y = [16, 8, 4, 2, 1]'; 421s bar3h (z, y); 421s ***** demo 421s ## Plot 3 series as a grouped plot without any space between the grouped bars 421s 421s y = [70 50 33 10; 75 55 35 15; 80 60 40 20]; 421s bar3h (y, 1, 'grouped'); 421s ***** demo 421s ## Plot a stacked style 3D bar graph 421s 421s y = [19, 30, 21, 30; 40, 16, 32, 12]; 421s b = bar3h (y, 0.5, 'stacked'); 421s ***** error bar3h ("A") 421s ***** error bar3h ({2,3,4,5}) 421s ***** error ... 421s bar3h ([1,2,3]', ones (2)) 421s ***** error ... 421s bar3h ([1:5], 1.2) 421s ***** error ... 421s bar3h ([1:5]', ones (5), 1.2) 421s ***** error ... 421s bar3h ([1:5]', ones (5), [0.8, 0.7]) 421s ***** error ... 421s bar3h (ones (5), 'width') 421s ***** error ... 421s bar3h (ones (5), 'width', 1.2) 421s ***** error ... 421s bar3h (ones (5), 'width', [0.8, 0.8, 0.8]) 421s ***** error ... 421s bar3h (ones (5), 'color') 421s ***** error ... 421s bar3h (ones (5), 'color', [0.8, 0.8]) 421s ***** error ... 421s bar3h (ones (5), 'color', "brown") 421s ***** error ... 421s bar3h (ones (5), 'color', {"r", "k", "c", "m", "brown"}) 421s ***** error ... 421s bar3h (ones (5), 'xlabel') 421s ***** error ... 421s bar3h (ones (5), 'xlabel', 4) 421s ***** error ... 421s bar3h (ones (5), 'zlabel') 421s ***** error ... 421s bar3h (ones (5), 'zlabel', 4) 421s ***** error bar3h (ones (5), 'this', 4) 421s ***** error ... 421s bar3h (ones (5), 'xlabel', {"A", "B", "C"}) 421s ***** error ... 421s bar3h (ones (5), 'zlabel', {"A", "B", "C"}) 421s 20 tests, 20 passed, 0 known failure, 0 skipped 421s [inst/bartlett_test.m] 421s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/bartlett_test.m 421s ***** error bartlett_test () 421s ***** error ... 421s bartlett_test (1, 2, 3, 4); 421s ***** error bartlett_test (randn (50, 2), 0); 421s ***** error ... 421s bartlett_test (randn (50, 2), [1, 2, 3]); 421s ***** error ... 421s bartlett_test (randn (50, 1), ones (55, 1)); 421s ***** error ... 421s bartlett_test (randn (50, 1), ones (50, 2)); 421s ***** error ... 421s bartlett_test (randn (50, 2), [], 1.2); 421s ***** error ... 421s bartlett_test (randn (50, 2), [], "alpha"); 421s ***** error ... 421s bartlett_test (randn (50, 1), [ones(25, 1); 2*ones(25, 1)], 1.2); 421s ***** error ... 421s bartlett_test (randn (50, 1), [ones(25, 1); 2*ones(25, 1)], "err"); 421s ***** warning ... 421s bartlett_test (randn (50, 1), [ones(24, 1); 2*ones(25, 1); 3]); 421s ***** test 421s load examgrades 421s [h, pval, chisq, df] = bartlett_test (grades); 421s assert (h, 1); 421s assert (pval, 7.908647337018238e-08, 1e-14); 421s assert (chisq, 38.73324, 1e-5); 421s assert (df, 4); 421s ***** test 421s load examgrades 421s [h, pval, chisq, df] = bartlett_test (grades(:,[2:4])); 421s assert (h, 1); 421s assert (pval, 0.01172, 1e-5); 421s assert (chisq, 8.89274, 1e-5); 421s assert (df, 2); 421s ***** test 421s load examgrades 421s [h, pval, chisq, df] = bartlett_test (grades(:,[1,4])); 421s assert (h, 0); 421s assert (pval, 0.88118, 1e-5); 421s assert (chisq, 0.02234, 1e-5); 421s assert (df, 1); 421s ***** test 421s load examgrades 421s grades = [grades; nan(10, 5)]; 421s [h, pval, chisq, df] = bartlett_test (grades(:,[1,4])); 421s assert (h, 0); 421s assert (pval, 0.88118, 1e-5); 421s assert (chisq, 0.02234, 1e-5); 421s assert (df, 1); 421s ***** test 421s load examgrades 421s [h, pval, chisq, df] = bartlett_test (grades(:,[2,5]), 0.01); 421s assert (h, 0); 421s assert (pval, 0.01791, 1e-5); 421s assert (chisq, 5.60486, 1e-5); 421s assert (df, 1); 421s 16 tests, 16 passed, 0 known failure, 0 skipped 421s [inst/barttest.m] 421s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/barttest.m 421s ***** error barttest () 421s ***** error barttest ([2,NaN;3,4]) 421s ***** error barttest (ones (30, 4), "alpha") 421s ***** error barttest (ones (30, 4), 0) 421s ***** error barttest (ones (30, 4), 1.2) 421s ***** error barttest (ones (30, 4), [0.2, 0.05]) 421s ***** error barttest (ones (30, 1)) 421s ***** error barttest (ones (30, 1), 0.05) 421s ***** test 421s x = [2, 3, 4, 5, 6, 7, 8, 9; 1, 2, 3, 4, 5, 6, 7, 8]'; 421s [ndim, pval, chisq] = barttest (x); 421s assert (ndim, 2); 421s assert (pval, 0); 421s ## assert (chisq, 512.0558, 1e-4); Result differs between octave 6 and 7 ? 421s ***** test 421s x = [0.53767, 0.62702, -0.10224, -0.25485, 1.4193, 1.5237 ; ... 421s 1.8339, 1.6452, -0.24145, -0.23444, 0.29158, 0.1634 ; ... 421s -2.2588, -2.1351, 0.31286, 0.39396, 0.19781, 0.20995 ; ... 421s 0.86217, 1.0835, 0.31286, 0.46499, 1.5877, 1.495 ; ... 421s 0.31877, 0.38454, -0.86488, -0.63839, -0.80447, -0.7536 ; ... 421s -1.3077, -1.1487, -0.030051, -0.017629, 0.69662, 0.60497 ; ... 421s -0.43359, -0.32672, -0.16488, -0.37364, 0.83509, 0.89586 ; ... 421s 0.34262, 0.29639, 0.62771, 0.51672, -0.24372, -0.13698 ; ... 421s 3.5784, 3.5841, 1.0933, 0.93258, 0.21567, 0.455 ; ... 421s 2.7694, 2.6307, 1.1093, 1.4298, -1.1658, -1.1816 ; ... 421s -1.3499, -1.2111, -0.86365, -0.94186, -1.148, -1.4381 ; ... 421s 3.0349, 2.8428, 0.077359, 0.18211, 0.10487, -0.014613; ... 421s 0.7254, 0.56737, -1.2141, -1.2291, 0.72225, 0.90612 ; ... 421s -0.063055,-0.17662, -1.1135, -0.97701, 2.5855, 2.4084 ; ... 421s 0.71474, 0.29225, -0.0068493, -0.11468, -0.66689, -0.52466 ; ... 421s -0.20497, -7.8874e-06, 1.5326, 1.3195, 0.18733, 0.20296 ; ... 421s -0.12414, -0.077029, -0.76967, -0.96262, -0.082494, 0.121 ; ... 421s 1.4897, 1.3683, 0.37138, 0.43653, -1.933, -2.1903 ; ... 421s 1.409, 1.5882, -0.22558, -0.24835, -0.43897, -0.46247 ; ... 421s 1.4172, 1.1616, 1.1174, 1.0785, -1.7947, -1.9471 ]; 421s [ndim, pval, chisq] = barttest (x); 421s assert (ndim, 3); 421s assert (pval, [0; 0; 0; 0.52063; 0.34314], 1e-5); 421s chisq_out = [251.6802; 210.2670; 153.1773; 4.2026; 2.1392]; 421s assert (chisq, chisq_out, 1e-4); 421s 10 tests, 10 passed, 0 known failure, 0 skipped 421s [inst/binotest.m] 421s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/binotest.m 421s ***** demo 421s % flip a coin 1000 times, showing 475 heads 421s % Hypothesis: coin is fair, i.e. p=1/2 421s [h,p_val,ci] = binotest(475,1000,0.5) 421s % Result: h = 0 : null hypothesis not rejected, coin could be fair 421s % P value 0.12, i.e. hypothesis not rejected for alpha up to 12% 421s % 0.444 <= p <= 0.506 with 95% confidence 421s ***** demo 421s % flip a coin 100 times, showing 65 heads 421s % Hypothesis: coin shows less than 50% heads, i.e. p<=1/2 421s [h,p_val,ci] = binotest(65,100,0.5,'tail','left','alpha',0.01) 421s % Result: h = 1 : null hypothesis is rejected, i.e. coin shows more heads than tails 421s % P value 0.0018, i.e. hypothesis not rejected for alpha up to 0.18% 421s % 0 <= p <= 0.76 with 99% confidence 421s ***** test #example from https://en.wikipedia.org/wiki/Binomial_test 421s [h,p_val,ci] = binotest (51,235,1/6); 421s assert (p_val, 0.0437, 0.00005) 421s [h,p_val,ci] = binotest (51,235,1/6,'tail','left'); 421s assert (p_val, 0.027, 0.0005) 421s 1 test, 1 passed, 0 known failure, 0 skipped 421s [inst/boxplot.m] 421s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/boxplot.m 421s ***** demo 421s axis ([0, 3]); 421s randn ("seed", 1); # for reproducibility 421s girls = randn (10, 1) * 5 + 140; 421s randn ("seed", 2); # for reproducibility 421s boys = randn (13, 1) * 8 + 135; 421s boxplot ({girls, boys}); 421s set (gca (), "xtick", [1 2], "xticklabel", {"girls", "boys"}) 421s title ("Grade 3 heights"); 421s ***** demo 421s randn ("seed", 7); # for reproducibility 421s A = randn (10, 1) * 5 + 140; 421s randn ("seed", 8); # for reproducibility 421s B = randn (25, 1) * 8 + 135; 421s randn ("seed", 9); # for reproducibility 421s C = randn (20, 1) * 6 + 165; 421s data = [A; B; C]; 421s groups = [(ones (10, 1)); (ones (25, 1) * 2); (ones (20, 1) * 3)]; 421s labels = {"Team A", "Team B", "Team C"}; 421s pos = [2, 1, 3]; 421s boxplot (data, groups, "Notch", "on", "Labels", labels, "Positions", pos, ... 421s "OutlierTags", "on", "BoxStyle", "filled"); 421s title ("Example of Group splitting with paired vectors"); 421s ***** demo 421s randn ("seed", 1); # for reproducibility 421s data = randn (100, 9); 421s boxplot (data, "notch", "on", "boxstyle", "filled", ... 421s "colors", "ygcwkmb", "whisker", 1.2); 421s title ("Example of different colors specified with characters"); 421s ***** demo 421s randn ("seed", 5); # for reproducibility 421s data = randn (100, 13); 421s colors = [0.7 0.7 0.7; ... 421s 0.0 0.4 0.9; ... 421s 0.7 0.4 0.3; ... 421s 0.7 0.1 0.7; ... 421s 0.8 0.7 0.4; ... 421s 0.1 0.8 0.5; ... 421s 0.9 0.9 0.2]; 421s boxplot (data, "notch", "on", "boxstyle", "filled", ... 421s "colors", colors, "whisker", 1.3, "boxwidth", "proportional"); 421s title ("Example of different colors specified as RGB values"); 421s ***** error boxplot ("a") 421s ***** error boxplot ({[1 2 3], "a"}) 421s ***** error boxplot ([1 2 3], 1, {2, 3}) 421s ***** error boxplot ([1 2 3], {"a", "b"}) 421s ***** error <'Notch' input argument accepts> boxplot ([1:10], "notch", "any") 421s ***** error boxplot ([1:10], "notch", i) 421s ***** error boxplot ([1:10], "notch", {}) 421s ***** error boxplot (1, "symbol", 1) 421s ***** error <'Orientation' input argument accepts only> boxplot (1, "orientation", "diagonal") 421s ***** error boxplot (1, "orientation", {}) 421s ***** error <'Whisker' input argument accepts only> boxplot (1, "whisker", "a") 421s ***** error <'Whisker' input argument accepts only> boxplot (1, "whisker", [1 3]) 421s ***** error <'OutlierTags' input argument accepts only> boxplot (3, "OutlierTags", "maybe") 421s ***** error boxplot (3, "OutlierTags", {}) 421s ***** error <'Sample_IDs' input argument accepts only> boxplot (1, "sample_IDs", 1) 421s ***** error <'BoxWidth' input argument accepts only> boxplot (1, "boxwidth", 2) 421s ***** error <'BoxWidth' input argument accepts only> boxplot (1, "boxwidth", "anything") 421s ***** error <'Widths' input argument accepts only> boxplot (5, "widths", "a") 421s ***** error <'Widths' input argument accepts only> boxplot (5, "widths", [1:4]) 421s ***** error <'Widths' input argument accepts only> boxplot (5, "widths", []) 421s ***** error <'CapWidths' input argument accepts only> boxplot (5, "capwidths", "a") 421s ***** error <'CapWidths' input argument accepts only> boxplot (5, "capwidths", [1:4]) 421s ***** error <'CapWidths' input argument accepts only> boxplot (5, "capwidths", []) 421s ***** error <'BoxStyle' input argument accepts only> boxplot (1, "Boxstyle", 1) 421s ***** error <'BoxStyle' input argument accepts only> boxplot (1, "Boxstyle", "garbage") 421s ***** error <'Positions' input argument accepts only> boxplot (1, "positions", "aa") 421s ***** error <'Labels' input argument accepts only> boxplot (3, "labels", [1 5]) 421s ***** error <'Colors' input argument accepts only> boxplot (1, "colors", {}) 421s ***** error <'Colors' input argument accepts only> boxplot (2, "colors", [1 2 3 4]) 421s ***** error boxplot (randn (10, 3), 'Sample_IDs', {"a", "b"}) 421s ***** error boxplot (rand (3, 3), [1 2]) 421s ***** test 421s hf = figure ("visible", "off"); 421s unwind_protect 421s [a, b] = boxplot (rand (10, 3)); 421s assert (size (a), [7, 3]); 421s assert (numel (b.box), 3); 421s assert (numel (b.whisker), 12); 421s assert (numel (b.median), 3); 421s unwind_protect_cleanup 421s close (hf); 421s end_unwind_protect 421s ***** test 421s hf = figure ("visible", "off"); 421s unwind_protect 421s [~, b] = boxplot (rand (10, 3), "BoxStyle", "filled", "colors", "ybc"); 421s assert (numel (b.box_fill), 3); 421s unwind_protect_cleanup 421s close (hf); 421s end_unwind_protect 422s ***** test 422s hf = figure ("visible", "off"); 422s unwind_protect 422s hold on 422s [a, b] = boxplot (rand (10, 3)); 422s assert (ishold, true); 422s unwind_protect_cleanup 422s close (hf); 422s end_unwind_protect 422s 34 tests, 34 passed, 0 known failure, 0 skipped 422s [inst/canoncorr.m] 422s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/canoncorr.m 422s ***** shared X,Y,A,B,r,U,V,k 422s k = 10; 422s X = [1:k; sin(1:k); cos(1:k)]'; Y = [tan(1:k); tanh((1:k)/k)]'; 422s [A,B,r,U,V,stats] = canoncorr (X,Y); 422s ***** assert (A, [-0.329229 0.072908; 0.074870 1.389318; -0.069302 -0.024109], 1E-6); 422s ***** assert (B, [-0.017086 -0.398402; -4.475049 -0.824538], 1E-6); 422s ***** assert (r, [0.99590 0.26754], 1E-5); 422s ***** assert (U, center(X) * A, 10*eps); 422s ***** assert (V, center(Y) * B, 10*eps); 422s ***** assert (cov(U), eye(size(U, 2)), 10*eps); 422s ***** assert (cov(V), eye(size(V, 2)), 10*eps); 422s rand ("state", 1); [A,B,r] = canoncorr (rand(5, 10),rand(5, 20)); 422s ***** assert (r, ones(1, 5), 10*eps); 422s 8 tests, 8 passed, 0 known failure, 0 skipped 422s [inst/cdfcalc.m] 422s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/cdfcalc.m 422s ***** test 422s x = [2, 4, 3, 2, 4, 3, 2, 5, 6, 4]; 422s [yCDF, xCDF, n, emsg, eid] = cdfcalc (x); 422s assert (yCDF, [0, 0.3, 0.5, 0.8, 0.9, 1]'); 422s assert (xCDF, [2, 3, 4, 5, 6]'); 422s assert (n, 10); 422s ***** shared x 422s x = [2, 4, 3, 2, 4, 3, 2, 5, 6, 4]; 422s ***** error yCDF = cdfcalc (x); 422s ***** error [yCDF, xCDF] = cdfcalc (); 422s ***** error [yCDF, xCDF] = cdfcalc (x, x); 422s ***** warning [yCDF, xCDF] = cdfcalc (ones(10,2)); 422s 5 tests, 5 passed, 0 known failure, 0 skipped 422s [inst/cdfplot.m] 422s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/cdfplot.m 422s ***** demo 422s x = randn(100,1); 422s cdfplot (x); 422s ***** test 422s hf = figure ("visible", "off"); 422s unwind_protect 422s x = [2, 4, 3, 2, 4, 3, 2, 5, 6, 4]; 422s [hCDF, stats] = cdfplot (x); 422s assert (stats.min, 2); 422s assert (stats.max, 6); 422s assert (stats.median, 3.5); 422s assert (stats.std, 1.35400640077266, 1e-14); 422s unwind_protect_cleanup 422s close (hf); 422s end_unwind_protect 422s ***** test 422s hf = figure ("visible", "off"); 422s unwind_protect 422s x = randn(100,1); 422s cdfplot (x); 422s unwind_protect_cleanup 422s close (hf); 422s end_unwind_protect 422s ***** error cdfplot (); 422s ***** error cdfplot ([x',x']); 422s ***** error cdfplot ([NaN, NaN, NaN, NaN]); 422s 5 tests, 5 passed, 0 known failure, 0 skipped 422s [inst/chi2gof.m] 422s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/chi2gof.m 422s ***** demo 422s x = normrnd (50, 5, 100, 1); 422s [h, p, stats] = chi2gof (x) 422s [h, p, stats] = chi2gof (x, "cdf", @(x)normcdf (x, mean(x), std(x))) 422s [h, p, stats] = chi2gof (x, "cdf", {@normcdf, mean(x), std(x)}) 422s ***** demo 422s x = rand (100,1 ); 422s n = length (x); 422s binedges = linspace (0, 1, 11); 422s expectedCounts = n * diff (binedges); 422s [h, p, stats] = chi2gof (x, "binedges", binedges, "expected", expectedCounts) 422s ***** demo 422s bins = 0:5; 422s obsCounts = [6 16 10 12 4 2]; 422s n = sum(obsCounts); 422s lambdaHat = sum(bins.*obsCounts) / n; 422s expCounts = n * poisspdf(bins,lambdaHat); 422s [h, p, stats] = chi2gof (bins, "binctrs", bins, "frequency", obsCounts, ... 422s "expected", expCounts, "nparams",1) 422s ***** error chi2gof () 422s ***** error chi2gof ([2,3;3,4]) 422s ***** error chi2gof ([1,2,3,4], "nbins", 3, "ctrs", [2,3,4]) 422s ***** error chi2gof ([1,2,3,4], "frequency", [2,3,2]) 422s ***** error chi2gof ([1,2,3,4], "frequency", [2,3,2,-2]) 422s ***** error chi2gof ([1,2,3,4], "frequency", [2,3,2,2], "nparams", i) 422s ***** error chi2gof ([1,2,3,4], "frequency", [2,3,2,2], "alpha", 1.3) 422s ***** error chi2gof ([1,2,3,4], "expected", [-3,2,2]) 422s ***** error chi2gof ([1,2,3,4], "expected", [3,2,2], "nbins", 5) 422s ***** error chi2gof ([1,2,3,4], "cdf", @normcdff) 422s ***** test 422s x = [1 2 1 3 2 4 3 2 4 3 2 2]; 422s [h, p, stats] = chi2gof (x); 422s assert (h, 0); 422s assert (p, NaN); 422s assert (stats.chi2stat, 0.1205375022748029, 1e-14); 422s assert (stats.df, 0); 422s assert (stats.edges, [1, 2.5, 4], 1e-14); 422s assert (stats.O, [7, 5], 1e-14); 422s assert (stats.E, [6.399995519909668, 5.600004480090332], 1e-14); 422s 11 tests, 11 passed, 0 known failure, 0 skipped 422s [inst/chi2test.m] 422s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/chi2test.m 422s ***** error chi2test (); 422s ***** error chi2test ([1, 2, 3, 4, 5]); 422s ***** error chi2test ([1, 2; 2, 1+3i]); 422s ***** error chi2test ([NaN, 6; 34, 12]); 422s ***** error ... 422s p = chi2test (ones (3, 3), "mutual", []); 422s ***** error ... 422s p = chi2test (ones (3, 3, 3), "testtype", 2); 422s ***** error ... 422s p = chi2test (ones (3, 3, 3), "mutual"); 422s ***** error ... 422s p = chi2test (ones (3, 3, 3), "joint", ["a"]); 422s ***** error ... 422s p = chi2test (ones (3, 3, 3), "joint", [2, 3]); 422s ***** error ... 422s p = chi2test (ones (3, 3, 3, 4), "mutual", []) 422s ***** warning p = chi2test (ones (2)); 422s ***** warning p = chi2test (ones (3, 2)); 422s ***** warning p = chi2test (0.4 * ones (3)); 422s ***** test 422s x = [11, 3, 8; 2, 9, 14; 12, 13, 28]; 422s p = chi2test (x); 422s assert (p, 0.017787, 1e-6); 422s ***** test 422s x = [11, 3, 8; 2, 9, 14; 12, 13, 28]; 422s [p, chisq] = chi2test (x); 422s assert (chisq, 11.9421, 1e-4); 422s ***** test 422s x = [11, 3, 8; 2, 9, 14; 12, 13, 28]; 422s [p, chisq, df] = chi2test (x); 422s assert (df, 4); 422s ***** test 422s ***** shared x 422s x(:,:,1) = [59, 32; 9,16]; 422s x(:,:,2) = [55, 24;12,33]; 422s x(:,:,3) = [107,80;17,56];%! 422s ***** assert (chi2test (x), 2.282063427117009e-11, 1e-14); 422s ***** assert (chi2test (x, "mutual", []), 2.282063427117009e-11, 1e-14); 422s ***** assert (chi2test (x, "joint", 1), 1.164834895206468e-11, 1e-14); 423s ***** assert (chi2test (x, "joint", 2), 7.771350230001417e-11, 1e-14); 423s ***** assert (chi2test (x, "joint", 3), 0.07151361728026107, 1e-14); 423s ***** assert (chi2test (x, "marginal", 1), 0, 1e-14); 423s ***** assert (chi2test (x, "marginal", 2), 6.347555814301131e-11, 1e-14); 423s ***** assert (chi2test (x, "marginal", 3), 0, 1e-14); 423s ***** assert (chi2test (x, "conditional", 1), 0.2303114201312508, 1e-14); 423s ***** assert (chi2test (x, "conditional", 2), 0.0958810684407079, 1e-14); 423s ***** assert (chi2test (x, "conditional", 3), 2.648037344954446e-11, 1e-14); 423s ***** assert (chi2test (x, "homogeneous", []), 0.4485579470993741, 1e-14); 423s ***** test 423s [pval, chisq, df, E] = chi2test (x); 423s assert (chisq, 64.0982, 1e-4); 423s assert (df, 7); 423s assert (E(:,:,1), [42.903, 39.921; 17.185, 15.991], ones (2, 2) * 1e-3); 423s ***** test 423s [pval, chisq, df, E] = chi2test (x, "joint", 2); 423s assert (chisq, 56.0943, 1e-4); 423s assert (df, 5); 423s assert (E(:,:,2), [40.922, 23.310; 38.078, 21.690], ones (2, 2) * 1e-3); 423s ***** test 423s [pval, chisq, df, E] = chi2test (x, "marginal", 3); 423s assert (chisq, 146.6058, 1e-4); 423s assert (df, 9); 423s assert (E(:,1,1), [61.642; 57.358], ones (2, 1) * 1e-3); 423s ***** test 423s [pval, chisq, df, E] = chi2test (x, "conditional", 3); 423s assert (chisq, 52.2509, 1e-4); 423s assert (df, 3); 423s assert (E(:,:,1), [53.345, 37.655; 14.655, 10.345], ones (2, 2) * 1e-3); 423s ***** test 423s [pval, chisq, df, E] = chi2test (x, "homogeneous", []); 423s assert (chisq, 1.6034, 1e-4); 423s assert (df, 2); 423s assert (E(:,:,1), [60.827, 31.382; 7.173, 16.618], ones (2, 2) * 1e-3); 423s 34 tests, 34 passed, 0 known failure, 0 skipped 423s [inst/cholcov.m] 423s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/cholcov.m 423s ***** demo 423s C1 = [2, 1, 1, 2; 1, 2, 1, 2; 1, 1, 2, 2; 2, 2, 2, 3] 423s T = cholcov (C1) 423s C2 = T'*T 423s ***** test 423s C1 = [2, 1, 1, 2; 1, 2, 1, 2; 1, 1, 2, 2; 2, 2, 2, 3]; 423s T = cholcov (C1); 423s assert (C1, T'*T, 1e-15 * ones (size (C1))); 423s 1 test, 1 passed, 0 known failure, 0 skipped 423s [inst/cl_multinom.m] 423s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/cl_multinom.m 423s ***** demo 423s CL = cl_multinom ([27; 43; 19; 11], 10000, 0.05) 423s ***** error cl_multinom (); 423s ***** error cl_multinom (1, 2, 3, 4, 5); 423s ***** error ... 423s cl_multinom (1, 2, 3, 4); 423s ***** error ... 423s cl_multinom (1, 2, 3, "some string"); 423s 4 tests, 4 passed, 0 known failure, 0 skipped 423s [inst/cluster.m] 423s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/cluster.m 423s ***** error cluster () 423s ***** error cluster ([1 1], "Cutoff", 1) 423s ***** error cluster ([1 2 1], "Bogus", 1) 423s ***** error cluster ([1 2 1], "Cutoff", -1) 423s ***** error cluster ([1 2 1], "Cutoff", 1, "Bogus", 1) 423s ***** test 423s 6 tests, 6 passed, 0 known failure, 0 skipped 423s [inst/clusterdata.m] 423s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/clusterdata.m 423s ***** demo 423s randn ("seed", 1) # for reproducibility 423s r1 = randn (10, 2) * 0.25 + 1; 423s randn ("seed", 5) # for reproducibility 423s r2 = randn (20, 2) * 0.5 - 1; 423s X = [r1; r2]; 423s 423s wnl = warning ("off", "Octave:linkage_savemem", "local"); 423s T = clusterdata (X, "linkage", "ward", "MaxClust", 2); 423s scatter (X(:,1), X(:,2), 36, T, "filled"); 423s ***** error ... 423s clusterdata () 423s ***** error ... 423s clusterdata (1) 423s ***** error clusterdata ([1 1], "Bogus", 1) 423s ***** error clusterdata ([1 1], "Depth", 1) 423s 4 tests, 4 passed, 0 known failure, 0 skipped 423s [inst/cmdscale.m] 423s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/cmdscale.m 423s ***** shared m, n, X, D 423s m = randi(100) + 1; n = randi(100) + 1; X = rand(m, n); D = pdist(X); 423s ***** assert(norm(pdist(cmdscale(D))), norm(D), sqrt(eps)) 423s ***** assert(norm(pdist(cmdscale(squareform(D)))), norm(D), sqrt(eps)) 423s 2 tests, 2 passed, 0 known failure, 0 skipped 423s [inst/combnk.m] 423s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/combnk.m 423s ***** demo 423s c = combnk (1:5, 2); 423s disp ("All pairs of integers between 1 and 5:"); 423s disp (c); 423s ***** test 423s c = combnk (1:3, 2); 423s assert (c, [1, 2; 1, 3; 2, 3]); 423s ***** test 423s c = combnk (1:3, 6); 423s assert (isempty (c)); 423s ***** test 423s c = combnk ({1, 2, 3}, 2); 423s assert (c, {1, 2; 1, 3; 2, 3}); 423s ***** test 423s c = combnk ("hello", 2); 423s assert (c, ["lo"; "lo"; "ll"; "eo"; "el"; "el"; "ho"; "hl"; "hl"; "he"]); 423s 4 tests, 4 passed, 0 known failure, 0 skipped 423s [inst/confusionchart.m] 423s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/confusionchart.m 423s ***** demo 423s close all 423s ## Setting the chart properties 423s Yt = [8 5 6 8 5 3 1 6 4 2 5 3 1 4]'; 423s Yp = [8 5 6 8 5 2 3 4 4 5 5 7 2 6]'; 423s confusionchart (Yt, Yp, "Title", ... 423s "Demonstration with summaries","Normalization",... 423s "absolute","ColumnSummary", "column-normalized","RowSummary",... 423s "row-normalized") 423s ***** demo 423s close all 423s ## Cellstr as inputs 423s Yt = {"Positive", "Positive", "Positive", "Negative", "Negative"}; 423s Yp = {"Positive", "Positive", "Negative", "Negative", "Negative"}; 423s m = confusionmat (Yt, Yp); 423s confusionchart (m, {"Positive", "Negative"}); 423s hold off 423s ***** demo 423s close all 423s ## Editing the object properties 423s Yt = {"Positive", "Positive", "Positive", "Negative", "Negative"}; 423s Yp = {"Positive", "Positive", "Negative", "Negative", "Negative"}; 423s cm = confusionchart (Yt, Yp); 423s cm.Title = "This is an example with a green diagonal"; 423s cm.DiagonalColor = [0.4660, 0.6740, 0.1880]; 423s hold off 423s ***** demo 423s close all 423s ## Confusion chart in a uipanel 423s h = uipanel (); 423s Yt = {"Positive", "Positive", "Positive", "Negative", "Negative"}; 423s Yp = {"Positive", "Positive", "Negative", "Negative", "Negative"}; 423s cm = confusionchart (h, Yt, Yp); 423s hold off 423s ***** demo 423s close all 423s ## Sorting classes 423s Yt = [8 5 6 8 5 3 1 6 4 2 5 3 1 4]'; 423s Yp = [8 5 6 8 5 2 3 4 4 5 5 7 2 6]'; 423s cm = confusionchart (Yt, Yp, "Title", ... 423s "Classes are sorted in ascending order"); 423s cm = confusionchart (Yt, Yp, "Title", ... 423s "Classes are sorted according to clusters"); 423s sortClasses (cm, "cluster"); 423s ***** shared visibility_setting 423s visibility_setting = get (0, "DefaultFigureVisible"); 423s ***** test 423s set (0, "DefaultFigureVisible", "off"); 423s fail ("confusionchart ()", "Invalid call"); 423s set (0, "DefaultFigureVisible", visibility_setting); 423s ***** test 423s set (0, "DefaultFigureVisible", "off"); 423s fail ("confusionchart ([1 1; 2 2; 3 3])", "invalid argument"); 423s set (0, "DefaultFigureVisible", visibility_setting); 423s ***** test 423s set (0, "DefaultFigureVisible", "off"); 423s fail ("confusionchart ([1 2], [0 1], 'xxx', 1)", "invalid property"); 423s set (0, "DefaultFigureVisible", visibility_setting); 423s ***** test 423s set (0, "DefaultFigureVisible", "off"); 423s fail ("confusionchart ([1 2], [0 1], 'XLabel', 1)", "XLabel .* string"); 423s set (0, "DefaultFigureVisible", visibility_setting); 423s ***** test 423s set (0, "DefaultFigureVisible", "off"); 423s fail ("confusionchart ([1 2], [0 1], 'YLabel', [1 0])", ... 423s ".* YLabel .* string"); 423s set (0, "DefaultFigureVisible", visibility_setting); 423s ***** test 423s set (0, "DefaultFigureVisible", "off"); 423s fail ("confusionchart ([1 2], [0 1], 'Title', .5)", ".* Title .* string"); 423s set (0, "DefaultFigureVisible", visibility_setting); 423s ***** test 423s set (0, "DefaultFigureVisible", "off"); 423s fail ("confusionchart ([1 2], [0 1], 'FontName', [])", ... 423s ".* FontName .* string"); 423s set (0, "DefaultFigureVisible", visibility_setting); 423s ***** test 423s set (0, "DefaultFigureVisible", "off"); 423s fail ("confusionchart ([1 2], [0 1], 'FontSize', 'b')", ... 423s ".* FontSize .* numeric"); 423s set (0, "DefaultFigureVisible", visibility_setting); 424s ***** test 424s set (0, "DefaultFigureVisible", "off"); 424s fail ("confusionchart ([1 2], [0 1], 'DiagonalColor', 'h')", ... 424s ".* DiagonalColor .* color"); 424s set (0, "DefaultFigureVisible", visibility_setting); 424s ***** test 424s set (0, "DefaultFigureVisible", "off"); 424s fail ("confusionchart ([1 2], [0 1], 'OffDiagonalColor', [])", ... 424s ".* OffDiagonalColor .* color"); 424s set (0, "DefaultFigureVisible", visibility_setting); 424s ***** test 424s set (0, "DefaultFigureVisible", "off"); 424s fail ("confusionchart ([1 2], [0 1], 'Normalization', '')", ... 424s ".* invalid .* Normalization"); 424s set (0, "DefaultFigureVisible", visibility_setting); 424s ***** test 424s set (0, "DefaultFigureVisible", "off"); 424s fail ("confusionchart ([1 2], [0 1], 'ColumnSummary', [])", ... 424s ".* invalid .* ColumnSummary"); 424s set (0, "DefaultFigureVisible", visibility_setting); 424s ***** test 424s set (0, "DefaultFigureVisible", "off"); 424s fail ("confusionchart ([1 2], [0 1], 'RowSummary', 1)", ... 424s ".* invalid .* RowSummary"); 424s set (0, "DefaultFigureVisible", visibility_setting); 424s ***** test 424s set (0, "DefaultFigureVisible", "off"); 424s fail ("confusionchart ([1 2], [0 1], 'GridVisible', .1)", ... 424s ".* invalid .* GridVisible"); 424s set (0, "DefaultFigureVisible", visibility_setting); 424s ***** test 424s set (0, "DefaultFigureVisible", "off"); 424s fail ("confusionchart ([1 2], [0 1], 'HandleVisibility', .1)", ... 424s ".* invalid .* HandleVisibility"); 424s set (0, "DefaultFigureVisible", visibility_setting); 424s ***** test 424s set (0, "DefaultFigureVisible", "off"); 424s fail ("confusionchart ([1 2], [0 1], 'OuterPosition', .1)", ... 424s ".* invalid .* OuterPosition"); 424s set (0, "DefaultFigureVisible", visibility_setting); 425s ***** test 425s set (0, "DefaultFigureVisible", "off"); 425s fail ("confusionchart ([1 2], [0 1], 'Position', .1)", ... 425s ".* invalid .* Position"); 425s set (0, "DefaultFigureVisible", visibility_setting); 425s ***** test 425s set (0, "DefaultFigureVisible", "off"); 425s fail ("confusionchart ([1 2], [0 1], 'Units', .1)", ".* invalid .* Units"); 425s set (0, "DefaultFigureVisible", visibility_setting); 425s 18 tests, 18 passed, 0 known failure, 0 skipped 425s [inst/confusionmat.m] 425s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/confusionmat.m 425s ***** test 425s Yt = [8 5 6 8 5 3 1 6 4 2 5 3 1 4]'; 425s Yp = [8 5 6 8 5 2 3 4 4 5 5 7 2 6]'; 425s C = [0 1 1 0 0 0 0 0; 0 0 0 0 1 0 0 0; 0 1 0 0 0 0 1 0; 0 0 0 1 0 1 0 0; ... 425s 0 0 0 0 3 0 0 0; 0 0 0 1 0 1 0 0; 0 0 0 0 0 0 0 0; 0 0 0 0 0 0 0 2]; 425s assert (confusionmat (Yt, Yp), C) 425s 1 test, 1 passed, 0 known failure, 0 skipped 425s [inst/cophenet.m] 425s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/cophenet.m 425s ***** demo 425s randn ("seed", 5) # for reproducibility 425s X = randn (10,2); 425s y = pdist (X); 425s Z = linkage (y, "average"); 425s cophenet (Z, y) 425s ***** error cophenet () 425s ***** error cophenet (1) 425s ***** error ... 425s cophenet (ones (2,2), 1) 425s ***** error ... 425s cophenet ([1 2 1], "a") 425s ***** error ... 425s cophenet ([1 2 1], [1 2]) 425s 5 tests, 5 passed, 0 known failure, 0 skipped 425s [inst/correlation_test.m] 425s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/correlation_test.m 425s ***** error correlation_test (); 425s ***** error correlation_test (1); 425s ***** error ... 425s correlation_test ([1 2 NaN]', [2 3 4]'); 425s ***** error ... 425s correlation_test ([1 2 Inf]', [2 3 4]'); 425s ***** error ... 425s correlation_test ([1 2 3+i]', [2 3 4]'); 425s ***** error ... 425s correlation_test ([1 2 3]', [2 3 NaN]'); 425s ***** error ... 425s correlation_test ([1 2 3]', [2 3 Inf]'); 425s ***** error ... 425s correlation_test ([1 2 3]', [3 4 3+i]'); 425s ***** error ... 425s correlation_test ([1 2 3]', [3 4 4 5]'); 425s ***** error ... 425s correlation_test ([1 2 3]', [2 3 4]', "alpha", 0); 425s ***** error ... 425s correlation_test ([1 2 3]', [2 3 4]', "alpha", 1.2); 425s ***** error ... 425s correlation_test ([1 2 3]', [2 3 4]', "alpha", [.02 .1]); 425s ***** error ... 425s correlation_test ([1 2 3]', [2 3 4]', "alpha", "a"); 425s ***** error ... 425s correlation_test ([1 2 3]', [2 3 4]', "some", 0.05); 425s ***** error ... 425s correlation_test ([1 2 3]', [2 3 4]', "tail", "val"); 425s ***** error ... 425s correlation_test ([1 2 3]', [2 3 4]', "alpha", 0.01, "tail", "val"); 425s ***** error ... 425s correlation_test ([1 2 3]', [2 3 4]', "method", 0.01); 425s ***** error ... 425s correlation_test ([1 2 3]', [2 3 4]', "method", "some"); 425s ***** test 425s x = [6 7 7 9 10 12 13 14 15 17]; 425s y = [19 22 27 25 30 28 30 29 25 32]; 425s [h, pval, stats] = correlation_test (x, y); 425s assert (stats.corrcoef, corr (x', y'), 1e-14); 425s assert (pval, 0.0223, 1e-4); 425s ***** test 425s x = [6 7 7 9 10 12 13 14 15 17]'; 425s y = [19 22 27 25 30 28 30 29 25 32]'; 425s [h, pval, stats] = correlation_test (x, y); 425s assert (stats.corrcoef, corr (x, y), 1e-14); 425s assert (pval, 0.0223, 1e-4); 425s 20 tests, 20 passed, 0 known failure, 0 skipped 425s [inst/createns.m] 425s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/createns.m 425s ***** test 425s ## Default ExhaustiveSearcher 425s X = [1, 2; 3, 4; 5, 6]; 425s obj = createns (X); 425s assert (isa (obj, "ExhaustiveSearcher")); 425s assert (obj.X, X); 425s assert (obj.Distance, "euclidean"); 425s ***** test 425s ## KDTreeSearcher with default parameters 425s X = [1, 2; 3, 4; 5, 6]; 425s obj = createns (X, "NSMethod", "kdtree"); 425s assert (isa (obj, "KDTreeSearcher")); 425s assert (obj.X, X); 425s assert (obj.Distance, "euclidean"); 425s ***** test 425s ## hnswSearcher with custom parameters 425s X = [1, 2; 3, 4; 5, 6]; 425s obj = createns (X, "NSMethod", "hnsw", "MaxNumLinksPerNode", 2, "TrainSetSize", 3); 425s assert (isa (obj, "hnswSearcher")); 425s assert (obj.X, X); 425s assert (obj.MaxNumLinksPerNode, 2); 425s assert (obj.TrainSetSize, 3); 425s ***** test 425s ## ExhaustiveSearcher with custom distance 425s X = [1, 2; 3, 4]; 425s obj = createns (X, "NSMethod", "exhaustive", "Distance", "cityblock"); 425s assert (isa (obj, "ExhaustiveSearcher")); 425s assert (obj.Distance, "cityblock"); 425s ***** error 425s createns () 425s ***** error 425s X = [1, 2; 3, 4]; createns (X, "NSMethod") 425s ***** error 425s createns ([1; Inf; 3]) 425s ***** error 425s X = [1, 2; 3, 4]; createns (X, "NSMethod", 1) 425s ***** error 425s X = [1, 2; 3, 4]; createns (X, "NSMethod", "invalid") 425s 9 tests, 9 passed, 0 known failure, 0 skipped 425s [inst/crosstab.m] 425s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/crosstab.m 425s ***** error crosstab () 425s ***** error crosstab (1) 425s ***** error crosstab (ones (2), [1 1]) 425s ***** error crosstab ([1 1], ones (2)) 425s ***** error crosstab ([1], [1 2]) 425s ***** error crosstab ([1 2], [1]) 425s ***** test 425s load carbig 425s [table, chisq, p, labels] = crosstab (cyl4, when, org); 425s assert (table(2,3,1), 38); 425s assert (labels{3,3}, "Japan"); 425s ***** test 425s load carbig 425s [table, chisq, p, labels] = crosstab (cyl4, when, org); 425s assert (table(2,3,2), 17); 425s assert (labels{1,3}, "USA"); 425s ***** test 425s x = [1, 1, 2, 3, 1]; 425s y = [1, 2, 5, 3, 1]; 425s t = crosstab (x, y); 425s assert (t, [2, 1, 0, 0; 0, 0, 0, 1; 0, 0, 1, 0]); 425s ***** test 425s x = [1, 1, 2, 3, 1]; 425s y = [1, 2, 3, 5, 1]; 425s t = crosstab (x, y); 425s assert (t, [2, 1, 0, 0; 0, 0, 1, 0; 0, 0, 0, 1]); 425s ***** test 425s x1 = [1, 3, 7, 7, 8]; 425s x2 = [4, 2, 1, 1, 1]; 425s x3 = [6, 2, 6, 2, NaN]; 425s T1 = [0, 0, 0; 0, 1, 0; 1, 0, 0; 0, 0, 0]; 425s T2 = [0, 0, 1; 0, 0, 0; 1, 0, 0; 0, 0, 0]; 425s T = zeros (4, 3, 2); 425s T(:,:,1) = T1; 425s T(:,:,2) = T2; 425s t = crosstab (x1, x2, x3); 425s assert (t, T); 425s ***** test 425s x = [1, 2, NaN, 1]; 425s y = [1, 2, 3, NaN]; 425s t = crosstab (x, y); 425s assert (t, [1, 0, 0; 0, 1, 0]); 425s 12 tests, 12 passed, 0 known failure, 0 skipped 425s [inst/crossval.m] 425s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/crossval.m 425s ***** demo 425s ## Determine the optimal number of clusters using cross-validation 425s 425s ## Declare a function to compute the sum of squared distances 425s ## between data points and a varying number of clusters. 425s function D = dist2clusters (X, Y, k) 425s [Z, Zmu, Zstd] = zscore (X); 425s [~, C] = kmeans (Z, k); 425s ZY = (Y - Zmu) ./ Zstd; 425s d = pdist2 (C, ZY, 'euclidean', 'Smallest', 1); 425s D = sum (d .^ 2); 425s endfunction 425s 425s load fisheriris 425s for k = 1:8 425s fcn = @(X, Y) dist2clusters (X, Y, k); 425s distances = crossval (fcn, meas); 425s cvdist(k) = sum (distances); 425s endfor 425s 425s plot(cvdist) 425s xlabel('Number of Clusters') 425s ylabel('CV Sum of Squared Distances') 425s xlim ([1,8]); 425s ***** test 425s function yfit = regf (Xtrain, ytrain, Xtest) 425s b = regress (ytrain, Xtrain); 425s yfit = Xtest * b; 425s endfunction 425s 425s load carsmall 425s data = [Acceleration Horsepower Weight MPG]; 425s data(any(isnan(data),2),:) = []; 425s 425s y = data(:,4); 425s X = [ones(length(y),1) data(:,1:3)]; 425s rand ("seed", 3); 425s cvMSE = crossval('mse',X,y,'Predfun',@regf); 425s assert (cvMSE, 18.720, 1e-3); 425s ***** error ... 425s crossval ('fe', rand (10, 1), rand (10, 1), 1); 425s ***** error ... 425s crossval ('mse', rand (10, 1), rand (10, 1), 1); 425s ***** error ... 425s crossval ('mse', rand (10, 1), 'Predfun', @(x,y) x + y); 425s ***** error ... 425s crossval ('mse', rand (10, 3), rand (10, 1), 'Predfun', @(x,y) sum (x + y)); 425s ***** error ... 425s crossval ('mse', rand (10, 3), rand (10, 1), 'Predfun', @(x,y,z) sum (x + y)); 425s ***** error crossval (@(x) x); 425s ***** error ... 425s crossval (@(x) x, rand (10, 3), rand (10, 1)); 425s ***** error ... 425s crossval (@(x,y) [x, y], rand (10, 3), rand (10, 1)); 426s ***** error crossval ({1}, 1, 1); 426s ***** error ... 426s crossval (@(x,y) sum ([x; y]), rand (10, 3), 'Holdout', 0.1, 'Leaveout', true) 426s ***** error ... 426s crossval (@(x,y) sum ([x; y]), rand (10, 3), 'Partition', cvpartition (10, 'Leaveout'), 'Stratify', true) 426s 12 tests, 12 passed, 0 known failure, 0 skipped 426s [inst/datasample.m] 426s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/datasample.m 426s ***** error datasample(); 426s ***** error datasample(1); 426s ***** error datasample({1, 2, 3}, 1); 426s ***** error datasample([1 2], -1); 426s ***** error datasample([1 2], 1.5); 426s ***** error datasample([1 2], [1 1]); 426s ***** error datasample([1 2], 'g', [1 1]); 426s ***** error datasample([1 2], 1, -1); 426s ***** error datasample([1 2], 1, 1.5); 426s ***** error datasample([1 2], 1, [1 1]); 426s ***** error datasample([1 2], 1, 1, "Replace", -2); 426s ***** error datasample([1 2], 1, 1, "Weights", "abc"); 426s ***** error datasample([1 2], 1, 1, "Weights", [1 -2 3]); 426s ***** error datasample([1 2], 1, 1, "Weights", ones (2)); 426s ***** error datasample([1 2], 1, 1, "Weights", [1 2 3]); 426s ***** test 426s dat = randn (10, 4); 426s assert (size (datasample (dat, 3, 1)), [3 4]); 426s ***** test 426s dat = randn (10, 4); 426s assert (size (datasample (dat, 3, 2)), [10 3]); 426s 17 tests, 17 passed, 0 known failure, 0 skipped 426s [inst/dcov.m] 426s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dcov.m 426s ***** demo 426s base=@(x) (x- min(x))./(max(x)-min(x)); 426s N = 5e2; 426s x = randn (N,1); x = base (x); 426s z = randn (N,1); z = base (z); 426s # Linear relations 426s cy = [1 0.55 0.3 0 -0.3 -0.55 -1]; 426s ly = x .* cy; 426s ly(:,[1:3 5:end]) = base (ly(:,[1:3 5:end])); 426s # Correlated Gaussian 426s cz = 1 - abs (cy); 426s gy = base ( ly + cz.*z); 426s # Shapes 426s sx = repmat (x,1,7); 426s sy = zeros (size (ly)); 426s v = 2 * rand (size(x,1),2) - 1; 426s sx(:,1) = v(:,1); sy(:,1) = cos(2*pi*sx(:,1)) + 0.5*v(:,2).*exp(-sx(:,1).^2/0.5); 426s R =@(d) [cosd(d) sind(d); -sind(d) cosd(d)]; 426s tmp = R(35) * v.'; 426s sx(:,2) = tmp(1,:); sy(:,2) = tmp(2,:); 426s tmp = R(45) * v.'; 426s sx(:,3) = tmp(1,:); sy(:,3) = tmp(2,:); 426s sx(:,4) = v(:,1); sy(:,4) = sx(:,4).^2 + 0.5*v(:,2); 426s sx(:,5) = v(:,1); sy(:,5) = 3*sign(v(:,2)).*(sx(:,5)).^2 + v(:,2); 426s sx(:,6) = cos (2*pi*v(:,1)) + 0.5*(x-0.5); 426s sy(:,6) = sin (2*pi*v(:,1)) + 0.5*(z-0.5); 426s sx(:,7) = x + sign(v(:,1)); sy(:,7) = z + sign(v(:,2)); 426s sy = base (sy); 426s sx = base (sx); 426s # scaled shape 426s sc = 1/3; 426s ssy = (sy-0.5) * sc + 0.5; 426s n = size (ly,2); 426s ym = 1.2; 426s xm = 0.5; 426s fmt={'horizontalalignment','center'}; 426s ff = "% .2f"; 426s figure (1) 426s for i=1:n 426s subplot(4,n,i); 426s plot (x, gy(:,i), '.b'); 426s axis tight 426s axis off 426s text (xm,ym,sprintf (ff, dcov (x,gy(:,i))),fmt{:}) 426s 426s subplot(4,n,i+n); 426s plot (x, ly(:,i), '.b'); 426s axis tight 426s axis off 426s text (xm,ym,sprintf (ff, dcov (x,ly(:,i))),fmt{:}) 426s 426s subplot(4,n,i+2*n); 426s plot (sx(:,i), sy(:,i), '.b'); 426s axis tight 426s axis off 426s text (xm,ym,sprintf (ff, dcov (sx(:,i),sy(:,i))),fmt{:}) 426s v = axis (); 426s 426s subplot(4,n,i+3*n); 426s plot (sx(:,i), ssy(:,i), '.b'); 426s axis (v) 426s axis off 426s text (xm,ym,sprintf (ff, dcov (sx(:,i),ssy(:,i))),fmt{:}) 426s endfor 426s ***** error dcov (randn (30, 5), randn (25,5)) 426s 1 test, 1 passed, 0 known failure, 0 skipped 426s [inst/dendrogram.m] 426s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dendrogram.m 426s ***** demo 426s ## simple dendrogram 426s y = [4, 5; 2, 6; 3, 7; 8, 9; 1, 10]; 426s y(:,3) = 1:5; 426s dendrogram (y); 426s title ("simple dendrogram"); 426s ***** demo 426s ## another simple dendrogram 426s v = 2 * rand (30, 1) - 1; 426s d = abs (bsxfun (@minus, v(:, 1), v(:, 1)')); 426s y = linkage (squareform (d, "tovector")); 426s dendrogram (y); 426s title ("another simple dendrogram"); 426s ***** demo 426s ## collapsed tree, find all the leaves of node 5 426s X = randn (60, 2); 426s D = pdist (X); 426s y = linkage (D, "average"); 426s subplot (2, 1, 1); 426s title ("original tree"); 426s dendrogram (y, 0); 426s subplot (2, 1, 2); 426s title ("collapsed tree"); 426s [~, t] = dendrogram (y, 20); 426s find(t == 5) 426s ***** demo 426s ## optimal leaf order 426s X = randn (30, 2); 426s D = pdist (X); 426s y = linkage (D, "average"); 426s order = optimalleaforder (y, D); 426s subplot (2, 1, 1); 426s title ("original leaf order"); 426s dendrogram (y); 426s subplot (2, 1, 2); 426s title ("optimal leaf order"); 426s dendrogram (y, "Reorder", order); 426s ***** demo 426s ## horizontal orientation and labels 426s X = randn (8, 2); 426s D = pdist (X); 426s L = ["Snow White"; "Doc"; "Grumpy"; "Happy"; "Sleepy"; "Bashful"; ... 426s "Sneezy"; "Dopey"]; 426s y = linkage (D, "average"); 426s dendrogram (y, "Orientation", "left", "Labels", L); 426s title ("horizontal orientation and labels"); 426s ***** shared visibility_setting 426s visibility_setting = get (0, "DefaultFigureVisible"); 426s ***** test 426s hf = figure ("visible", "off"); 426s unwind_protect 426s y = [4, 5; 2, 6; 3, 7; 8, 9; 1, 10]; 426s y(:,3) = 1:5; 426s dendrogram (y); 426s unwind_protect_cleanup 426s close (hf); 426s end_unwind_protect 426s ***** test 426s hf = figure ("visible", "off"); 426s unwind_protect 426s y = [4, 5; 2, 6; 3, 7; 8, 9; 1, 10]; 426s y(:,3) = 1:5; 426s dendrogram (y); 426s unwind_protect_cleanup 426s close (hf); 426s end_unwind_protect 426s ***** test 426s hf = figure ("visible", "off"); 426s unwind_protect 426s v = 2 * rand (30, 1) - 1; 426s d = abs (bsxfun (@minus, v(:, 1), v(:, 1)')); 426s y = linkage (squareform (d, "tovector")); 426s dendrogram (y); 426s unwind_protect_cleanup 426s close (hf); 426s end_unwind_protect 427s ***** test 427s hf = figure ("visible", "off"); 427s unwind_protect 427s X = randn (30, 2); 427s D = pdist (X); 427s y = linkage (D, "average"); 427s order = optimalleaforder (y, D); 427s subplot (2, 1, 1); 427s title ("original leaf order"); 427s dendrogram (y); 427s subplot (2, 1, 2); 427s title ("optimal leaf order"); 427s dendrogram (y, "Reorder", order); 427s unwind_protect_cleanup 427s close (hf); 427s end_unwind_protect 429s ***** error dendrogram (); 429s ***** error dendrogram (ones (2, 2), 1); 429s ***** error dendrogram ([1 2 1], 1, "xxx", "xxx"); 429s ***** error dendrogram ([1 2 1], "Reorder", "xxx"); 429s ***** error dendrogram ([1 2 1], "Reorder", [1 2 3 4]); 429s fail ('dendrogram ([1 2 1], "Orientation", "north")', "invalid orientation .*") 429s 9 tests, 9 passed, 0 known failure, 0 skipped 429s [inst/dist_fit/betafit.m] 429s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fit/betafit.m 429s ***** demo 429s ## Sample 2 populations from different Beta distributions 429s randg ("seed", 1); # for reproducibility 429s r1 = betarnd (2, 5, 500, 1); 429s randg ("seed", 2); # for reproducibility 429s r2 = betarnd (2, 2, 500, 1); 429s r = [r1, r2]; 429s 429s ## Plot them normalized and fix their colors 429s hist (r, 12, 15); 429s h = findobj (gca, "Type", "patch"); 429s set (h(1), "facecolor", "c"); 429s set (h(2), "facecolor", "g"); 429s hold on 429s 429s ## Estimate their shape parameters 429s a_b_A = betafit (r(:,1)); 429s a_b_B = betafit (r(:,2)); 429s 429s ## Plot their estimated PDFs 429s x = [min(r(:)):0.01:max(r(:))]; 429s y = betapdf (x, a_b_A(1), a_b_A(2)); 429s plot (x, y, "-pr"); 429s y = betapdf (x, a_b_B(1), a_b_B(2)); 429s plot (x, y, "-sg"); 429s ylim ([0, 4]) 429s legend ({"Normalized HIST of sample 1 with α=2 and β=5", ... 429s "Normalized HIST of sample 2 with α=2 and β=2", ... 429s sprintf("PDF for sample 1 with estimated α=%0.2f and β=%0.2f", ... 429s a_b_A(1), a_b_A(2)), ... 429s sprintf("PDF for sample 2 with estimated α=%0.2f and β=%0.2f", ... 429s a_b_B(1), a_b_B(2))}) 429s title ("Two population samples from different Beta distributions") 429s hold off 429s ***** test 429s x = 0.01:0.02:0.99; 429s [paramhat, paramci] = betafit (x); 429s paramhat_out = [1.0199, 1.0199]; 429s paramci_out = [0.6947, 0.6947; 1.4974, 1.4974]; 429s assert (paramhat, paramhat_out, 1e-4); 429s assert (paramci, paramci_out, 1e-4); 429s ***** test 429s x = 0.01:0.02:0.99; 429s [paramhat, paramci] = betafit (x, 0.01); 429s paramci_out = [0.6157, 0.6157; 1.6895, 1.6895]; 429s assert (paramci, paramci_out, 1e-4); 429s ***** test 429s x = 0.00:0.02:1; 429s [paramhat, paramci] = betafit (x); 429s paramhat_out = [0.0875, 0.1913]; 429s paramci_out = [0.0822, 0.1490; 0.0931, 0.2455]; 429s assert (paramhat, paramhat_out, 1e-4); 429s assert (paramci, paramci_out, 1e-4); 429s ***** error betafit ([0.2, 0.5+i]); 429s ***** error betafit (ones (2,2) * 0.5); 429s ***** error betafit ([0.5, 1.2]); 429s ***** error betafit ([0.1, 0.1]); 429s ***** error betafit ([0.01:0.1:0.99], 1.2); 429s ***** error ... 429s betafit ([0.01:0.01:0.05], 0.05, [1, 2, 3, 2]); 429s ***** error ... 429s betafit ([0.01:0.01:0.05], 0.05, [1, 2, 3, 2, -1]); 429s ***** error ... 429s betafit ([0.01:0.01:0.05], 0.05, [1, 2, 3, 2, 1.5]); 429s ***** error ... 429s betafit ([0.01:0.01:0.05], 0.05, struct ("option", 234)); 429s ***** error ... 429s betafit ([0.01:0.01:0.05], 0.05, ones (1,5), struct ("option", 234)); 429s 13 tests, 13 passed, 0 known failure, 0 skipped 429s [inst/dist_fit/betalike.m] 429s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fit/betalike.m 429s ***** test 429s x = 0.01:0.02:0.99; 429s [nlogL, avar] = betalike ([2.3, 1.2], x); 429s avar_out = [0.03691678, 0.02803056; 0.02803056, 0.03965629]; 429s assert (nlogL, 17.873477715879040, 3e-14); 429s assert (avar, avar_out, 1e-7); 429s ***** test 429s x = 0.01:0.02:0.99; 429s [nlogL, avar] = betalike ([1, 4], x); 429s avar_out = [0.02793282, 0.02717274; 0.02717274, 0.03993361]; 429s assert (nlogL, 79.648061114839550, 1e-13); 429s assert (avar, avar_out, 1e-7); 429s ***** test 429s x = 0.00:0.02:1; 429s [nlogL, avar] = betalike ([1, 4], x); 429s avar_out = [0.00000801564765, 0.00000131397245; ... 429s 0.00000131397245, 0.00070827639442]; 429s assert (nlogL, 573.2008434477486, 1e-10); 429s assert (avar, avar_out, 1e-14); 429s ***** error ... 429s betalike ([12, 15]); 429s ***** error betalike ([12, 15, 3], [1:50]); 429s ***** error ... 429s betalike ([12, 15], ones (10, 1), ones (8,1)) 429s ***** error ... 429s betalike ([12, 15], ones (1, 8), [1 1 1 1 1 1 1 -1]) 429s ***** error ... 429s betalike ([12, 15], ones (1, 8), [1 1 1 1 1 1 1 1.5]) 429s 8 tests, 8 passed, 0 known failure, 0 skipped 429s [inst/dist_fit/binofit.m] 429s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fit/binofit.m 429s ***** demo 429s ## Sample 2 populations from different binomial distributions 429s rand ("seed", 1); # for reproducibility 429s r1 = binornd (50, 0.15, 1000, 1); 429s rand ("seed", 2); # for reproducibility 429s r2 = binornd (100, 0.5, 1000, 1); 429s r = [r1, r2]; 429s 429s ## Plot them normalized and fix their colors 429s hist (r, 23, 0.35); 429s h = findobj (gca, "Type", "patch"); 429s set (h(1), "facecolor", "c"); 429s set (h(2), "facecolor", "g"); 429s hold on 429s 429s ## Estimate their probability of success 429s pshatA = binofit (r(:,1), 50); 429s pshatB = binofit (r(:,2), 100); 429s 429s ## Plot their estimated PDFs 429s x = [min(r(:,1)):max(r(:,1))]; 429s y = binopdf (x, 50, mean (pshatA)); 429s plot (x, y, "-pg"); 429s x = [min(r(:,2)):max(r(:,2))]; 429s y = binopdf (x, 100, mean (pshatB)); 429s plot (x, y, "-sc"); 429s ylim ([0, 0.2]) 429s legend ({"Normalized HIST of sample 1 with ps=0.15", ... 429s "Normalized HIST of sample 2 with ps=0.50", ... 429s sprintf("PDF for sample 1 with estimated ps=%0.2f", ... 429s mean (pshatA)), ... 429s sprintf("PDF for sample 2 with estimated ps=%0.2f", ... 429s mean (pshatB))}) 429s title ("Two population samples from different binomial distributions") 429s hold off 429s ***** test 429s x = 0:3; 429s [pshat, psci] = binofit (x, 3); 429s assert (pshat, [0, 0.3333, 0.6667, 1], 1e-4); 429s assert (psci(1,:), [0, 0.7076], 1e-4); 429s assert (psci(2,:), [0.0084, 0.9057], 1e-4); 429s assert (psci(3,:), [0.0943, 0.9916], 1e-4); 429s assert (psci(4,:), [0.2924, 1.0000], 1e-4); 429s ***** error ... 429s binofit ([1 2 3 4]) 429s ***** error ... 429s binofit ([-1, 4, 3, 2], [1, 2, 3, 3]) 429s ***** error binofit (ones(2), [1, 2, 3, 3]) 429s ***** error ... 429s binofit ([1, 4, 3, 2], [1, 2, -1, 3]) 429s ***** error ... 429s binofit ([1, 4, 3, 2], [5, 5, 5]) 429s ***** error ... 429s binofit ([1, 4, 3, 2], [5, 3, 5, 5]) 429s ***** error binofit ([1, 2, 1], 3, 1.2); 429s ***** error binofit ([1, 2, 1], 3, 0); 429s ***** error binofit ([1, 2, 1], 3, "alpha"); 429s 10 tests, 10 passed, 0 known failure, 0 skipped 429s [inst/dist_fit/binolike.m] 429s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fit/binolike.m 429s ***** assert (binolike ([3, 0.333], [0:3]), 6.8302, 1e-4) 429s ***** assert (binolike ([3, 0.333], 0), 1.2149, 1e-4) 429s ***** assert (binolike ([3, 0.333], 1), 0.8109, 1e-4) 429s ***** assert (binolike ([3, 0.333], 2), 1.5056, 1e-4) 429s ***** assert (binolike ([3, 0.333], 3), 3.2988, 1e-4) 429s ***** test 429s [nlogL, acov] = binolike ([3, 0.333], 3); 429s assert (acov(4), 0.0740, 1e-4) 429s ***** error binolike (3.25) 429s ***** error binolike ([5, 0.2], ones (2)) 429s ***** error ... 429s binolike ([1, 0.2, 3], [1, 3, 5, 7]) 429s ***** error binolike ([1.5, 0.2], 1) 429s ***** error binolike ([-1, 0.2], 1) 429s ***** error binolike ([Inf, 0.2], 1) 429s ***** error binolike ([5, 1.2], [3, 5]) 429s ***** error binolike ([5, -0.2], [3, 5]) 429s ***** error ... 429s binolike ([5, 0.5], ones (10, 1), ones (8,1)) 429s ***** error ... 429s binolike ([5, 0.5], ones (1, 8), [1 1 1 1 1 1 1 -1]) 429s ***** error binolike ([5, 0.2], [-1, 3]) 429s ***** error binolike ([5, 0.2], [3, 5, 7]) 429s 18 tests, 18 passed, 0 known failure, 0 skipped 429s [inst/dist_fit/bisafit.m] 429s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fit/bisafit.m 429s ***** demo 429s ## Sample 3 populations from different Birnbaum-Saunders distributions 429s rand ("seed", 5); # for reproducibility 429s r1 = bisarnd (1, 0.5, 2000, 1); 429s rand ("seed", 2); # for reproducibility 429s r2 = bisarnd (2, 0.3, 2000, 1); 429s rand ("seed", 7); # for reproducibility 429s r3 = bisarnd (4, 0.5, 2000, 1); 429s r = [r1, r2, r3]; 429s 429s ## Plot them normalized and fix their colors 429s hist (r, 80, 4.2); 429s h = findobj (gca, "Type", "patch"); 429s set (h(1), "facecolor", "c"); 429s set (h(2), "facecolor", "g"); 429s set (h(3), "facecolor", "r"); 429s ylim ([0, 1.1]); 429s xlim ([0, 8]); 429s hold on 429s 429s ## Estimate their α and β parameters 429s beta_gammaA = bisafit (r(:,1)); 429s beta_gammaB = bisafit (r(:,2)); 429s beta_gammaC = bisafit (r(:,3)); 429s 429s ## Plot their estimated PDFs 429s x = [0:0.1:8]; 429s y = bisapdf (x, beta_gammaA(1), beta_gammaA(2)); 429s plot (x, y, "-pr"); 429s y = bisapdf (x, beta_gammaB(1), beta_gammaB(2)); 429s plot (x, y, "-sg"); 429s y = bisapdf (x, beta_gammaC(1), beta_gammaC(2)); 429s plot (x, y, "-^c"); 429s hold off 429s legend ({"Normalized HIST of sample 1 with β=1 and γ=0.5", ... 429s "Normalized HIST of sample 2 with β=2 and γ=0.3", ... 429s "Normalized HIST of sample 3 with β=4 and γ=0.5", ... 429s sprintf("PDF for sample 1 with estimated β=%0.2f and γ=%0.2f", ... 429s beta_gammaA(1), beta_gammaA(2)), ... 429s sprintf("PDF for sample 2 with estimated β=%0.2f and γ=%0.2f", ... 429s beta_gammaB(1), beta_gammaB(2)), ... 429s sprintf("PDF for sample 3 with estimated β=%0.2f and γ=%0.2f", ... 429s beta_gammaC(1), beta_gammaC(2))}) 429s title ("Three population samples from different Birnbaum-Saunders distributions") 429s hold off 429s ***** test 429s paramhat = bisafit ([1:50]); 429s paramhat_out = [16.2649, 1.0156]; 429s assert (paramhat, paramhat_out, 1e-4); 429s ***** test 429s paramhat = bisafit ([1:5]); 429s paramhat_out = [2.5585, 0.5839]; 429s assert (paramhat, paramhat_out, 1e-4); 429s ***** error bisafit (ones (2,5)); 429s ***** error bisafit ([-1 2 3 4]); 429s ***** error bisafit ([1, 2, 3, 4, 5], 1.2); 429s ***** error bisafit ([1, 2, 3, 4, 5], 0); 429s ***** error bisafit ([1, 2, 3, 4, 5], "alpha"); 429s ***** error ... 429s bisafit ([1, 2, 3, 4, 5], 0.05, [1 1 0]); 429s ***** error ... 429s bisafit ([1, 2, 3, 4, 5], [], [1 1 0 1 1]'); 429s ***** error ... 429s bisafit ([1, 2, 3, 4, 5], 0.05, zeros (1,5), [1 1 0]); 429s ***** error ... 429s bisafit ([1, 2, 3, 4, 5], [], [], [1 1 0 1 1]'); 429s ***** error ... 429s bisafit ([1, 2, 3, 4, 5], 0.05, [], [], 2); 429s 12 tests, 12 passed, 0 known failure, 0 skipped 430s [inst/dist_fit/bisalike.m] 430s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fit/bisalike.m 430s ***** test 430s nlogL = bisalike ([16.2649, 1.0156], [1:50]); 430s assert (nlogL, 215.5905, 1e-4); 430s ***** test 430s nlogL = bisalike ([2.5585, 0.5839], [1:5]); 430s assert (nlogL, 8.9950, 1e-4); 430s ***** error bisalike (3.25) 430s ***** error bisalike ([5, 0.2], ones (2)) 430s ***** error bisalike ([5, 0.2], [-1, 3]) 430s ***** error ... 430s bisalike ([1, 0.2, 3], [1, 3, 5, 7]) 430s ***** error ... 430s bisalike ([1.5, 0.2], [1:5], [0, 0, 0]) 430s ***** error ... 430s bisalike ([1.5, 0.2], [1:5], [0, 0, 0, 0, 0], [1, 1, 1]) 430s ***** error ... 430s bisalike ([1.5, 0.2], [1:5], [], [1, 1, 1]) 430s 9 tests, 9 passed, 0 known failure, 0 skipped 430s [inst/dist_fit/burrfit.m] 430s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fit/burrfit.m 430s ***** demo 430s ## Sample 3 populations from different Burr type XII distributions 430s rand ("seed", 4); # for reproducibility 430s r1 = burrrnd (3.5, 2, 2.5, 10000, 1); 430s rand ("seed", 2); # for reproducibility 430s r2 = burrrnd (1, 3, 1, 10000, 1); 430s rand ("seed", 9); # for reproducibility 430s r3 = burrrnd (0.5, 2, 3, 10000, 1); 430s r = [r1, r2, r3]; 430s 430s ## Plot them normalized and fix their colors 430s hist (r, [0.1:0.2:20], [18, 5, 3]); 430s h = findobj (gca, "Type", "patch"); 430s set (h(1), "facecolor", "c"); 430s set (h(2), "facecolor", "g"); 430s set (h(3), "facecolor", "r"); 430s ylim ([0, 3]); 430s xlim ([0, 5]); 430s hold on 430s 430s ## Estimate their α and β parameters 430s lambda_c_kA = burrfit (r(:,1)); 430s lambda_c_kB = burrfit (r(:,2)); 430s lambda_c_kC = burrfit (r(:,3)); 430s 430s ## Plot their estimated PDFs 430s x = [0.01:0.15:15]; 430s y = burrpdf (x, lambda_c_kA(1), lambda_c_kA(2), lambda_c_kA(3)); 430s plot (x, y, "-pr"); 430s y = burrpdf (x, lambda_c_kB(1), lambda_c_kB(2), lambda_c_kB(3)); 430s plot (x, y, "-sg"); 430s y = burrpdf (x, lambda_c_kC(1), lambda_c_kC(2), lambda_c_kC(3)); 430s plot (x, y, "-^c"); 430s hold off 430s legend ({"Normalized HIST of sample 1 with λ=3.5, c=2, and k=2.5", ... 430s "Normalized HIST of sample 2 with λ=1, c=3, and k=1", ... 430s "Normalized HIST of sample 3 with λ=0.5, c=2, and k=3", ... 430s sprintf("PDF for sample 1 with estimated λ=%0.2f, c=%0.2f, and k=%0.2f", ... 430s lambda_c_kA(1), lambda_c_kA(2), lambda_c_kA(3)), ... 430s sprintf("PDF for sample 2 with estimated λ=%0.2f, c=%0.2f, and k=%0.2f", ... 430s lambda_c_kB(1), lambda_c_kB(2), lambda_c_kB(3)), ... 430s sprintf("PDF for sample 3 with estimated λ=%0.2f, c=%0.2f, and k=%0.2f", ... 430s lambda_c_kC(1), lambda_c_kC(2), lambda_c_kC(3))}) 430s title ("Three population samples from different Burr type XII distributions") 430s hold off 430s ***** test 430s l = 1; c = 2; k = 3; 430s r = burrrnd (l, c, k, 100000, 1); 430s lambda_c_kA = burrfit (r); 430s assert (lambda_c_kA(1), l, 0.2); 430s assert (lambda_c_kA(2), c, 0.2); 430s assert (lambda_c_kA(3), k, 0.3); 433s ***** test 433s l = 0.5; c = 1; k = 3; 433s r = burrrnd (l, c, k, 100000, 1); 433s lambda_c_kA = burrfit (r); 433s assert (lambda_c_kA(1), l, 0.2); 433s assert (lambda_c_kA(2), c, 0.2); 433s assert (lambda_c_kA(3), k, 0.3); 437s ***** test 437s l = 1; c = 3; k = 1; 437s r = burrrnd (l, c, k, 100000, 1); 437s lambda_c_kA = burrfit (r); 437s assert (lambda_c_kA(1), l, 0.2); 437s assert (lambda_c_kA(2), c, 0.2); 437s assert (lambda_c_kA(3), k, 0.3); 440s ***** test 440s l = 3; c = 2; k = 1; 440s r = burrrnd (l, c, k, 100000, 1); 440s lambda_c_kA = burrfit (r); 440s assert (lambda_c_kA(1), l, 0.2); 440s assert (lambda_c_kA(2), c, 0.2); 440s assert (lambda_c_kA(3), k, 0.3); 444s ***** test 444s l = 4; c = 2; k = 4; 444s r = burrrnd (l, c, k, 100000, 1); 444s lambda_c_kA = burrfit (r); 444s assert (lambda_c_kA(1), l, 0.2); 444s assert (lambda_c_kA(2), c, 0.2); 444s assert (lambda_c_kA(3), k, 0.3); 447s ***** error burrfit (ones (2,5)); 447s ***** error burrfit ([-1 2 3 4]); 447s ***** error burrfit ([1, 2, 3, 4, 5], 1.2); 447s ***** error burrfit ([1, 2, 3, 4, 5], 0); 447s ***** error burrfit ([1, 2, 3, 4, 5], "alpha"); 447s ***** error ... 447s burrfit ([1, 2, 3, 4, 5], 0.05, [1 1 0]); 447s ***** error ... 447s burrfit ([1, 2, 3, 4, 5], [], [1 1 0 1 1]'); 447s ***** error 447s burrfit ([1, 2, 3, 4, 5], 0.05, [], [1, 1, 5]) 447s ***** error 447s burrfit ([1, 2, 3, 4, 5], 0.05, [], [1, 5, 1, 1, -1]) 447s ***** error ... 447s burrfit ([1:10], 0.05, [], [], 5) 447s 15 tests, 15 passed, 0 known failure, 0 skipped 447s [inst/dist_fit/burrlike.m] 447s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fit/burrlike.m 447s ***** error burrlike (3.25) 447s ***** error burrlike ([1, 2, 3], ones (2)) 447s ***** error burrlike ([1, 2, 3], [-1, 3]) 447s ***** error ... 447s burrlike ([1, 2], [1, 3, 5, 7]) 447s ***** error ... 447s burrlike ([1, 2, 3, 4], [1, 3, 5, 7]) 447s ***** error ... 447s burrlike ([1, 2, 3], [1:5], [0, 0, 0]) 447s ***** error ... 447s burrlike ([1, 2, 3], [1:5], [0, 0, 0, 0, 0], [1, 1, 1]) 447s ***** error ... 447s burrlike ([1, 2, 3], [1:5], [], [1, 1, 1]) 447s 8 tests, 8 passed, 0 known failure, 0 skipped 447s [inst/dist_fit/evfit.m] 447s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fit/evfit.m 447s ***** demo 447s ## Sample 3 populations from different extreme value distributions 447s rand ("seed", 1); # for reproducibility 447s r1 = evrnd (2, 5, 400, 1); 447s rand ("seed", 12); # for reproducibility 447s r2 = evrnd (-5, 3, 400, 1); 447s rand ("seed", 13); # for reproducibility 447s r3 = evrnd (14, 8, 400, 1); 447s r = [r1, r2, r3]; 447s 447s ## Plot them normalized and fix their colors 447s hist (r, 25, 0.4); 447s h = findobj (gca, "Type", "patch"); 447s set (h(1), "facecolor", "c"); 447s set (h(2), "facecolor", "g"); 447s set (h(3), "facecolor", "r"); 447s ylim ([0, 0.28]) 447s xlim ([-30, 30]); 447s hold on 447s 447s ## Estimate their MU and SIGMA parameters 447s mu_sigmaA = evfit (r(:,1)); 447s mu_sigmaB = evfit (r(:,2)); 447s mu_sigmaC = evfit (r(:,3)); 447s 447s ## Plot their estimated PDFs 447s x = [min(r(:)):max(r(:))]; 447s y = evpdf (x, mu_sigmaA(1), mu_sigmaA(2)); 447s plot (x, y, "-pr"); 447s y = evpdf (x, mu_sigmaB(1), mu_sigmaB(2)); 447s plot (x, y, "-sg"); 447s y = evpdf (x, mu_sigmaC(1), mu_sigmaC(2)); 447s plot (x, y, "-^c"); 447s legend ({"Normalized HIST of sample 1 with μ=2 and σ=5", ... 447s "Normalized HIST of sample 2 with μ=-5 and σ=3", ... 447s "Normalized HIST of sample 3 with μ=14 and σ=8", ... 447s sprintf("PDF for sample 1 with estimated μ=%0.2f and σ=%0.2f", ... 447s mu_sigmaA(1), mu_sigmaA(2)), ... 447s sprintf("PDF for sample 2 with estimated μ=%0.2f and σ=%0.2f", ... 447s mu_sigmaB(1), mu_sigmaB(2)), ... 447s sprintf("PDF for sample 3 with estimated μ=%0.2f and σ=%0.2f", ... 447s mu_sigmaC(1), mu_sigmaC(2))}) 447s title ("Three population samples from different extreme value distributions") 447s hold off 447s ***** test 447s x = 1:50; 447s [paramhat, paramci] = evfit (x); 447s paramhat_out = [32.6811, 13.0509]; 447s paramci_out = [28.8504, 10.5294; 36.5118, 16.1763]; 447s assert (paramhat, paramhat_out, 1e-4); 447s assert (paramci, paramci_out, 1e-4); 447s ***** test 447s x = 1:50; 447s [paramhat, paramci] = evfit (x, 0.01); 447s paramci_out = [27.6468, 9.8426; 37.7155, 17.3051]; 447s assert (paramci, paramci_out, 1e-4); 447s ***** error evfit (ones (2,5)); 447s ***** error evfit (single (ones (1,5))); 447s ***** error evfit ([1, 2, 3, 4, NaN]); 447s ***** error evfit ([1, 2, 3, 4, 5], 1.2); 447s ***** error 447s evfit ([1 2 3], 0.05, [], [1 5]) 447s ***** error 447s evfit ([1 2 3], 0.05, [], [1 5 -1]) 447s ***** error ... 447s evfit ([1:10], 0.05, [], [], 5) 447s 9 tests, 9 passed, 0 known failure, 0 skipped 447s [inst/dist_fit/evlike.m] 447s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fit/evlike.m 447s ***** test 447s x = 1:50; 447s [nlogL, acov] = evlike ([2.3, 1.2], x); 447s avar_out = [-1.2778e-13, 3.1859e-15; 3.1859e-15, -7.9430e-17]; 447s assert (nlogL, 3.242264755689906e+17, 1e-14); 447s assert (acov, avar_out, 1e-3); 447s ***** test 447s x = 1:50; 447s [nlogL, acov] = evlike ([2.3, 1.2], x * 0.5); 447s avar_out = [-7.6094e-05, 3.9819e-06; 3.9819e-06, -2.0836e-07]; 447s assert (nlogL, 481898704.0472211, 1e-6); 447s assert (acov, avar_out, 1e-3); 447s ***** test 447s x = 1:50; 447s [nlogL, acov] = evlike ([21, 15], x); 447s avar_out = [11.73913876598908, -5.9546128523121216; ... 447s -5.954612852312121, 3.708060045170236]; 447s assert (nlogL, 223.7612479380652, 1e-13); 447s assert (acov, avar_out, 1e-14); 447s ***** error evlike ([12, 15]) 447s ***** error evlike ([12, 15, 3], [1:50]) 447s ***** error evlike ([12, 3], ones (10, 2)) 447s ***** error ... 447s evlike ([12, 15], [1:50], [1, 2, 3]) 447s ***** error ... 447s evlike ([12, 15], [1:50], [], [1, 2, 3]) 447s 8 tests, 8 passed, 0 known failure, 0 skipped 447s [inst/dist_fit/expfit.m] 447s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fit/expfit.m 447s ***** demo 447s ## Sample 3 populations from 3 different exponential distributions 447s rande ("seed", 1); # for reproducibility 447s r1 = exprnd (2, 4000, 1); 447s rande ("seed", 2); # for reproducibility 447s r2 = exprnd (5, 4000, 1); 447s rande ("seed", 3); # for reproducibility 447s r3 = exprnd (12, 4000, 1); 447s r = [r1, r2, r3]; 447s 447s ## Plot them normalized and fix their colors 447s hist (r, 48, 0.52); 447s h = findobj (gca, "Type", "patch"); 447s set (h(1), "facecolor", "c"); 447s set (h(2), "facecolor", "g"); 447s set (h(3), "facecolor", "r"); 447s hold on 447s 447s ## Estimate their mu parameter 447s muhat = expfit (r); 447s 447s ## Plot their estimated PDFs 447s x = [0:max(r(:))]; 447s y = exppdf (x, muhat(1)); 447s plot (x, y, "-pr"); 447s y = exppdf (x, muhat(2)); 447s plot (x, y, "-sg"); 447s y = exppdf (x, muhat(3)); 447s plot (x, y, "-^c"); 447s ylim ([0, 0.6]) 447s xlim ([0, 40]) 447s legend ({"Normalized HIST of sample 1 with μ=2", ... 447s "Normalized HIST of sample 2 with μ=5", ... 447s "Normalized HIST of sample 3 with μ=12", ... 447s sprintf("PDF for sample 1 with estimated μ=%0.2f", muhat(1)), ... 447s sprintf("PDF for sample 2 with estimated μ=%0.2f", muhat(2)), ... 447s sprintf("PDF for sample 3 with estimated μ=%0.2f", muhat(3))}) 447s title ("Three population samples from different exponential distributions") 447s hold off 447s ***** assert (expfit (1), 1) 447s ***** assert (expfit (1:3), 2) 447s ***** assert (expfit ([1:3]'), 2) 447s ***** assert (expfit (1:3, []), 2) 447s ***** assert (expfit (1:3, [], [], []), 2) 447s ***** assert (expfit (magic (3)), [5 5 5]) 447s ***** assert (expfit (cat (3, magic (3), 2*magic (3))), cat (3,[5 5 5], [10 10 10])) 447s ***** assert (expfit (1:3, 0.1, [0 0 0], [1 1 1]), 2) 447s ***** assert (expfit ([1:3]', 0.1, [0 0 0]', [1 1 1]'), 2) 447s ***** assert (expfit (1:3, 0.1, [0 0 0]', [1 1 1]'), 2) 447s ***** assert (expfit (1:3, 0.1, [1 0 0], [1 1 1]), 3) 447s ***** assert (expfit (1:3, 0.1, [0 0 0], [4 1 1]), 1.5) 447s ***** assert (expfit (1:3, 0.1, [1 0 0], [4 1 1]), 4.5) 447s ***** assert (expfit (1:3, 0.1, [1 0 1], [4 1 1]), 9) 447s ***** assert (expfit (1:3, 0.1, [], [-1 1 1]), 4) 447s ***** assert (expfit (1:3, 0.1, [], [0.5 1 1]), 2.2) 447s ***** assert (expfit (1:3, 0.1, [1 1 1]), NaN) 447s ***** assert (expfit (1:3, 0.1, [], [0 0 0]), NaN) 447s ***** assert (expfit (reshape (1:9, [3 3])), [2 5 8]) 447s ***** assert (expfit (reshape (1:9, [3 3]), [], eye(3)), [3 7.5 12]) 447s ***** assert (expfit (reshape (1:9, [3 3]), [], 2*eye(3)), [3 7.5 12]) 447s ***** assert (expfit (reshape (1:9, [3 3]), [], [], [2 2 2; 1 1 1; 1 1 1]), ... 447s [1.75 4.75 7.75]) 447s ***** assert (expfit (reshape (1:9, [3 3]), [], [], [2 2 2; 1 1 1; 1 1 1]), ... 447s [1.75 4.75 7.75]) 447s ***** assert (expfit (reshape (1:9, [3 3]), [], eye(3), [2 2 2; 1 1 1; 1 1 1]), ... 447s [3.5 19/3 31/3]) 448s ***** assert ([~,muci] = expfit (1:3, 0), [0; Inf]) 448s ***** assert ([~,muci] = expfit (1:3, 2), [Inf; 0]) 448s ***** assert ([~,muci] = expfit (1:3, 0.1, [1 1 1]), [NaN; NaN]) 448s ***** assert ([~,muci] = expfit (1:3, 0.1, [], [0 0 0]), [NaN; NaN]) 448s ***** assert ([~,muci] = expfit (1:3, -1), [NaN; NaN]) 448s ***** assert ([~,muci] = expfit (1:3, 5), [NaN; NaN]) 448s ***** assert ([~,muci] = expfit (1:3), [0.830485728373393; 9.698190330474096], ... 448s 1000*eps) 448s ***** assert ([~,muci] = expfit (1:3, 0.1), ... 448s [0.953017262058213; 7.337731146400207], 1000*eps) 448s ***** assert ([~,muci] = expfit ([1:3;2:4]), ... 448s [0.538440777613095, 0.897401296021825, 1.256361814430554; ... 448s 12.385982973214016, 20.643304955356694, 28.900626937499371], ... 448s 1000*eps) 448s ***** assert ([~,muci] = expfit ([1:3;2:4], [], [1 1 1; 0 0 0]), ... 448s 100*[0.008132550920455, 0.013554251534091, 0.018975952147727; ... 448s 1.184936706156216, 1.974894510260360, 2.764852314364504], ... 448s 1000*eps) 448s ***** assert ([~,muci] = expfit ([1:3;2:4], [], [], [3 3 3; 1 1 1]), ... 448s [0.570302756652583, 1.026544961974649, 1.482787167296715; ... 448s 4.587722594914109, 8.257900670845396, 11.928078746776684], ... 448s 1000*eps) 448s ***** assert ([~,muci] = expfit ([1:3;2:4], [], [0 0 0; 1 1 1], [3 3 3; 1 1 1]), ... 448s [0.692071440311161, 1.245728592560089, 1.799385744809018; ... 448s 8.081825275395081, 14.547285495711145, 21.012745716027212], ... 448s 1000*eps) 448s ***** test 448s x = reshape (1:8, [4 2]); 448s x(4) = NaN; 448s [muhat,muci] = expfit (x); 448s assert ({muhat, muci}, {[NaN, 6.5], ... 448s [NaN, 2.965574334593430;NaN, 23.856157493553368]}, 1000*eps); 448s ***** test 448s x = magic (3); 448s censor = [0 1 0; 0 1 0; 0 1 0]; 448s freq = [1 1 0; 1 1 0; 1 1 0]; 448s [muhat,muci] = expfit (x, [], censor, freq); 448s assert ({muhat, muci}, {[5 NaN NaN], ... 448s [[2.076214320933482; 24.245475826185242],NaN(2)]}, 1000*eps); 448s ***** error expfit () 448s ***** error expfit (1,2,3,4,5) 448s ***** error [a b censor] = expfit (1) 448s ***** error expfit (1, [1 2]) 448s ***** error expfit ([-1 2 3 4 5]) 448s ***** error expfit ([1:5], [], "test") 448s ***** error expfit ([1:5], [], [], "test") 448s ***** error expfit ([1:5], [], [0 0 0 0]) 448s ***** error expfit ([1:5], [], [], [1 1 1 1]) 448s 47 tests, 47 passed, 0 known failure, 0 skipped 448s [inst/dist_fit/explike.m] 448s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fit/explike.m 448s ***** test 448s x = 12; 448s beta = 5; 448s [L, V] = explike (beta, x); 448s expected_L = 4.0094; 448s expected_V = 6.5789; 448s assert (L, expected_L, 0.001); 448s assert (V, expected_V, 0.001); 448s ***** test 448s x = 1:5; 448s beta = 2; 448s [L, V] = explike (beta, x); 448s expected_L = 10.9657; 448s expected_V = 0.4; 448s assert (L, expected_L, 0.001); 448s assert (V, expected_V, 0.001); 448s ***** error explike () 448s ***** error explike (2) 448s ***** error explike ([12, 3], [1:50]) 448s ***** error explike (3, ones (10, 2)) 448s ***** error ... 448s explike (3, [1:50], [1, 2, 3]) 448s ***** error ... 448s explike (3, [1:50], [], [1, 2, 3]) 448s 8 tests, 8 passed, 0 known failure, 0 skipped 448s [inst/dist_fit/gamfit.m] 448s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fit/gamfit.m 448s ***** demo 448s ## Sample 3 populations from different Gamma distributions 448s randg ("seed", 5); # for reproducibility 448s r1 = gamrnd (1, 2, 2000, 1); 448s randg ("seed", 2); # for reproducibility 448s r2 = gamrnd (2, 2, 2000, 1); 448s randg ("seed", 7); # for reproducibility 448s r3 = gamrnd (7.5, 1, 2000, 1); 448s r = [r1, r2, r3]; 448s 448s ## Plot them normalized and fix their colors 448s hist (r, 75, 4); 448s h = findobj (gca, "Type", "patch"); 448s set (h(1), "facecolor", "c"); 448s set (h(2), "facecolor", "g"); 448s set (h(3), "facecolor", "r"); 448s ylim ([0, 0.62]); 448s xlim ([0, 12]); 448s hold on 448s 448s ## Estimate their α and β parameters 448s a_bA = gamfit (r(:,1)); 448s a_bB = gamfit (r(:,2)); 448s a_bC = gamfit (r(:,3)); 448s 448s ## Plot their estimated PDFs 448s x = [0.01,0.1:0.2:18]; 448s y = gampdf (x, a_bA(1), a_bA(2)); 448s plot (x, y, "-pr"); 448s y = gampdf (x, a_bB(1), a_bB(2)); 448s plot (x, y, "-sg"); 448s y = gampdf (x, a_bC(1), a_bC(2)); 448s plot (x, y, "-^c"); 448s hold off 448s legend ({"Normalized HIST of sample 1 with α=1 and β=2", ... 448s "Normalized HIST of sample 2 with α=2 and β=2", ... 448s "Normalized HIST of sample 3 with α=7.5 and β=1", ... 448s sprintf("PDF for sample 1 with estimated α=%0.2f and β=%0.2f", ... 448s a_bA(1), a_bA(2)), ... 448s sprintf("PDF for sample 2 with estimated α=%0.2f and β=%0.2f", ... 448s a_bB(1), a_bB(2)), ... 448s sprintf("PDF for sample 3 with estimated α=%0.2f and β=%0.2f", ... 448s a_bC(1), a_bC(2))}) 448s title ("Three population samples from different Gamma distributions") 448s hold off 448s ***** shared x 448s x = [1.2 1.6 1.7 1.8 1.9 2.0 2.2 2.6 3.0 3.5 4.0 4.8 5.6 6.6 7.6]; 448s ***** test 448s [paramhat, paramci] = gamfit (x); 448s assert (paramhat, [3.4248, 0.9752], 1e-4); 448s assert (paramci, [1.7287, 0.4670; 6.7852, 2.0366], 1e-4); 448s ***** test 448s [paramhat, paramci] = gamfit (x, 0.01); 448s assert (paramhat, [3.4248, 0.9752], 1e-4); 448s assert (paramci, [1.3945, 0.3705; 8.4113, 2.5668], 1e-4); 448s ***** test 448s freq = [1 1 1 1 2 1 1 1 1 2 1 1 1 1 2]; 448s [paramhat, paramci] = gamfit (x, [], [], freq); 448s assert (paramhat, [3.3025, 1.0615], 1e-4); 448s assert (paramci, [1.7710, 0.5415; 6.1584, 2.0806], 1e-4); 448s ***** test 448s [paramhat, paramci] = gamfit (x, [], [], [1:15]); 448s assert (paramhat, [4.4484, 0.9689], 1e-4); 448s assert (paramci, [3.4848, 0.7482; 5.6785, 1.2546], 1e-4); 448s ***** test 448s [paramhat, paramci] = gamfit (x, 0.01, [], [1:15]); 448s assert (paramhat, [4.4484, 0.9689], 1e-4); 448s assert (paramci, [3.2275, 0.6899; 6.1312, 1.3608], 1e-4); 448s ***** test 448s cens = [0 0 0 0 1 0 0 0 0 0 0 0 0 0 0]; 448s [paramhat, paramci] = gamfit (x, [], cens, [1:15]); 448s assert (paramhat, [4.7537, 0.9308], 1e-4); 448s assert (paramci, [3.7123, 0.7162; 6.0872, 1.2097], 1e-4); 448s ***** test 448s cens = [0 0 0 0 1 0 0 0 0 0 0 0 0 0 0]; 448s freq = [1 1 1 1 2 1 1 1 1 2 1 1 1 1 2]; 448s [paramhat, paramci] = gamfit (x, [], cens, freq); 448s assert (paramhat, [3.4736, 1.0847], 1e-4); 448s assert (paramci, [1.8286, 0.5359; 6.5982, 2.1956], 1e-4); 448s ***** test 448s [paramhat, paramci] = gamfit ([1 1 1 1 1 1]); 448s assert (paramhat, [Inf, 0]); 448s assert (paramci, [Inf, 0; Inf, 0]); 448s ***** test 448s [paramhat, paramci] = gamfit ([1 1 1 1 1 1], [], [1 1 1 1 1 1]); 448s assert (paramhat, [NaN, NaN]); 448s assert (paramci, [NaN, NaN; NaN, NaN]); 448s ***** test 448s [paramhat, paramci] = gamfit ([1 1 1 1 1 1], [], [], [1 1 1 1 1 1]); 448s assert (paramhat, [Inf, 0]); 448s assert (paramci, [Inf, 0; Inf, 0]); 448s ***** assert (class (gamfit (single (x))), "single") 448s ***** error gamfit (ones (2)) 448s ***** error gamfit (x, 1) 448s ***** error gamfit (x, -1) 448s ***** error gamfit (x, {0.05}) 448s ***** error gamfit (x, "a") 448s ***** error gamfit (x, i) 448s ***** error gamfit (x, [0.01 0.02]) 448s ***** error 448s gamfit ([1 2 3], 0.05, [], [1 5]) 448s ***** error 448s gamfit ([1 2 3], 0.05, [], [1 5 -1]) 448s ***** error ... 448s gamfit ([1:10], 0.05, [], [], 5) 448s ***** error gamfit ([1 2 3 -4]) 448s ***** error ... 448s gamfit ([1 2 0], [], [1 0 0]) 448s 23 tests, 23 passed, 0 known failure, 0 skipped 448s [inst/dist_fit/gamlike.m] 449s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fit/gamlike.m 449s ***** test 449s [nlogL, acov] = gamlike([2, 3], [2, 3, 4, 5, 6, 7, 8, 9]); 449s assert (nlogL, 19.4426, 1e-4); 449s assert (acov, [2.7819, -5.0073; -5.0073, 9.6882], 1e-4); 449s ***** test 449s [nlogL, acov] = gamlike([2, 3], [5:45]); 449s assert (nlogL, 305.8070, 1e-4); 449s assert (acov, [0.0423, -0.0087; -0.0087, 0.0167], 1e-4); 449s ***** test 449s [nlogL, acov] = gamlike([2, 13], [5:45]); 449s assert (nlogL, 163.2261, 1e-4); 449s assert (acov, [0.2362, -1.6631; -1.6631, 13.9440], 1e-4); 449s ***** error ... 449s gamlike ([12, 15]) 449s ***** error gamlike ([12, 15, 3], [1:50]) 449s ***** error gamlike ([12, 3], ones (10, 2)) 449s ***** error ... 449s gamlike ([12, 15], [1:50], [1, 2, 3]) 449s ***** error ... 449s gamlike ([12, 15], [1:50], [], [1, 2, 3]) 449s 8 tests, 8 passed, 0 known failure, 0 skipped 449s [inst/dist_fit/geofit.m] 449s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fit/geofit.m 449s ***** demo 449s ## Sample 2 populations from different geometric distributions 449s rande ("seed", 1); # for reproducibility 449s r1 = geornd (0.15, 1000, 1); 449s rande ("seed", 2); # for reproducibility 449s r2 = geornd (0.5, 1000, 1); 449s r = [r1, r2]; 449s 449s ## Plot them normalized and fix their colors 449s hist (r, 0:0.5:20.5, 1); 449s h = findobj (gca, "Type", "patch"); 449s set (h(1), "facecolor", "c"); 449s set (h(2), "facecolor", "g"); 449s hold on 449s 449s ## Estimate their probability of success 449s pshatA = geofit (r(:,1)); 449s pshatB = geofit (r(:,2)); 449s 449s ## Plot their estimated PDFs 449s x = [0:15]; 449s y = geopdf (x, pshatA); 449s plot (x, y, "-pg"); 449s y = geopdf (x, pshatB); 449s plot (x, y, "-sc"); 449s xlim ([0, 15]) 449s ylim ([0, 0.6]) 449s legend ({"Normalized HIST of sample 1 with ps=0.15", ... 449s "Normalized HIST of sample 2 with ps=0.50", ... 449s sprintf("PDF for sample 1 with estimated ps=%0.2f", ... 449s mean (pshatA)), ... 449s sprintf("PDF for sample 2 with estimated ps=%0.2f", ... 449s mean (pshatB))}) 449s title ("Two population samples from different geometric distributions") 449s hold off 449s ***** test 449s x = 0:5; 449s [pshat, psci] = geofit (x); 449s assert (pshat, 0.2857, 1e-4); 449s assert (psci, [0.092499; 0.478929], 1e-5); 449s ***** test 449s x = 0:5; 449s [pshat, psci] = geofit (x, [], [1 1 1 1 1 1]); 449s assert (pshat, 0.2857, 1e-4); 449s assert (psci, [0.092499; 0.478929], 1e-5); 449s ***** assert (geofit ([1 1 2 3]), geofit ([1 2 3], [] ,[2 1 1])) 449s ***** error geofit () 449s ***** error geofit (-1, [1 2 3 3]) 449s ***** error geofit (1, 0) 449s ***** error geofit (1, 1.2) 449s ***** error geofit (1, [0.02 0.05]) 449s ***** error ... 449s geofit ([1.5, 0.2], [], [0, 0, 0, 0, 0]) 449s ***** error ... 449s geofit ([1.5, 0.2], [], [1, 1, 1]) 449s 10 tests, 10 passed, 0 known failure, 0 skipped 449s [inst/dist_fit/gevfit.m] 449s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fit/gevfit.m 449s ***** demo 449s ## Sample 2 populations from 2 different exponential distributions 449s rand ("seed", 1); # for reproducibility 449s r1 = gevrnd (-0.5, 1, 2, 5000, 1); 449s rand ("seed", 2); # for reproducibility 449s r2 = gevrnd (0, 1, -4, 5000, 1); 449s r = [r1, r2]; 449s 449s ## Plot them normalized and fix their colors 449s hist (r, 50, 5); 449s h = findobj (gca, "Type", "patch"); 449s set (h(1), "facecolor", "c"); 449s set (h(2), "facecolor", "g"); 449s hold on 449s 449s ## Estimate their k, sigma, and mu parameters 449s k_sigma_muA = gevfit (r(:,1)); 449s k_sigma_muB = gevfit (r(:,2)); 449s 449s ## Plot their estimated PDFs 449s x = [-10:0.5:20]; 449s y = gevpdf (x, k_sigma_muA(1), k_sigma_muA(2), k_sigma_muA(3)); 449s plot (x, y, "-pr"); 449s y = gevpdf (x, k_sigma_muB(1), k_sigma_muB(2), k_sigma_muB(3)); 449s plot (x, y, "-sg"); 449s ylim ([0, 0.7]) 449s xlim ([-7, 5]) 449s legend ({"Normalized HIST of sample 1 with k=-0.5, σ=1, μ=2", ... 449s "Normalized HIST of sample 2 with k=0, σ=1, μ=-4", 449s sprintf("PDF for sample 1 with estimated k=%0.2f, σ=%0.2f, μ=%0.2f", ... 449s k_sigma_muA(1), k_sigma_muA(2), k_sigma_muA(3)), ... 449s sprintf("PDF for sample 3 with estimated k=%0.2f, σ=%0.2f, μ=%0.2f", ... 449s k_sigma_muB(1), k_sigma_muB(2), k_sigma_muB(3))}) 449s title ("Two population samples from different exponential distributions") 449s hold off 449s ***** test 449s x = 1:50; 449s [pfit, pci] = gevfit (x); 449s pfit_out = [-0.4407, 15.1923, 21.5309]; 449s pci_out = [-0.7532, 11.5878, 16.5686; -0.1282, 19.9183, 26.4926]; 449s assert (pfit, pfit_out, 1e-3); 449s assert (pci, pci_out, 1e-3); 449s ***** test 449s x = 1:2:50; 449s [pfit, pci] = gevfit (x); 449s pfit_out = [-0.4434, 15.2024, 21.0532]; 449s pci_out = [-0.8904, 10.3439, 14.0168; 0.0035, 22.3429, 28.0896]; 449s assert (pfit, pfit_out, 1e-3); 449s assert (pci, pci_out, 1e-3); 449s ***** error gevfit (ones (2,5)); 449s ***** error gevfit ([1, 2, 3, 4, 5], 1.2); 449s ***** error gevfit ([1, 2, 3, 4, 5], 0); 449s ***** error gevfit ([1, 2, 3, 4, 5], "alpha"); 449s ***** error ... 449s gevfit ([1, 2, 3, 4, 5], 0.05, [1, 2, 3, 2]); 449s ***** error ... 449s gevfit ([1, 2, 3, 4, 5], 0.05, [1, 2, 3, 2, -1]); 449s ***** error ... 449s gevfit ([1, 2, 3, 4, 5], 0.05, [1, 2, 3, 2, 1.5]); 449s ***** error ... 449s gevfit ([1, 2, 3, 4, 5], 0.05, struct ("option", 234)); 449s ***** error ... 449s gevfit ([1, 2, 3, 4, 5], 0.05, ones (1,5), struct ("option", 234)); 449s 11 tests, 11 passed, 0 known failure, 0 skipped 449s [inst/dist_fit/gevfit_lmom.m] 449s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fit/gevfit_lmom.m 449s ***** xtest <31070> 449s data = 1:50; 449s [pfit, pci] = gevfit_lmom (data); 449s expected_p = [-0.28 15.01 20.22]'; 449s assert (pfit, expected_p, 0.1); 449s 1 test, 1 passed, 0 known failure, 0 skipped 449s [inst/dist_fit/gevlike.m] 449s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fit/gevlike.m 449s ***** test 449s x = 1; 449s k = 0.2; 449s sigma = 0.3; 449s mu = 0.5; 449s [L, C] = gevlike ([k sigma mu], x); 449s expected_L = 0.75942; 449s expected_C = [-0.12547 1.77884 1.06731; 1.77884 16.40761 8.48877; 1.06731 8.48877 0.27979]; 449s assert (L, expected_L, 0.001); 449s assert (C, inv (expected_C), 0.001); 449s ***** test 449s x = 1; 449s k = 0; 449s sigma = 0.3; 449s mu = 0.5; 449s [L, C] = gevlike ([k sigma mu], x); 449s expected_L = 0.65157; 449s expected_C = [0.090036 3.41229 2.047337; 3.412229 24.760027 12.510190; 2.047337 12.510190 2.098618]; 449s assert (L, expected_L, 0.001); 449s assert (C, inv (expected_C), 0.001); 449s ***** test 449s x = -5:-1; 449s k = -0.2; 449s sigma = 0.3; 449s mu = 0.5; 449s [L, C] = gevlike ([k sigma mu], x); 449s expected_L = 3786.4; 449s expected_C = [1.6802e-07, 4.6110e-06, 8.7297e-05; ... 449s 4.6110e-06, 7.5693e-06, 1.2034e-05; ... 449s 8.7297e-05, 1.2034e-05, -0.0019125]; 449s assert (L, expected_L, -0.001); 449s assert (C, expected_C, -0.001); 449s ***** test 449s x = -5:0; 449s k = -0.2; 449s sigma = 0.3; 449s mu = 0.5; 449s [L, C] = gevlike ([k sigma mu], x, [1, 1, 1, 1, 1, 0]); 449s expected_L = 3786.4; 449s expected_C = [1.6802e-07, 4.6110e-06, 8.7297e-05; ... 449s 4.6110e-06, 7.5693e-06, 1.2034e-05; ... 449s 8.7297e-05, 1.2034e-05, -0.0019125]; 449s assert (L, expected_L, -0.001); 449s assert (C, expected_C, -0.001); 449s ***** error gevlike (3.25) 449s ***** error gevlike ([1, 2, 3], ones (2)) 449s ***** error ... 449s gevlike ([1, 2], [1, 3, 5, 7]) 449s ***** error ... 449s gevlike ([1, 2, 3, 4], [1, 3, 5, 7]) 449s ***** error ... 449s gevlike ([5, 0.2, 1], ones (10, 1), ones (8,1)) 449s ***** error ... 449s gevlike ([5, 0.2, 1], ones (1, 8), [1 1 1 1 1 1 1 -1]) 449s ***** error ... 449s gevlike ([5, 0.2, 1], ones (1, 8), [1 1 1 1 1 1 1 1.5]) 449s 11 tests, 11 passed, 0 known failure, 0 skipped 449s [inst/dist_fit/gpfit.m] 449s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fit/gpfit.m 449s ***** demo 449s ## Sample 2 populations from different generalized Pareto distributions 449s ## Assume location parameter θ is known 449s theta = 0; 449s rand ("seed", 5); # for reproducibility 449s r1 = gprnd (1, 2, theta, 20000, 1); 449s rand ("seed", 2); # for reproducibility 449s r2 = gprnd (3, 1, theta, 20000, 1); 449s r = [r1, r2]; 449s 449s ## Plot them normalized and fix their colors 449s hist (r, [0.1:0.2:100], 5); 449s h = findobj (gca, "Type", "patch"); 449s set (h(1), "facecolor", "r"); 449s set (h(2), "facecolor", "c"); 449s ylim ([0, 1]); 449s xlim ([0, 5]); 449s hold on 449s 449s ## Estimate their α and β parameters 449s k_sigmaA = gpfit (r(:,1), theta); 449s k_sigmaB = gpfit (r(:,2), theta); 449s 449s ## Plot their estimated PDFs 449s x = [0.01, 0.1:0.2:18]; 449s y = gppdf (x, k_sigmaA(1), k_sigmaA(2), theta); 449s plot (x, y, "-pc"); 449s y = gppdf (x, k_sigmaB(1), k_sigmaB(2), theta); 449s plot (x, y, "-sr"); 449s hold off 449s legend ({"Normalized HIST of sample 1 with k=1 and σ=2", ... 449s "Normalized HIST of sample 2 with k=2 and σ=2", ... 449s sprintf("PDF for sample 1 with estimated k=%0.2f and σ=%0.2f", ... 449s k_sigmaA(1), k_sigmaA(2)), ... 449s sprintf("PDF for sample 3 with estimated k=%0.2f and σ=%0.2f", ... 449s k_sigmaB(1), k_sigmaB(2))}) 449s title ("Two population samples from different generalized Pareto distributions") 449s text (2, 0.7, "Known location parameter θ = 0") 449s hold off 449s ***** test 449s k = 0.8937; sigma = 1.3230; theta = 1; 449s x = [2.2196, 11.9301, 4.3673, 1.0949, 6.5626, ... 449s 1.2109, 1.8576, 1.0039, 12.7917, 2.2590]; 449s [hat, ci] = gpfit (x, theta); 449s assert (hat, [k, sigma, theta], 1e-4); 449s assert (ci, [-0.7750, 0.2437, 1; 2.5624, 7.1820, 1], 1e-4); 449s ***** error gpfit () 449s ***** error gpfit (1) 449s ***** error gpfit ([0.2, 0.5+i], 0); 449s ***** error gpfit (ones (2,2) * 0.5, 0); 449s ***** error ... 449s gpfit ([0.5, 1.2], [0, 1]); 449s ***** error ... 449s gpfit ([0.5, 1.2], 5+i); 449s ***** error ... 449s gpfit ([1:5], 2); 449s ***** error gpfit ([0.01:0.1:0.99], 0, 1.2); 449s ***** error gpfit ([0.01:0.1:0.99], 0, i); 449s ***** error gpfit ([0.01:0.1:0.99], 0, -1); 449s ***** error gpfit ([0.01:0.1:0.99], 0, [0.05, 0.01]); 449s ***** error 449s gpfit ([1 2 3], 0, [], [1 5]) 449s ***** error 449s gpfit ([1 2 3], 0, [], [1 5 -1]) 449s ***** error ... 449s gpfit ([1:10], 1, 0.05, [], 5) 449s 15 tests, 15 passed, 0 known failure, 0 skipped 449s [inst/dist_fit/gplike.m] 449s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fit/gplike.m 449s ***** test 449s k = 0.8937; sigma = 1.3230; theta = 1; 449s x = [2.2196, 11.9301, 4.3673, 1.0949, 6.5626, ... 449s 1.2109, 1.8576, 1.0039, 12.7917, 2.2590]; 449s [nlogL, acov] = gplike ([k, sigma, theta], x); 449s assert (nlogL, 21.736, 1e-3); 449s assert (acov, [0.7249, -0.7351, 0; -0.7351, 1.3040, 0; 0, 0, 0], 1e-4); 449s ***** assert (gplike ([2, 3, 0], 4), 3.047536764863501, 1e-14) 449s ***** assert (gplike ([2, 3, 4], 8), 3.047536764863501, 1e-14) 449s ***** assert (gplike ([1, 2, 0], 4), 2.890371757896165, 1e-14) 449s ***** assert (gplike ([1, 2, 4], 8), 2.890371757896165, 1e-14) 449s ***** assert (gplike ([2, 3, 0], [1:10]), 32.57864322725392, 1e-14) 449s ***** assert (gplike ([2, 3, 2], [1:10] + 2), 32.57864322725392, 1e-14) 449s ***** assert (gplike ([2, 3, 0], [1:10], ones (1,10)), 32.57864322725392, 1e-14) 449s ***** assert (gplike ([1, 2, 0], [1:10]), 31.65666282460443, 1e-14) 449s ***** assert (gplike ([1, 2, 3], [1:10] + 3), 31.65666282460443, 1e-14) 449s ***** assert (gplike ([1, 2, 0], [1:10], ones (1,10)), 31.65666282460443, 1e-14) 449s ***** assert (gplike ([1, NaN, 0], [1:10]), NaN) 449s ***** error gplike () 449s ***** error gplike (1) 449s ***** error gplike ([1, 2, 0], []) 449s ***** error gplike ([1, 2, 0], ones (2)) 449s ***** error gplike (2, [1:10]) 449s ***** error gplike ([2, 3], [1:10]) 449s ***** error ... 449s gplike ([1, 2, 0], ones (10, 1), ones (8,1)) 449s ***** error ... 449s gplike ([1, 2, 0], ones (1, 8), [1 1 1 1 1 1 1 -1]) 449s 20 tests, 20 passed, 0 known failure, 0 skipped 449s [inst/dist_fit/gumbelfit.m] 449s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fit/gumbelfit.m 449s ***** demo 449s ## Sample 3 populations from different Gumbel distributions 449s rand ("seed", 1); # for reproducibility 449s r1 = gumbelrnd (2, 5, 400, 1); 449s rand ("seed", 11); # for reproducibility 449s r2 = gumbelrnd (-5, 3, 400, 1); 449s rand ("seed", 16); # for reproducibility 449s r3 = gumbelrnd (14, 8, 400, 1); 449s r = [r1, r2, r3]; 449s 449s ## Plot them normalized and fix their colors 449s hist (r, 25, 0.32); 449s h = findobj (gca, "Type", "patch"); 449s set (h(1), "facecolor", "c"); 449s set (h(2), "facecolor", "g"); 449s set (h(3), "facecolor", "r"); 449s ylim ([0, 0.28]) 449s xlim ([-11, 50]); 449s hold on 449s 449s ## Estimate their MU and BETA parameters 449s mu_betaA = gumbelfit (r(:,1)); 449s mu_betaB = gumbelfit (r(:,2)); 449s mu_betaC = gumbelfit (r(:,3)); 449s 449s ## Plot their estimated PDFs 449s x = [min(r(:)):max(r(:))]; 449s y = gumbelpdf (x, mu_betaA(1), mu_betaA(2)); 449s plot (x, y, "-pr"); 449s y = gumbelpdf (x, mu_betaB(1), mu_betaB(2)); 449s plot (x, y, "-sg"); 449s y = gumbelpdf (x, mu_betaC(1), mu_betaC(2)); 449s plot (x, y, "-^c"); 449s legend ({"Normalized HIST of sample 1 with μ=2 and β=5", ... 449s "Normalized HIST of sample 2 with μ=-5 and β=3", ... 449s "Normalized HIST of sample 3 with μ=14 and β=8", ... 449s sprintf("PDF for sample 1 with estimated μ=%0.2f and β=%0.2f", ... 449s mu_betaA(1), mu_betaA(2)), ... 449s sprintf("PDF for sample 2 with estimated μ=%0.2f and β=%0.2f", ... 449s mu_betaB(1), mu_betaB(2)), ... 449s sprintf("PDF for sample 3 with estimated μ=%0.2f and β=%0.2f", ... 449s mu_betaC(1), mu_betaC(2))}) 449s title ("Three population samples from different Gumbel distributions") 449s hold off 449s ***** test 449s x = 1:50; 449s [paramhat, paramci] = gumbelfit (x); 449s paramhat_out = [18.3188, 13.0509]; 449s paramci_out = [14.4882, 10.5294; 22.1495, 16.1763]; 449s assert (paramhat, paramhat_out, 1e-4); 449s assert (paramci, paramci_out, 1e-4); 449s ***** test 449s x = 1:50; 449s [paramhat, paramci] = gumbelfit (x, 0.01); 449s paramci_out = [13.2845, 9.8426; 23.3532, 17.3051]; 449s assert (paramci, paramci_out, 1e-4); 449s ***** error gumbelfit (ones (2,5)); 449s ***** error ... 449s gumbelfit (single (ones (1,5))); 449s ***** error ... 449s gumbelfit ([1, 2, 3, 4, NaN]); 449s ***** error gumbelfit ([1, 2, 3, 4, 5], 1.2); 449s ***** error ... 449s gumbelfit ([1, 2, 3, 4, 5], 0.05, [1 1 0]); 449s ***** error ... 449s gumbelfit ([1, 2, 3, 4, 5], 0.05, [], [1 1 0]); 449s ***** error 449s gamfit ([1, 2, 3], 0.05, [], [1 5 -1]) 449s ***** error ... 449s gumbelfit ([1, 2, 3, 4, 5], 0.05, [], [], 2); 449s 10 tests, 10 passed, 0 known failure, 0 skipped 449s [inst/dist_fit/gumbellike.m] 449s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fit/gumbellike.m 449s ***** test 449s x = 1:50; 449s [nlogL, avar] = gumbellike ([2.3, 1.2], x); 449s avar_out = [-1.2778e-13, 3.1859e-15; 3.1859e-15, -7.9430e-17]; 449s assert (nlogL, 3.242264755689906e+17, 1e-14); 449s assert (avar, avar_out, 1e-3); 449s ***** test 449s x = 1:50; 449s [nlogL, avar] = gumbellike ([2.3, 1.2], x * 0.5); 449s avar_out = [-7.6094e-05, 3.9819e-06; 3.9819e-06, -2.0836e-07]; 449s assert (nlogL, 481898704.0472211, 1e-6); 449s assert (avar, avar_out, 1e-3); 449s ***** test 449s x = 1:50; 449s [nlogL, avar] = gumbellike ([21, 15], x); 449s avar_out = [11.73913876598908, -5.9546128523121216; ... 449s -5.954612852312121, 3.708060045170236]; 449s assert (nlogL, 223.7612479380652, 1e-13); 449s assert (avar, avar_out, 1e-14); 449s ***** error gumbellike ([12, 15]); 449s ***** error gumbellike ([12, 15, 3], [1:50]); 449s ***** error gumbellike ([12, 3], ones (10, 2)); 449s ***** error gumbellike ([12, 15], [1:50], [1, 2, 3]); 449s ***** error gumbellike ([12, 15], [1:50], [], [1, 2, 3]); 449s 8 tests, 8 passed, 0 known failure, 0 skipped 449s [inst/dist_fit/hnfit.m] 449s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fit/hnfit.m 449s ***** demo 449s ## Sample 2 populations from different half-normal distributions 449s rand ("seed", 1); # for reproducibility 449s r1 = hnrnd (0, 5, 5000, 1); 449s rand ("seed", 2); # for reproducibility 449s r2 = hnrnd (0, 2, 5000, 1); 449s r = [r1, r2]; 449s 449s ## Plot them normalized and fix their colors 449s hist (r, [0.5:20], 1); 449s h = findobj (gca, "Type", "patch"); 449s set (h(1), "facecolor", "c"); 449s set (h(2), "facecolor", "g"); 449s hold on 449s 449s ## Estimate their shape parameters 449s mu_sigmaA = hnfit (r(:,1), 0); 449s mu_sigmaB = hnfit (r(:,2), 0); 449s 449s ## Plot their estimated PDFs 449s x = [0:0.2:10]; 449s y = hnpdf (x, mu_sigmaA(1), mu_sigmaA(2)); 449s plot (x, y, "-pr"); 449s y = hnpdf (x, mu_sigmaB(1), mu_sigmaB(2)); 449s plot (x, y, "-sg"); 449s xlim ([0, 10]) 449s ylim ([0, 0.5]) 449s legend ({"Normalized HIST of sample 1 with μ=0 and σ=5", ... 449s "Normalized HIST of sample 2 with μ=0 and σ=2", ... 449s sprintf("PDF for sample 1 with estimated μ=%0.2f and σ=%0.2f", ... 449s mu_sigmaA(1), mu_sigmaA(2)), ... 449s sprintf("PDF for sample 2 with estimated μ=%0.2f and σ=%0.2f", ... 449s mu_sigmaB(1), mu_sigmaB(2))}) 449s title ("Two population samples from different half-normal distributions") 449s hold off 449s ***** test 449s x = 1:20; 449s [paramhat, paramci] = hnfit (x, 0); 449s assert (paramhat, [0, 11.9791], 1e-4); 449s assert (paramci, [0, 9.1648; 0, 17.2987], 1e-4); 449s ***** test 449s x = 1:20; 449s [paramhat, paramci] = hnfit (x, 0, 0.01); 449s assert (paramci, [0, 8.4709; 0, 19.6487], 1e-4); 449s ***** error hnfit () 449s ***** error hnfit (1) 449s ***** error hnfit ([0.2, 0.5+i], 0); 449s ***** error hnfit (ones (2,2) * 0.5, 0); 449s ***** error ... 449s hnfit ([0.5, 1.2], [0, 1]); 449s ***** error ... 449s hnfit ([0.5, 1.2], 5+i); 449s ***** error ... 449s hnfit ([1:5], 2); 449s ***** error hnfit ([0.01:0.1:0.99], 0, 1.2); 449s ***** error hnfit ([0.01:0.1:0.99], 0, i); 449s ***** error hnfit ([0.01:0.1:0.99], 0, -1); 449s ***** error hnfit ([0.01:0.1:0.99], 0, [0.05, 0.01]); 449s ***** error 449s hnfit ([1 2 3], 0, [], [1 5]) 449s ***** error 449s hnfit ([1 2 3], 0, [], [1 5 -1]) 449s 15 tests, 15 passed, 0 known failure, 0 skipped 449s [inst/dist_fit/hnlike.m] 449s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fit/hnlike.m 449s ***** test 449s x = 1:20; 449s paramhat = hnfit (x, 0); 449s [nlogL, acov] = hnlike (paramhat, x); 449s assert (nlogL, 64.179177404891300, 1e-14); 449s ***** test 449s x = 1:20; 449s paramhat = hnfit (x, 0); 449s [nlogL, acov] = hnlike (paramhat, x, ones (1, 20)); 449s assert (nlogL, 64.179177404891300, 1e-14); 449s ***** error ... 449s hnlike ([12, 15]); 449s ***** error hnlike ([12, 15, 3], [1:50]); 449s ***** error hnlike ([3], [1:50]); 449s ***** error ... 449s hnlike ([0, 3], ones (2)); 449s ***** error ... 449s hnlike ([0, 3], [1, 2, 3, 4, 5+i]); 449s ***** error ... 449s hnlike ([1, 2], ones (10, 1), ones (8,1)) 449s ***** error ... 449s hnlike ([1, 2], ones (1, 8), [1 1 1 1 1 1 1 -1]) 449s 9 tests, 9 passed, 0 known failure, 0 skipped 449s [inst/dist_fit/invgfit.m] 449s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fit/invgfit.m 449s ***** demo 449s ## Sample 3 populations from different inverse Gaussian distributions 449s rand ("seed", 5); randn ("seed", 5); # for reproducibility 449s r1 = invgrnd (1, 0.2, 2000, 1); 449s rand ("seed", 2); randn ("seed", 2); # for reproducibility 449s r2 = invgrnd (1, 3, 2000, 1); 449s rand ("seed", 7); randn ("seed", 7); # for reproducibility 449s r3 = invgrnd (3, 1, 2000, 1); 449s r = [r1, r2, r3]; 449s 449s ## Plot them normalized and fix their colors 449s hist (r, [0.1:0.1:3.2], 9); 449s h = findobj (gca, "Type", "patch"); 449s set (h(1), "facecolor", "c"); 449s set (h(2), "facecolor", "g"); 449s set (h(3), "facecolor", "r"); 449s ylim ([0, 3]); 449s xlim ([0, 3]); 449s hold on 449s 449s ## Estimate their MU and LAMBDA parameters 449s mu_lambdaA = invgfit (r(:,1)); 449s mu_lambdaB = invgfit (r(:,2)); 449s mu_lambdaC = invgfit (r(:,3)); 449s 449s ## Plot their estimated PDFs 449s x = [0:0.1:3]; 449s y = invgpdf (x, mu_lambdaA(1), mu_lambdaA(2)); 449s plot (x, y, "-pr"); 449s y = invgpdf (x, mu_lambdaB(1), mu_lambdaB(2)); 449s plot (x, y, "-sg"); 449s y = invgpdf (x, mu_lambdaC(1), mu_lambdaC(2)); 449s plot (x, y, "-^c"); 449s hold off 449s legend ({"Normalized HIST of sample 1 with μ=1 and λ=0.5", ... 449s "Normalized HIST of sample 2 with μ=2 and λ=0.3", ... 449s "Normalized HIST of sample 3 with μ=4 and λ=0.5", ... 449s sprintf("PDF for sample 1 with estimated μ=%0.2f and λ=%0.2f", ... 449s mu_lambdaA(1), mu_lambdaA(2)), ... 449s sprintf("PDF for sample 2 with estimated μ=%0.2f and λ=%0.2f", ... 449s mu_lambdaB(1), mu_lambdaB(2)), ... 449s sprintf("PDF for sample 3 with estimated μ=%0.2f and λ=%0.2f", ... 449s mu_lambdaC(1), mu_lambdaC(2))}) 449s title ("Three population samples from different inverse Gaussian distributions") 449s hold off 449s ***** test 449s paramhat = invgfit ([1:50]); 449s paramhat_out = [25.5, 19.6973]; 449s assert (paramhat, paramhat_out, 1e-4); 449s ***** test 449s paramhat = invgfit ([1:5]); 449s paramhat_out = [3, 8.1081]; 449s assert (paramhat, paramhat_out, 1e-4); 449s ***** error invgfit (ones (2,5)); 449s ***** error invgfit ([-1 2 3 4]); 449s ***** error invgfit ([1, 2, 3, 4, 5], 1.2); 449s ***** error invgfit ([1, 2, 3, 4, 5], 0); 449s ***** error invgfit ([1, 2, 3, 4, 5], "alpha"); 449s ***** error ... 449s invgfit ([1, 2, 3, 4, 5], 0.05, [1 1 0]); 449s ***** error ... 449s invgfit ([1, 2, 3, 4, 5], [], [1 1 0 1 1]'); 449s ***** error ... 449s invgfit ([1, 2, 3, 4, 5], 0.05, zeros (1,5), [1 1 0]); 449s ***** error ... 449s invgfit ([1, 2, 3, 4, 5], [], [], [1 1 0 1 1]'); 449s ***** error ... 449s invgfit ([1, 2, 3, 4, 5], 0.05, [], [], 2); 449s 12 tests, 12 passed, 0 known failure, 0 skipped 449s [inst/dist_fit/invglike.m] 449s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fit/invglike.m 449s ***** test 449s nlogL = invglike ([25.5, 19.6973], [1:50]); 449s assert (nlogL, 219.1516, 1e-4); 449s ***** test 449s nlogL = invglike ([3, 8.1081], [1:5]); 449s assert (nlogL, 9.0438, 1e-4); 449s ***** error invglike (3.25) 449s ***** error invglike ([5, 0.2], ones (2)) 449s ***** error invglike ([5, 0.2], [-1, 3]) 449s ***** error ... 449s invglike ([1, 0.2, 3], [1, 3, 5, 7]) 449s ***** error ... 449s invglike ([1.5, 0.2], [1:5], [0, 0, 0]) 449s ***** error ... 449s invglike ([1.5, 0.2], [1:5], [0, 0, 0, 0, 0], [1, 1, 1]) 449s ***** error ... 449s invglike ([1.5, 0.2], [1:5], [], [1, 1, 1]) 450s 9 tests, 9 passed, 0 known failure, 0 skipped 450s [inst/dist_fit/logifit.m] 450s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fit/logifit.m 450s ***** demo 450s ## Sample 3 populations from different logistic distributions 450s rand ("seed", 5) # for reproducibility 450s r1 = logirnd (2, 1, 2000, 1); 450s rand ("seed", 2) # for reproducibility 450s r2 = logirnd (5, 2, 2000, 1); 450s rand ("seed", 7) # for reproducibility 450s r3 = logirnd (9, 4, 2000, 1); 450s r = [r1, r2, r3]; 450s 450s ## Plot them normalized and fix their colors 450s hist (r, [-6:20], 1); 450s h = findobj (gca, "Type", "patch"); 450s set (h(1), "facecolor", "c"); 450s set (h(2), "facecolor", "g"); 450s set (h(3), "facecolor", "r"); 450s ylim ([0, 0.3]); 450s xlim ([-5, 20]); 450s hold on 450s 450s ## Estimate their MU and LAMBDA parameters 450s mu_sA = logifit (r(:,1)); 450s mu_sB = logifit (r(:,2)); 450s mu_sC = logifit (r(:,3)); 450s 450s ## Plot their estimated PDFs 450s x = [-5:0.5:20]; 450s y = logipdf (x, mu_sA(1), mu_sA(2)); 450s plot (x, y, "-pr"); 450s y = logipdf (x, mu_sB(1), mu_sB(2)); 450s plot (x, y, "-sg"); 450s y = logipdf (x, mu_sC(1), mu_sC(2)); 450s plot (x, y, "-^c"); 450s hold off 450s legend ({"Normalized HIST of sample 1 with μ=1 and s=0.5", ... 450s "Normalized HIST of sample 2 with μ=2 and s=0.3", ... 450s "Normalized HIST of sample 3 with μ=4 and s=0.5", ... 450s sprintf("PDF for sample 1 with estimated μ=%0.2f and s=%0.2f", ... 450s mu_sA(1), mu_sA(2)), ... 450s sprintf("PDF for sample 2 with estimated μ=%0.2f and s=%0.2f", ... 450s mu_sB(1), mu_sB(2)), ... 450s sprintf("PDF for sample 3 with estimated μ=%0.2f and s=%0.2f", ... 450s mu_sC(1), mu_sC(2))}) 450s title ("Three population samples from different logistic distributions") 450s hold off 450s ***** test 450s paramhat = logifit ([1:50]); 450s paramhat_out = [25.5, 8.7724]; 450s assert (paramhat, paramhat_out, 1e-4); 450s ***** test 450s paramhat = logifit ([1:5]); 450s paramhat_out = [3, 0.8645]; 450s assert (paramhat, paramhat_out, 1e-4); 450s ***** test 450s paramhat = logifit ([1:6], [], [], [1 1 1 1 1 0]); 450s paramhat_out = [3, 0.8645]; 450s assert (paramhat, paramhat_out, 1e-4); 450s ***** test 450s paramhat = logifit ([1:5], [], [], [1 1 1 1 2]); 450s paramhat_out = logifit ([1:5, 5]); 450s assert (paramhat, paramhat_out, 1e-4); 450s ***** error logifit (ones (2,5)); 450s ***** error logifit ([1, 2, 3, 4, 5], 1.2); 450s ***** error logifit ([1, 2, 3, 4, 5], 0); 450s ***** error logifit ([1, 2, 3, 4, 5], "alpha"); 450s ***** error ... 450s logifit ([1, 2, 3, 4, 5], 0.05, [1 1 0]); 450s ***** error ... 450s logifit ([1, 2, 3, 4, 5], [], [1 1 0 1 1]'); 450s ***** error ... 450s logifit ([1, 2, 3, 4, 5], 0.05, zeros (1,5), [1 1 0]); 450s ***** error ... 450s logifit ([1, 2, 3, 4, 5], [], [], [1 1 0 1 1]'); 450s ***** error ... 450s logifit ([1, 2, 3, 4, 5], 0.05, [], [], 2); 450s 13 tests, 13 passed, 0 known failure, 0 skipped 450s [inst/dist_fit/logilike.m] 450s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fit/logilike.m 450s ***** test 450s nlogL = logilike ([25.5, 8.7725], [1:50]); 450s assert (nlogL, 206.6769, 1e-4); 450s ***** test 450s nlogL = logilike ([3, 0.8645], [1:5]); 450s assert (nlogL, 9.0699, 1e-4); 450s ***** error logilike (3.25) 450s ***** error logilike ([5, 0.2], ones (2)) 450s ***** error ... 450s logilike ([1, 0.2, 3], [1, 3, 5, 7]) 450s ***** error ... 450s logilike ([1.5, 0.2], [1:5], [0, 0, 0]) 450s ***** error ... 450s logilike ([1.5, 0.2], [1:5], [0, 0, 0, 0, 0], [1, 1, 1]) 450s ***** error ... 450s logilike ([1.5, 0.2], [1:5], [], [1, 1, 1]) 450s 8 tests, 8 passed, 0 known failure, 0 skipped 450s [inst/dist_fit/loglfit.m] 450s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fit/loglfit.m 450s ***** demo 450s ## Sample 3 populations from different log-logistic distributions 450s rand ("seed", 5) # for reproducibility 450s r1 = loglrnd (0, 1, 2000, 1); 450s rand ("seed", 2) # for reproducibility 450s r2 = loglrnd (0, 0.5, 2000, 1); 450s rand ("seed", 7) # for reproducibility 450s r3 = loglrnd (0, 0.125, 2000, 1); 450s r = [r1, r2, r3]; 450s 450s ## Plot them normalized and fix their colors 450s hist (r, [0.05:0.1:2.5], 10); 450s h = findobj (gca, "Type", "patch"); 450s set (h(1), "facecolor", "c"); 450s set (h(2), "facecolor", "g"); 450s set (h(3), "facecolor", "r"); 450s ylim ([0, 3.5]); 450s xlim ([0, 2.0]); 450s hold on 450s 450s ## Estimate their MU and LAMBDA parameters 450s a_bA = loglfit (r(:,1)); 450s a_bB = loglfit (r(:,2)); 450s a_bC = loglfit (r(:,3)); 450s 450s ## Plot their estimated PDFs 450s x = [0.01:0.1:2.01]; 450s y = loglpdf (x, a_bA(1), a_bA(2)); 450s plot (x, y, "-pr"); 450s y = loglpdf (x, a_bB(1), a_bB(2)); 450s plot (x, y, "-sg"); 450s y = loglpdf (x, a_bC(1), a_bC(2)); 450s plot (x, y, "-^c"); 450s legend ({"Normalized HIST of sample 1 with α=1 and β=1", ... 450s "Normalized HIST of sample 2 with α=1 and β=2", ... 450s "Normalized HIST of sample 3 with α=1 and β=8", ... 450s sprintf("PDF for sample 1 with estimated α=%0.2f and β=%0.2f", ... 450s a_bA(1), a_bA(2)), ... 450s sprintf("PDF for sample 2 with estimated α=%0.2f and β=%0.2f", ... 450s a_bB(1), a_bB(2)), ... 450s sprintf("PDF for sample 3 with estimated α=%0.2f and β=%0.2f", ... 450s a_bC(1), a_bC(2))}) 450s title ("Three population samples from different log-logistic distributions") 450s hold off 450s ***** test 450s [paramhat, paramci] = loglfit ([1:50]); 450s paramhat_out = [3.09717, 0.468525]; 450s paramci_out = [2.87261, 0.370616; 3.32174, 0.5923]; 450s assert (paramhat, paramhat_out, 1e-5); 450s assert (paramci, paramci_out, 1e-5); 450s ***** test 450s paramhat = loglfit ([1:5]); 450s paramhat_out = [1.01124, 0.336449]; 450s assert (paramhat, paramhat_out, 1e-5); 450s ***** test 450s paramhat = loglfit ([1:6], [], [], [1 1 1 1 1 0]); 450s paramhat_out = [1.01124, 0.336449]; 450s assert (paramhat, paramhat_out, 1e-4); 450s ***** test 450s paramhat = loglfit ([1:5], [], [], [1 1 1 1 2]); 450s paramhat_out = loglfit ([1:5, 5]); 450s assert (paramhat, paramhat_out, 1e-4); 450s ***** error loglfit (ones (2,5)); 450s ***** error loglfit ([1, 2, 3, 4, 5], 1.2); 450s ***** error loglfit ([1, 2, 3, 4, 5], 0); 450s ***** error loglfit ([1, 2, 3, 4, 5], "alpha"); 450s ***** error ... 450s loglfit ([1, 2, 3, 4, 5], 0.05, [1 1 0]); 450s ***** error ... 450s loglfit ([1, 2, 3, 4, 5], [], [1 1 0 1 1]'); 450s ***** error ... 450s loglfit ([1, 2, 3, 4, 5], 0.05, zeros (1,5), [1 1 0]); 450s ***** error ... 450s loglfit ([1, 2, 3, 4, 5], [], [], [1 1 0 1 1]'); 450s ***** error ... 450s loglfit ([1, 2, 3, 4, 5], 0.05, [], [], 2); 450s 13 tests, 13 passed, 0 known failure, 0 skipped 450s [inst/dist_fit/logllike.m] 450s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fit/logllike.m 450s ***** test 450s [nlogL, acov] = logllike ([3.09717, 0.468525], [1:50]); 450s assert (nlogL, 211.2965, 1e-4); 450s assert (acov, [0.0131, -0.0007; -0.0007, 0.0031], 1e-4); 450s ***** test 450s [nlogL, acov] = logllike ([1.01124, 0.336449], [1:5]); 450s assert (nlogL, 9.2206, 1e-4); 450s assert (acov, [0.0712, -0.0032; -0.0032, 0.0153], 1e-4); 450s ***** error logllike (3.25) 450s ***** error logllike ([5, 0.2], ones (2)) 450s ***** error ... 450s logllike ([1, 0.2, 3], [1, 3, 5, 7]) 450s ***** error ... 450s logllike ([1.5, 0.2], [1:5], [0, 0, 0]) 450s ***** error ... 450s logllike ([1.5, 0.2], [1:5], [0, 0, 0, 0, 0], [1, 1, 1]) 450s ***** error ... 450s logllike ([1.5, 0.2], [1:5], [], [1, 1, 1]) 450s 8 tests, 8 passed, 0 known failure, 0 skipped 450s [inst/dist_fit/lognfit.m] 450s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fit/lognfit.m 450s ***** demo 450s ## Sample 3 populations from 3 different log-normal distributions 450s randn ("seed", 1); # for reproducibility 450s r1 = lognrnd (0, 0.25, 1000, 1); 450s randn ("seed", 2); # for reproducibility 450s r2 = lognrnd (0, 0.5, 1000, 1); 450s randn ("seed", 3); # for reproducibility 450s r3 = lognrnd (0, 1, 1000, 1); 450s r = [r1, r2, r3]; 450s 450s ## Plot them normalized and fix their colors 450s hist (r, 30, 2); 450s h = findobj (gca, "Type", "patch"); 450s set (h(1), "facecolor", "c"); 450s set (h(2), "facecolor", "g"); 450s set (h(3), "facecolor", "r"); 450s hold on 450s 450s ## Estimate their mu and sigma parameters 450s mu_sigmaA = lognfit (r(:,1)); 450s mu_sigmaB = lognfit (r(:,2)); 450s mu_sigmaC = lognfit (r(:,3)); 450s 450s ## Plot their estimated PDFs 450s x = [0:0.1:6]; 450s y = lognpdf (x, mu_sigmaA(1), mu_sigmaA(2)); 450s plot (x, y, "-pr"); 450s y = lognpdf (x, mu_sigmaB(1), mu_sigmaB(2)); 450s plot (x, y, "-sg"); 450s y = lognpdf (x, mu_sigmaC(1), mu_sigmaC(2)); 450s plot (x, y, "-^c"); 450s ylim ([0, 2]) 450s xlim ([0, 6]) 450s hold off 450s legend ({"Normalized HIST of sample 1 with mu=0, σ=0.25", ... 450s "Normalized HIST of sample 2 with mu=0, σ=0.5", ... 450s "Normalized HIST of sample 3 with mu=0, σ=1", ... 450s sprintf("PDF for sample 1 with estimated mu=%0.2f and σ=%0.2f", ... 450s mu_sigmaA(1), mu_sigmaA(2)), ... 450s sprintf("PDF for sample 2 with estimated mu=%0.2f and σ=%0.2f", ... 450s mu_sigmaB(1), mu_sigmaB(2)), ... 450s sprintf("PDF for sample 3 with estimated mu=%0.2f and σ=%0.2f", ... 450s mu_sigmaC(1), mu_sigmaC(2))}, "location", "northeast") 450s title ("Three population samples from different log-normal distributions") 450s hold off 450s ***** test 450s randn ("seed", 1); 450s x = lognrnd (3, 5, [1000, 1]); 450s [paramhat, paramci] = lognfit (x, 0.01); 450s assert (paramci(1,1) < 3); 450s assert (paramci(1,2) > 3); 450s assert (paramci(2,1) < 5); 450s assert (paramci(2,2) > 5); 450s ***** error ... 450s lognfit (ones (20,3)) 450s ***** error ... 450s lognfit ({1, 2, 3, 4, 5}) 450s ***** error ... 450s lognfit ([-1, 2, 3, 4, 5]) 450s ***** error lognfit (ones (20,1), 0) 450s ***** error lognfit (ones (20,1), -0.3) 450s ***** error lognfit (ones (20,1), 1.2) 450s ***** error lognfit (ones (20,1), [0.05, 0.1]) 450s ***** error lognfit (ones (20,1), 0.02+i) 450s ***** error ... 450s lognfit (ones (20,1), [], zeros(15,1)) 450s ***** error ... 450s lognfit (ones (20,1), [], zeros(20,1), ones(25,1)) 450s ***** error lognfit (ones (20,1), [], zeros(20,1), ones(20,1), "options") 450s 12 tests, 12 passed, 0 known failure, 0 skipped 450s [inst/dist_fit/lognlike.m] 450s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fit/lognlike.m 450s ***** test 450s x = 1:50; 450s [nlogL, avar] = lognlike ([0, 0.25], x); 450s avar_out = [-5.4749e-03, 2.8308e-04; 2.8308e-04, -1.1916e-05]; 450s assert (nlogL, 3962.330333301793, 1e-10); 450s assert (avar, avar_out, 1e-7); 450s ***** test 450s x = 1:50; 450s [nlogL, avar] = lognlike ([0, 0.25], x * 0.5); 450s avar_out = [-7.6229e-03, 4.8722e-04; 4.8722e-04, -2.6754e-05]; 450s assert (nlogL, 2473.183051225747, 1e-10); 450s assert (avar, avar_out, 1e-7); 450s ***** test 450s x = 1:50; 450s [nlogL, avar] = lognlike ([0, 0.5], x); 450s avar_out = [-2.1152e-02, 2.2017e-03; 2.2017e-03, -1.8535e-04]; 450s assert (nlogL, 1119.072424020455, 1e-12); 450s assert (avar, avar_out, 1e-6); 450s ***** test 450s x = 1:50; 450s censor = ones (1, 50); 450s censor([2, 4, 6, 8, 12, 14]) = 0; 450s [nlogL, avar] = lognlike ([0, 0.5], x, censor); 450s avar_out = [-1.9823e-02, 2.0370e-03; 2.0370e-03, -1.6618e-04]; 450s assert (nlogL, 1091.746371145497, 1e-12); 450s assert (avar, avar_out, 1e-6); 450s ***** test 450s x = 1:50; 450s censor = ones (1, 50); 450s censor([2, 4, 6, 8, 12, 14]) = 0; 450s [nlogL, avar] = lognlike ([0, 1], x, censor); 450s avar_out = [-6.8634e-02, 1.3968e-02; 1.3968e-02, -2.1664e-03]; 450s assert (nlogL, 349.3969104144271, 1e-12); 450s assert (avar, avar_out, 1e-6); 450s ***** error ... 450s lognlike ([12, 15]); 450s ***** error lognlike ([12, 15], ones (2)); 450s ***** error ... 450s lognlike ([12, 15, 3], [1:50]); 451s ***** error ... 451s lognlike ([12, 15], [1:50], [1, 2, 3]); 451s ***** error ... 451s lognlike ([12, 15], [1:50], [], [1, 2, 3]); 451s 10 tests, 10 passed, 0 known failure, 0 skipped 451s [inst/dist_fit/nakafit.m] 451s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fit/nakafit.m 451s ***** demo 451s ## Sample 3 populations from different Nakagami distributions 451s randg ("seed", 5) # for reproducibility 451s r1 = nakarnd (0.5, 1, 2000, 1); 451s randg ("seed", 2) # for reproducibility 451s r2 = nakarnd (5, 1, 2000, 1); 451s randg ("seed", 7) # for reproducibility 451s r3 = nakarnd (2, 2, 2000, 1); 451s r = [r1, r2, r3]; 451s 451s ## Plot them normalized and fix their colors 451s hist (r, [0.05:0.1:3.5], 10); 451s h = findobj (gca, "Type", "patch"); 451s set (h(1), "facecolor", "c"); 451s set (h(2), "facecolor", "g"); 451s set (h(3), "facecolor", "r"); 451s ylim ([0, 2.5]); 451s xlim ([0, 3.0]); 451s hold on 451s 451s ## Estimate their MU and LAMBDA parameters 451s mu_omegaA = nakafit (r(:,1)); 451s mu_omegaB = nakafit (r(:,2)); 451s mu_omegaC = nakafit (r(:,3)); 451s 451s ## Plot their estimated PDFs 451s x = [0.01:0.1:3.01]; 451s y = nakapdf (x, mu_omegaA(1), mu_omegaA(2)); 451s plot (x, y, "-pr"); 451s y = nakapdf (x, mu_omegaB(1), mu_omegaB(2)); 451s plot (x, y, "-sg"); 451s y = nakapdf (x, mu_omegaC(1), mu_omegaC(2)); 451s plot (x, y, "-^c"); 451s legend ({"Normalized HIST of sample 1 with μ=0.5 and ω=1", ... 451s "Normalized HIST of sample 2 with μ=5 and ω=1", ... 451s "Normalized HIST of sample 3 with μ=2 and ω=2", ... 451s sprintf("PDF for sample 1 with estimated μ=%0.2f and ω=%0.2f", ... 451s mu_omegaA(1), mu_omegaA(2)), ... 451s sprintf("PDF for sample 2 with estimated μ=%0.2f and ω=%0.2f", ... 451s mu_omegaB(1), mu_omegaB(2)), ... 451s sprintf("PDF for sample 3 with estimated μ=%0.2f and ω=%0.2f", ... 451s mu_omegaC(1), mu_omegaC(2))}) 451s title ("Three population samples from different Nakagami distributions") 451s hold off 451s ***** test 451s paramhat = nakafit ([1:50]); 451s paramhat_out = [0.7355, 858.5]; 451s assert (paramhat, paramhat_out, 1e-4); 451s ***** test 451s paramhat = nakafit ([1:5]); 451s paramhat_out = [1.1740, 11]; 451s assert (paramhat, paramhat_out, 1e-4); 451s ***** test 451s paramhat = nakafit ([1:6], [], [], [1 1 1 1 1 0]); 451s paramhat_out = [1.1740, 11]; 451s assert (paramhat, paramhat_out, 1e-4); 451s ***** test 451s paramhat = nakafit ([1:5], [], [], [1 1 1 1 2]); 451s paramhat_out = nakafit ([1:5, 5]); 451s assert (paramhat, paramhat_out, 1e-4); 451s ***** error nakafit (ones (2,5)); 451s ***** error nakafit ([1, 2, 3, 4, 5], 1.2); 451s ***** error nakafit ([1, 2, 3, 4, 5], 0); 451s ***** error nakafit ([1, 2, 3, 4, 5], "alpha"); 451s ***** error ... 451s nakafit ([1, 2, 3, 4, 5], 0.05, [1 1 0]); 451s ***** error ... 451s nakafit ([1, 2, 3, 4, 5], [], [1 1 0 1 1]'); 451s ***** error ... 451s nakafit ([1, 2, 3, 4, 5], 0.05, zeros (1,5), [1 1 0]); 451s ***** error ... 451s nakafit ([1, 2, 3, 4, 5], [], [], [1 1 0 1 1]'); 451s ***** error ... 451s nakafit ([1, 2, 3, 4, 5], [], [], [1 1 -1 1 1]); 451s ***** error ... 451s nakafit ([1, 2, 3, 4, 5], [], [], [1 1 1.5 1 1]); 451s ***** error ... 451s nakafit ([1, 2, 3, 4, 5], 0.05, [], [], 2); 451s 15 tests, 15 passed, 0 known failure, 0 skipped 451s [inst/dist_fit/nakalike.m] 451s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fit/nakalike.m 451s ***** test 451s nlogL = nakalike ([0.735504, 858.5], [1:50]); 451s assert (nlogL, 202.8689, 1e-4); 451s ***** test 451s nlogL = nakalike ([1.17404, 11], [1:5]); 451s assert (nlogL, 8.6976, 1e-4); 451s ***** test 451s nlogL = nakalike ([1.17404, 11], [1:5], [], [1, 1, 1, 1, 1]); 451s assert (nlogL, 8.6976, 1e-4); 451s ***** test 451s nlogL = nakalike ([1.17404, 11], [1:6], [], [1, 1, 1, 1, 1, 0]); 451s assert (nlogL, 8.6976, 1e-4); 451s ***** error nakalike (3.25) 451s ***** error nakalike ([5, 0.2], ones (2)) 451s ***** error ... 451s nakalike ([1, 0.2, 3], [1, 3, 5, 7]) 451s ***** error ... 451s nakalike ([1.5, 0.2], [1:5], [0, 0, 0]) 451s ***** error ... 451s nakalike ([1.5, 0.2], [1:5], [0, 0, 0, 0, 0], [1, 1, 1]) 451s ***** error ... 451s nakalike ([1.5, 0.2], [1:5], [], [1, 1, 1]) 451s ***** error ... 451s nakalike ([1.5, 0.2], [1:5], [], [1, 1, 1, 1, -1]) 451s 11 tests, 11 passed, 0 known failure, 0 skipped 451s [inst/dist_fit/nbinfit.m] 451s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fit/nbinfit.m 451s ***** demo 451s ## Sample 2 populations from different negative binomial distributions 451s randp ("seed", 5); randg ("seed", 5); # for reproducibility 451s r1 = nbinrnd (2, 0.15, 5000, 1); 451s randp ("seed", 8); randg ("seed", 8); # for reproducibility 451s r2 = nbinrnd (5, 0.2, 5000, 1); 451s r = [r1, r2]; 451s 451s ## Plot them normalized and fix their colors 451s hist (r, [0:51], 1); 451s h = findobj (gca, "Type", "patch"); 451s set (h(1), "facecolor", "c"); 451s set (h(2), "facecolor", "g"); 451s hold on 451s 451s ## Estimate their probability of success 451s r_psA = nbinfit (r(:,1)); 451s r_psB = nbinfit (r(:,2)); 451s 451s ## Plot their estimated PDFs 451s x = [0:40]; 451s y = nbinpdf (x, r_psA(1), r_psA(2)); 451s plot (x, y, "-pg"); 451s x = [min(r(:,2)):max(r(:,2))]; 451s y = nbinpdf (x, r_psB(1), r_psB(2)); 451s plot (x, y, "-sc"); 451s ylim ([0, 0.1]) 451s xlim ([0, 50]) 451s legend ({"Normalized HIST of sample 1 with r=2 and ps=0.15", ... 451s "Normalized HIST of sample 2 with r=5 and ps=0.2", ... 451s sprintf("PDF for sample 1 with estimated r=%0.2f and ps=%0.2f", ... 451s r_psA(1), r_psA(2)), ... 451s sprintf("PDF for sample 2 with estimated r=%0.2f and ps=%0.2f", ... 451s r_psB(1), r_psB(2))}) 451s title ("Two population samples from negative different binomial distributions") 451s hold off 451s ***** test 451s [paramhat, paramci] = nbinfit ([1:50]); 451s assert (paramhat, [2.420857, 0.086704], 1e-6); 451s assert (paramci(:,1), [1.382702; 3.459012], 1e-6); 451s assert (paramci(:,2), [0.049676; 0.123732], 1e-6); 451s ***** test 451s [paramhat, paramci] = nbinfit ([1:20]); 451s assert (paramhat, [3.588233, 0.254697], 1e-6); 451s assert (paramci(:,1), [0.451693; 6.724774], 1e-6); 451s assert (paramci(:,2), [0.081143; 0.428251], 1e-6); 451s ***** test 451s [paramhat, paramci] = nbinfit ([1:10]); 451s assert (paramhat, [8.8067, 0.6156], 1e-4); 451s assert (paramci(:,1), [0; 30.7068], 1e-4); 451s assert (paramci(:,2), [0.0217; 1], 1e-4); 451s ***** test 451s [paramhat, paramci] = nbinfit ([1:10], 0.05, ones (1, 10)); 451s assert (paramhat, [8.8067, 0.6156], 1e-4); 451s assert (paramci(:,1), [0; 30.7068], 1e-4); 451s assert (paramci(:,2), [0.0217; 1], 1e-4); 451s ***** test 451s [paramhat, paramci] = nbinfit ([1:11], 0.05, [ones(1, 10), 0]); 451s assert (paramhat, [8.8067, 0.6156], 1e-4); 451s assert (paramci(:,1), [0; 30.7068], 1e-4); 451s assert (paramci(:,2), [0.0217; 1], 1e-4); 451s ***** error nbinfit ([-1 2 3 3]) 451s ***** error nbinfit (ones (2)) 451s ***** error nbinfit ([1 2 1.2 3]) 451s ***** error nbinfit ([1 2 3], 0) 451s ***** error nbinfit ([1 2 3], 1.2) 451s ***** error nbinfit ([1 2 3], [0.02 0.05]) 451s ***** error ... 451s nbinfit ([1, 2, 3, 4, 5], 0.05, [1, 2, 3, 2]); 451s ***** error ... 451s nbinfit ([1, 2, 3, 4, 5], 0.05, [1, 2, 3, 2, -1]); 451s ***** error ... 451s nbinfit ([1, 2, 3, 4, 5], 0.05, [1, 2, 3, 2, 1.5]); 451s ***** error ... 451s nbinfit ([1, 2, 3, 4, 5], 0.05, struct ("option", 234)); 451s ***** error ... 451s nbinfit ([1, 2, 3, 4, 5], 0.05, ones (1,5), struct ("option", 234)); 451s 16 tests, 16 passed, 0 known failure, 0 skipped 451s [inst/dist_fit/nbinlike.m] 451s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fit/nbinlike.m 451s ***** assert (nbinlike ([2.42086, 0.0867043], [1:50]), 205.5942, 1e-4) 451s ***** assert (nbinlike ([3.58823, 0.254697], [1:20]), 63.6435, 1e-4) 451s ***** assert (nbinlike ([8.80671, 0.615565], [1:10]), 24.7410, 1e-4) 451s ***** assert (nbinlike ([22.1756, 0.831306], [1:8]), 17.9528, 1e-4) 451s ***** assert (nbinlike ([22.1756, 0.831306], [1:9], [ones(1,8), 0]), 17.9528, 1e-4) 451s ***** error nbinlike (3.25) 451s ***** error nbinlike ([5, 0.2], ones (2)) 451s ***** error nbinlike ([5, 0.2], [-1, 3]) 451s ***** error ... 451s nbinlike ([1, 0.2, 3], [1, 3, 5, 7]) 451s ***** error nbinlike ([-5, 0.2], [1:15]) 451s ***** error nbinlike ([0, 0.2], [1:15]) 451s ***** error nbinlike ([5, 1.2], [3, 5]) 451s ***** error nbinlike ([5, -0.2], [3, 5]) 451s ***** error ... 451s nbinlike ([5, 0.2], ones (10, 1), ones (8,1)) 451s ***** error ... 451s nbinlike ([5, 0.2], ones (1, 8), [1 1 1 1 1 1 1 -1]) 451s ***** error ... 451s nbinlike ([5, 0.2], ones (1, 8), [1 1 1 1 1 1 1 1.5]) 451s 16 tests, 16 passed, 0 known failure, 0 skipped 451s [inst/dist_fit/normfit.m] 451s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fit/normfit.m 451s ***** demo 451s ## Sample 3 populations from 3 different normal distributions 451s randn ("seed", 1); # for reproducibility 451s r1 = normrnd (2, 5, 5000, 1); 451s randn ("seed", 2); # for reproducibility 451s r2 = normrnd (5, 2, 5000, 1); 451s randn ("seed", 3); # for reproducibility 451s r3 = normrnd (9, 4, 5000, 1); 451s r = [r1, r2, r3]; 451s 451s ## Plot them normalized and fix their colors 451s hist (r, 15, 0.4); 451s h = findobj (gca, "Type", "patch"); 451s set (h(1), "facecolor", "c"); 451s set (h(2), "facecolor", "g"); 451s set (h(3), "facecolor", "r"); 451s hold on 451s 451s ## Estimate their mu and sigma parameters 451s [muhat, sigmahat] = normfit (r); 451s 451s ## Plot their estimated PDFs 451s x = [min(r(:)):max(r(:))]; 451s y = normpdf (x, muhat(1), sigmahat(1)); 451s plot (x, y, "-pr"); 451s y = normpdf (x, muhat(2), sigmahat(2)); 451s plot (x, y, "-sg"); 451s y = normpdf (x, muhat(3), sigmahat(3)); 451s plot (x, y, "-^c"); 451s ylim ([0, 0.5]) 451s xlim ([-20, 20]) 451s hold off 451s legend ({"Normalized HIST of sample 1 with mu=2, σ=5", ... 451s "Normalized HIST of sample 2 with mu=5, σ=2", ... 451s "Normalized HIST of sample 3 with mu=9, σ=4", ... 451s sprintf("PDF for sample 1 with estimated mu=%0.2f and σ=%0.2f", ... 451s muhat(1), sigmahat(1)), ... 451s sprintf("PDF for sample 2 with estimated mu=%0.2f and σ=%0.2f", ... 451s muhat(2), sigmahat(2)), ... 451s sprintf("PDF for sample 3 with estimated mu=%0.2f and σ=%0.2f", ... 451s muhat(3), sigmahat(3))}, "location", "northwest") 451s title ("Three population samples from different normal distributions") 451s hold off 451s ***** test 451s load lightbulb 451s idx = find (lightbulb(:,2) == 0); 451s censoring = lightbulb(idx,3) == 1; 451s [muHat, sigmaHat] = normfit (lightbulb(idx,1), [], censoring); 451s assert (muHat, 9496.59586737857, 1e-11); 451s assert (sigmaHat, 3064.021012796456, 2e-12); 451s ***** test 451s randn ("seed", 234); 451s x = normrnd (3, 5, [1000, 1]); 451s [muHat, sigmaHat, muCI, sigmaCI] = normfit (x, 0.01); 451s assert (muCI(1) < 3); 451s assert (muCI(2) > 3); 451s assert (sigmaCI(1) < 5); 451s assert (sigmaCI(2) > 5); 451s ***** error ... 451s normfit (ones (3,3,3)) 451s ***** error ... 451s normfit (ones (20,3), [], zeros (20,1)) 451s ***** error normfit (ones (20,1), 0) 451s ***** error normfit (ones (20,1), -0.3) 451s ***** error normfit (ones (20,1), 1.2) 451s ***** error normfit (ones (20,1), [0.05 0.1]) 451s ***** error normfit (ones (20,1), 0.02+i) 451s ***** error ... 451s normfit (ones (20,1), [], zeros(15,1)) 451s ***** error ... 451s normfit (ones (20,1), [], zeros(20,1), ones(25,1)) 451s ***** error ... 451s normfit (ones (5,1), [], zeros(5,1), [1, 2, 1, 2, -1]') 451s ***** error normfit (ones (20,1), [], zeros(20,1), ones(20,1), "options") 451s 13 tests, 13 passed, 0 known failure, 0 skipped 451s [inst/dist_fit/normlike.m] 451s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fit/normlike.m 451s ***** error normlike ([12, 15]); 451s ***** error normlike ([12, 15], ones (2)); 451s ***** error ... 451s normlike ([12, 15, 3], [1:50]); 451s ***** error ... 451s normlike ([12, 15], [1:50], [1, 2, 3]); 451s ***** error ... 451s normlike ([12, 15], [1:50], [], [1, 2, 3]); 451s ***** error ... 451s normlike ([12, 15], [1:5], [], [1, 2, 3, 2, -1]); 451s ***** test 451s x = 1:50; 451s [nlogL, avar] = normlike ([2.3, 1.2], x); 451s avar_out = [7.5767e-01, -1.8850e-02; -1.8850e-02, 4.8750e-04]; 451s assert (nlogL, 13014.95883783327, 1e-10); 451s assert (avar, avar_out, 1e-4); 451s ***** test 451s x = 1:50; 451s [nlogL, avar] = normlike ([2.3, 1.2], x * 0.5); 451s avar_out = [3.0501e-01, -1.5859e-02; -1.5859e-02, 9.1057e-04]; 451s assert (nlogL, 2854.802587833265, 1e-10); 451s assert (avar, avar_out, 1e-4); 451s ***** test 451s x = 1:50; 451s [nlogL, avar] = normlike ([21, 15], x); 451s avar_out = [5.460474308300396, -1.600790513833993; ... 451s -1.600790513833993, 2.667984189723321]; 451s assert (nlogL, 206.738325604233, 1e-12); 451s assert (avar, avar_out, 1e-14); 451s ***** test 451s x = 1:50; 451s censor = ones (1, 50); 451s censor([2, 4, 6, 8, 12, 14]) = 0; 451s [nlogL, avar] = normlike ([2.3, 1.2], x, censor); 451s avar_out = [3.0501e-01, -1.5859e-02; -1.5859e-02, 9.1057e-04]; 451s assert (nlogL, Inf); 451s assert (avar, [NaN, NaN; NaN, NaN]); 451s ***** test 451s x = 1:50; 451s censor = ones (1, 50); 451s censor([2, 4, 6, 8, 12, 14]) = 0; 451s [nlogL, avar] = normlike ([21, 15], x, censor); 451s avar_out = [24.4824488866131, -10.6649544179636; ... 451s -10.6649544179636, 6.22827849965737]; 451s assert (nlogL, 86.9254371829733, 1e-12); 451s assert (avar, avar_out, 8e-14); 451s 11 tests, 11 passed, 0 known failure, 0 skipped 451s [inst/dist_fit/poissfit.m] 451s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fit/poissfit.m 451s ***** demo 451s ## Sample 3 populations from 3 different Poisson distributions 451s randp ("seed", 2); # for reproducibility 451s r1 = poissrnd (1, 1000, 1); 451s randp ("seed", 2); # for reproducibility 451s r2 = poissrnd (4, 1000, 1); 451s randp ("seed", 3); # for reproducibility 451s r3 = poissrnd (10, 1000, 1); 451s r = [r1, r2, r3]; 451s 451s ## Plot them normalized and fix their colors 451s hist (r, [0:20], 1); 451s h = findobj (gca, "Type", "patch"); 451s set (h(1), "facecolor", "c"); 451s set (h(2), "facecolor", "g"); 451s set (h(3), "facecolor", "r"); 451s hold on 451s 451s ## Estimate their lambda parameter 451s lambdahat = poissfit (r); 451s 451s ## Plot their estimated PDFs 451s x = [0:20]; 451s y = poisspdf (x, lambdahat(1)); 451s plot (x, y, "-pr"); 451s y = poisspdf (x, lambdahat(2)); 451s plot (x, y, "-sg"); 451s y = poisspdf (x, lambdahat(3)); 451s plot (x, y, "-^c"); 451s xlim ([0, 20]) 451s ylim ([0, 0.4]) 451s legend ({"Normalized HIST of sample 1 with λ=1", ... 451s "Normalized HIST of sample 2 with λ=4", ... 451s "Normalized HIST of sample 3 with λ=10", ... 451s sprintf("PDF for sample 1 with estimated λ=%0.2f", ... 451s lambdahat(1)), ... 451s sprintf("PDF for sample 2 with estimated λ=%0.2f", ... 451s lambdahat(2)), ... 451s sprintf("PDF for sample 3 with estimated λ=%0.2f", ... 451s lambdahat(3))}) 451s title ("Three population samples from different Poisson distributions") 451s hold off 451s ***** test 451s x = [1 3 2 4 5 4 3 4]; 451s [lhat, lci] = poissfit (x); 451s assert (lhat, 3.25) 451s assert (lci, [2.123007901949543; 4.762003010390628], 1e-14) 451s ***** test 451s x = [1 3 2 4 5 4 3 4]; 451s [lhat, lci] = poissfit (x, 0.01); 451s assert (lhat, 3.25) 451s assert (lci, [1.842572740234582; 5.281369033298528], 1e-14) 451s ***** test 451s x = [1 2 3 4 5]; 451s f = [1 1 2 3 1]; 451s [lhat, lci] = poissfit (x, [], f); 451s assert (lhat, 3.25) 451s assert (lci, [2.123007901949543; 4.762003010390628], 1e-14) 451s ***** test 451s x = [1 2 3 4 5]; 451s f = [1 1 2 3 1]; 451s [lhat, lci] = poissfit (x, 0.01, f); 451s assert (lhat, 3.25) 451s assert (lci, [1.842572740234582; 5.281369033298528], 1e-14) 451s ***** error poissfit ([1 2 -1 3]) 451s ***** error poissfit ([1 2 3], 0) 451s ***** error poissfit ([1 2 3], 1.2) 451s ***** error poissfit ([1 2 3], [0.02 0.05]) 451s ***** error 451s poissfit ([1 2 3], [], [1 5]) 451s ***** error 451s poissfit ([1 2 3], [], [1 5 -1]) 451s 10 tests, 10 passed, 0 known failure, 0 skipped 451s [inst/dist_fit/poisslike.m] 451s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fit/poisslike.m 451s ***** test 451s x = [1 3 2 4 5 4 3 4]; 451s [nlogL, avar] = poisslike (3.25, x); 451s assert (nlogL, 13.9533, 1e-4) 451s ***** test 451s x = [1 2 3 4 5]; 451s f = [1 1 2 3 1]; 451s [nlogL, avar] = poisslike (3.25, x, f); 451s assert (nlogL, 13.9533, 1e-4) 451s ***** error poisslike (1) 451s ***** error poisslike ([1 2 3], [1 2]) 451s ***** error ... 451s poisslike (3.25, ones (10, 2)) 451s ***** error ... 451s poisslike (3.25, [1 2 3 -4 5]) 451s ***** error ... 451s poisslike (3.25, ones (10, 1), ones (8,1)) 451s ***** error ... 451s poisslike (3.25, ones (1, 8), [1 1 1 1 1 1 1 -1]) 451s 8 tests, 8 passed, 0 known failure, 0 skipped 451s [inst/dist_fit/raylfit.m] 451s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fit/raylfit.m 451s ***** demo 451s ## Sample 3 populations from 3 different Rayleigh distributions 451s rand ("seed", 2); # for reproducibility 451s r1 = raylrnd (1, 1000, 1); 451s rand ("seed", 2); # for reproducibility 451s r2 = raylrnd (2, 1000, 1); 451s rand ("seed", 3); # for reproducibility 451s r3 = raylrnd (4, 1000, 1); 451s r = [r1, r2, r3]; 451s 451s ## Plot them normalized and fix their colors 451s hist (r, [0.5:0.5:10.5], 2); 451s h = findobj (gca, "Type", "patch"); 451s set (h(1), "facecolor", "c"); 451s set (h(2), "facecolor", "g"); 451s set (h(3), "facecolor", "r"); 451s hold on 451s 451s ## Estimate their lambda parameter 451s sigmaA = raylfit (r(:,1)); 451s sigmaB = raylfit (r(:,2)); 451s sigmaC = raylfit (r(:,3)); 451s 451s ## Plot their estimated PDFs 451s x = [0:0.1:10]; 451s y = raylpdf (x, sigmaA); 451s plot (x, y, "-pr"); 451s y = raylpdf (x, sigmaB); 451s plot (x, y, "-sg"); 451s y = raylpdf (x, sigmaC); 451s plot (x, y, "-^c"); 451s xlim ([0, 10]) 451s ylim ([0, 0.7]) 451s legend ({"Normalized HIST of sample 1 with σ=1", ... 451s "Normalized HIST of sample 2 with σ=2", ... 451s "Normalized HIST of sample 3 with σ=4", ... 451s sprintf("PDF for sample 1 with estimated σ=%0.2f", ... 451s sigmaA), ... 451s sprintf("PDF for sample 2 with estimated σ=%0.2f", ... 451s sigmaB), ... 451s sprintf("PDF for sample 3 with estimated σ=%0.2f", ... 451s sigmaC)}) 451s title ("Three population samples from different Rayleigh distributions") 451s hold off 451s ***** test 451s x = [1 3 2 4 5 4 3 4]; 451s [shat, sci] = raylfit (x); 451s assert (shat, 2.4495, 1e-4) 451s assert (sci, [1.8243; 3.7279], 1e-4) 451s ***** test 451s x = [1 3 2 4 5 4 3 4]; 451s [shat, sci] = raylfit (x, 0.01); 451s assert (shat, 2.4495, 1e-4) 451s assert (sci, [1.6738; 4.3208], 1e-4) 452s ***** test 452s x = [1 2 3 4 5]; 452s f = [1 1 2 3 1]; 452s [shat, sci] = raylfit (x, [], [], f); 452s assert (shat, 2.4495, 1e-4) 452s assert (sci, [1.8243; 3.7279], 1e-4) 452s ***** test 452s x = [1 2 3 4 5]; 452s f = [1 1 2 3 1]; 452s [shat, sci] = raylfit (x, 0.01, [], f); 452s assert (shat, 2.4495, 1e-4) 452s assert (sci, [1.6738; 4.3208], 1e-4) 452s ***** test 452s x = [1 2 3 4 5 6]; 452s c = [0 0 0 0 0 1]; 452s f = [1 1 2 3 1 1]; 452s [shat, sci] = raylfit (x, 0.01, c, f); 452s assert (shat, 2.4495, 1e-4) 452s assert (sci, [1.6738; 4.3208], 1e-4) 452s ***** error raylfit (ones (2,5)); 452s ***** error raylfit ([1 2 -1 3]) 452s ***** error raylfit ([1 2 3], 0) 452s ***** error raylfit ([1 2 3], 1.2) 452s ***** error raylfit ([1 2 3], [0.02 0.05]) 452s ***** error ... 452s raylfit ([1, 2, 3, 4, 5], 0.05, [1 1 0]); 452s ***** error ... 452s raylfit ([1, 2, 3, 4, 5], [], [1 1 0 1 1]'); 452s ***** error ... 452s raylfit ([1, 2, 3, 4, 5], 0.05, zeros (1,5), [1 1 0]); 452s ***** error ... 452s raylfit ([1, 2, 3, 4, 5], [], [], [1 1 0 1 1]'); 452s ***** error 452s raylfit ([1 2 3], [], [], [1 5]) 452s ***** error 452s raylfit ([1 2 3], [], [], [1 5 -1]) 452s 16 tests, 16 passed, 0 known failure, 0 skipped 452s [inst/dist_fit/rayllike.m] 452s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fit/rayllike.m 452s ***** test 452s x = [1 3 2 4 5 4 3 4]; 452s [nlogL, acov] = rayllike (3.25, x); 452s assert (nlogL, 14.7442, 1e-4) 452s ***** test 452s x = [1 2 3 4 5]; 452s f = [1 1 2 3 1]; 452s [nlogL, acov] = rayllike (3.25, x, [], f); 452s assert (nlogL, 14.7442, 1e-4) 452s ***** test 452s x = [1 2 3 4 5 6]; 452s f = [1 1 2 3 1 0]; 452s [nlogL, acov] = rayllike (3.25, x, [], f); 452s assert (nlogL, 14.7442, 1e-4) 452s ***** test 452s x = [1 2 3 4 5 6]; 452s c = [0 0 0 0 0 1]; 452s f = [1 1 2 3 1 0]; 452s [nlogL, acov] = rayllike (3.25, x, c, f); 452s assert (nlogL, 14.7442, 1e-4) 452s ***** error rayllike (1) 452s ***** error rayllike ([1 2 3], [1 2]) 452s ***** error ... 452s rayllike (3.25, ones (10, 2)) 452s ***** error ... 452s rayllike (3.25, [1 2 3 -4 5]) 452s ***** error ... 452s rayllike (3.25, [1, 2, 3, 4, 5], [1 1 0]); 452s ***** error ... 452s rayllike (3.25, [1, 2, 3, 4, 5], [1 1 0 1 1]'); 452s ***** error ... 452s rayllike (3.25, [1, 2, 3, 4, 5], zeros (1,5), [1 1 0]); 452s ***** error ... 452s rayllike (3.25, [1, 2, 3, 4, 5], [], [1 1 0 1 1]'); 452s ***** error ... 452s rayllike (3.25, ones (1, 8), [], [1 1 1 1 1 1 1 -1]) 452s 13 tests, 13 passed, 0 known failure, 0 skipped 452s [inst/dist_fit/ricefit.m] 452s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fit/ricefit.m 452s ***** demo 452s ## Sample 3 populations from different Gamma distributions 452s randg ("seed", 5); # for reproducibility 452s randp ("seed", 6); 452s r1 = ricernd (1, 2, 3000, 1); 452s randg ("seed", 2); # for reproducibility 452s randp ("seed", 8); 452s r2 = ricernd (2, 4, 3000, 1); 452s randg ("seed", 7); # for reproducibility 452s randp ("seed", 9); 452s r3 = ricernd (7.5, 1, 3000, 1); 452s r = [r1, r2, r3]; 452s 452s ## Plot them normalized and fix their colors 452s hist (r, 75, 4); 452s h = findobj (gca, "Type", "patch"); 452s set (h(1), "facecolor", "c"); 452s set (h(2), "facecolor", "g"); 452s set (h(3), "facecolor", "r"); 452s ylim ([0, 0.7]); 452s xlim ([0, 12]); 452s hold on 452s 452s ## Estimate their α and β parameters 452s s_sigmaA = ricefit (r(:,1)); 452s s_sigmaB = ricefit (r(:,2)); 452s s_sigmaC = ricefit (r(:,3)); 452s 452s ## Plot their estimated PDFs 452s x = [0.01,0.1:0.2:18]; 452s y = ricepdf (x, s_sigmaA(1), s_sigmaA(2)); 452s plot (x, y, "-pr"); 452s y = ricepdf (x, s_sigmaB(1), s_sigmaB(2)); 452s plot (x, y, "-sg"); 452s y = ricepdf (x, s_sigmaC(1), s_sigmaC(2)); 452s plot (x, y, "-^c"); 452s hold off 452s legend ({"Normalized HIST of sample 1 with s=1 and σ=2", ... 452s "Normalized HIST of sample 2 with s=2 and σ=4", ... 452s "Normalized HIST of sample 3 with s=7.5 and σ=1", ... 452s sprintf("PDF for sample 1 with estimated s=%0.2f and σ=%0.2f", ... 452s s_sigmaA(1), s_sigmaA(2)), ... 452s sprintf("PDF for sample 2 with estimated s=%0.2f and σ=%0.2f", ... 452s s_sigmaB(1), s_sigmaB(2)), ... 452s sprintf("PDF for sample 3 with estimated s=%0.2f and σ=%0.2f", ... 452s s_sigmaC(1), s_sigmaC(2))}) 452s title ("Three population samples from different Rician distributions") 452s hold off 452s ***** test 452s [paramhat, paramci] = ricefit ([1:50]); 452s assert (paramhat, [15.3057, 17.6668], 1e-4); 452s assert (paramci, [9.5468, 11.7802; 24.5383, 26.4952], 1e-4); 452s ***** test 452s [paramhat, paramci] = ricefit ([1:50], 0.01); 452s assert (paramhat, [15.3057, 17.6668], 1e-4); 452s assert (paramci, [8.2309, 10.3717; 28.4615, 30.0934], 1e-4); 452s ***** test 452s [paramhat, paramci] = ricefit ([1:5]); 452s assert (paramhat, [2.3123, 1.6812], 1e-4); 452s assert (paramci, [1.0819, 0.6376; 4.9424, 4.4331], 1e-4); 452s ***** test 452s [paramhat, paramci] = ricefit ([1:5], 0.01); 452s assert (paramhat, [2.3123, 1.6812], 1e-4); 452s assert (paramci, [0.8521, 0.4702; 6.2747, 6.0120], 1e-4); 452s ***** test 452s freq = [1 1 1 1 5]; 452s [paramhat, paramci] = ricefit ([1:5], [], [], freq); 452s assert (paramhat, [3.5181, 1.5565], 1e-4); 452s assert (paramci, [2.5893, 0.9049; 4.7801, 2.6772], 1e-4); 452s ***** test 452s censor = [1 0 0 0 0]; 452s [paramhat, paramci] = ricefit ([1:5], [], censor); 452s assert (paramhat, [3.2978, 1.1527], 1e-4); 452s assert (paramci, [2.3192, 0.5476; 4.6895, 2.4261], 1e-4); 452s ***** assert (class (ricefit (single ([1:50]))), "single") 452s ***** error ricefit (ones (2)) 452s ***** error ricefit ([1:50], 1) 452s ***** error ricefit ([1:50], -1) 452s ***** error ricefit ([1:50], {0.05}) 452s ***** error ricefit ([1:50], "k") 452s ***** error ricefit ([1:50], i) 452s ***** error ricefit ([1:50], [0.01 0.02]) 452s ***** error ricefit ([1:50], [], [1 1]) 452s ***** error ricefit ([1:50], [], [], [1 1]) 452s ***** error ... 452s ricefit ([1:5], [], [], [1, 1, 2, 1, -1]) 452s ***** error ricefit ([1 2 3 -4]) 452s ***** error ricefit ([1 2 0], [], [1 0 0]) 452s 19 tests, 19 passed, 0 known failure, 0 skipped 452s [inst/dist_fit/ricelike.m] 452s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fit/ricelike.m 452s ***** test 452s nlogL = ricelike ([15.3057344, 17.6668458], [1:50]); 452s assert (nlogL, 204.5230311010569, 1e-12); 452s ***** test 452s nlogL = ricelike ([2.312346885, 1.681228265], [1:5]); 452s assert (nlogL, 8.65562164930058, 1e-12); 452s ***** error ricelike (3.25) 452s ***** error ricelike ([5, 0.2], ones (2)) 452s ***** error ... 452s ricelike ([1, 0.2, 3], [1, 3, 5, 7]) 452s ***** error ... 452s ricelike ([1.5, 0.2], [1:5], [0, 0, 0]) 452s ***** error ... 452s ricelike ([1.5, 0.2], [1:5], [0, 0, 0, 0, 0], [1, 1, 1]) 452s ***** error ... 452s ricelike ([1.5, 0.2], [1:5], [], [1, 1, 1]) 452s ***** error ... 452s ricelike ([1.5, 0.2], [1:5], [], [1, 1, 1, 0, -1]) 452s 9 tests, 9 passed, 0 known failure, 0 skipped 452s [inst/dist_fit/tlsfit.m] 452s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fit/tlsfit.m 452s ***** demo 452s ## Sample 3 populations from 3 different location-scale T distributions 452s randn ("seed", 1); # for reproducibility 452s randg ("seed", 2); # for reproducibility 452s r1 = tlsrnd (-4, 3, 1, 2000, 1); 452s randn ("seed", 3); # for reproducibility 452s randg ("seed", 4); # for reproducibility 452s r2 = tlsrnd (0, 3, 1, 2000, 1); 452s randn ("seed", 5); # for reproducibility 452s randg ("seed", 6); # for reproducibility 452s r3 = tlsrnd (5, 5, 4, 2000, 1); 452s r = [r1, r2, r3]; 452s 452s ## Plot them normalized and fix their colors 452s hist (r, [-21:21], [1, 1, 1]); 452s h = findobj (gca, "Type", "patch"); 452s set (h(1), "facecolor", "c"); 452s set (h(2), "facecolor", "g"); 452s set (h(3), "facecolor", "r"); 452s ylim ([0, 0.25]); 452s xlim ([-20, 20]); 452s hold on 452s 452s ## Estimate their lambda parameter 452s mu_sigma_nuA = tlsfit (r(:,1)); 452s mu_sigma_nuB = tlsfit (r(:,2)); 452s mu_sigma_nuC = tlsfit (r(:,3)); 452s 452s ## Plot their estimated PDFs 452s x = [-20:0.1:20]; 452s y = tlspdf (x, mu_sigma_nuA(1), mu_sigma_nuA(2), mu_sigma_nuA(3)); 452s plot (x, y, "-pr"); 452s y = tlspdf (x, mu_sigma_nuB(1), mu_sigma_nuB(2), mu_sigma_nuB(3)); 452s plot (x, y, "-sg"); 452s y = tlspdf (x, mu_sigma_nuC(1), mu_sigma_nuC(2), mu_sigma_nuC(3)); 452s plot (x, y, "-^c"); 452s hold off 452s legend ({"Normalized HIST of sample 1 with μ=0, σ=2 and nu=1", ... 452s "Normalized HIST of sample 2 with μ=5, σ=2 and nu=1", ... 452s "Normalized HIST of sample 3 with μ=3, σ=4 and nu=3", ... 452s sprintf("PDF for sample 1 with estimated μ=%0.2f, σ=%0.2f, and ν=%0.2f", ... 452s mu_sigma_nuA(1), mu_sigma_nuA(2), mu_sigma_nuA(3)), ... 452s sprintf("PDF for sample 2 with estimated μ=%0.2f, σ=%0.2f, and ν=%0.2f", ... 452s mu_sigma_nuB(1), mu_sigma_nuB(2), mu_sigma_nuB(3)), ... 452s sprintf("PDF for sample 3 with estimated μ=%0.2f, σ=%0.2f, and ν=%0.2f", ... 452s mu_sigma_nuC(1), mu_sigma_nuC(2), mu_sigma_nuC(3))}) 452s title ("Three population samples from different location-scale T distributions") 452s hold off 452s ***** test 452s x = [-1.2352, -0.2741, 0.1726, 7.4356, 1.0392, 16.4165]; 452s [paramhat, paramci] = tlsfit (x); 452s paramhat_out = [0.035893, 0.862711, 0.649261]; 452s paramci_out = [-0.949034, 0.154655, 0.181080; 1.02082, 4.812444, 2.327914]; 452s assert (paramhat, paramhat_out, 1e-6); 452s assert (paramci, paramci_out, 1e-5); 453s ***** test 453s x = [-1.2352, -0.2741, 0.1726, 7.4356, 1.0392, 16.4165]; 453s [paramhat, paramci] = tlsfit (x, 0.01); 453s paramci_out = [-1.2585, 0.0901, 0.1212; 1.3303, 8.2591, 3.4771]; 453s assert (paramci, paramci_out, 1e-4); 453s ***** error tlsfit (ones (2,5)); 453s ***** error tlsfit ([1, 2, 3, 4, 5], 1.2); 453s ***** error tlsfit ([1, 2, 3, 4, 5], 0); 453s ***** error tlsfit ([1, 2, 3, 4, 5], "alpha"); 453s ***** error ... 453s tlsfit ([1, 2, 3, 4, 5], 0.05, [1 1 0]); 453s ***** error ... 453s tlsfit ([1, 2, 3, 4, 5], [], [1 1 0 1 1]'); 453s ***** error ... 453s tlsfit ([1, 2, 3, 4, 5], 0.05, zeros (1,5), [1 1 0]); 453s ***** error ... 453s tlsfit ([1, 2, 3, 4, 5], [], [], [1 1 0 1 1]'); 453s ***** error ... 453s tlsfit ([1, 2, 3, 4, 5], [], [], [1 1 0 1 -1]); 453s ***** error ... 453s tlsfit ([1, 2, 3, 4, 5], 0.05, [], [], 2); 453s 12 tests, 12 passed, 0 known failure, 0 skipped 453s [inst/dist_fit/tlslike.m] 453s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fit/tlslike.m 453s ***** test 453s x = [-1.2352, -0.2741, 0.1726, 7.4356, 1.0392, 16.4165]; 453s [nlogL, acov] = tlslike ([0.035893, 0.862711, 0.649261], x); 453s acov_out = [0.2525, 0.0670, 0.0288; ... 453s 0.0670, 0.5724, 0.1786; ... 453s 0.0288, 0.1786, 0.1789]; 453s assert (nlogL, 17.9979636579, 1e-10); 453s assert (acov, acov_out, 1e-4); 453s ***** error tlslike ([12, 15, 1]); 453s ***** error tlslike ([12, 15], [1:50]); 453s ***** error tlslike ([12, 3, 1], ones (10, 2)); 453s ***** error tlslike ([12, 15, 1], [1:50], [1, 2, 3]); 453s ***** error tlslike ([12, 15, 1], [1:50], [], [1, 2, 3]); 453s ***** error tlslike ([12, 15, 1], [1:3], [], [1, 2, -3]); 453s 7 tests, 7 passed, 0 known failure, 0 skipped 453s [inst/dist_fit/unidfit.m] 453s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fit/unidfit.m 453s ***** demo 453s ## Sample 2 populations from different discrete uniform distributions 453s rand ("seed", 1); # for reproducibility 453s r1 = unidrnd (5, 1000, 1); 453s rand ("seed", 2); # for reproducibility 453s r2 = unidrnd (9, 1000, 1); 453s r = [r1, r2]; 453s 453s ## Plot them normalized and fix their colors 453s hist (r, 0:0.5:20.5, 1); 453s h = findobj (gca, "Type", "patch"); 453s set (h(1), "facecolor", "c"); 453s set (h(2), "facecolor", "g"); 453s hold on 453s 453s ## Estimate their probability of success 453s NhatA = unidfit (r(:,1)); 453s NhatB = unidfit (r(:,2)); 453s 453s ## Plot their estimated PDFs 453s x = [0:10]; 453s y = unidpdf (x, NhatA); 453s plot (x, y, "-pg"); 453s y = unidpdf (x, NhatB); 453s plot (x, y, "-sc"); 453s xlim ([0, 10]) 453s ylim ([0, 0.4]) 453s legend ({"Normalized HIST of sample 1 with N=5", ... 453s "Normalized HIST of sample 2 with N=9", ... 453s sprintf("PDF for sample 1 with estimated N=%0.2f", NhatA), ... 453s sprintf("PDF for sample 2 with estimated N=%0.2f", NhatB)}) 453s title ("Two population samples from different discrete uniform distributions") 453s hold off 453s ***** test 453s x = 0:5; 453s [Nhat, Nci] = unidfit (x); 453s assert (Nhat, 5); 453s assert (Nci, [5; 9]); 453s ***** test 453s x = 0:5; 453s [Nhat, Nci] = unidfit (x, [], [1 1 1 1 1 1]); 453s assert (Nhat, 5); 453s assert (Nci, [5; 9]); 453s ***** assert (unidfit ([1 1 2 3]), unidfit ([1 2 3], [] ,[2 1 1])) 453s ***** error unidfit () 453s ***** error unidfit (-1, [1 2 3 3]) 453s ***** error unidfit (1, 0) 453s ***** error unidfit (1, 1.2) 453s ***** error unidfit (1, [0.02 0.05]) 453s ***** error ... 453s unidfit ([1.5, 0.2], [], [0, 0, 0, 0, 0]) 453s ***** error ... 453s unidfit ([1.5, 0.2], [], [1, 1, 1]) 453s ***** error ... 453s unidfit ([1.5, 0.2], [], [1, -1]) 453s 11 tests, 11 passed, 0 known failure, 0 skipped 453s [inst/dist_fit/unifit.m] 453s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fit/unifit.m 453s ***** demo 453s ## Sample 2 populations from different continuous uniform distributions 453s rand ("seed", 5); # for reproducibility 453s r1 = unifrnd (2, 5, 2000, 1); 453s rand ("seed", 6); # for reproducibility 453s r2 = unifrnd (3, 9, 2000, 1); 453s r = [r1, r2]; 453s 453s ## Plot them normalized and fix their colors 453s hist (r, 0:0.5:10, 2); 453s h = findobj (gca, "Type", "patch"); 453s set (h(1), "facecolor", "c"); 453s set (h(2), "facecolor", "g"); 453s hold on 453s 453s ## Estimate their probability of success 453s a_bA = unifit (r(:,1)); 453s a_bB = unifit (r(:,2)); 453s 453s ## Plot their estimated PDFs 453s x = [0:10]; 453s y = unifpdf (x, a_bA(1), a_bA(2)); 453s plot (x, y, "-pg"); 453s y = unifpdf (x, a_bB(1), a_bB(2)); 453s plot (x, y, "-sc"); 453s xlim ([1, 10]) 453s ylim ([0, 0.5]) 453s legend ({"Normalized HIST of sample 1 with a=2 and b=5", ... 453s "Normalized HIST of sample 2 with a=3 and b=9", ... 453s sprintf("PDF for sample 1 with estimated a=%0.2f and b=%0.2f", ... 453s a_bA(1), a_bA(2)), ... 453s sprintf("PDF for sample 2 with estimated a=%0.2f and b=%0.2f", ... 453s a_bB(1), a_bB(2))}) 453s title ("Two population samples from different continuous uniform distributions") 453s hold off 453s ***** test 453s x = 0:5; 453s [paramhat, paramci] = unifit (x); 453s assert (paramhat, [0, 5]); 453s assert (paramci, [-3.2377, 8.2377; 0, 5], 1e-4); 453s ***** test 453s x = 0:5; 453s [paramhat, paramci] = unifit (x, [], [1 1 1 1 1 1]); 453s assert (paramhat, [0, 5]); 453s assert (paramci, [-3.2377, 8.2377; 0, 5], 1e-4); 453s ***** assert (unifit ([1 1 2 3]), unifit ([1 2 3], [] ,[2 1 1])) 453s ***** error unifit () 453s ***** error unifit (-1, [1 2 3 3]) 453s ***** error unifit (1, 0) 453s ***** error unifit (1, 1.2) 453s ***** error unifit (1, [0.02 0.05]) 453s ***** error ... 453s unifit ([1.5, 0.2], [], [0, 0, 0, 0, 0]) 453s ***** error ... 453s unifit ([1.5, 0.2], [], [1, -1]) 453s ***** error ... 453s unifit ([1.5, 0.2], [], [1, 1, 1]) 453s 11 tests, 11 passed, 0 known failure, 0 skipped 453s [inst/dist_fit/wblfit.m] 453s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fit/wblfit.m 453s ***** demo 453s ## Sample 3 populations from 3 different Weibull distributions 453s rande ("seed", 1); # for reproducibility 453s r1 = wblrnd(2, 4, 2000, 1); 453s rande ("seed", 2); # for reproducibility 453s r2 = wblrnd(5, 2, 2000, 1); 453s rande ("seed", 5); # for reproducibility 453s r3 = wblrnd(1, 5, 2000, 1); 453s r = [r1, r2, r3]; 453s 453s ## Plot them normalized and fix their colors 453s hist (r, 30, [2.5 2.1 3.2]); 453s h = findobj (gca, "Type", "patch"); 453s set (h(1), "facecolor", "c"); 453s set (h(2), "facecolor", "g"); 453s set (h(3), "facecolor", "r"); 453s ylim ([0, 2]); 453s xlim ([0, 10]); 453s hold on 453s 453s ## Estimate their lambda parameter 453s lambda_kA = wblfit (r(:,1)); 453s lambda_kB = wblfit (r(:,2)); 453s lambda_kC = wblfit (r(:,3)); 453s 453s ## Plot their estimated PDFs 453s x = [0:0.1:15]; 453s y = wblpdf (x, lambda_kA(1), lambda_kA(2)); 453s plot (x, y, "-pr"); 453s y = wblpdf (x, lambda_kB(1), lambda_kB(2)); 453s plot (x, y, "-sg"); 453s y = wblpdf (x, lambda_kC(1), lambda_kC(2)); 453s plot (x, y, "-^c"); 453s hold off 453s legend ({"Normalized HIST of sample 1 with λ=2 and k=4", ... 453s "Normalized HIST of sample 2 with λ=5 and k=2", ... 453s "Normalized HIST of sample 3 with λ=1 and k=5", ... 453s sprintf("PDF for sample 1 with estimated λ=%0.2f and k=%0.2f", ... 453s lambda_kA(1), lambda_kA(2)), ... 453s sprintf("PDF for sample 2 with estimated λ=%0.2f and k=%0.2f", ... 453s lambda_kB(1), lambda_kB(2)), ... 453s sprintf("PDF for sample 3 with estimated λ=%0.2f and k=%0.2f", ... 453s lambda_kC(1), lambda_kC(2))}) 453s title ("Three population samples from different Weibull distributions") 453s hold off 453s ***** test 453s x = 1:50; 453s [paramhat, paramci] = wblfit (x); 453s paramhat_out = [28.3636, 1.7130]; 453s paramci_out = [23.9531, 1.3551; 33.5861, 2.1655]; 453s assert (paramhat, paramhat_out, 1e-4); 453s assert (paramci, paramci_out, 1e-4); 453s ***** test 453s x = 1:50; 453s [paramhat, paramci] = wblfit (x, 0.01); 453s paramci_out = [22.7143, 1.2589; 35.4179, 2.3310]; 453s assert (paramci, paramci_out, 1e-4); 453s ***** error wblfit (ones (2,5)); 453s ***** error wblfit ([-1 2 3 4]); 453s ***** error wblfit ([1, 2, 3, 4, 5], 1.2); 453s ***** error wblfit ([1, 2, 3, 4, 5], 0); 453s ***** error wblfit ([1, 2, 3, 4, 5], "alpha"); 453s ***** error ... 453s wblfit ([1, 2, 3, 4, 5], 0.05, [1 1 0]); 453s ***** error ... 453s wblfit ([1, 2, 3, 4, 5], [], [1 1 0 1 1]'); 453s ***** error ... 453s wblfit ([1, 2, 3, 4, 5], 0.05, zeros (1,5), [1 1 0]); 453s ***** error ... 453s wblfit ([1, 2, 3, 4, 5], [], [], [1 1 0 -1 1]); 453s ***** error ... 453s wblfit ([1, 2, 3, 4, 5], [], [], [1 1 0 1 1]'); 453s ***** error ... 453s wblfit ([1, 2, 3, 4, 5], 0.05, [], [], 2); 453s 13 tests, 13 passed, 0 known failure, 0 skipped 453s [inst/dist_fit/wbllike.m] 453s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fit/wbllike.m 453s ***** test 453s x = 1:50; 453s [nlogL, acov] = wbllike ([2.3, 1.2], x); 453s avar_out = [0.0250, 0.0062; 0.0062, 0.0017]; 453s assert (nlogL, 945.9589180651594, 1e-12); 453s assert (acov, avar_out, 1e-4); 453s ***** test 453s x = 1:50; 453s [nlogL, acov] = wbllike ([2.3, 1.2], x * 0.5); 453s avar_out = [-0.3238, -0.1112; -0.1112, -0.0376]; 453s assert (nlogL, 424.9879809704742, 6e-14); 453s assert (acov, avar_out, 1e-4); 453s ***** test 453s x = 1:50; 453s [nlogL, acov] = wbllike ([21, 15], x); 453s avar_out = [-0.00001236, -0.00001166; -0.00001166, -0.00001009]; 453s assert (nlogL, 1635190.328991511, 1e-8); 453s assert (acov, avar_out, 1e-8); 453s ***** error wbllike ([12, 15]); 453s ***** error wbllike ([12, 15, 3], [1:50]); 453s ***** error wbllike ([12, 3], ones (10, 2)); 453s ***** error wbllike ([12, 15], [1:50], [1, 2, 3]); 453s ***** error wbllike ([12, 15], [1:50], [], [1, 2, 3]); 453s ***** error ... 453s wbllike ([12, 15], [1:5], [], [1, 2, 3, -1, 0]); 453s 9 tests, 9 passed, 0 known failure, 0 skipped 453s [inst/dist_fun/betacdf.m] 453s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/betacdf.m 453s ***** demo 453s ## Plot various CDFs from the Beta distribution 453s x = 0:0.005:1; 453s p1 = betacdf (x, 0.5, 0.5); 453s p2 = betacdf (x, 5, 1); 453s p3 = betacdf (x, 1, 3); 453s p4 = betacdf (x, 2, 2); 453s p5 = betacdf (x, 2, 5); 453s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-c", x, p5, "-m") 453s grid on 453s legend ({"α = β = 0.5", "α = 5, β = 1", "α = 1, β = 3", ... 453s "α = 2, β = 2", "α = 2, β = 5"}, "location", "northwest") 453s title ("Beta CDF") 453s xlabel ("values in x") 453s ylabel ("probability") 453s ***** shared x, y, x1, x2 453s x = [-1 0 0.5 1 2]; 453s y = [0 0 0.75 1 1]; 453s ***** assert (betacdf (x, ones (1, 5), 2 * ones (1, 5)), y) 453s ***** assert (betacdf (x, 1, 2 * ones (1, 5)), y) 453s ***** assert (betacdf (x, ones (1, 5), 2), y) 453s ***** assert (betacdf (x, [0 1 NaN 1 1], 2), [NaN 0 NaN 1 1]) 453s ***** assert (betacdf (x, 1, 2 * [0 1 NaN 1 1]), [NaN 0 NaN 1 1]) 453s ***** assert (betacdf ([x(1:2) NaN x(4:5)], 1, 2), [y(1:2) NaN y(4:5)]) 453s x1 = [0.1:0.2:0.9]; 453s ***** assert (betacdf (x1, 2, 2), [0.028, 0.216, 0.5, 0.784, 0.972], 1e-14); 453s ***** assert (betacdf (x1, 2, 2, "upper"), 1 - [0.028, 0.216, 0.5, 0.784, 0.972],... 453s 1e-14); 453s x2 = [1, 2, 3]; 453s ***** assert (betacdf (0.5, x2, x2), [0.5, 0.5, 0.5], 1e-14); 453s ***** assert (betacdf ([x, NaN], 1, 2), [y, NaN]) 453s ***** assert (betacdf (single ([x, NaN]), 1, 2), single ([y, NaN])) 453s ***** assert (betacdf ([x, NaN], single (1), 2), single ([y, NaN])) 453s ***** assert (betacdf ([x, NaN], 1, single (2)), single ([y, NaN])) 453s ***** error betacdf () 453s ***** error betacdf (1) 453s ***** error betacdf (1, 2) 453s ***** error betacdf (1, 2, 3, 4, 5) 453s ***** error betacdf (1, 2, 3, "tail") 453s ***** error betacdf (1, 2, 3, 4) 453s ***** error ... 453s betacdf (ones (3), ones (2), ones (2)) 453s ***** error ... 453s betacdf (ones (2), ones (3), ones (2)) 453s ***** error ... 453s betacdf (ones (2), ones (2), ones (3)) 453s ***** error betacdf (i, 2, 2) 453s ***** error betacdf (2, i, 2) 453s ***** error betacdf (2, 2, i) 453s 25 tests, 25 passed, 0 known failure, 0 skipped 453s [inst/dist_fun/betainv.m] 453s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/betainv.m 453s ***** demo 453s ## Plot various iCDFs from the Beta distribution 453s p = 0.001:0.001:0.999; 453s x1 = betainv (p, 0.5, 0.5); 453s x2 = betainv (p, 5, 1); 453s x3 = betainv (p, 1, 3); 453s x4 = betainv (p, 2, 2); 453s x5 = betainv (p, 2, 5); 453s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-c", p, x5, "-m") 453s grid on 453s legend ({"α = β = 0.5", "α = 5, β = 1", "α = 1, β = 3", ... 453s "α = 2, β = 2", "α = 2, β = 5"}, "location", "southeast") 453s title ("Beta iCDF") 453s xlabel ("probability") 453s ylabel ("values in x") 453s ***** shared p 453s p = [-1 0 0.75 1 2]; 453s ***** assert (betainv (p, ones (1,5), 2*ones (1,5)), [NaN 0 0.5 1 NaN], eps) 453s ***** assert (betainv (p, 1, 2*ones (1,5)), [NaN 0 0.5 1 NaN], eps) 453s ***** assert (betainv (p, ones (1,5), 2), [NaN 0 0.5 1 NaN], eps) 453s ***** assert (betainv (p, [1 0 NaN 1 1], 2), [NaN NaN NaN 1 NaN]) 453s ***** assert (betainv (p, 1, 2*[1 0 NaN 1 1]), [NaN NaN NaN 1 NaN]) 453s ***** assert (betainv ([p(1:2) NaN p(4:5)], 1, 2), [NaN 0 NaN 1 NaN]) 453s ***** assert (betainv ([p, NaN], 1, 2), [NaN 0 0.5 1 NaN NaN], eps) 453s ***** assert (betainv (single ([p, NaN]), 1, 2), single ([NaN 0 0.5 1 NaN NaN])) 453s ***** assert (betainv ([p, NaN], single (1), 2), single ([NaN 0 0.5 1 NaN NaN]), eps("single")) 453s ***** assert (betainv ([p, NaN], 1, single (2)), single ([NaN 0 0.5 1 NaN NaN]), eps("single")) 453s ***** error betainv () 453s ***** error betainv (1) 453s ***** error betainv (1,2) 453s ***** error betainv (1,2,3,4) 453s ***** error ... 453s betainv (ones (3), ones (2), ones (2)) 453s ***** error ... 453s betainv (ones (2), ones (3), ones (2)) 453s ***** error ... 453s betainv (ones (2), ones (2), ones (3)) 453s ***** error betainv (i, 2, 2) 453s ***** error betainv (2, i, 2) 453s ***** error betainv (2, 2, i) 453s 20 tests, 20 passed, 0 known failure, 0 skipped 453s [inst/dist_fun/betapdf.m] 453s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/betapdf.m 453s ***** demo 453s ## Plot various PDFs from the Beta distribution 453s x = 0.001:0.001:0.999; 453s y1 = betapdf (x, 0.5, 0.5); 453s y2 = betapdf (x, 5, 1); 453s y3 = betapdf (x, 1, 3); 453s y4 = betapdf (x, 2, 2); 453s y5 = betapdf (x, 2, 5); 453s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-c", x, y5, "-m") 453s grid on 453s ylim ([0, 2.5]) 453s legend ({"α = β = 0.5", "α = 5, β = 1", "α = 1, β = 3", ... 453s "α = 2, β = 2", "α = 2, β = 5"}, "location", "north") 453s title ("Beta PDF") 453s xlabel ("values in x") 453s ylabel ("density") 453s ***** shared x, y 453s x = [-1 0 0.5 1 2]; 453s y = [0 2 1 0 0]; 453s ***** assert (betapdf (x, ones (1, 5), 2 * ones (1, 5)), y) 453s ***** assert (betapdf (x, 1, 2 * ones (1, 5)), y) 453s ***** assert (betapdf (x, ones (1, 5), 2), y) 453s ***** assert (betapdf (x, [0 NaN 1 1 1], 2), [NaN NaN y(3:5)]) 453s ***** assert (betapdf (x, 1, 2 * [0 NaN 1 1 1]), [NaN NaN y(3:5)]) 453s ***** assert (betapdf ([x, NaN], 1, 2), [y, NaN]) 453s ***** assert (betapdf (single ([x, NaN]), 1, 2), single ([y, NaN])) 453s ***** assert (betapdf ([x, NaN], single (1), 2), single ([y, NaN])) 453s ***** assert (betapdf ([x, NaN], 1, single (2)), single ([y, NaN])) 453s ***** test 453s x = rand (10,1); 453s y = 1 ./ (pi * sqrt (x .* (1 - x))); 453s assert (betapdf (x, 1/2, 1/2), y, 1e-12); 453s ***** assert (betapdf (0.5, 1000, 1000), 35.678, 1e-3) 453s ***** error betapdf () 453s ***** error betapdf (1) 453s ***** error betapdf (1,2) 453s ***** error betapdf (1,2,3,4) 453s ***** error ... 453s betapdf (ones (3), ones (2), ones (2)) 453s ***** error ... 453s betapdf (ones (2), ones (3), ones (2)) 453s ***** error ... 453s betapdf (ones (2), ones (2), ones (3)) 453s ***** error betapdf (i, 2, 2) 453s ***** error betapdf (2, i, 2) 453s ***** error betapdf (2, 2, i) 453s 21 tests, 21 passed, 0 known failure, 0 skipped 453s [inst/dist_fun/betarnd.m] 453s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/betarnd.m 453s ***** assert (size (betarnd (2, 1/2)), [1 1]) 453s ***** assert (size (betarnd (2 * ones (2, 1), 1/2)), [2, 1]) 453s ***** assert (size (betarnd (2 * ones (2, 2), 1/2)), [2, 2]) 453s ***** assert (size (betarnd (2, 1/2 * ones (2, 1))), [2, 1]) 453s ***** assert (size (betarnd (1, 1/2 * ones (2, 2))), [2, 2]) 453s ***** assert (size (betarnd (ones (2, 1), 1)), [2, 1]) 453s ***** assert (size (betarnd (ones (2, 2), 1)), [2, 2]) 453s ***** assert (size (betarnd (2, 1/2, 3)), [3, 3]) 453s ***** assert (size (betarnd (1, 1, [4, 1])), [4, 1]) 453s ***** assert (size (betarnd (1, 1, 4, 1)), [4, 1]) 453s ***** assert (size (betarnd (1, 1, 4, 1, 5)), [4, 1, 5]) 453s ***** assert (size (betarnd (1, 1, 0, 1)), [0, 1]) 453s ***** assert (size (betarnd (1, 1, 1, 0)), [1, 0]) 453s ***** assert (size (betarnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 453s ***** assert (class (betarnd (1, 1)), "double") 453s ***** assert (class (betarnd (1, single (0))), "single") 453s ***** assert (class (betarnd (1, single ([0, 0]))), "single") 453s ***** assert (class (betarnd (1, single (1), 2)), "single") 453s ***** assert (class (betarnd (1, single ([1, 1]), 1, 2)), "single") 454s ***** assert (class (betarnd (single (1), 1, 2)), "single") 454s ***** assert (class (betarnd (single ([1, 1]), 1, 1, 2)), "single") 454s ***** error betarnd () 454s ***** error betarnd (1) 454s ***** error ... 454s betarnd (ones (3), ones (2)) 454s ***** error ... 454s betarnd (ones (2), ones (3)) 454s ***** error betarnd (i, 2) 454s ***** error betarnd (1, i) 454s ***** error ... 454s betarnd (1, 1/2, -1) 454s ***** error ... 454s betarnd (1, 1/2, 1.2) 454s ***** error ... 454s betarnd (1, 1/2, ones (2)) 454s ***** error ... 454s betarnd (1, 1/2, [2 -1 2]) 454s ***** error ... 454s betarnd (1, 1/2, [2 0 2.5]) 454s ***** error ... 454s betarnd (1, 1/2, 2, -1, 5) 454s ***** error ... 454s betarnd (1, 1/2, 2, 1.5, 5) 454s ***** error ... 454s betarnd (2, 1/2 * ones (2), 3) 454s ***** error ... 454s betarnd (2, 1/2 * ones (2), [3, 2]) 454s ***** error ... 454s betarnd (2, 1/2 * ones (2), 3, 2) 454s ***** error ... 454s betarnd (2 * ones (2), 1/2, 3) 454s ***** error ... 454s betarnd (2 * ones (2), 1/2, [3, 2]) 454s ***** error ... 454s betarnd (2 * ones (2), 1/2, 3, 2) 454s 40 tests, 40 passed, 0 known failure, 0 skipped 454s [inst/dist_fun/binocdf.m] 454s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/binocdf.m 454s ***** demo 454s ## Plot various CDFs from the binomial distribution 454s x = 0:40; 454s p1 = binocdf (x, 20, 0.5); 454s p2 = binocdf (x, 20, 0.7); 454s p3 = binocdf (x, 40, 0.5); 454s plot (x, p1, "*b", x, p2, "*g", x, p3, "*r") 454s grid on 454s legend ({"n = 20, ps = 0.5", "n = 20, ps = 0.7", ... 454s "n = 40, ps = 0.5"}, "location", "southeast") 454s title ("Binomial CDF") 454s xlabel ("values in x (number of successes)") 454s ylabel ("probability") 454s ***** shared x, p, p1 454s x = [-1 0 1 2 3]; 454s p = [0 1/4 3/4 1 1]; 454s p1 = 1 - p; 454s ***** assert (binocdf (x, 2 * ones (1, 5), 0.5 * ones (1, 5)), p, eps) 454s ***** assert (binocdf (x, 2, 0.5 * ones (1, 5)), p, eps) 454s ***** assert (binocdf (x, 2 * ones (1, 5), 0.5), p, eps) 454s ***** assert (binocdf (x, 2 * [0 -1 NaN 1.1 1], 0.5), [0 NaN NaN NaN 1]) 454s ***** assert (binocdf (x, 2, 0.5 * [0 -1 NaN 3 1]), [0 NaN NaN NaN 1]) 454s ***** assert (binocdf ([x(1:2) NaN x(4:5)], 2, 0.5), [p(1:2) NaN p(4:5)], eps) 454s ***** assert (binocdf (99, 100, 0.1, "upper"), 1e-100, 1e-112); 454s ***** assert (binocdf (x, 2 * ones (1, 5), 0.5*ones (1,5), "upper"), p1, eps) 454s ***** assert (binocdf (x, 2, 0.5 * ones (1, 5), "upper"), p1, eps) 454s ***** assert (binocdf (x, 2 * ones (1, 5), 0.5, "upper"), p1, eps) 454s ***** assert (binocdf (x, 2 * [0 -1 NaN 1.1 1], 0.5, "upper"), [1 NaN NaN NaN 0]) 454s ***** assert (binocdf (x, 2, 0.5 * [0 -1 NaN 3 1], "upper"), [1 NaN NaN NaN 0]) 454s ***** assert (binocdf ([x(1:2) NaN x(4:5)], 2, 0.5, "upper"), [p1(1:2) NaN p1(4:5)]) 454s ***** assert (binocdf ([x, NaN], 2, 0.5), [p, NaN], eps) 454s ***** assert (binocdf (single ([x, NaN]), 2, 0.5), single ([p, NaN])) 454s ***** assert (binocdf ([x, NaN], single (2), 0.5), single ([p, NaN])) 454s ***** assert (binocdf ([x, NaN], 2, single (0.5)), single ([p, NaN])) 454s ***** error binocdf () 454s ***** error binocdf (1) 454s ***** error binocdf (1, 2) 454s ***** error binocdf (1, 2, 3, 4, 5) 454s ***** error binocdf (1, 2, 3, "tail") 454s ***** error binocdf (1, 2, 3, 4) 454s ***** error ... 454s binocdf (ones (3), ones (2), ones (2)) 454s ***** error ... 454s binocdf (ones (2), ones (3), ones (2)) 454s ***** error ... 454s binocdf (ones (2), ones (2), ones (3)) 454s ***** error binocdf (i, 2, 2) 454s ***** error binocdf (2, i, 2) 454s ***** error binocdf (2, 2, i) 454s 29 tests, 29 passed, 0 known failure, 0 skipped 454s [inst/dist_fun/binoinv.m] 454s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/binoinv.m 454s ***** demo 454s ## Plot various iCDFs from the binomial distribution 454s p = 0.001:0.001:0.999; 454s x1 = binoinv (p, 20, 0.5); 454s x2 = binoinv (p, 20, 0.7); 454s x3 = binoinv (p, 40, 0.5); 454s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r") 454s grid on 454s legend ({"n = 20, ps = 0.5", "n = 20, ps = 0.7", ... 454s "n = 40, ps = 0.5"}, "location", "southeast") 454s title ("Binomial iCDF") 454s xlabel ("probability") 454s ylabel ("values in x (number of successes)") 454s ***** shared p 454s p = [-1 0 0.5 1 2]; 454s ***** assert (binoinv (p, 2*ones (1,5), 0.5*ones (1,5)), [NaN 0 1 2 NaN]) 454s ***** assert (binoinv (p, 2, 0.5*ones (1,5)), [NaN 0 1 2 NaN]) 454s ***** assert (binoinv (p, 2*ones (1,5), 0.5), [NaN 0 1 2 NaN]) 454s ***** assert (binoinv (p, 2*[0 -1 NaN 1.1 1], 0.5), [NaN NaN NaN NaN NaN]) 454s ***** assert (binoinv (p, 2, 0.5*[0 -1 NaN 3 1]), [NaN NaN NaN NaN NaN]) 454s ***** assert (binoinv ([p(1:2) NaN p(4:5)], 2, 0.5), [NaN 0 NaN 2 NaN]) 454s ***** assert (binoinv ([p, NaN], 2, 0.5), [NaN 0 1 2 NaN NaN]) 454s ***** assert (binoinv (single ([p, NaN]), 2, 0.5), single ([NaN 0 1 2 NaN NaN])) 454s ***** assert (binoinv ([p, NaN], single (2), 0.5), single ([NaN 0 1 2 NaN NaN])) 454s ***** assert (binoinv ([p, NaN], 2, single (0.5)), single ([NaN 0 1 2 NaN NaN])) 454s ***** shared x, tol 454s x = magic (3) + 1; 454s tol = 1; 454s ***** assert (binoinv (binocdf (1:10, 11, 0.1), 11, 0.1), 1:10, tol) 454s ***** assert (binoinv (binocdf (1:10, 2*(1:10), 0.1), 2*(1:10), 0.1), 1:10, tol) 454s ***** assert (binoinv (binocdf (x, 2*x, 1./x), 2*x, 1./x), x, tol) 454s ***** error binoinv () 454s ***** error binoinv (1) 454s ***** error binoinv (1,2) 454s ***** error binoinv (1,2,3,4) 454s ***** error ... 454s binoinv (ones (3), ones (2), ones (2)) 454s ***** error ... 454s binoinv (ones (2), ones (3), ones (2)) 454s ***** error ... 454s binoinv (ones (2), ones (2), ones (3)) 454s ***** error binoinv (i, 2, 2) 454s ***** error binoinv (2, i, 2) 454s ***** error binoinv (2, 2, i) 454s 23 tests, 23 passed, 0 known failure, 0 skipped 454s [inst/dist_fun/binopdf.m] 454s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/binopdf.m 454s ***** demo 454s ## Plot various PDFs from the binomial distribution 454s x = 0:40; 454s y1 = binopdf (x, 20, 0.5); 454s y2 = binopdf (x, 20, 0.7); 454s y3 = binopdf (x, 40, 0.5); 454s plot (x, y1, "*b", x, y2, "*g", x, y3, "*r") 454s grid on 454s ylim ([0, 0.25]) 454s legend ({"n = 20, ps = 0.5", "n = 20, ps = 0.7", ... 454s "n = 40, ps = 0.5"}, "location", "northeast") 454s title ("Binomial PDF") 454s xlabel ("values in x (number of successes)") 454s ylabel ("density") 454s ***** shared x, y 454s x = [-1 0 1 2 3]; 454s y = [0 1/4 1/2 1/4 0]; 454s ***** assert (binopdf (x, 2 * ones (1, 5), 0.5 * ones (1, 5)), y, eps) 454s ***** assert (binopdf (x, 2, 0.5 * ones (1, 5)), y, eps) 454s ***** assert (binopdf (x, 2 * ones (1, 5), 0.5), y, eps) 454s ***** assert (binopdf (x, 2 * [0 -1 NaN 1.1 1], 0.5), [0 NaN NaN NaN 0]) 454s ***** assert (binopdf (x, 2, 0.5 * [0 -1 NaN 3 1]), [0 NaN NaN NaN 0]) 454s ***** assert (binopdf ([x, NaN], 2, 0.5), [y, NaN], eps) 454s ***** assert (binopdf (cat (3, x, x), 2, 0.5), cat (3, y, y), eps) 454s ***** assert (binopdf (1, 1, 1), 1) 454s ***** assert (binopdf (0, 3, 0), 1) 454s ***** assert (binopdf (2, 2, 1), 1) 454s ***** assert (binopdf (1, 2, 1), 0) 454s ***** assert (binopdf (0, 1.1, 0), NaN) 454s ***** assert (binopdf (1, 2, -1), NaN) 454s ***** assert (binopdf (1, 2, 1.5), NaN) 454s ***** assert (binopdf ([], 1, 1), []) 454s ***** assert (binopdf (1, [], 1), []) 454s ***** assert (binopdf (1, 1, []), []) 454s ***** assert (binopdf (ones (1, 0), 2, .5), ones(1, 0)) 454s ***** assert (binopdf (ones (0, 1), 2, .5), ones(0, 1)) 454s ***** assert (binopdf (ones (0, 1, 2), 2, .5), ones(0, 1, 2)) 454s ***** assert (binopdf (1, ones (0, 1, 2), .5), ones(0, 1, 2)) 454s ***** assert (binopdf (1, 2, ones (0, 1, 2)), ones(0, 1, 2)) 454s ***** assert (binopdf (ones (1, 0, 2), 2, .5), ones(1, 0, 2)) 454s ***** assert (binopdf (ones (1, 2, 0), 2, .5), ones(1, 2, 0)) 454s ***** assert (binopdf (ones (0, 1, 2), NaN, .5), ones(0, 1, 2)) 454s ***** assert (binopdf (ones (0, 1, 2), 2, NaN), ones(0, 1, 2)) 454s ***** assert (binopdf (single ([x, NaN]), 2, 0.5), single ([y, NaN])) 454s ***** assert (binopdf ([x, NaN], single (2), 0.5), single ([y, NaN])) 454s ***** assert (binopdf ([x, NaN], 2, single (0.5)), single ([y, NaN])) 454s ***** error binopdf () 454s ***** error binopdf (1) 454s ***** error binopdf (1, 2) 454s ***** error binopdf (1, 2, 3, 4) 454s ***** error ... 454s binopdf (ones (3), ones (2), ones (2)) 454s ***** error ... 454s binopdf (ones (2), ones (3), ones (2)) 454s ***** error ... 454s binopdf (ones (2), ones (2), ones (3)) 455s ***** error binopdf (i, 2, 2) 455s ***** error binopdf (2, i, 2) 455s ***** error binopdf (2, 2, i) 455s 39 tests, 39 passed, 0 known failure, 0 skipped 455s [inst/dist_fun/binornd.m] 455s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/binornd.m 455s ***** assert (size (binornd (2, 1/2)), [1 1]) 455s ***** assert (size (binornd (2 * ones (2, 1), 1/2)), [2, 1]) 455s ***** assert (size (binornd (2 * ones (2, 2), 1/2)), [2, 2]) 455s ***** assert (size (binornd (2, 1/2 * ones (2, 1))), [2, 1]) 455s ***** assert (size (binornd (1, 1/2 * ones (2, 2))), [2, 2]) 455s ***** assert (size (binornd (ones (2, 1), 1)), [2, 1]) 455s ***** assert (size (binornd (ones (2, 2), 1)), [2, 2]) 455s ***** assert (size (binornd (2, 1/2, 3)), [3, 3]) 455s ***** assert (size (binornd (1, 1, [4, 1])), [4, 1]) 455s ***** assert (size (binornd (1, 1, 4, 1)), [4, 1]) 455s ***** assert (size (binornd (1, 1, 4, 1, 5)), [4, 1, 5]) 455s ***** assert (size (binornd (1, 1, 0, 1)), [0, 1]) 455s ***** assert (size (binornd (1, 1, 1, 0)), [1, 0]) 455s ***** assert (size (binornd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 455s ***** assert (class (binornd (1, 1)), "double") 455s ***** assert (class (binornd (1, single (0))), "single") 455s ***** assert (class (binornd (1, single ([0, 0]))), "single") 455s ***** assert (class (binornd (1, single (1), 2)), "single") 455s ***** assert (class (binornd (1, single ([1, 1]), 1, 2)), "single") 455s ***** assert (class (binornd (single (1), 1, 2)), "single") 455s ***** assert (class (binornd (single ([1, 1]), 1, 1, 2)), "single") 455s ***** error binornd () 455s ***** error binornd (1) 455s ***** error ... 455s binornd (ones (3), ones (2)) 455s ***** error ... 455s binornd (ones (2), ones (3)) 455s ***** error binornd (i, 2) 455s ***** error binornd (1, i) 455s ***** error ... 455s binornd (1, 1/2, -1) 455s ***** error ... 455s binornd (1, 1/2, 1.2) 455s ***** error ... 455s binornd (1, 1/2, ones (2)) 455s ***** error ... 455s binornd (1, 1/2, [2 -1 2]) 455s ***** error ... 455s binornd (1, 1/2, [2 0 2.5]) 455s ***** error ... 455s binornd (1, 1/2, 2, -1, 5) 455s ***** error ... 455s binornd (1, 1/2, 2, 1.5, 5) 455s ***** error ... 455s binornd (2, 1/2 * ones (2), 3) 455s ***** error ... 455s binornd (2, 1/2 * ones (2), [3, 2]) 455s ***** error ... 455s binornd (2, 1/2 * ones (2), 3, 2) 455s ***** error ... 455s binornd (2 * ones (2), 1/2, 3) 455s ***** error ... 455s binornd (2 * ones (2), 1/2, [3, 2]) 455s ***** error ... 455s binornd (2 * ones (2), 1/2, 3, 2) 455s 40 tests, 40 passed, 0 known failure, 0 skipped 455s [inst/dist_fun/bisacdf.m] 455s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/bisacdf.m 455s ***** demo 455s ## Plot various CDFs from the Birnbaum-Saunders distribution 455s x = 0.01:0.01:4; 455s p1 = bisacdf (x, 1, 0.5); 455s p2 = bisacdf (x, 1, 1); 455s p3 = bisacdf (x, 1, 2); 455s p4 = bisacdf (x, 1, 5); 455s p5 = bisacdf (x, 1, 10); 455s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-c", x, p5, "-m") 455s grid on 455s legend ({"β = 1, γ = 0.5", "β = 1, γ = 1", "β = 1, γ = 2", ... 455s "β = 1, γ = 5", "β = 1, γ = 10"}, "location", "southeast") 455s title ("Birnbaum-Saunders CDF") 455s xlabel ("values in x") 455s ylabel ("probability") 455s ***** demo 455s ## Plot various CDFs from the Birnbaum-Saunders distribution 455s x = 0.01:0.01:6; 455s p1 = bisacdf (x, 1, 0.3); 455s p2 = bisacdf (x, 2, 0.3); 455s p3 = bisacdf (x, 1, 0.5); 455s p4 = bisacdf (x, 3, 0.5); 455s p5 = bisacdf (x, 5, 0.5); 455s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-c", x, p5, "-m") 455s grid on 455s legend ({"β = 1, γ = 0.3", "β = 2, γ = 0.3", "β = 1, γ = 0.5", ... 455s "β = 3, γ = 0.5", "β = 5, γ = 0.5"}, "location", "southeast") 455s title ("Birnbaum-Saunders CDF") 455s xlabel ("values in x") 455s ylabel ("probability") 455s ***** shared x, y 455s x = [-1, 0, 1, 2, Inf]; 455s y = [0, 0, 1/2, 0.76024993890652337, 1]; 455s ***** assert (bisacdf (x, ones (1,5), ones (1,5)), y, eps) 455s ***** assert (bisacdf (x, 1, 1), y, eps) 455s ***** assert (bisacdf (x, 1, ones (1,5)), y, eps) 455s ***** assert (bisacdf (x, ones (1,5), 1), y, eps) 455s ***** assert (bisacdf (x, 1, 1), y, eps) 455s ***** assert (bisacdf (x, 1, [1, 1, NaN, 1, 1]), [y(1:2), NaN, y(4:5)], eps) 455s ***** assert (bisacdf (x, [1, 1, NaN, 1, 1], 1), [y(1:2), NaN, y(4:5)], eps) 455s ***** assert (bisacdf ([x, NaN], 1, 1), [y, NaN], eps) 455s ***** assert (bisacdf (single ([x, NaN]), 1, 1), single ([y, NaN]), eps ("single")) 455s ***** assert (bisacdf ([x, NaN], 1, single (1)), single ([y, NaN]), eps ("single")) 455s ***** assert (bisacdf ([x, NaN], single (1), 1), single ([y, NaN]), eps ("single")) 455s ***** error bisacdf () 455s ***** error bisacdf (1) 455s ***** error bisacdf (1, 2) 455s ***** error ... 455s bisacdf (1, 2, 3, 4, 5) 455s ***** error bisacdf (1, 2, 3, "tail") 455s ***** error bisacdf (1, 2, 3, 4) 455s ***** error ... 455s bisacdf (ones (3), ones (2), ones(2)) 455s ***** error ... 455s bisacdf (ones (2), ones (3), ones(2)) 455s ***** error ... 455s bisacdf (ones (2), ones (2), ones(3)) 455s ***** error bisacdf (i, 4, 3) 455s ***** error bisacdf (1, i, 3) 455s ***** error bisacdf (1, 4, i) 455s 23 tests, 23 passed, 0 known failure, 0 skipped 455s [inst/dist_fun/bisainv.m] 455s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/bisainv.m 455s ***** demo 455s ## Plot various iCDFs from the Birnbaum-Saunders distribution 455s p = 0.001:0.001:0.999; 455s x1 = bisainv (p, 1, 0.5); 455s x2 = bisainv (p, 1, 1); 455s x3 = bisainv (p, 1, 2); 455s x4 = bisainv (p, 1, 5); 455s x5 = bisainv (p, 1, 10); 455s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-c", p, x5, "-m") 455s grid on 455s ylim ([0, 10]) 455s legend ({"β = 1, γ = 0.5", "β = 1, γ = 1", "β = 1, γ = 2", ... 455s "β = 1, γ = 5", "β = 1, γ = 10"}, "location", "northwest") 455s title ("Birnbaum-Saunders iCDF") 455s xlabel ("probability") 455s ylabel ("values in x") 455s ***** demo 455s ## Plot various iCDFs from the Birnbaum-Saunders distribution 455s p = 0.001:0.001:0.999; 455s x1 = bisainv (p, 1, 0.3); 455s x2 = bisainv (p, 2, 0.3); 455s x3 = bisainv (p, 1, 0.5); 455s x4 = bisainv (p, 3, 0.5); 455s x5 = bisainv (p, 5, 0.5); 455s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-c", p, x5, "-m") 455s grid on 455s ylim ([0, 10]) 455s legend ({"β = 1, γ = 0.3", "β = 2, γ = 0.3", "β = 1, γ = 0.5", ... 455s "β = 3, γ = 0.5", "β = 5, γ = 0.5"}, "location", "northwest") 455s title ("Birnbaum-Saunders iCDF") 455s xlabel ("probability") 455s ylabel ("values in x") 455s ***** shared p, y, f 455s f = @(p,b,c) (b * (c * norminv (p) + sqrt (4 + (c * norminv(p))^2))^2) / 4; 455s p = [-1, 0, 1/4, 1/2, 1, 2]; 455s y = [NaN, 0, f(1/4, 1, 1), 1, Inf, NaN]; 455s ***** assert (bisainv (p, ones (1,6), ones (1,6)), y) 455s ***** assert (bisainv (p, 1, ones (1,6)), y) 455s ***** assert (bisainv (p, ones (1,6), 1), y) 455s ***** assert (bisainv (p, 1, 1), y) 455s ***** assert (bisainv (p, 1, [1, 1, 1, NaN, 1, 1]), [y(1:3), NaN, y(5:6)]) 455s ***** assert (bisainv (p, [1, 1, 1, NaN, 1, 1], 1), [y(1:3), NaN, y(5:6)]) 455s ***** assert (bisainv ([p, NaN], 1, 1), [y, NaN]) 455s ***** assert (bisainv (single ([p, NaN]), 1, 1), single ([y, NaN]), eps ("single")) 455s ***** assert (bisainv ([p, NaN], 1, single (1)), single ([y, NaN]), eps ("single")) 455s ***** assert (bisainv ([p, NaN], single (1), 1), single ([y, NaN]), eps ("single")) 455s ***** error bisainv () 455s ***** error bisainv (1) 455s ***** error bisainv (1, 2) 455s ***** error bisainv (1, 2, 3, 4) 455s ***** error ... 455s bisainv (ones (3), ones (2), ones(2)) 455s ***** error ... 455s bisainv (ones (2), ones (3), ones(2)) 455s ***** error ... 455s bisainv (ones (2), ones (2), ones(3)) 455s ***** error bisainv (i, 4, 3) 455s ***** error bisainv (1, i, 3) 455s ***** error bisainv (1, 4, i) 455s 20 tests, 20 passed, 0 known failure, 0 skipped 455s [inst/dist_fun/bisapdf.m] 455s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/bisapdf.m 455s ***** demo 455s ## Plot various PDFs from the Birnbaum-Saunders distribution 455s x = 0.01:0.01:4; 455s y1 = bisapdf (x, 1, 0.5); 455s y2 = bisapdf (x, 1, 1); 455s y3 = bisapdf (x, 1, 2); 455s y4 = bisapdf (x, 1, 5); 455s y5 = bisapdf (x, 1, 10); 455s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-c", x, y5, "-m") 455s grid on 455s ylim ([0, 1.5]) 455s legend ({"β = 1 ,γ = 0.5", "β = 1, γ = 1", "β = 1, γ = 2", ... 455s "β = 1, γ = 5", "β = 1, γ = 10"}, "location", "northeast") 455s title ("Birnbaum-Saunders PDF") 455s xlabel ("values in x") 455s ylabel ("density") 455s ***** demo 455s ## Plot various PDFs from the Birnbaum-Saunders distribution 455s x = 0.01:0.01:6; 455s y1 = bisapdf (x, 1, 0.3); 455s y2 = bisapdf (x, 2, 0.3); 455s y3 = bisapdf (x, 1, 0.5); 455s y4 = bisapdf (x, 3, 0.5); 455s y5 = bisapdf (x, 5, 0.5); 455s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-c", x, y5, "-m") 455s grid on 455s ylim ([0, 1.5]) 455s legend ({"β = 1, γ = 0.3", "β = 2, γ = 0.3", "β = 1, γ = 0.5", ... 455s "β = 3, γ = 0.5", "β = 5, γ = 0.5"}, "location", "northeast") 455s title ("Birnbaum-Saunders CDF") 455s xlabel ("values in x") 455s ylabel ("density") 455s ***** shared x, y 455s x = [-1, 0, 1, 2, Inf]; 455s y = [0, 0, 0.3989422804014327, 0.1647717335503959, 0]; 455s ***** assert (bisapdf (x, ones (1,5), ones (1,5)), y, eps) 455s ***** assert (bisapdf (x, 1, 1), y, eps) 455s ***** assert (bisapdf (x, 1, ones (1,5)), y, eps) 455s ***** assert (bisapdf (x, ones (1,5), 1), y, eps) 455s ***** assert (bisapdf (x, 1, [1, 1, NaN, 1, 1]), [y(1:2), NaN, y(4:5)], eps) 455s ***** assert (bisapdf (x, [1, 1, NaN, 1, 1], 1), [y(1:2), NaN, y(4:5)], eps) 455s ***** assert (bisapdf ([x, NaN], 1, 1), [y, NaN], eps) 455s ***** assert (bisapdf (single ([x, NaN]), 1, 1), single ([y, NaN]), eps ("single")) 455s ***** assert (bisapdf ([x, NaN], 1, single (1)), single ([y, NaN]), eps ("single")) 455s ***** assert (bisapdf ([x, NaN], single (1), 1), single ([y, NaN]), eps ("single")) 455s ***** error bisapdf () 455s ***** error bisapdf (1) 455s ***** error bisapdf (1, 2) 455s ***** error bisapdf (1, 2, 3, 4) 455s ***** error ... 455s bisapdf (ones (3), ones (2), ones(2)) 455s ***** error ... 455s bisapdf (ones (2), ones (3), ones(2)) 455s ***** error ... 455s bisapdf (ones (2), ones (2), ones(3)) 455s ***** error bisapdf (i, 4, 3) 455s ***** error bisapdf (1, i, 3) 455s ***** error bisapdf (1, 4, i) 455s 20 tests, 20 passed, 0 known failure, 0 skipped 455s [inst/dist_fun/bisarnd.m] 455s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/bisarnd.m 455s ***** assert (size (bisarnd (1, 1)), [1 1]) 455s ***** assert (size (bisarnd (1, ones (2,1))), [2, 1]) 455s ***** assert (size (bisarnd (1, ones (2,2))), [2, 2]) 455s ***** assert (size (bisarnd (ones (2,1), 1)), [2, 1]) 455s ***** assert (size (bisarnd (ones (2,2), 1)), [2, 2]) 455s ***** assert (size (bisarnd (1, 1, 3)), [3, 3]) 455s ***** assert (size (bisarnd (1, 1, [4, 1])), [4, 1]) 455s ***** assert (size (bisarnd (1, 1, 4, 1)), [4, 1]) 455s ***** assert (size (bisarnd (1, 1, 4, 1, 5)), [4, 1, 5]) 455s ***** assert (size (bisarnd (1, 1, 0, 1)), [0, 1]) 455s ***** assert (size (bisarnd (1, 1, 1, 0)), [1, 0]) 455s ***** assert (size (bisarnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 455s ***** assert (class (bisarnd (1, 1)), "double") 455s ***** assert (class (bisarnd (1, single (1))), "single") 455s ***** assert (class (bisarnd (1, single ([1, 1]))), "single") 455s ***** assert (class (bisarnd (single (1), 1)), "single") 455s ***** assert (class (bisarnd (single ([1, 1]), 1)), "single") 455s ***** error bisarnd () 455s ***** error bisarnd (1) 455s ***** error ... 455s bisarnd (ones (3), ones (2)) 455s ***** error ... 455s bisarnd (ones (2), ones (3)) 455s ***** error bisarnd (i, 2, 3) 455s ***** error bisarnd (1, i, 3) 455s ***** error ... 455s bisarnd (1, 2, -1) 455s ***** error ... 455s bisarnd (1, 2, 1.2) 455s ***** error ... 455s bisarnd (1, 2, ones (2)) 455s ***** error ... 455s bisarnd (1, 2, [2 -1 2]) 455s ***** error ... 455s bisarnd (1, 2, [2 0 2.5]) 455s ***** error ... 455s bisarnd (1, 2, 2, -1, 5) 455s ***** error ... 455s bisarnd (1, 2, 2, 1.5, 5) 455s ***** error ... 455s bisarnd (2, ones (2), 3) 455s ***** error ... 455s bisarnd (2, ones (2), [3, 2]) 455s ***** error ... 455s bisarnd (2, ones (2), 3, 2) 455s 33 tests, 33 passed, 0 known failure, 0 skipped 455s [inst/dist_fun/burrcdf.m] 455s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/burrcdf.m 455s ***** demo 455s ## Plot various CDFs from the Burr type XII distribution 455s x = 0.001:0.001:5; 455s p1 = burrcdf (x, 1, 1, 1); 455s p2 = burrcdf (x, 1, 1, 2); 455s p3 = burrcdf (x, 1, 1, 3); 455s p4 = burrcdf (x, 1, 2, 1); 455s p5 = burrcdf (x, 1, 3, 1); 455s p6 = burrcdf (x, 1, 0.5, 2); 455s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", ... 455s x, p4, "-c", x, p5, "-m", x, p6, "-k") 455s grid on 455s legend ({"λ = 1, c = 1, k = 1", "λ = 1, c = 1, k = 2", ... 455s "λ = 1, c = 1, k = 3", "λ = 1, c = 2, k = 1", ... 455s "λ = 1, c = 3, k = 1", "λ = 1, c = 0.5, k = 2"}, ... 455s "location", "southeast") 455s title ("Burr type XII CDF") 455s xlabel ("values in x") 455s ylabel ("probability") 455s ***** shared x, y 455s x = [-1, 0, 1, 2, Inf]; 455s y = [0, 0, 1/2, 2/3, 1]; 455s ***** assert (burrcdf (x, ones(1,5), ones (1,5), ones (1,5)), y, eps) 455s ***** assert (burrcdf (x, 1, 1, 1), y, eps) 455s ***** assert (burrcdf (x, [1, 1, NaN, 1, 1], 1, 1), [y(1:2), NaN, y(4:5)], eps) 455s ***** assert (burrcdf (x, 1, [1, 1, NaN, 1, 1], 1), [y(1:2), NaN, y(4:5)], eps) 455s ***** assert (burrcdf (x, 1, 1, [1, 1, NaN, 1, 1]), [y(1:2), NaN, y(4:5)], eps) 455s ***** assert (burrcdf ([x, NaN], 1, 1, 1), [y, NaN], eps) 455s ***** assert (burrcdf (single ([x, NaN]), 1, 1, 1), single ([y, NaN]), eps("single")) 455s ***** assert (burrcdf ([x, NaN], single (1), 1, 1), single ([y, NaN]), eps("single")) 455s ***** assert (burrcdf ([x, NaN], 1, single (1), 1), single ([y, NaN]), eps("single")) 455s ***** assert (burrcdf ([x, NaN], 1, 1, single (1)), single ([y, NaN]), eps("single")) 455s ***** error burrcdf () 455s ***** error burrcdf (1) 455s ***** error burrcdf (1, 2) 455s ***** error burrcdf (1, 2, 3) 455s ***** error ... 455s burrcdf (1, 2, 3, 4, 5, 6) 455s ***** error burrcdf (1, 2, 3, 4, "tail") 455s ***** error burrcdf (1, 2, 3, 4, 5) 455s ***** error ... 455s burrcdf (ones (3), ones (2), ones(2), ones(2)) 455s ***** error ... 455s burrcdf (ones (2), ones (3), ones(2), ones(2)) 455s ***** error ... 455s burrcdf (ones (2), ones (2), ones(3), ones(2)) 455s ***** error ... 455s burrcdf (ones (2), ones (2), ones(2), ones(3)) 455s ***** error burrcdf (i, 2, 3, 4) 455s ***** error burrcdf (1, i, 3, 4) 455s ***** error burrcdf (1, 2, i, 4) 455s ***** error burrcdf (1, 2, 3, i) 455s 25 tests, 25 passed, 0 known failure, 0 skipped 455s [inst/dist_fun/burrinv.m] 455s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/burrinv.m 455s ***** demo 455s ## Plot various iCDFs from the Burr type XII distribution 455s p = 0.001:0.001:0.999; 455s x1 = burrinv (p, 1, 1, 1); 455s x2 = burrinv (p, 1, 1, 2); 455s x3 = burrinv (p, 1, 1, 3); 455s x4 = burrinv (p, 1, 2, 1); 455s x5 = burrinv (p, 1, 3, 1); 455s x6 = burrinv (p, 1, 0.5, 2); 455s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", ... 455s p, x4, "-c", p, x5, "-m", p, x6, "-k") 455s grid on 455s ylim ([0, 5]) 455s legend ({"λ = 1, c = 1, k = 1", "λ = 1, c = 1, k = 2", ... 455s "λ = 1, c = 1, k = 3", "λ = 1, c = 2, k = 1", ... 455s "λ = 1, c = 3, k = 1", "λ = 1, c = 0.5, k = 2"}, ... 455s "location", "northwest") 455s title ("Burr type XII iCDF") 455s xlabel ("probability") 455s ylabel ("values in x") 455s ***** shared p, y 455s p = [-Inf, -1, 0, 1/2, 1, 2, Inf]; 455s y = [NaN, NaN, 0, 1 , Inf, NaN, NaN]; 455s ***** assert (burrinv (p, ones (1,7), ones (1,7), ones(1,7)), y, eps) 455s ***** assert (burrinv (p, 1, 1, 1), y, eps) 455s ***** assert (burrinv (p, [1, 1, 1, NaN, 1, 1, 1], 1, 1), [y(1:3), NaN, y(5:7)], eps) 455s ***** assert (burrinv (p, 1, [1, 1, 1, NaN, 1, 1, 1], 1), [y(1:3), NaN, y(5:7)], eps) 455s ***** assert (burrinv (p, 1, 1, [1, 1, 1, NaN, 1, 1, 1]), [y(1:3), NaN, y(5:7)], eps) 455s ***** assert (burrinv ([p, NaN], 1, 1, 1), [y, NaN], eps) 455s ***** assert (burrinv (single ([p, NaN]), 1, 1, 1), single ([y, NaN]), eps("single")) 455s ***** assert (burrinv ([p, NaN], single (1), 1, 1), single ([y, NaN]), eps("single")) 455s ***** assert (burrinv ([p, NaN], 1, single (1), 1), single ([y, NaN]), eps("single")) 455s ***** assert (burrinv ([p, NaN], 1, 1, single (1)), single ([y, NaN]), eps("single")) 455s ***** error burrinv () 455s ***** error burrinv (1) 455s ***** error burrinv (1, 2) 455s ***** error burrinv (1, 2, 3) 455s ***** error ... 455s burrinv (1, 2, 3, 4, 5) 455s ***** error ... 455s burrinv (ones (3), ones (2), ones(2), ones(2)) 455s ***** error ... 455s burrinv (ones (2), ones (3), ones(2), ones(2)) 455s ***** error ... 455s burrinv (ones (2), ones (2), ones(3), ones(2)) 455s ***** error ... 455s burrinv (ones (2), ones (2), ones(2), ones(3)) 455s ***** error burrinv (i, 2, 3, 4) 455s ***** error burrinv (1, i, 3, 4) 455s ***** error burrinv (1, 2, i, 4) 455s ***** error burrinv (1, 2, 3, i) 455s 23 tests, 23 passed, 0 known failure, 0 skipped 455s [inst/dist_fun/burrpdf.m] 455s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/burrpdf.m 455s ***** demo 455s ## Plot various PDFs from the Burr type XII distribution 455s x = 0.001:0.001:3; 455s y1 = burrpdf (x, 1, 1, 1); 455s y2 = burrpdf (x, 1, 1, 2); 455s y3 = burrpdf (x, 1, 1, 3); 455s y4 = burrpdf (x, 1, 2, 1); 455s y5 = burrpdf (x, 1, 3, 1); 455s y6 = burrpdf (x, 1, 0.5, 2); 455s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", ... 455s x, y4, "-c", x, y5, "-m", x, y6, "-k") 455s grid on 455s ylim ([0, 2]) 455s legend ({"λ = 1, c = 1, k = 1", "λ = 1, c = 1, k = 2", ... 455s "λ = 1, c = 1, k = 3", "λ = 1, c = 2, k = 1", ... 455s "λ = 1, c = 3, k = 1", "λ = 1, c = 0.5, k = 2"}, ... 455s "location", "northeast") 455s title ("Burr type XII PDF") 455s xlabel ("values in x") 455s ylabel ("density") 455s ***** shared x, y 455s x = [-1, 0, 1, 2, Inf]; 455s y = [0, 1, 1/4, 1/9, 0]; 455s ***** assert (burrpdf (x, ones(1,5), ones (1,5), ones (1,5)), y) 455s ***** assert (burrpdf (x, 1, 1, 1), y) 455s ***** assert (burrpdf (x, [1, 1, NaN, 1, 1], 1, 1), [y(1:2), NaN, y(4:5)]) 455s ***** assert (burrpdf (x, 1, [1, 1, NaN, 1, 1], 1), [y(1:2), NaN, y(4:5)]) 455s ***** assert (burrpdf (x, 1, 1, [1, 1, NaN, 1, 1]), [y(1:2), NaN, y(4:5)]) 455s ***** assert (burrpdf ([x, NaN], 1, 1, 1), [y, NaN]) 455s ***** assert (burrpdf (single ([x, NaN]), 1, 1, 1), single ([y, NaN])) 455s ***** assert (burrpdf ([x, NaN], single (1), 1, 1), single ([y, NaN])) 455s ***** assert (burrpdf ([x, NaN], 1, single (1), 1), single ([y, NaN])) 455s ***** assert (burrpdf ([x, NaN], 1, 1, single (1)), single ([y, NaN])) 455s ***** error burrpdf () 455s ***** error burrpdf (1) 455s ***** error burrpdf (1, 2) 455s ***** error burrpdf (1, 2, 3) 455s ***** error ... 455s burrpdf (1, 2, 3, 4, 5) 455s ***** error ... 455s burrpdf (ones (3), ones (2), ones(2), ones(2)) 455s ***** error ... 455s burrpdf (ones (2), ones (3), ones(2), ones(2)) 455s ***** error ... 455s burrpdf (ones (2), ones (2), ones(3), ones(2)) 455s ***** error ... 455s burrpdf (ones (2), ones (2), ones(2), ones(3)) 455s ***** error burrpdf (i, 2, 3, 4) 455s ***** error burrpdf (1, i, 3, 4) 455s ***** error burrpdf (1, 2, i, 4) 455s ***** error burrpdf (1, 2, 3, i) 455s 23 tests, 23 passed, 0 known failure, 0 skipped 455s [inst/dist_fun/burrrnd.m] 455s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/burrrnd.m 455s ***** assert (size (burrrnd (1, 1, 1)), [1 1]) 455s ***** assert (size (burrrnd (ones (2,1), 1, 1)), [2, 1]) 455s ***** assert (size (burrrnd (ones (2,2), 1, 1)), [2, 2]) 455s ***** assert (size (burrrnd (1, ones (2,1), 1)), [2, 1]) 455s ***** assert (size (burrrnd (1, ones (2,2), 1)), [2, 2]) 455s ***** assert (size (burrrnd (1, 1, ones (2,1))), [2, 1]) 455s ***** assert (size (burrrnd (1, 1, ones (2,2))), [2, 2]) 455s ***** assert (size (burrrnd (1, 1, 1, 3)), [3, 3]) 455s ***** assert (size (burrrnd (1, 1, 1, [4 1])), [4, 1]) 455s ***** assert (size (burrrnd (1, 1, 1, 4, 1)), [4, 1]) 455s ***** assert (class (burrrnd (1,1,1)), "double") 455s ***** assert (class (burrrnd (single (1),1,1)), "single") 455s ***** assert (class (burrrnd (single ([1 1]),1,1)), "single") 455s ***** assert (class (burrrnd (1,single (1),1)), "single") 455s ***** assert (class (burrrnd (1,single ([1 1]),1)), "single") 455s ***** assert (class (burrrnd (1,1,single (1))), "single") 455s ***** assert (class (burrrnd (1,1,single ([1 1]))), "single") 455s ***** error burrrnd () 455s ***** error burrrnd (1) 455s ***** error burrrnd (1, 2) 455s ***** error ... 455s burrrnd (ones (3), ones (2), ones (2)) 455s ***** error ... 455s burrrnd (ones (2), ones (3), ones (2)) 455s ***** error ... 455s burrrnd (ones (2), ones (2), ones (3)) 455s ***** error burrrnd (i, 2, 3) 455s ***** error burrrnd (1, i, 3) 455s ***** error burrrnd (1, 2, i) 455s ***** error ... 455s burrrnd (1, 2, 3, -1) 455s ***** error ... 455s burrrnd (1, 2, 3, 1.2) 455s ***** error ... 455s burrrnd (1, 2, 3, ones (2)) 455s ***** error ... 455s burrrnd (1, 2, 3, [2 -1 2]) 455s ***** error ... 455s burrrnd (1, 2, 3, [2 0 2.5]) 455s ***** error ... 455s burrrnd (1, 2, 3, 2, -1, 5) 455s ***** error ... 455s burrrnd (1, 2, 3, 2, 1.5, 5) 455s ***** error ... 455s burrrnd (2, ones (2), 2, 3) 455s ***** error ... 455s burrrnd (2, ones (2), 2, [3, 2]) 455s ***** error ... 455s burrrnd (2, ones (2), 2, 3, 2) 455s 36 tests, 36 passed, 0 known failure, 0 skipped 455s [inst/dist_fun/bvncdf.m] 455s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/bvncdf.m 455s ***** demo 455s mu = [1, -1]; 455s sigma = [0.9, 0.4; 0.4, 0.3]; 455s [X1, X2] = meshgrid (linspace (-1, 3, 25)', linspace (-3, 1, 25)'); 455s x = [X1(:), X2(:)]; 455s p = bvncdf (x, mu, sigma); 455s Z = reshape (p, 25, 25); 455s surf (X1, X2, Z); 455s title ("Bivariate Normal Distribution"); 455s ylabel "X1" 455s xlabel "X2" 455s ***** test 455s mu = [1, -1]; 455s sigma = [0.9, 0.4; 0.4, 0.3]; 455s [X1,X2] = meshgrid (linspace (-1, 3, 25)', linspace (-3, 1, 25)'); 455s x = [X1(:), X2(:)]; 455s p = bvncdf (x, mu, sigma); 455s p_out = [0.00011878988774500, 0.00034404112322371, ... 455s 0.00087682502191813, 0.00195221905058185, ... 455s 0.00378235566873474, 0.00638175749734415, ... 455s 0.00943764224329656, 0.01239164888125426, ... 455s 0.01472750274376648, 0.01623228313374828]'; 455s assert (p([1:10]), p_out, 1e-16); 455s ***** test 455s mu = [1, -1]; 455s sigma = [0.9, 0.4; 0.4, 0.3]; 455s [X1,X2] = meshgrid (linspace (-1, 3, 25)', linspace (-3, 1, 25)'); 455s x = [X1(:), X2(:)]; 455s p = bvncdf (x, mu, sigma); 455s p_out = [0.8180695783608276, 0.8854485749482751, ... 455s 0.9308108777385832, 0.9579855743025508, ... 455s 0.9722897881414742, 0.9788150170059926, ... 455s 0.9813597788804785, 0.9821977956568989, ... 455s 0.9824283794464095, 0.9824809345614861]'; 455s assert (p([616:625]), p_out, 3e-16); 455s ***** error bvncdf (randn (25,3), [], [1, 1; 1, 1]); 455s ***** error bvncdf (randn (25,2), [], [1, 1; 1, 1]); 455s ***** error bvncdf (randn (25,2), [], ones (3, 2)); 455s 5 tests, 5 passed, 0 known failure, 0 skipped 455s [inst/dist_fun/bvtcdf.m] 455s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/bvtcdf.m 455s ***** test 455s x = [1, 2]; 455s rho = [1, 0.5; 0.5, 1]; 455s df = 4; 455s assert (bvtcdf(x, rho(2), df), mvtcdf(x, rho, df), 1e-14); 456s ***** test 456s x = [3, 2;2, 4;1, 5]; 456s rho = [1, 0.5; 0.5, 1]; 456s df = 4; 456s assert (bvtcdf(x, rho(2), df), mvtcdf(x, rho, df), 1e-14); 456s 2 tests, 2 passed, 0 known failure, 0 skipped 456s [inst/dist_fun/cauchycdf.m] 456s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/cauchycdf.m 456s ***** demo 456s ## Plot various CDFs from the Cauchy distribution 456s x = -5:0.01:5; 456s p1 = cauchycdf (x, 0, 0.5); 456s p2 = cauchycdf (x, 0, 1); 456s p3 = cauchycdf (x, 0, 2); 456s p4 = cauchycdf (x, -2, 1); 456s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-c") 456s grid on 456s xlim ([-5, 5]) 456s legend ({"x0 = 0, γ = 0.5", "x0 = 0, γ = 1", ... 456s "x0 = 0, γ = 2", "x0 = -2, γ = 1"}, "location", "southeast") 456s title ("Cauchy CDF") 456s xlabel ("values in x") 456s ylabel ("probability") 456s ***** shared x, y 456s x = [-1 0 0.5 1 2]; 456s y = 1/pi * atan ((x-1) / 2) + 1/2; 456s ***** assert (cauchycdf (x, ones (1,5), 2*ones (1,5)), y) 456s ***** assert (cauchycdf (x, 1, 2*ones (1,5)), y) 456s ***** assert (cauchycdf (x, ones (1,5), 2), y) 456s ***** assert (cauchycdf (x, [-Inf 1 NaN 1 Inf], 2), [NaN y(2) NaN y(4) NaN]) 456s ***** assert (cauchycdf (x, 1, 2*[0 1 NaN 1 Inf]), [NaN y(2) NaN y(4) NaN]) 456s ***** assert (cauchycdf ([x(1:2) NaN x(4:5)], 1, 2), [y(1:2) NaN y(4:5)]) 456s ***** assert (cauchycdf ([x, NaN], 1, 2), [y, NaN]) 456s ***** assert (cauchycdf (single ([x, NaN]), 1, 2), single ([y, NaN]), eps ("single")) 456s ***** assert (cauchycdf ([x, NaN], single (1), 2), single ([y, NaN]), eps ("single")) 456s ***** assert (cauchycdf ([x, NaN], 1, single (2)), single ([y, NaN]), eps ("single")) 456s ***** error cauchycdf () 456s ***** error cauchycdf (1) 456s ***** error ... 456s cauchycdf (1, 2) 456s ***** error ... 456s cauchycdf (1, 2, 3, 4, 5) 456s ***** error cauchycdf (1, 2, 3, "tail") 456s ***** error cauchycdf (1, 2, 3, 4) 456s ***** error ... 456s cauchycdf (ones (3), ones (2), ones (2)) 456s ***** error ... 456s cauchycdf (ones (2), ones (3), ones (2)) 456s ***** error ... 456s cauchycdf (ones (2), ones (2), ones (3)) 456s ***** error cauchycdf (i, 2, 2) 456s ***** error cauchycdf (2, i, 2) 456s ***** error cauchycdf (2, 2, i) 456s 22 tests, 22 passed, 0 known failure, 0 skipped 456s [inst/dist_fun/cauchyinv.m] 456s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/cauchyinv.m 456s ***** demo 456s ## Plot various iCDFs from the Cauchy distribution 456s p = 0.001:0.001:0.999; 456s x1 = cauchyinv (p, 0, 0.5); 456s x2 = cauchyinv (p, 0, 1); 456s x3 = cauchyinv (p, 0, 2); 456s x4 = cauchyinv (p, -2, 1); 456s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-c") 456s grid on 456s ylim ([-5, 5]) 456s legend ({"x0 = 0, γ = 0.5", "x0 = 0, γ = 1", ... 456s "x0 = 0, γ = 2", "x0 = -2, γ = 1"}, "location", "northwest") 456s title ("Cauchy iCDF") 456s xlabel ("probability") 456s ylabel ("values in x") 456s ***** shared p 456s p = [-1 0 0.5 1 2]; 456s ***** assert (cauchyinv (p, ones (1,5), 2 * ones (1,5)), [NaN -Inf 1 Inf NaN], eps) 456s ***** assert (cauchyinv (p, 1, 2 * ones (1,5)), [NaN -Inf 1 Inf NaN], eps) 456s ***** assert (cauchyinv (p, ones (1,5), 2), [NaN -Inf 1 Inf NaN], eps) 456s ***** assert (cauchyinv (p, [1 -Inf NaN Inf 1], 2), [NaN NaN NaN NaN NaN]) 456s ***** assert (cauchyinv (p, 1, 2 * [1 0 NaN Inf 1]), [NaN NaN NaN NaN NaN]) 456s ***** assert (cauchyinv ([p(1:2) NaN p(4:5)], 1, 2), [NaN -Inf NaN Inf NaN]) 456s ***** assert (cauchyinv ([p, NaN], 1, 2), [NaN -Inf 1 Inf NaN NaN], eps) 456s ***** assert (cauchyinv (single ([p, NaN]), 1, 2), ... 456s single ([NaN -Inf 1 Inf NaN NaN]), eps ("single")) 456s ***** assert (cauchyinv ([p, NaN], single (1), 2), ... 456s single ([NaN -Inf 1 Inf NaN NaN]), eps ("single")) 456s ***** assert (cauchyinv ([p, NaN], 1, single (2)), ... 456s single ([NaN -Inf 1 Inf NaN NaN]), eps ("single")) 456s ***** error cauchyinv () 456s ***** error cauchyinv (1) 456s ***** error ... 456s cauchyinv (1, 2) 456s ***** error cauchyinv (1, 2, 3, 4) 456s ***** error ... 456s cauchyinv (ones (3), ones (2), ones(2)) 456s ***** error ... 456s cauchyinv (ones (2), ones (3), ones(2)) 456s ***** error ... 456s cauchyinv (ones (2), ones (2), ones(3)) 456s ***** error cauchyinv (i, 4, 3) 456s ***** error cauchyinv (1, i, 3) 456s ***** error cauchyinv (1, 4, i) 456s 20 tests, 20 passed, 0 known failure, 0 skipped 456s [inst/dist_fun/cauchypdf.m] 456s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/cauchypdf.m 456s ***** demo 456s ## Plot various PDFs from the Cauchy distribution 456s x = -5:0.01:5; 456s y1 = cauchypdf (x, 0, 0.5); 456s y2 = cauchypdf (x, 0, 1); 456s y3 = cauchypdf (x, 0, 2); 456s y4 = cauchypdf (x, -2, 1); 456s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-c") 456s grid on 456s xlim ([-5, 5]) 456s ylim ([0, 0.7]) 456s legend ({"x0 = 0, γ = 0.5", "x0 = 0, γ = 1", ... 456s "x0 = 0, γ = 2", "x0 = -2, γ = 1"}, "location", "northeast") 456s title ("Cauchy PDF") 456s xlabel ("values in x") 456s ylabel ("density") 456s ***** shared x, y 456s x = [-1 0 0.5 1 2]; 456s y = 1/pi * ( 2 ./ ((x-1).^2 + 2^2) ); 456s ***** assert (cauchypdf (x, ones (1,5), 2*ones (1,5)), y) 456s ***** assert (cauchypdf (x, 1, 2*ones (1,5)), y) 456s ***** assert (cauchypdf (x, ones (1,5), 2), y) 456s ***** assert (cauchypdf (x, [-Inf 1 NaN 1 Inf], 2), [NaN y(2) NaN y(4) NaN]) 456s ***** assert (cauchypdf (x, 1, 2*[0 1 NaN 1 Inf]), [NaN y(2) NaN y(4) NaN]) 456s ***** assert (cauchypdf ([x, NaN], 1, 2), [y, NaN]) 456s ***** assert (cauchypdf (single ([x, NaN]), 1, 2), single ([y, NaN]), eps ("single")) 456s ***** assert (cauchypdf ([x, NaN], single (1), 2), single ([y, NaN]), eps ("single")) 456s ***** assert (cauchypdf ([x, NaN], 1, single (2)), single ([y, NaN]), eps ("single")) 456s ***** test 456s x = rand (10, 1); 456s assert (cauchypdf (x, 0, 1), tpdf (x, 1), eps); 456s ***** error cauchypdf () 456s ***** error cauchypdf (1) 456s ***** error ... 456s cauchypdf (1, 2) 456s ***** error cauchypdf (1, 2, 3, 4) 456s ***** error ... 456s cauchypdf (ones (3), ones (2), ones(2)) 456s ***** error ... 456s cauchypdf (ones (2), ones (3), ones(2)) 456s ***** error ... 456s cauchypdf (ones (2), ones (2), ones(3)) 456s ***** error cauchypdf (i, 4, 3) 456s ***** error cauchypdf (1, i, 3) 456s ***** error cauchypdf (1, 4, i) 456s 20 tests, 20 passed, 0 known failure, 0 skipped 456s [inst/dist_fun/cauchyrnd.m] 456s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/cauchyrnd.m 456s ***** assert (size (cauchyrnd (1, 1)), [1 1]) 456s ***** assert (size (cauchyrnd (1, ones (2,1))), [2, 1]) 456s ***** assert (size (cauchyrnd (1, ones (2,2))), [2, 2]) 456s ***** assert (size (cauchyrnd (ones (2,1), 1)), [2, 1]) 456s ***** assert (size (cauchyrnd (ones (2,2), 1)), [2, 2]) 456s ***** assert (size (cauchyrnd (1, 1, 3)), [3, 3]) 456s ***** assert (size (cauchyrnd (1, 1, [4, 1])), [4, 1]) 456s ***** assert (size (cauchyrnd (1, 1, 4, 1)), [4, 1]) 456s ***** assert (size (cauchyrnd (1, 1, 4, 1, 5)), [4, 1, 5]) 456s ***** assert (size (cauchyrnd (1, 1, 0, 1)), [0, 1]) 456s ***** assert (size (cauchyrnd (1, 1, 1, 0)), [1, 0]) 456s ***** assert (size (cauchyrnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 456s ***** assert (class (cauchyrnd (1, 1)), "double") 456s ***** assert (class (cauchyrnd (1, single (1))), "single") 456s ***** assert (class (cauchyrnd (1, single ([1, 1]))), "single") 456s ***** assert (class (cauchyrnd (single (1), 1)), "single") 456s ***** assert (class (cauchyrnd (single ([1, 1]), 1)), "single") 456s ***** error cauchyrnd () 456s ***** error cauchyrnd (1) 456s ***** error ... 456s cauchyrnd (ones (3), ones (2)) 456s ***** error ... 456s cauchyrnd (ones (2), ones (3)) 456s ***** error cauchyrnd (i, 2, 3) 456s ***** error cauchyrnd (1, i, 3) 456s ***** error ... 456s cauchyrnd (1, 2, -1) 456s ***** error ... 456s cauchyrnd (1, 2, 1.2) 456s ***** error ... 456s cauchyrnd (1, 2, ones (2)) 456s ***** error ... 456s cauchyrnd (1, 2, [2 -1 2]) 456s ***** error ... 456s cauchyrnd (1, 2, [2 0 2.5]) 456s ***** error ... 456s cauchyrnd (1, 2, 2, -1, 5) 456s ***** error ... 456s cauchyrnd (1, 2, 2, 1.5, 5) 456s ***** error ... 456s cauchyrnd (2, ones (2), 3) 456s ***** error ... 456s cauchyrnd (2, ones (2), [3, 2]) 456s ***** error ... 456s cauchyrnd (2, ones (2), 3, 2) 456s 33 tests, 33 passed, 0 known failure, 0 skipped 456s [inst/dist_fun/chi2cdf.m] 456s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/chi2cdf.m 456s ***** demo 456s ## Plot various CDFs from the chi-squared distribution 456s x = 0:0.01:8; 456s p1 = chi2cdf (x, 1); 456s p2 = chi2cdf (x, 2); 456s p3 = chi2cdf (x, 3); 456s p4 = chi2cdf (x, 4); 456s p5 = chi2cdf (x, 6); 456s p6 = chi2cdf (x, 9); 456s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", ... 456s x, p4, "-c", x, p5, "-m", x, p6, "-y") 456s grid on 456s xlim ([0, 8]) 456s legend ({"df = 1", "df = 2", "df = 3", ... 456s "df = 4", "df = 6", "df = 9"}, "location", "southeast") 456s title ("Chi-squared CDF") 456s xlabel ("values in x") 456s ylabel ("probability") 456s ***** shared x, p, u 456s x = [-1, 0, 0.5, 1, 2]; 456s p = [0, (1 - exp (-x(2:end) / 2))]; 456s u = [1, 0, NaN, 0.606530659712633, 0.367879441171442]; 456s ***** assert (chi2cdf (x, 2 * ones (1,5)), p, eps) 456s ***** assert (chi2cdf (x, 2), p, eps) 456s ***** assert (chi2cdf (x, 2 * [1, 0, NaN, 1, 1]), [0, 1, NaN, p(4:5)], eps) 456s ***** assert (chi2cdf (x, 2 * [1, 0, NaN, 1, 1], "upper"), u, 3 * eps) 456s ***** assert (chi2cdf ([x(1:2), NaN, x(4:5)], 2), [p(1:2), NaN, p(4:5)], eps) 456s ***** assert (chi2cdf ([x, NaN], 2), [p, NaN], eps) 456s ***** assert (chi2cdf (single ([x, NaN]), 2), single ([p, NaN]), eps ("single")) 456s ***** assert (chi2cdf ([x, NaN], single (2)), single ([p, NaN]), eps ("single")) 456s ***** error chi2cdf () 456s ***** error chi2cdf (1) 456s ***** error chi2cdf (1, 2, 3, 4) 456s ***** error chi2cdf (1, 2, 3) 456s ***** error chi2cdf (1, 2, "uper") 456s ***** error ... 456s chi2cdf (ones (3), ones (2)) 456s ***** error ... 456s chi2cdf (ones (2), ones (3)) 456s ***** error chi2cdf (i, 2) 456s ***** error chi2cdf (2, i) 456s 17 tests, 17 passed, 0 known failure, 0 skipped 456s [inst/dist_fun/chi2inv.m] 456s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/chi2inv.m 456s ***** demo 456s ## Plot various iCDFs from the chi-squared distribution 456s p = 0.001:0.001:0.999; 456s x1 = chi2inv (p, 1); 456s x2 = chi2inv (p, 2); 456s x3 = chi2inv (p, 3); 456s x4 = chi2inv (p, 4); 456s x5 = chi2inv (p, 6); 456s x6 = chi2inv (p, 9); 456s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", ... 456s p, x4, "-c", p, x5, "-m", p, x6, "-y") 456s grid on 456s ylim ([0, 8]) 456s legend ({"df = 1", "df = 2", "df = 3", ... 456s "df = 4", "df = 6", "df = 9"}, "location", "northwest") 456s title ("Chi-squared iCDF") 456s xlabel ("probability") 456s ylabel ("values in x") 456s ***** shared p 456s p = [-1 0 0.3934693402873666 1 2]; 456s ***** assert (chi2inv (p, 2*ones (1,5)), [NaN 0 1 Inf NaN], 5*eps) 456s ***** assert (chi2inv (p, 2), [NaN 0 1 Inf NaN], 5*eps) 456s ***** assert (chi2inv (p, 2*[0 1 NaN 1 1]), [NaN 0 NaN Inf NaN], 5*eps) 456s ***** assert (chi2inv ([p(1:2) NaN p(4:5)], 2), [NaN 0 NaN Inf NaN], 5*eps) 456s ***** assert (chi2inv ([p, NaN], 2), [NaN 0 1 Inf NaN NaN], 5*eps) 456s ***** assert (chi2inv (single ([p, NaN]), 2), single ([NaN 0 1 Inf NaN NaN]), 5*eps ("single")) 456s ***** assert (chi2inv ([p, NaN], single (2)), single ([NaN 0 1 Inf NaN NaN]), 5*eps ("single")) 456s ***** error chi2inv () 456s ***** error chi2inv (1) 456s ***** error chi2inv (1,2,3) 456s ***** error ... 456s chi2inv (ones (3), ones (2)) 456s ***** error ... 456s chi2inv (ones (2), ones (3)) 456s ***** error chi2inv (i, 2) 456s ***** error chi2inv (2, i) 456s 14 tests, 14 passed, 0 known failure, 0 skipped 456s [inst/dist_fun/chi2pdf.m] 456s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/chi2pdf.m 456s ***** demo 456s ## Plot various PDFs from the chi-squared distribution 456s x = 0:0.01:8; 456s y1 = chi2pdf (x, 1); 456s y2 = chi2pdf (x, 2); 456s y3 = chi2pdf (x, 3); 456s y4 = chi2pdf (x, 4); 456s y5 = chi2pdf (x, 6); 456s y6 = chi2pdf (x, 9); 456s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", ... 456s x, y4, "-c", x, y5, "-m", x, y6, "-y") 456s grid on 456s xlim ([0, 8]) 456s ylim ([0, 0.5]) 456s legend ({"df = 1", "df = 2", "df = 3", ... 456s "df = 4", "df = 6", "df = 9"}, "location", "northeast") 456s title ("Chi-squared PDF") 456s xlabel ("values in x") 456s ylabel ("density") 456s ***** shared x, y 456s x = [-1 0 0.5 1 Inf]; 456s y = [0, 1/2 * exp(-x(2:5)/2)]; 456s ***** assert (chi2pdf (x, 2*ones (1,5)), y) 456s ***** assert (chi2pdf (x, 2), y) 456s ***** assert (chi2pdf (x, 2*[1 0 NaN 1 1]), [y(1) NaN NaN y(4:5)]) 456s ***** assert (chi2pdf ([x, NaN], 2), [y, NaN]) 456s ***** assert (chi2pdf (2, Inf), 0) 456s ***** assert (chi2pdf (single ([x, NaN]), 2), single ([y, NaN])) 456s ***** assert (chi2pdf ([x, NaN], single (2)), single ([y, NaN])) 456s ***** error chi2pdf () 456s ***** error chi2pdf (1) 456s ***** error chi2pdf (1,2,3) 456s ***** error ... 456s chi2pdf (ones (3), ones (2)) 456s ***** error ... 456s chi2pdf (ones (2), ones (3)) 456s ***** error chi2pdf (i, 2) 456s ***** error chi2pdf (2, i) 456s 14 tests, 14 passed, 0 known failure, 0 skipped 456s [inst/dist_fun/chi2rnd.m] 456s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/chi2rnd.m 456s ***** assert (size (chi2rnd (2)), [1, 1]) 456s ***** assert (size (chi2rnd (ones (2,1))), [2, 1]) 456s ***** assert (size (chi2rnd (ones (2,2))), [2, 2]) 456s ***** assert (size (chi2rnd (1, 3)), [3, 3]) 456s ***** assert (size (chi2rnd (1, [4 1])), [4, 1]) 456s ***** assert (size (chi2rnd (1, 4, 1)), [4, 1]) 456s ***** assert (size (chi2rnd (1, 4, 1)), [4, 1]) 456s ***** assert (size (chi2rnd (1, 4, 1, 5)), [4, 1, 5]) 456s ***** assert (size (chi2rnd (1, 0, 1)), [0, 1]) 456s ***** assert (size (chi2rnd (1, 1, 0)), [1, 0]) 456s ***** assert (size (chi2rnd (1, 1, 2, 0, 5)), [1, 2, 0, 5]) 456s ***** assert (class (chi2rnd (2)), "double") 456s ***** assert (class (chi2rnd (single (2))), "single") 456s ***** assert (class (chi2rnd (single ([2 2]))), "single") 456s ***** error chi2rnd () 456s ***** error chi2rnd (i) 456s ***** error ... 456s chi2rnd (1, -1) 456s ***** error ... 456s chi2rnd (1, 1.2) 456s ***** error ... 456s chi2rnd (1, ones (2)) 456s ***** error ... 456s chi2rnd (1, [2 -1 2]) 456s ***** error ... 456s chi2rnd (1, [2 0 2.5]) 456s ***** error ... 456s chi2rnd (ones (2), ones (2)) 456s ***** error ... 456s chi2rnd (1, 2, -1, 5) 456s ***** error ... 456s chi2rnd (1, 2, 1.5, 5) 456s ***** error chi2rnd (ones (2,2), 3) 456s ***** error chi2rnd (ones (2,2), [3, 2]) 456s ***** error chi2rnd (ones (2,2), 2, 3) 456s 27 tests, 27 passed, 0 known failure, 0 skipped 456s [inst/dist_fun/copulacdf.m] 456s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/copulacdf.m 456s ***** test 456s x = [0.2:0.2:0.6; 0.2:0.2:0.6]; 456s theta = [1; 2]; 456s p = copulacdf ("Clayton", x, theta); 456s expected_p = [0.1395; 0.1767]; 456s assert (p, expected_p, 0.001); 456s ***** test 456s x = [0.2:0.2:0.6; 0.2:0.2:0.6]; 456s p = copulacdf ("Gumbel", x, 2); 456s expected_p = [0.1464; 0.1464]; 456s assert (p, expected_p, 0.001); 456s ***** test 456s x = [0.2:0.2:0.6; 0.2:0.2:0.6]; 456s theta = [1; 2]; 456s p = copulacdf ("Frank", x, theta); 456s expected_p = [0.0699; 0.0930]; 456s assert (p, expected_p, 0.001); 456s ***** test 456s x = [0.2:0.2:0.6; 0.2:0.2:0.6]; 456s theta = [0.3; 0.7]; 456s p = copulacdf ("AMH", x, theta); 456s expected_p = [0.0629; 0.0959]; 456s assert (p, expected_p, 0.001); 456s ***** test 456s x = [0.2:0.2:0.6; 0.2:0.1:0.4]; 456s theta = [0.2, 0.1, 0.1, 0.05]; 456s p = copulacdf ("FGM", x, theta); 456s expected_p = [0.0558; 0.0293]; 456s assert (p, expected_p, 0.001); 456s 5 tests, 5 passed, 0 known failure, 0 skipped 456s [inst/dist_fun/copulapdf.m] 456s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/copulapdf.m 456s ***** test 456s x = [0.2:0.2:0.6; 0.2:0.2:0.6]; 456s theta = [1; 2]; 456s y = copulapdf ("Clayton", x, theta); 456s expected_p = [0.9872; 0.7295]; 456s assert (y, expected_p, 0.001); 456s ***** test 456s x = [0.2:0.2:0.6; 0.2:0.2:0.6]; 456s y = copulapdf ("Gumbel", x, 2); 456s expected_p = [0.9468; 0.9468]; 456s assert (y, expected_p, 0.001); 456s ***** test 456s x = [0.2, 0.6; 0.2, 0.6]; 456s theta = [1; 2]; 456s y = copulapdf ("Frank", x, theta); 456s expected_p = [0.9378; 0.8678]; 456s assert (y, expected_p, 0.001); 456s ***** test 456s x = [0.2, 0.6; 0.2, 0.6]; 456s theta = [0.3; 0.7]; 456s y = copulapdf ("AMH", x, theta); 456s expected_p = [0.9540; 0.8577]; 456s assert (y, expected_p, 0.001); 456s 4 tests, 4 passed, 0 known failure, 0 skipped 456s [inst/dist_fun/copularnd.m] 456s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/copularnd.m 456s ***** test 456s theta = 0.5; 456s r = copularnd ("Gaussian", theta); 456s assert (size (r), [1, 2]); 456s assert (all ((r >= 0) & (r <= 1))); 456s ***** test 456s theta = 0.5; 456s df = 2; 456s r = copularnd ("t", theta, df); 456s assert (size (r), [1, 2]); 456s assert (all ((r >= 0) & (r <= 1))); 456s ***** test 456s theta = 0.5; 456s r = copularnd ("Clayton", theta); 456s assert (size (r), [1, 2]); 456s assert (all ((r >= 0) & (r <= 1))); 456s ***** test 456s theta = 0.5; 456s n = 2; 456s r = copularnd ("Clayton", theta, n); 456s assert (size (r), [n, 2]); 456s assert (all ((r >= 0) & (r <= 1))); 456s ***** test 456s theta = [1; 2]; 456s n = 2; 456s d = 3; 456s r = copularnd ("Clayton", theta, n, d); 456s assert (size (r), [n, d]); 456s assert (all ((r >= 0) & (r <= 1))); 456s 5 tests, 5 passed, 0 known failure, 0 skipped 456s [inst/dist_fun/evcdf.m] 456s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/evcdf.m 456s ***** demo 456s ## Plot various CDFs from the extreme value distribution 456s x = -10:0.01:10; 456s p1 = evcdf (x, 0.5, 2); 456s p2 = evcdf (x, 1.0, 2); 456s p3 = evcdf (x, 1.5, 3); 456s p4 = evcdf (x, 3.0, 4); 456s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-c") 456s grid on 456s legend ({"μ = 0.5, σ = 2", "μ = 1.0, σ = 2", ... 456s "μ = 1.5, σ = 3", "μ = 3.0, σ = 4"}, "location", "southeast") 456s title ("Extreme value CDF") 456s xlabel ("values in x") 456s ylabel ("probability") 456s ***** shared x, y 456s x = [-Inf, 1, 2, Inf]; 456s y = [0, 0.6321, 0.9340, 1]; 456s ***** assert (evcdf (x, ones (1,4), ones (1,4)), y, 1e-4) 456s ***** assert (evcdf (x, 1, ones (1,4)), y, 1e-4) 456s ***** assert (evcdf (x, ones (1,4), 1), y, 1e-4) 456s ***** assert (evcdf (x, [0, -Inf, NaN, Inf], 1), [0, 1, NaN, NaN], 1e-4) 456s ***** assert (evcdf (x, 1, [Inf, NaN, -1, 0]), [NaN, NaN, NaN, NaN], 1e-4) 456s ***** assert (evcdf ([x(1:2), NaN, x(4)], 1, 1), [y(1:2), NaN, y(4)], 1e-4) 456s ***** assert (evcdf (x, "upper"), [1, 0.0660, 0.0006, 0], 1e-4) 456s ***** assert (evcdf ([x, NaN], 1, 1), [y, NaN], 1e-4) 456s ***** assert (evcdf (single ([x, NaN]), 1, 1), single ([y, NaN]), 1e-4) 456s ***** assert (evcdf ([x, NaN], single (1), 1), single ([y, NaN]), 1e-4) 456s ***** assert (evcdf ([x, NaN], 1, single (1)), single ([y, NaN]), 1e-4) 456s ***** error evcdf () 456s ***** error evcdf (1,2,3,4,5,6,7) 456s ***** error evcdf (1, 2, 3, 4, "uper") 456s ***** error ... 456s evcdf (ones (3), ones (2), ones (2)) 456s ***** error evcdf (2, 3, 4, [1, 2]) 456s ***** error ... 456s [p, plo, pup] = evcdf (1, 2, 3) 456s ***** error [p, plo, pup] = ... 456s evcdf (1, 2, 3, [1, 0; 0, 1], 0) 456s ***** error [p, plo, pup] = ... 456s evcdf (1, 2, 3, [1, 0; 0, 1], 1.22) 456s ***** error [p, plo, pup] = ... 456s evcdf (1, 2, 3, [1, 0; 0, 1], "alpha", "upper") 456s ***** error evcdf (i, 2, 2) 456s ***** error evcdf (2, i, 2) 456s ***** error evcdf (2, 2, i) 456s ***** error ... 456s [p, plo, pup] = evcdf (1, 2, 3, [1, 0; 0, -inf], 0.04) 456s 24 tests, 24 passed, 0 known failure, 0 skipped 456s [inst/dist_fun/evinv.m] 456s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/evinv.m 456s ***** demo 456s ## Plot various iCDFs from the extreme value distribution 456s p = 0.001:0.001:0.999; 456s x1 = evinv (p, 0.5, 2); 456s x2 = evinv (p, 1.0, 2); 456s x3 = evinv (p, 1.5, 3); 456s x4 = evinv (p, 3.0, 4); 456s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-c") 456s grid on 456s ylim ([-10, 10]) 456s legend ({"μ = 0.5, σ = 2", "μ = 1.0, σ = 2", ... 456s "μ = 1.5, σ = 3", "μ = 3.0, σ = 4"}, "location", "northwest") 456s title ("Extreme value iCDF") 456s xlabel ("probability") 456s ylabel ("values in x") 456s ***** shared p, x 456s p = [0, 0.05, 0.5 0.95]; 456s x = [-Inf, -2.9702, -0.3665, 1.0972]; 456s ***** assert (evinv (p), x, 1e-4) 457s ***** assert (evinv (p, zeros (1,4), ones (1,4)), x, 1e-4) 457s ***** assert (evinv (p, 0, ones (1,4)), x, 1e-4) 457s ***** assert (evinv (p, zeros (1,4), 1), x, 1e-4) 457s ***** assert (evinv (p, [0, -Inf, NaN, Inf], 1), [-Inf, -Inf, NaN, Inf], 1e-4) 457s ***** assert (evinv (p, 0, [Inf, NaN, -1, 0]), [-Inf, NaN, NaN, NaN], 1e-4) 457s ***** assert (evinv ([p(1:2), NaN, p(4)], 0, 1), [x(1:2), NaN, x(4)], 1e-4) 457s ***** assert (evinv ([p, NaN], 0, 1), [x, NaN], 1e-4) 457s ***** assert (evinv (single ([p, NaN]), 0, 1), single ([x, NaN]), 1e-4) 457s ***** assert (evinv ([p, NaN], single (0), 1), single ([x, NaN]), 1e-4) 457s ***** assert (evinv ([p, NaN], 0, single (1)), single ([x, NaN]), 1e-4) 457s ***** error evinv () 457s ***** error evinv (1,2,3,4,5,6) 457s ***** error ... 457s evinv (ones (3), ones (2), ones (2)) 457s ***** error ... 457s [p, plo, pup] = evinv (2, 3, 4, [1, 2]) 457s ***** error ... 457s [p, plo, pup] = evinv (1, 2, 3) 457s ***** error [p, plo, pup] = ... 457s evinv (1, 2, 3, [1, 0; 0, 1], 0) 457s ***** error [p, plo, pup] = ... 457s evinv (1, 2, 3, [1, 0; 0, 1], 1.22) 457s ***** error evinv (i, 2, 2) 457s ***** error evinv (2, i, 2) 457s ***** error evinv (2, 2, i) 457s ***** error ... 457s [p, plo, pup] = evinv (1, 2, 3, [-1, -10; -Inf, -Inf], 0.04) 457s 22 tests, 22 passed, 0 known failure, 0 skipped 457s [inst/dist_fun/evpdf.m] 457s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/evpdf.m 457s ***** demo 457s ## Plot various PDFs from the Extreme value distribution 457s x = -10:0.001:10; 457s y1 = evpdf (x, 0.5, 2); 457s y2 = evpdf (x, 1.0, 2); 457s y3 = evpdf (x, 1.5, 3); 457s y4 = evpdf (x, 3.0, 4); 457s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-c") 457s grid on 457s ylim ([0, 0.2]) 457s legend ({"μ = 0.5, σ = 2", "μ = 1.0, σ = 2", ... 457s "μ = 1.5, σ = 3", "μ = 3.0, σ = 4"}, "location", "northeast") 457s title ("Extreme value PDF") 457s xlabel ("values in x") 457s ylabel ("density") 457s ***** shared x, y0, y1 457s x = [-5, 0, 1, 2, 3]; 457s y0 = [0.0067, 0.3679, 0.1794, 0.0046, 0]; 457s y1 = [0.0025, 0.2546, 0.3679, 0.1794, 0.0046]; 457s ***** assert (evpdf (x), y0, 1e-4) 457s ***** assert (evpdf (x, zeros (1,5), ones (1,5)), y0, 1e-4) 457s ***** assert (evpdf (x, ones (1,5), ones (1,5)), y1, 1e-4) 457s ***** error evpdf () 457s ***** error ... 457s evpdf (ones (3), ones (2), ones (2)) 457s ***** error evpdf (i, 2, 2) 457s ***** error evpdf (2, i, 2) 457s ***** error evpdf (2, 2, i) 457s 8 tests, 8 passed, 0 known failure, 0 skipped 457s [inst/dist_fun/evrnd.m] 457s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/evrnd.m 457s ***** assert (size (evrnd (1, 1)), [1 1]) 457s ***** assert (size (evrnd (1, ones (2,1))), [2, 1]) 457s ***** assert (size (evrnd (1, ones (2,2))), [2, 2]) 457s ***** assert (size (evrnd (ones (2,1), 1)), [2, 1]) 457s ***** assert (size (evrnd (ones (2,2), 1)), [2, 2]) 457s ***** assert (size (evrnd (1, 1, 3)), [3, 3]) 457s ***** assert (size (evrnd (1, 1, [4, 1])), [4, 1]) 457s ***** assert (size (evrnd (1, 1, 4, 1)), [4, 1]) 457s ***** assert (size (evrnd (1, 1, 4, 1, 5)), [4, 1, 5]) 457s ***** assert (size (evrnd (1, 1, 0, 1)), [0, 1]) 457s ***** assert (size (evrnd (1, 1, 1, 0)), [1, 0]) 457s ***** assert (size (evrnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 457s ***** assert (class (evrnd (1, 1)), "double") 457s ***** assert (class (evrnd (1, single (1))), "single") 457s ***** assert (class (evrnd (1, single ([1, 1]))), "single") 457s ***** assert (class (evrnd (single (1), 1)), "single") 457s ***** assert (class (evrnd (single ([1, 1]), 1)), "single") 457s ***** error evrnd () 457s ***** error evrnd (1) 457s ***** error ... 457s evrnd (ones (3), ones (2)) 457s ***** error ... 457s evrnd (ones (2), ones (3)) 457s ***** error evrnd (i, 2, 3) 457s ***** error evrnd (1, i, 3) 457s ***** error ... 457s evrnd (1, 2, -1) 457s ***** error ... 457s evrnd (1, 2, 1.2) 457s ***** error ... 457s evrnd (1, 2, ones (2)) 457s ***** error ... 457s evrnd (1, 2, [2 -1 2]) 457s ***** error ... 457s evrnd (1, 2, [2 0 2.5]) 457s ***** error ... 457s evrnd (1, 2, 2, -1, 5) 457s ***** error ... 457s evrnd (1, 2, 2, 1.5, 5) 457s ***** error ... 457s evrnd (2, ones (2), 3) 457s ***** error ... 457s evrnd (2, ones (2), [3, 2]) 457s ***** error ... 457s evrnd (2, ones (2), 3, 2) 457s 33 tests, 33 passed, 0 known failure, 0 skipped 457s [inst/dist_fun/expcdf.m] 457s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/expcdf.m 457s ***** demo 457s ## Plot various CDFs from the exponential distribution 457s x = 0:0.01:5; 457s p1 = expcdf (x, 2/3); 457s p2 = expcdf (x, 1.0); 457s p3 = expcdf (x, 2.0); 457s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r") 457s grid on 457s legend ({"μ = 2/3", "μ = 1", "μ = 2"}, "location", "southeast") 457s title ("Exponential CDF") 457s xlabel ("values in x") 457s ylabel ("probability") 457s ***** shared x, p 457s x = [-1 0 0.5 1 Inf]; 457s p = [0, 1 - exp(-x(2:end)/2)]; 457s ***** assert (expcdf (x, 2 * ones (1, 5)), p, 1e-16) 457s ***** assert (expcdf (x, 2), p, 1e-16) 457s ***** assert (expcdf (x, 2 * [1, 0, NaN, 1, 1]), [0, NaN, NaN, p(4:5)], 1e-16) 457s ***** assert (expcdf ([x, NaN], 2), [p, NaN], 1e-16) 457s ***** assert (expcdf (single ([x, NaN]), 2), single ([p, NaN])) 457s ***** assert (expcdf ([x, NaN], single (2)), single ([p, NaN])) 457s ***** test 457s [p, plo, pup] = expcdf (1, 2, 3); 457s assert (p, 0.39346934028737, 1e-14); 457s assert (plo, 0.08751307220484, 1e-14); 457s assert (pup, 0.93476821257933, 1e-14); 457s ***** test 457s [p, plo, pup] = expcdf (1, 2, 2, 0.1); 457s assert (p, 0.39346934028737, 1e-14); 457s assert (plo, 0.14466318041675, 1e-14); 457s assert (pup, 0.79808291849140, 1e-14); 457s ***** test 457s [p, plo, pup] = expcdf (1, 2, 2, 0.1, "upper"); 457s assert (p, 0.60653065971263, 1e-14); 457s assert (plo, 0.20191708150860, 1e-14); 457s assert (pup, 0.85533681958325, 1e-14); 457s ***** error expcdf () 457s ***** error expcdf (1, 2 ,3 ,4 ,5, 6) 457s ***** error expcdf (1, 2, 3, 4, "uper") 457s ***** error ... 457s expcdf (ones (3), ones (2)) 457s ***** error ... 457s expcdf (2, 3, [1, 2]) 457s ***** error ... 457s [p, plo, pup] = expcdf (1, 2) 457s ***** error [p, plo, pup] = ... 457s expcdf (1, 2, 3, 0) 457s ***** error [p, plo, pup] = ... 457s expcdf (1, 2, 3, 1.22) 457s ***** error [p, plo, pup] = ... 457s expcdf (1, 2, 3, "alpha", "upper") 457s ***** error expcdf (i, 2) 457s ***** error expcdf (2, i) 457s ***** error ... 457s [p, plo, pup] = expcdf (1, 2, -1, 0.04) 457s 21 tests, 21 passed, 0 known failure, 0 skipped 457s [inst/dist_fun/expinv.m] 457s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/expinv.m 457s ***** demo 457s ## Plot various iCDFs from the exponential distribution 457s p = 0.001:0.001:0.999; 457s x1 = expinv (p, 2/3); 457s x2 = expinv (p, 1.0); 457s x3 = expinv (p, 2.0); 457s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r") 457s grid on 457s ylim ([0, 5]) 457s legend ({"μ = 2/3", "μ = 1", "μ = 2"}, "location", "northwest") 457s title ("Exponential iCDF") 457s xlabel ("probability") 457s ylabel ("values in x") 457s ***** shared p 457s p = [-1 0 0.3934693402873666 1 2]; 457s ***** assert (expinv (p, 2*ones (1,5)), [NaN 0 1 Inf NaN], eps) 457s ***** assert (expinv (p, 2), [NaN 0 1 Inf NaN], eps) 457s ***** assert (expinv (p, 2*[1 0 NaN 1 1]), [NaN NaN NaN Inf NaN], eps) 457s ***** assert (expinv ([p(1:2) NaN p(4:5)], 2), [NaN 0 NaN Inf NaN], eps) 457s ***** assert (expinv ([p, NaN], 2), [NaN 0 1 Inf NaN NaN], eps) 457s ***** assert (expinv (single ([p, NaN]), 2), single ([NaN 0 1 Inf NaN NaN]), eps) 457s ***** assert (expinv ([p, NaN], single (2)), single ([NaN 0 1 Inf NaN NaN]), eps) 457s ***** error expinv () 457s ***** error expinv (1, 2 ,3 ,4 ,5) 457s ***** error ... 457s expinv (ones (3), ones (2)) 457s ***** error ... 457s expinv (2, 3, [1, 2]) 457s ***** error ... 457s [x, xlo, xup] = expinv (1, 2) 457s ***** error [x, xlo, xup] = ... 457s expinv (1, 2, 3, 0) 457s ***** error [x, xlo, xup] = ... 457s expinv (1, 2, 3, 1.22) 457s ***** error [x, xlo, xup] = ... 457s expinv (1, 2, 3, [0.05, 0.1]) 457s ***** error expinv (i, 2) 457s ***** error expinv (2, i) 457s ***** error ... 457s [x, xlo, xup] = expinv (1, 2, -1, 0.04) 457s 18 tests, 18 passed, 0 known failure, 0 skipped 457s [inst/dist_fun/exppdf.m] 457s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/exppdf.m 457s ***** demo 457s ## Plot various PDFs from the exponential distribution 457s x = 0:0.01:5; 457s y1 = exppdf (x, 2/3); 457s y2 = exppdf (x, 1.0); 457s y3 = exppdf (x, 2.0); 457s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r") 457s grid on 457s ylim ([0, 1.5]) 457s legend ({"μ = 2/3", "μ = 1", "μ = 2"}, "location", "northeast") 457s title ("Exponential PDF") 457s xlabel ("values in x") 457s ylabel ("density") 457s ***** shared x,y 457s x = [-1 0 0.5 1 Inf]; 457s y = gampdf (x, 1, 2); 457s ***** assert (exppdf (x, 2*ones (1,5)), y) 457s ***** assert (exppdf (x, 2*[1 0 NaN 1 1]), [y(1) NaN NaN y(4:5)]) 457s ***** assert (exppdf ([x, NaN], 2), [y, NaN]) 457s ***** assert (exppdf (single ([x, NaN]), 2), single ([y, NaN])) 457s ***** assert (exppdf ([x, NaN], single (2)), single ([y, NaN])) 457s ***** error exppdf () 457s ***** error exppdf (1,2,3) 457s ***** error ... 457s exppdf (ones (3), ones (2)) 457s ***** error ... 457s exppdf (ones (2), ones (3)) 457s ***** error exppdf (i, 2) 457s ***** error exppdf (2, i) 457s 11 tests, 11 passed, 0 known failure, 0 skipped 457s [inst/dist_fun/exprnd.m] 457s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/exprnd.m 457s ***** assert (size (exprnd (2)), [1, 1]) 457s ***** assert (size (exprnd (ones (2,1))), [2, 1]) 457s ***** assert (size (exprnd (ones (2,2))), [2, 2]) 457s ***** assert (size (exprnd (1, 3)), [3, 3]) 457s ***** assert (size (exprnd (1, [4 1])), [4, 1]) 457s ***** assert (size (exprnd (1, 4, 1)), [4, 1]) 457s ***** assert (size (exprnd (1, 4, 1)), [4, 1]) 457s ***** assert (size (exprnd (1, 4, 1, 5)), [4, 1, 5]) 457s ***** assert (size (exprnd (1, 0, 1)), [0, 1]) 457s ***** assert (size (exprnd (1, 1, 0)), [1, 0]) 457s ***** assert (size (exprnd (1, 1, 2, 0, 5)), [1, 2, 0, 5]) 457s ***** assert (class (exprnd (2)), "double") 457s ***** assert (class (exprnd (single (2))), "single") 457s ***** assert (class (exprnd (single ([2 2]))), "single") 457s ***** error exprnd () 457s ***** error exprnd (i) 457s ***** error ... 457s exprnd (1, -1) 457s ***** error ... 457s exprnd (1, 1.2) 457s ***** error ... 457s exprnd (1, ones (2)) 457s ***** error ... 457s exprnd (1, [2 -1 2]) 457s ***** error ... 457s exprnd (1, [2 0 2.5]) 457s ***** error ... 457s exprnd (ones (2), ones (2)) 457s ***** error ... 457s exprnd (1, 2, -1, 5) 457s ***** error ... 457s exprnd (1, 2, 1.5, 5) 457s ***** error exprnd (ones (2,2), 3) 457s ***** error exprnd (ones (2,2), [3, 2]) 457s ***** error exprnd (ones (2,2), 2, 3) 457s 27 tests, 27 passed, 0 known failure, 0 skipped 457s [inst/dist_fun/fcdf.m] 457s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/fcdf.m 457s ***** demo 457s ## Plot various CDFs from the F distribution 457s x = 0.01:0.01:4; 457s p1 = fcdf (x, 1, 2); 457s p2 = fcdf (x, 2, 1); 457s p3 = fcdf (x, 5, 2); 457s p4 = fcdf (x, 10, 1); 457s p5 = fcdf (x, 100, 100); 457s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-c", x, p5, "-m") 457s grid on 457s legend ({"df1 = 1, df2 = 2", "df1 = 2, df2 = 1", ... 457s "df1 = 5, df2 = 2", "df1 = 10, df2 = 1", ... 457s "df1 = 100, df2 = 100"}, "location", "southeast") 457s title ("F CDF") 457s xlabel ("values in x") 457s ylabel ("probability") 457s ***** shared x, y 457s x = [-1, 0, 0.5, 1, 2, Inf]; 457s y = [0, 0, 1/3, 1/2, 2/3, 1]; 457s ***** assert (fcdf (x, 2*ones (1,6), 2*ones (1,6)), y, eps) 457s ***** assert (fcdf (x, 2, 2*ones (1,6)), y, eps) 457s ***** assert (fcdf (x, 2*ones (1,6), 2), y, eps) 457s ***** assert (fcdf (x, [0 NaN Inf 2 2 2], 2), [NaN NaN 0.1353352832366127 y(4:6)], eps) 457s ***** assert (fcdf (x, 2, [0 NaN Inf 2 2 2]), [NaN NaN 0.3934693402873666 y(4:6)], eps) 457s ***** assert (fcdf ([x(1:2) NaN x(4:6)], 2, 2), [y(1:2) NaN y(4:6)], eps) 457s ***** assert (fcdf ([x, NaN], 2, 2), [y, NaN], eps) 457s ***** assert (fcdf (single ([x, NaN]), 2, 2), single ([y, NaN]), eps ("single")) 457s ***** assert (fcdf ([x, NaN], single (2), 2), single ([y, NaN]), eps ("single")) 457s ***** assert (fcdf ([x, NaN], 2, single (2)), single ([y, NaN]), eps ("single")) 457s ***** error fcdf () 457s ***** error fcdf (1) 457s ***** error fcdf (1, 2) 457s ***** error fcdf (1, 2, 3, 4) 457s ***** error fcdf (1, 2, 3, "tail") 457s ***** error ... 457s fcdf (ones (3), ones (2), ones (2)) 457s ***** error ... 457s fcdf (ones (2), ones (3), ones (2)) 457s ***** error ... 457s fcdf (ones (2), ones (2), ones (3)) 457s ***** error fcdf (i, 2, 2) 457s ***** error fcdf (2, i, 2) 457s ***** error fcdf (2, 2, i) 457s 21 tests, 21 passed, 0 known failure, 0 skipped 457s [inst/dist_fun/finv.m] 457s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/finv.m 457s ***** demo 457s ## Plot various iCDFs from the F distribution 457s p = 0.001:0.001:0.999; 457s x1 = finv (p, 1, 1); 457s x2 = finv (p, 2, 1); 457s x3 = finv (p, 5, 2); 457s x4 = finv (p, 10, 1); 457s x5 = finv (p, 100, 100); 457s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-c", p, x5, "-m") 457s grid on 457s ylim ([0, 4]) 457s legend ({"df1 = 1, df2 = 2", "df1 = 2, df2 = 1", ... 457s "df1 = 5, df2 = 2", "df1 = 10, df2 = 1", ... 457s "df1 = 100, df2 = 100"}, "location", "northwest") 457s title ("F iCDF") 457s xlabel ("probability") 457s ylabel ("values in x") 457s ***** shared p 457s p = [-1 0 0.5 1 2]; 457s ***** assert (finv (p, 2*ones (1,5), 2*ones (1,5)), [NaN 0 1 Inf NaN]) 457s ***** assert (finv (p, 2, 2*ones (1,5)), [NaN 0 1 Inf NaN]) 457s ***** assert (finv (p, 2*ones (1,5), 2), [NaN 0 1 Inf NaN]) 457s ***** assert (finv (p, [2 -Inf NaN Inf 2], 2), [NaN NaN NaN Inf NaN]) 457s ***** assert (finv (p, 2, [2 -Inf NaN Inf 2]), [NaN NaN NaN Inf NaN]) 457s ***** assert (finv ([p(1:2) NaN p(4:5)], 2, 2), [NaN 0 NaN Inf NaN]) 457s ***** assert (finv (0.025, 10, 1e6), 0.3247, 1e-4) 457s ***** assert (finv (0.025, 10, 1e7), 0.3247, 1e-4) 457s ***** assert (finv (0.025, 10, 1e10), 0.3247, 1e-4) 457s ***** assert (finv (0.025, 10, 1e255), 0.3247, 1e-4) 457s ***** assert (finv (0.025, 10, Inf), 0.3247, 1e-4) 457s ***** test 457s x = finv (0.35, Inf, 4); 457s assert (x, 0.9014, 1e-4) 457s ***** test 457s x = finv (0, Inf, 4); 457s assert (x, 0) 457s ***** test 457s x = finv (1, Inf, 4); 457s assert (x, Inf) 457s ***** test 457s x = finv (0.35, 4, Inf); 457s assert (x, 0.6175, 1e-4) 457s ***** test 457s x = finv (0, 4, Inf); 457s assert (x, 0) 457s ***** test 457s x = finv (1, 4, Inf); 457s assert (x, Inf) 457s ***** test 457s x = finv ([0, 0.000001, 0.35, 1, 1.2], Inf, Inf); 457s assert (x, [0, 1, 1, 1, NaN]); 457s ***** assert (finv ([p, NaN], 2, 2), [NaN 0 1 Inf NaN NaN]) 457s ***** assert (finv (single ([p, NaN]), 2, 2), single ([NaN 0 1 Inf NaN NaN])) 457s ***** assert (finv ([p, NaN], single (2), 2), single ([NaN 0 1 Inf NaN NaN])) 457s ***** assert (finv ([p, NaN], 2, single (2)), single ([NaN 0 1 Inf NaN NaN])) 457s ***** error finv () 457s ***** error finv (1) 457s ***** error finv (1,2) 457s ***** error ... 457s finv (ones (3), ones (2), ones (2)) 457s ***** error ... 457s finv (ones (2), ones (3), ones (2)) 457s ***** error ... 457s finv (ones (2), ones (2), ones (3)) 457s ***** error finv (i, 2, 2) 457s ***** error finv (2, i, 2) 457s ***** error finv (2, 2, i) 457s 31 tests, 31 passed, 0 known failure, 0 skipped 457s [inst/dist_fun/fpdf.m] 457s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/fpdf.m 457s ***** demo 457s ## Plot various PDFs from the F distribution 457s x = 0.01:0.01:4; 457s y1 = fpdf (x, 1, 1); 457s y2 = fpdf (x, 2, 1); 457s y3 = fpdf (x, 5, 2); 457s y4 = fpdf (x, 10, 1); 457s y5 = fpdf (x, 100, 100); 457s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-c", x, y5, "-m") 457s grid on 457s ylim ([0, 2.5]) 457s legend ({"df1 = 1, df2 = 2", "df1 = 2, df2 = 1", ... 457s "df1 = 5, df2 = 2", "df1 = 10, df2 = 1", ... 457s "df1 = 100, df2 = 100"}, "location", "northeast") 457s title ("F PDF") 457s xlabel ("values in x") 457s ylabel ("density") 457s ***** shared x, y 457s x = [-1, 0, 0.5, 1, 2]; 457s y = [0, 0, 4/9, 1/4, 1/9]; 457s ***** assert (fpdf (x, 2*ones (1,5), 2*ones (1,5)), y, eps) 457s ***** assert (fpdf (x, 2, 2*ones (1,5)), y, eps) 457s ***** assert (fpdf (x, 2*ones (1,5), 2), y, eps) 457s ***** assert (fpdf (x, [0, NaN, Inf, 2, 2], 2), [NaN, NaN, 0.5413, y(4:5)], 1e-4) 457s ***** assert (fpdf (x, 2, [0, NaN, Inf, 2, 2]), [NaN, NaN, 0.6065, y(4:5)], 1e-4) 457s ***** assert (fpdf ([x, NaN], 2, 2), [y, NaN], eps) 457s ***** test #F (x, 1, df1) == T distribution (sqrt (x), df1) / sqrt (x) 457s rand ("seed", 1234); # for reproducibility 457s xr = rand (10,1); 457s xr = xr(x > 0.1 & x < 0.9); 457s yr = tpdf (sqrt (xr), 2) ./ sqrt (xr); 457s assert (fpdf (xr, 1, 2), yr, 5*eps); 457s ***** test 457s yy = fpdf (2, 4, Inf); 457s assert (yy, 0.1465, 1e-4) 457s ***** test 457s yy = fpdf (2, 4, 1000000000000000); 457s assert (yy, 0.1465, 1e-4) 457s ***** test 457s yy = fpdf (2, Inf, 4); 457s assert (yy, 0.1839, 1e-4) 457s ***** test 457s yy = fpdf (2, 10000000000000000, 4); 457s assert (yy, 0.1839, 1e-4) 457s ***** test 457s yy = fpdf (2, Inf, Inf); 457s assert (yy, 0) 457s ***** test 457s yy = fpdf (NaN, Inf, Inf); 457s assert (yy, NaN) 457s ***** assert (fpdf (single ([x, NaN]), 2, 2), single ([y, NaN]), eps ("single")) 457s ***** assert (fpdf ([x, NaN], single (2), 2), single ([y, NaN]), eps ("single")) 457s ***** assert (fpdf ([x, NaN], 2, single (2)), single ([y, NaN]), eps ("single")) 457s ***** error fpdf () 457s ***** error fpdf (1) 457s ***** error fpdf (1,2) 457s ***** error ... 457s fpdf (ones (3), ones (2), ones (2)) 457s ***** error ... 457s fpdf (ones (2), ones (3), ones (2)) 457s ***** error ... 457s fpdf (ones (2), ones (2), ones (3)) 458s ***** error fpdf (i, 2, 2) 458s ***** error fpdf (2, i, 2) 458s ***** error fpdf (2, 2, i) 458s 25 tests, 25 passed, 0 known failure, 0 skipped 458s [inst/dist_fun/frnd.m] 458s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/frnd.m 458s ***** assert (size (frnd (1, 1)), [1 1]) 458s ***** assert (size (frnd (1, ones (2,1))), [2, 1]) 458s ***** assert (size (frnd (1, ones (2,2))), [2, 2]) 458s ***** assert (size (frnd (ones (2,1), 1)), [2, 1]) 458s ***** assert (size (frnd (ones (2,2), 1)), [2, 2]) 458s ***** assert (size (frnd (1, 1, 3)), [3, 3]) 458s ***** assert (size (frnd (1, 1, [4, 1])), [4, 1]) 458s ***** assert (size (frnd (1, 1, 4, 1)), [4, 1]) 458s ***** assert (size (frnd (1, 1, 4, 1, 5)), [4, 1, 5]) 458s ***** assert (size (frnd (1, 1, 0, 1)), [0, 1]) 458s ***** assert (size (frnd (1, 1, 1, 0)), [1, 0]) 458s ***** assert (size (frnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 458s ***** assert (class (frnd (1, 1)), "double") 458s ***** assert (class (frnd (1, single (1))), "single") 458s ***** assert (class (frnd (1, single ([1, 1]))), "single") 458s ***** assert (class (frnd (single (1), 1)), "single") 458s ***** assert (class (frnd (single ([1, 1]), 1)), "single") 458s ***** error frnd () 458s ***** error frnd (1) 458s ***** error ... 458s frnd (ones (3), ones (2)) 458s ***** error ... 458s frnd (ones (2), ones (3)) 458s ***** error frnd (i, 2, 3) 458s ***** error frnd (1, i, 3) 458s ***** error ... 458s frnd (1, 2, -1) 458s ***** error ... 458s frnd (1, 2, 1.2) 458s ***** error ... 458s frnd (1, 2, ones (2)) 458s ***** error ... 458s frnd (1, 2, [2 -1 2]) 458s ***** error ... 458s frnd (1, 2, [2 0 2.5]) 458s ***** error ... 458s frnd (1, 2, 2, -1, 5) 458s ***** error ... 458s frnd (1, 2, 2, 1.5, 5) 458s ***** error ... 458s frnd (2, ones (2), 3) 458s ***** error ... 458s frnd (2, ones (2), [3, 2]) 458s ***** error ... 458s frnd (2, ones (2), 3, 2) 458s 33 tests, 33 passed, 0 known failure, 0 skipped 458s [inst/dist_fun/gamcdf.m] 458s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/gamcdf.m 458s ***** demo 458s ## Plot various CDFs from the Gamma distribution 458s x = 0:0.01:20; 458s p1 = gamcdf (x, 1, 2); 458s p2 = gamcdf (x, 2, 2); 458s p3 = gamcdf (x, 3, 2); 458s p4 = gamcdf (x, 5, 1); 458s p5 = gamcdf (x, 9, 0.5); 458s p6 = gamcdf (x, 7.5, 1); 458s p7 = gamcdf (x, 0.5, 1); 458s plot (x, p1, "-r", x, p2, "-g", x, p3, "-y", x, p4, "-m", ... 458s x, p5, "-k", x, p6, "-b", x, p7, "-c") 458s grid on 458s legend ({"α = 1, β = 2", "α = 2, β = 2", "α = 3, β = 2", ... 458s "α = 5, β = 1", "α = 9, β = 0.5", "α = 7.5, β = 1", ... 458s "α = 0.5, β = 1"}, "location", "southeast") 458s title ("Gamma CDF") 458s xlabel ("values in x") 458s ylabel ("probability") 458s ***** shared x, y, u 458s x = [-1, 0, 0.5, 1, 2, Inf]; 458s y = [0, gammainc(x(2:end), 1)]; 458s u = [0, NaN, NaN, 1, 0.1353352832366127, 0]; 458s ***** assert (gamcdf (x, ones (1,6), ones (1,6)), y, eps) 458s ***** assert (gamcdf (x, ones (1,6), ones (1,6), []), y, eps) 458s ***** assert (gamcdf (x, 1, ones (1,6)), y, eps) 458s ***** assert (gamcdf (x, ones (1,6), 1), y, eps) 458s ***** assert (gamcdf (x, [0, -Inf, NaN, Inf, 1, 1], 1), [1, NaN, NaN, 0, y(5:6)], eps) 458s ***** assert (gamcdf (x, [0, -Inf, NaN, Inf, 1, 1], 1, "upper"), u, eps) 458s ***** assert (gamcdf (x, 1, [0, -Inf, NaN, Inf, 1, 1]), [NaN, NaN, NaN, 0, y(5:6)], eps) 458s ***** assert (gamcdf ([x(1:2), NaN, x(4:6)], 1, 1), [y(1:2), NaN, y(4:6)], eps) 458s ***** assert (gamcdf ([x, NaN], 1, 1), [y, NaN]) 458s ***** assert (gamcdf (single ([x, NaN]), 1, 1), single ([y, NaN]), eps ("single")) 458s ***** assert (gamcdf ([x, NaN], single (1), 1), single ([y, NaN]), eps ("single")) 458s ***** assert (gamcdf ([x, NaN], 1, single (1)), single ([y, NaN]), eps ("single")) 458s ***** error gamcdf () 458s ***** error gamcdf (1) 458s ***** error gamcdf (1, 2, 3, 4, 5, 6, 7) 458s ***** error gamcdf (1, 2, 3, "uper") 458s ***** error gamcdf (1, 2, 3, 4, 5, "uper") 458s ***** error gamcdf (2, 3, 4, [1, 2]) 458s ***** error ... 458s [p, plo, pup] = gamcdf (1, 2, 3) 458s ***** error ... 458s [p, plo, pup] = gamcdf (1, 2, 3, "upper") 458s ***** error [p, plo, pup] = ... 458s gamcdf (1, 2, 3, [1, 0; 0, 1], 0) 458s ***** error [p, plo, pup] = ... 458s gamcdf (1, 2, 3, [1, 0; 0, 1], 1.22) 458s ***** error [p, plo, pup] = ... 458s gamcdf (1, 2, 3, [1, 0; 0, 1], "alpha", "upper") 458s ***** error ... 458s gamcdf (ones (3), ones (2), ones (2)) 458s ***** error ... 458s gamcdf (ones (2), ones (3), ones (2)) 458s ***** error ... 458s gamcdf (ones (2), ones (2), ones (3)) 458s ***** error gamcdf (i, 2, 2) 458s ***** error gamcdf (2, i, 2) 458s ***** error gamcdf (2, 2, i) 458s ***** error ... 458s [p, plo, pup] = gamcdf (1, 2, 3, [1, 0; 0, -inf], 0.04) 458s 30 tests, 30 passed, 0 known failure, 0 skipped 458s [inst/dist_fun/gaminv.m] 458s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/gaminv.m 458s ***** demo 458s ## Plot various iCDFs from the Gamma distribution 458s p = 0.001:0.001:0.999; 458s x1 = gaminv (p, 1, 2); 458s x2 = gaminv (p, 2, 2); 458s x3 = gaminv (p, 3, 2); 458s x4 = gaminv (p, 5, 1); 458s x5 = gaminv (p, 9, 0.5); 458s x6 = gaminv (p, 7.5, 1); 458s x7 = gaminv (p, 0.5, 1); 458s plot (p, x1, "-r", p, x2, "-g", p, x3, "-y", p, x4, "-m", ... 458s p, x5, "-k", p, x6, "-b", p, x7, "-c") 458s ylim ([0, 20]) 458s grid on 458s legend ({"α = 1, β = 2", "α = 2, β = 2", "α = 3, β = 2", ... 458s "α = 5, β = 1", "α = 9, β = 0.5", "α = 7.5, β = 1", ... 458s "α = 0.5, β = 1"}, "location", "northwest") 458s title ("Gamma iCDF") 458s xlabel ("probability") 458s ylabel ("x") 458s ***** shared p 458s p = [-1 0 0.63212055882855778 1 2]; 458s ***** assert (gaminv (p, ones (1,5), ones (1,5)), [NaN 0 1 Inf NaN], eps) 458s ***** assert (gaminv (p, 1, ones (1,5)), [NaN 0 1 Inf NaN], eps) 458s ***** assert (gaminv (p, ones (1,5), 1), [NaN 0 1 Inf NaN], eps) 458s ***** assert (gaminv (p, [1 -Inf NaN Inf 1], 1), [NaN NaN NaN NaN NaN]) 458s ***** assert (gaminv (p, 1, [1 -Inf NaN Inf 1]), [NaN NaN NaN NaN NaN]) 458s ***** assert (gaminv ([p(1:2) NaN p(4:5)], 1, 1), [NaN 0 NaN Inf NaN]) 458s ***** assert (gaminv ([p(1:2) NaN p(4:5)], 1, 1), [NaN 0 NaN Inf NaN]) 458s ***** assert (gaminv (1e-16, 1, 1), 1e-16, eps) 458s ***** assert (gaminv (1e-16, 1, 2), 2e-16, eps) 458s ***** assert (gaminv (1e-20, 3, 5), 1.957434012161815e-06, eps) 458s ***** assert (gaminv (1e-15, 1, 1), 1e-15, eps) 458s ***** assert (gaminv (1e-35, 1, 1), 1e-35, eps) 458s ***** assert (gaminv ([p, NaN], 1, 1), [NaN 0 1 Inf NaN NaN], eps) 458s ***** assert (gaminv (single ([p, NaN]), 1, 1), single ([NaN 0 1 Inf NaN NaN]), ... 458s eps ("single")) 458s ***** assert (gaminv ([p, NaN], single (1), 1), single ([NaN 0 1 Inf NaN NaN]), ... 458s eps ("single")) 458s ***** assert (gaminv ([p, NaN], 1, single (1)), single ([NaN 0 1 Inf NaN NaN]), ... 458s eps ("single")) 458s ***** error gaminv () 458s ***** error gaminv (1) 458s ***** error gaminv (1,2) 458s ***** error ... 458s gaminv (ones (3), ones (2), ones (2)) 458s ***** error ... 458s gaminv (ones (2), ones (3), ones (2)) 458s ***** error ... 458s gaminv (ones (2), ones (2), ones (3)) 458s ***** error gaminv (i, 2, 2) 458s ***** error gaminv (2, i, 2) 458s ***** error gaminv (2, 2, i) 458s 25 tests, 25 passed, 0 known failure, 0 skipped 458s [inst/dist_fun/gampdf.m] 458s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/gampdf.m 458s ***** demo 458s ## Plot various PDFs from the Gamma distribution 458s x = 0:0.01:20; 458s y1 = gampdf (x, 1, 2); 458s y2 = gampdf (x, 2, 2); 458s y3 = gampdf (x, 3, 2); 458s y4 = gampdf (x, 5, 1); 458s y5 = gampdf (x, 9, 0.5); 458s y6 = gampdf (x, 7.5, 1); 458s y7 = gampdf (x, 0.5, 1); 458s plot (x, y1, "-r", x, y2, "-g", x, y3, "-y", x, y4, "-m", ... 458s x, y5, "-k", x, y6, "-b", x, y7, "-c") 458s grid on 458s ylim ([0,0.5]) 458s legend ({"α = 1, β = 2", "α = 2, β = 2", "α = 3, β = 2", ... 458s "α = 5, β = 1", "α = 9, β = 0.5", "α = 7.5, β = 1", ... 458s "α = 0.5, β = 1"}, "location", "northeast") 458s title ("Gamma PDF") 458s xlabel ("values in x") 458s ylabel ("density") 458s ***** shared x, y 458s x = [-1 0 0.5 1 Inf]; 458s y = [0 exp(-x(2:end))]; 458s ***** assert (gampdf (x, ones (1,5), ones (1,5)), y) 458s ***** assert (gampdf (x, 1, ones (1,5)), y) 458s ***** assert (gampdf (x, ones (1,5), 1), y) 458s ***** assert (gampdf (x, [0 -Inf NaN Inf 1], 1), [NaN NaN NaN 0 y(5)]) 458s ***** assert (gampdf (x, [0 Inf NaN Inf 1], 1), [NaN 0 NaN 0 y(5)]) 458s ***** assert (gampdf (x, 1, [0 -Inf NaN Inf 1]), [NaN NaN NaN 0 y(5)]) 458s ***** assert (gampdf ([x, NaN], 1, 1), [y, NaN]) 458s ***** assert (gampdf (2, Inf, 4), 0) 458s ***** assert (gampdf (2, 4, Inf), 0) 458s ***** assert (gampdf (2, Inf, Inf), 0) 458s ***** assert (gampdf (single ([x, NaN]), 1, 1), single ([y, NaN])) 458s ***** assert (gampdf ([x, NaN], single (1), 1), single ([y, NaN])) 458s ***** assert (gampdf ([x, NaN], 1, single (1)), single ([y, NaN])) 458s ***** error gampdf () 458s ***** error gampdf (1) 458s ***** error gampdf (1,2) 458s ***** error ... 458s gampdf (ones (3), ones (2), ones (2)) 458s ***** error ... 458s gampdf (ones (2), ones (3), ones (2)) 458s ***** error ... 458s gampdf (ones (2), ones (2), ones (3)) 458s ***** error gampdf (i, 2, 2) 458s ***** error gampdf (2, i, 2) 458s ***** error gampdf (2, 2, i) 458s 22 tests, 22 passed, 0 known failure, 0 skipped 458s [inst/dist_fun/gamrnd.m] 458s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/gamrnd.m 458s ***** assert (size (gamrnd (1, 1)), [1 1]) 458s ***** assert (size (gamrnd (1, ones (2,1))), [2, 1]) 458s ***** assert (size (gamrnd (1, ones (2,2))), [2, 2]) 458s ***** assert (size (gamrnd (ones (2,1), 1)), [2, 1]) 458s ***** assert (size (gamrnd (ones (2,2), 1)), [2, 2]) 458s ***** assert (size (gamrnd (1, 1, 3)), [3, 3]) 458s ***** assert (size (gamrnd (1, 1, [4, 1])), [4, 1]) 458s ***** assert (size (gamrnd (1, 1, 4, 1)), [4, 1]) 458s ***** assert (size (gamrnd (1, 1, 4, 1, 5)), [4, 1, 5]) 458s ***** assert (size (gamrnd (1, 1, 0, 1)), [0, 1]) 458s ***** assert (size (gamrnd (1, 1, 1, 0)), [1, 0]) 458s ***** assert (size (gamrnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 458s ***** assert (class (gamrnd (1, 1)), "double") 458s ***** assert (class (gamrnd (1, single (1))), "single") 458s ***** assert (class (gamrnd (1, single ([1, 1]))), "single") 458s ***** assert (class (gamrnd (single (1), 1)), "single") 458s ***** assert (class (gamrnd (single ([1, 1]), 1)), "single") 458s ***** error gamrnd () 458s ***** error gamrnd (1) 458s ***** error ... 458s gamrnd (ones (3), ones (2)) 458s ***** error ... 458s gamrnd (ones (2), ones (3)) 458s ***** error gamrnd (i, 2, 3) 458s ***** error gamrnd (1, i, 3) 458s ***** error ... 458s gamrnd (1, 2, -1) 458s ***** error ... 458s gamrnd (1, 2, 1.2) 458s ***** error ... 458s gamrnd (1, 2, ones (2)) 458s ***** error ... 458s gamrnd (1, 2, [2 -1 2]) 458s ***** error ... 458s gamrnd (1, 2, [2 0 2.5]) 458s ***** error ... 458s gamrnd (1, 2, 2, -1, 5) 458s ***** error ... 458s gamrnd (1, 2, 2, 1.5, 5) 458s ***** error ... 458s gamrnd (2, ones (2), 3) 458s ***** error ... 458s gamrnd (2, ones (2), [3, 2]) 458s ***** error ... 458s gamrnd (2, ones (2), 3, 2) 458s 33 tests, 33 passed, 0 known failure, 0 skipped 458s [inst/dist_fun/geocdf.m] 458s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/geocdf.m 458s ***** demo 458s ## Plot various CDFs from the geometric distribution 458s x = 0:10; 458s p1 = geocdf (x, 0.2); 458s p2 = geocdf (x, 0.5); 458s p3 = geocdf (x, 0.7); 458s plot (x, p1, "*b", x, p2, "*g", x, p3, "*r") 458s grid on 458s xlim ([0, 10]) 458s legend ({"ps = 0.2", "ps = 0.5", "ps = 0.7"}, "location", "southeast") 458s title ("Geometric CDF") 458s xlabel ("values in x (number of failures)") 458s ylabel ("probability") 458s ***** test 458s p = geocdf ([1, 2, 3, 4], 0.25); 458s assert (p(1), 0.4375000000, 1e-14); 458s assert (p(2), 0.5781250000, 1e-14); 458s assert (p(3), 0.6835937500, 1e-14); 458s assert (p(4), 0.7626953125, 1e-14); 458s ***** test 458s p = geocdf ([1, 2, 3, 4], 0.25, "upper"); 458s assert (p(1), 0.5625000000, 1e-14); 458s assert (p(2), 0.4218750000, 1e-14); 458s assert (p(3), 0.3164062500, 1e-14); 458s assert (p(4), 0.2373046875, 1e-14); 458s ***** shared x, p 458s x = [-1 0 1 Inf]; 458s p = [0 0.5 0.75 1]; 458s ***** assert (geocdf (x, 0.5*ones (1,4)), p) 458s ***** assert (geocdf (x, 0.5), p) 458s ***** assert (geocdf (x, 0.5*[-1 NaN 4 1]), [NaN NaN NaN p(4)]) 458s ***** assert (geocdf ([x(1:2) NaN x(4)], 0.5), [p(1:2) NaN p(4)]) 458s ***** assert (geocdf ([x, NaN], 0.5), [p, NaN]) 458s ***** assert (geocdf (single ([x, NaN]), 0.5), single ([p, NaN])) 458s ***** assert (geocdf ([x, NaN], single (0.5)), single ([p, NaN])) 458s ***** error geocdf () 458s ***** error geocdf (1) 458s ***** error ... 458s geocdf (ones (3), ones (2)) 458s ***** error ... 458s geocdf (ones (2), ones (3)) 458s ***** error geocdf (i, 2) 458s ***** error geocdf (2, i) 458s ***** error geocdf (2, 3, "tail") 458s ***** error geocdf (2, 3, 5) 458s 17 tests, 17 passed, 0 known failure, 0 skipped 458s [inst/dist_fun/geoinv.m] 458s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/geoinv.m 458s ***** demo 458s ## Plot various iCDFs from the geometric distribution 458s p = 0.001:0.001:0.999; 458s x1 = geoinv (p, 0.2); 458s x2 = geoinv (p, 0.5); 458s x3 = geoinv (p, 0.7); 458s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r") 458s grid on 458s ylim ([0, 10]) 458s legend ({"ps = 0.2", "ps = 0.5", "ps = 0.7"}, "location", "northwest") 458s title ("Geometric iCDF") 458s xlabel ("probability") 458s ylabel ("values in x (number of failures)") 458s ***** shared p 458s p = [-1 0 0.75 1 2]; 458s ***** assert (geoinv (p, 0.5*ones (1,5)), [NaN 0 1 Inf NaN]) 458s ***** assert (geoinv (p, 0.5), [NaN 0 1 Inf NaN]) 458s ***** assert (geoinv (p, 0.5*[1 -1 NaN 4 1]), [NaN NaN NaN NaN NaN]) 458s ***** assert (geoinv ([p(1:2) NaN p(4:5)], 0.5), [NaN 0 NaN Inf NaN]) 458s ***** assert (geoinv ([p, NaN], 0.5), [NaN 0 1 Inf NaN NaN]) 458s ***** assert (geoinv (single ([p, NaN]), 0.5), single ([NaN 0 1 Inf NaN NaN])) 458s ***** assert (geoinv ([p, NaN], single (0.5)), single ([NaN 0 1 Inf NaN NaN])) 458s ***** error geoinv () 458s ***** error geoinv (1) 458s ***** error ... 458s geoinv (ones (3), ones (2)) 458s ***** error ... 458s geoinv (ones (2), ones (3)) 458s ***** error ... 458s geoinv (i, 2) 458s ***** error ... 458s geoinv (2, i) 458s 13 tests, 13 passed, 0 known failure, 0 skipped 458s [inst/dist_fun/geopdf.m] 458s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/geopdf.m 458s ***** demo 458s ## Plot various PDFs from the geometric distribution 458s x = 0:10; 458s y1 = geopdf (x, 0.2); 458s y2 = geopdf (x, 0.5); 458s y3 = geopdf (x, 0.7); 458s plot (x, y1, "*b", x, y2, "*g", x, y3, "*r") 458s grid on 458s ylim ([0, 0.8]) 458s legend ({"ps = 0.2", "ps = 0.5", "ps = 0.7"}, "location", "northeast") 458s title ("Geometric PDF") 458s xlabel ("values in x (number of failures)") 458s ylabel ("density") 458s ***** shared x, y 458s x = [-1 0 1 Inf]; 458s y = [0, 1/2, 1/4, NaN]; 458s ***** assert (geopdf (x, 0.5*ones (1,4)), y) 458s ***** assert (geopdf (x, 0.5), y) 458s ***** assert (geopdf (x, 0.5*[-1 NaN 4 1]), [NaN NaN NaN y(4)]) 458s ***** assert (geopdf ([x, NaN], 0.5), [y, NaN]) 458s ***** assert (geopdf (single ([x, NaN]), 0.5), single ([y, NaN]), 5*eps ("single")) 458s ***** assert (geopdf ([x, NaN], single (0.5)), single ([y, NaN]), 5*eps ("single")) 458s ***** error geopdf () 458s ***** error geopdf (1) 458s ***** error geopdf (1,2,3) 458s ***** error geopdf (ones (3), ones (2)) 458s ***** error geopdf (ones (2), ones (3)) 458s ***** error geopdf (i, 2) 458s ***** error geopdf (2, i) 458s 13 tests, 13 passed, 0 known failure, 0 skipped 458s [inst/dist_fun/geornd.m] 458s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/geornd.m 458s ***** assert (size (geornd (0.5)), [1, 1]) 458s ***** assert (size (geornd (0.5*ones (2,1))), [2, 1]) 458s ***** assert (size (geornd (0.5*ones (2,2))), [2, 2]) 458s ***** assert (size (geornd (0.5, 3)), [3, 3]) 458s ***** assert (size (geornd (0.5, [4 1])), [4, 1]) 458s ***** assert (size (geornd (0.5, 4, 1)), [4, 1]) 458s ***** assert (class (geornd (0.5)), "double") 458s ***** assert (class (geornd (single (0.5))), "single") 458s ***** assert (class (geornd (single ([0.5 0.5]))), "single") 458s ***** assert (class (geornd (single (0))), "single") 458s ***** assert (class (geornd (single (1))), "single") 458s ***** error geornd () 458s ***** error geornd (i) 458s ***** error ... 458s geornd (1, -1) 458s ***** error ... 458s geornd (1, 1.2) 458s ***** error ... 458s geornd (1, ones (2)) 458s ***** error ... 458s geornd (1, [2 -1 2]) 458s ***** error ... 458s geornd (1, [2 0 2.5]) 458s ***** error ... 458s geornd (ones (2), ones (2)) 458s ***** error ... 458s geornd (1, 2, -1, 5) 458s ***** error ... 458s geornd (1, 2, 1.5, 5) 458s ***** error geornd (ones (2,2), 3) 458s ***** error geornd (ones (2,2), [3, 2]) 458s ***** error geornd (ones (2,2), 2, 3) 458s 24 tests, 24 passed, 0 known failure, 0 skipped 458s [inst/dist_fun/gevcdf.m] 458s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/gevcdf.m 458s ***** demo 458s ## Plot various CDFs from the generalized extreme value distribution 458s x = -1:0.001:10; 458s p1 = gevcdf (x, 1, 1, 1); 458s p2 = gevcdf (x, 0.5, 1, 1); 458s p3 = gevcdf (x, 1, 1, 5); 458s p4 = gevcdf (x, 1, 2, 5); 458s p5 = gevcdf (x, 1, 5, 5); 458s p6 = gevcdf (x, 1, 0.5, 5); 458s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", ... 458s x, p4, "-c", x, p5, "-m", x, p6, "-k") 458s grid on 458s xlim ([-1, 10]) 458s legend ({"k = 1, σ = 1, μ = 1", "k = 0.5, σ = 1, μ = 1", ... 458s "k = 1, σ = 1, μ = 5", "k = 1, σ = 2, μ = 5", ... 458s "k = 1, σ = 5, μ = 5", "k = 1, σ = 0.5, μ = 5"}, ... 458s "location", "southeast") 458s title ("Generalized extreme value CDF") 458s xlabel ("values in x") 458s ylabel ("probability") 458s ***** test 458s x = 0:0.5:2.5; 458s sigma = 1:6; 458s k = 1; 458s mu = 0; 458s p = gevcdf (x, k, sigma, mu); 458s expected_p = [0.36788, 0.44933, 0.47237, 0.48323, 0.48954, 0.49367]; 458s assert (p, expected_p, 0.001); 458s ***** test 458s x = -0.5:0.5:2.5; 458s sigma = 0.5; 458s k = 1; 458s mu = 0; 458s p = gevcdf (x, k, sigma, mu); 458s expected_p = [0, 0.36788, 0.60653, 0.71653, 0.77880, 0.81873, 0.84648]; 458s assert (p, expected_p, 0.001); 458s ***** test # check for continuity for k near 0 458s x = 1; 458s sigma = 0.5; 458s k = -0.03:0.01:0.03; 458s mu = 0; 458s p = gevcdf (x, k, sigma, mu); 458s expected_p = [0.88062, 0.87820, 0.87580, 0.87342, 0.87107, 0.86874, 0.86643]; 458s assert (p, expected_p, 0.001); 458s ***** error gevcdf () 458s ***** error gevcdf (1) 458s ***** error gevcdf (1, 2) 458s ***** error gevcdf (1, 2, 3) 458s ***** error ... 458s gevcdf (1, 2, 3, 4, 5, 6) 458s ***** error gevcdf (1, 2, 3, 4, "tail") 458s ***** error gevcdf (1, 2, 3, 4, 5) 458s ***** error ... 458s gevcdf (ones (3), ones (2), ones(2), ones(2)) 458s ***** error ... 458s gevcdf (ones (2), ones (3), ones(2), ones(2)) 458s ***** error ... 458s gevcdf (ones (2), ones (2), ones(3), ones(2)) 459s ***** error ... 459s gevcdf (ones (2), ones (2), ones(2), ones(3)) 459s ***** error gevcdf (i, 2, 3, 4) 459s ***** error gevcdf (1, i, 3, 4) 459s ***** error gevcdf (1, 2, i, 4) 459s ***** error gevcdf (1, 2, 3, i) 459s 18 tests, 18 passed, 0 known failure, 0 skipped 459s [inst/dist_fun/gevinv.m] 459s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/gevinv.m 459s ***** demo 459s ## Plot various iCDFs from the generalized extreme value distribution 459s p = 0.001:0.001:0.999; 459s x1 = gevinv (p, 1, 1, 1); 459s x2 = gevinv (p, 0.5, 1, 1); 459s x3 = gevinv (p, 1, 1, 5); 459s x4 = gevinv (p, 1, 2, 5); 459s x5 = gevinv (p, 1, 5, 5); 459s x6 = gevinv (p, 1, 0.5, 5); 459s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", ... 459s p, x4, "-c", p, x5, "-m", p, x6, "-k") 459s grid on 459s ylim ([-1, 10]) 459s legend ({"k = 1, σ = 1, μ = 1", "k = 0.5, σ = 1, μ = 1", ... 459s "k = 1, σ = 1, μ = 5", "k = 1, σ = 2, μ = 5", ... 459s "k = 1, σ = 5, μ = 5", "k = 1, σ = 0.5, μ = 5"}, ... 459s "location", "northwest") 459s title ("Generalized extreme value iCDF") 459s xlabel ("probability") 459s ylabel ("values in x") 459s ***** test 459s p = 0.1:0.1:0.9; 459s k = 0; 459s sigma = 1; 459s mu = 0; 459s x = gevinv (p, k, sigma, mu); 459s c = gevcdf(x, k, sigma, mu); 459s assert (c, p, 0.001); 459s ***** test 459s p = 0.1:0.1:0.9; 459s k = 1; 459s sigma = 1; 459s mu = 0; 459s x = gevinv (p, k, sigma, mu); 459s c = gevcdf(x, k, sigma, mu); 459s assert (c, p, 0.001); 459s ***** test 459s p = 0.1:0.1:0.9; 459s k = 0.3; 459s sigma = 1; 459s mu = 0; 459s x = gevinv (p, k, sigma, mu); 459s c = gevcdf(x, k, sigma, mu); 459s assert (c, p, 0.001); 459s ***** error gevinv () 459s ***** error gevinv (1) 459s ***** error gevinv (1, 2) 459s ***** error gevinv (1, 2, 3) 459s ***** error ... 459s gevinv (ones (3), ones (2), ones(2), ones(2)) 459s ***** error ... 459s gevinv (ones (2), ones (3), ones(2), ones(2)) 459s ***** error ... 459s gevinv (ones (2), ones (2), ones(3), ones(2)) 459s ***** error ... 459s gevinv (ones (2), ones (2), ones(2), ones(3)) 459s ***** error gevinv (i, 2, 3, 4) 459s ***** error gevinv (1, i, 3, 4) 459s ***** error gevinv (1, 2, i, 4) 459s ***** error gevinv (1, 2, 3, i) 459s 15 tests, 15 passed, 0 known failure, 0 skipped 459s [inst/dist_fun/gevpdf.m] 459s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/gevpdf.m 459s ***** demo 459s ## Plot various PDFs from the generalized extreme value distribution 459s x = -1:0.001:10; 459s y1 = gevpdf (x, 1, 1, 1); 459s y2 = gevpdf (x, 0.5, 1, 1); 459s y3 = gevpdf (x, 1, 1, 5); 459s y4 = gevpdf (x, 1, 2, 5); 459s y5 = gevpdf (x, 1, 5, 5); 459s y6 = gevpdf (x, 1, 0.5, 5); 459s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", ... 459s x, y4, "-c", x, y5, "-m", x, y6, "-k") 459s grid on 459s xlim ([-1, 10]) 459s ylim ([0, 1.1]) 459s legend ({"k = 1, σ = 1, μ = 1", "k = 0.5, σ = 1, μ = 1", ... 459s "k = 1, σ = 1, μ = 5", "k = 1, σ = 2, μ = 5", ... 459s "k = 1, σ = 5, μ = 5", "k = 1, σ = 0.5, μ = 5"}, ... 459s "location", "northeast") 459s title ("Generalized extreme value PDF") 459s xlabel ("values in x") 459s ylabel ("density") 459s ***** test 459s x = 0:0.5:2.5; 459s sigma = 1:6; 459s k = 1; 459s mu = 0; 459s y = gevpdf (x, k, sigma, mu); 459s expected_y = [0.367879 0.143785 0.088569 0.063898 0.049953 0.040997]; 459s assert (y, expected_y, 0.001); 459s ***** test 459s x = -0.5:0.5:2.5; 459s sigma = 0.5; 459s k = 1; 459s mu = 0; 459s y = gevpdf (x, k, sigma, mu); 459s expected_y = [0 0.735759 0.303265 0.159229 0.097350 0.065498 0.047027]; 459s assert (y, expected_y, 0.001); 459s ***** test # check for continuity for k near 0 459s x = 1; 459s sigma = 0.5; 459s k = -0.03:0.01:0.03; 459s mu = 0; 459s y = gevpdf (x, k, sigma, mu); 459s expected_y = [0.23820 0.23764 0.23704 0.23641 0.23576 0.23508 0.23438]; 459s assert (y, expected_y, 0.001); 459s ***** error gevpdf () 459s ***** error gevpdf (1) 459s ***** error gevpdf (1, 2) 459s ***** error gevpdf (1, 2, 3) 459s ***** error ... 459s gevpdf (ones (3), ones (2), ones(2), ones(2)) 459s ***** error ... 459s gevpdf (ones (2), ones (3), ones(2), ones(2)) 459s ***** error ... 459s gevpdf (ones (2), ones (2), ones(3), ones(2)) 459s ***** error ... 459s gevpdf (ones (2), ones (2), ones(2), ones(3)) 459s ***** error gevpdf (i, 2, 3, 4) 459s ***** error gevpdf (1, i, 3, 4) 459s ***** error gevpdf (1, 2, i, 4) 459s ***** error gevpdf (1, 2, 3, i) 459s 15 tests, 15 passed, 0 known failure, 0 skipped 459s [inst/dist_fun/gevrnd.m] 459s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/gevrnd.m 459s ***** assert(size (gevrnd (1,2,1)), [1, 1]); 459s ***** assert(size (gevrnd (ones(2,1), 2, 1)), [2, 1]); 459s ***** assert(size (gevrnd (ones(2,2), 2, 1)), [2, 2]); 459s ***** assert(size (gevrnd (1, 2*ones(2,1), 1)), [2, 1]); 459s ***** assert(size (gevrnd (1, 2*ones(2,2), 1)), [2, 2]); 459s ***** assert(size (gevrnd (1, 2, 1, 3)), [3, 3]); 459s ***** assert(size (gevrnd (1, 2, 1, [4 1])), [4, 1]); 459s ***** assert(size (gevrnd (1, 2, 1, 4, 1)), [4, 1]); 459s ***** assert (class (gevrnd (1,1,1)), "double") 459s ***** assert (class (gevrnd (single (1),1,1)), "single") 459s ***** assert (class (gevrnd (single ([1 1]),1,1)), "single") 459s ***** assert (class (gevrnd (1,single (1),1)), "single") 459s ***** assert (class (gevrnd (1,single ([1 1]),1)), "single") 459s ***** assert (class (gevrnd (1,1,single (1))), "single") 459s ***** assert (class (gevrnd (1,1,single ([1 1]))), "single") 459s ***** error gevrnd () 459s ***** error gevrnd (1) 459s ***** error gevrnd (1, 2) 459s ***** error ... 459s gevrnd (ones (3), ones (2), ones (2)) 459s ***** error ... 459s gevrnd (ones (2), ones (3), ones (2)) 459s ***** error ... 459s gevrnd (ones (2), ones (2), ones (3)) 459s ***** error gevrnd (i, 2, 3) 459s ***** error gevrnd (1, i, 3) 459s ***** error gevrnd (1, 2, i) 459s ***** error ... 459s gevrnd (1, 2, 3, -1) 459s ***** error ... 459s gevrnd (1, 2, 3, 1.2) 459s ***** error ... 459s gevrnd (1, 2, 3, ones (2)) 459s ***** error ... 459s gevrnd (1, 2, 3, [2 -1 2]) 459s ***** error ... 459s gevrnd (1, 2, 3, [2 0 2.5]) 459s ***** error ... 459s gevrnd (1, 2, 3, 2, -1, 5) 459s ***** error ... 459s gevrnd (1, 2, 3, 2, 1.5, 5) 459s ***** error ... 459s gevrnd (2, ones (2), 2, 3) 459s ***** error ... 459s gevrnd (2, ones (2), 2, [3, 2]) 459s ***** error ... 459s gevrnd (2, ones (2), 2, 3, 2) 459s 34 tests, 34 passed, 0 known failure, 0 skipped 459s [inst/dist_fun/gpcdf.m] 459s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/gpcdf.m 459s ***** demo 459s ## Plot various CDFs from the generalized Pareto distribution 459s x = 0:0.001:5; 459s p1 = gpcdf (x, 1, 1, 0); 459s p2 = gpcdf (x, 5, 1, 0); 459s p3 = gpcdf (x, 20, 1, 0); 459s p4 = gpcdf (x, 1, 2, 0); 459s p5 = gpcdf (x, 5, 2, 0); 459s p6 = gpcdf (x, 20, 2, 0); 459s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", ... 459s x, p4, "-c", x, p5, "-m", x, p6, "-k") 459s grid on 459s xlim ([0, 5]) 459s legend ({"k = 1, σ = 1, θ = 0", "k = 5, σ = 1, θ = 0", ... 459s "k = 20, σ = 1, θ = 0", "k = 1, σ = 2, θ = 0", ... 459s "k = 5, σ = 2, θ = 0", "k = 20, σ = 2, θ = 0"}, ... 459s "location", "northwest") 459s title ("Generalized Pareto CDF") 459s xlabel ("values in x") 459s ylabel ("probability") 459s ***** shared x, y1, y1u, y2, y2u, y3, y3u 459s x = [-Inf, -1, 0, 1/2, 1, Inf]; 459s y1 = [0, 0, 0, 0.3934693402873666, 0.6321205588285577, 1]; 459s y1u = [1, 1, 1, 0.6065306597126334, 0.3678794411714423, 0]; 459s y2 = [0, 0, 0, 1/3, 1/2, 1]; 459s y2u = [1, 1, 1, 2/3, 1/2, 0]; 459s y3 = [0, 0, 0, 1/2, 1, 1]; 459s y3u = [1, 1, 1, 1/2, 0, 0]; 459s ***** assert (gpcdf (x, zeros (1,6), ones (1,6), zeros (1,6)), y1, eps) 459s ***** assert (gpcdf (x, 0, 1, zeros (1,6)), y1, eps) 459s ***** assert (gpcdf (x, 0, ones (1,6), 0), y1, eps) 459s ***** assert (gpcdf (x, zeros (1,6), 1, 0), y1, eps) 459s ***** assert (gpcdf (x, 0, 1, 0), y1, eps) 459s ***** assert (gpcdf (x, 0, 1, [0, 0, 0, NaN, 0, 0]), [y1(1:3), NaN, y1(5:6)], eps) 459s ***** assert (gpcdf (x, 0, [1, 1, 1, NaN, 1, 1], 0), [y1(1:3), NaN, y1(5:6)], eps) 459s ***** assert (gpcdf (x, [0, 0, 0, NaN, 0, 0], 1, 0), [y1(1:3), NaN, y1(5:6)], eps) 459s ***** assert (gpcdf ([x(1:3), NaN, x(5:6)], 0, 1, 0), [y1(1:3), NaN, y1(5:6)], eps) 459s ***** assert (gpcdf (x, zeros (1,6), ones (1,6), zeros (1,6), "upper"), y1u, eps) 459s ***** assert (gpcdf (x, 0, 1, zeros (1,6), "upper"), y1u, eps) 459s ***** assert (gpcdf (x, 0, ones (1,6), 0, "upper"), y1u, eps) 459s ***** assert (gpcdf (x, zeros (1,6), 1, 0, "upper"), y1u, eps) 459s ***** assert (gpcdf (x, 0, 1, 0, "upper"), y1u, eps) 459s ***** assert (gpcdf (x, ones (1,6), ones (1,6), zeros (1,6)), y2, eps) 459s ***** assert (gpcdf (x, 1, 1, zeros (1,6)), y2, eps) 459s ***** assert (gpcdf (x, 1, ones (1,6), 0), y2, eps) 459s ***** assert (gpcdf (x, ones (1,6), 1, 0), y2, eps) 459s ***** assert (gpcdf (x, 1, 1, 0), y2, eps) 459s ***** assert (gpcdf (x, 1, 1, [0, 0, 0, NaN, 0, 0]), [y2(1:3), NaN, y2(5:6)], eps) 459s ***** assert (gpcdf (x, 1, [1, 1, 1, NaN, 1, 1], 0), [y2(1:3), NaN, y2(5:6)], eps) 459s ***** assert (gpcdf (x, [1, 1, 1, NaN, 1, 1], 1, 0), [y2(1:3), NaN, y2(5:6)], eps) 459s ***** assert (gpcdf ([x(1:3), NaN, x(5:6)], 1, 1, 0), [y2(1:3), NaN, y2(5:6)], eps) 459s ***** assert (gpcdf (x, ones (1,6), ones (1,6), zeros (1,6), "upper"), y2u, eps) 459s ***** assert (gpcdf (x, 1, 1, zeros (1,6), "upper"), y2u, eps) 459s ***** assert (gpcdf (x, 1, ones (1,6), 0, "upper"), y2u, eps) 459s ***** assert (gpcdf (x, ones (1,6), 1, 0, "upper"), y2u, eps) 459s ***** assert (gpcdf (x, 1, 1, 0, "upper"), y2u, eps) 459s ***** assert (gpcdf (x, 1, 1, [0, 0, 0, NaN, 0, 0], "upper"), ... 459s [y2u(1:3), NaN, y2u(5:6)], eps) 459s ***** assert (gpcdf (x, 1, [1, 1, 1, NaN, 1, 1], 0, "upper"), ... 459s [y2u(1:3), NaN, y2u(5:6)], eps) 459s ***** assert (gpcdf (x, [1, 1, 1, NaN, 1, 1], 1, 0, "upper"), ... 459s [y2u(1:3), NaN, y2u(5:6)], eps) 459s ***** assert (gpcdf ([x(1:3), NaN, x(5:6)], 1, 1, 0, "upper"), ... 459s [y2u(1:3), NaN, y2u(5:6)], eps) 459s ***** assert (gpcdf (x, -ones (1,6), ones (1,6), zeros (1,6)), y3, eps) 459s ***** assert (gpcdf (x, -1, 1, zeros (1,6)), y3, eps) 459s ***** assert (gpcdf (x, -1, ones (1,6), 0), y3, eps) 459s ***** assert (gpcdf (x, -ones (1,6), 1, 0), y3, eps) 459s ***** assert (gpcdf (x, -1, 1, 0), y3, eps) 459s ***** assert (gpcdf (x, -1, 1, [0, 0, 0, NaN, 0, 0]), [y3(1:3), NaN, y3(5:6)], eps) 459s ***** assert (gpcdf (x, -1, [1, 1, 1, NaN, 1, 1], 0), [y3(1:3), NaN, y3(5:6)], eps) 459s ***** assert (gpcdf (x, [-1, -1, -1, NaN, -1, -1], 1, 0), [y3(1:3), NaN, y3(5:6)], eps) 459s ***** assert (gpcdf ([x(1:3), NaN, x(5:6)], -1, 1, 0), [y3(1:3), NaN, y3(5:6)], eps) 459s ***** assert (gpcdf (x, -ones (1,6), ones (1,6), zeros (1,6), "upper"), y3u, eps) 459s ***** assert (gpcdf (x, -1, 1, zeros (1,6), "upper"), y3u, eps) 459s ***** assert (gpcdf (x, -1, ones (1,6), 0, "upper"), y3u, eps) 459s ***** assert (gpcdf (x, -ones (1,6), 1, 0, "upper"), y3u, eps) 459s ***** assert (gpcdf (x, -1, 1, 0, "upper"), y3u, eps) 459s ***** assert (gpcdf (x, -1, 1, [0, 0, 0, NaN, 0, 0], "upper"), ... 459s [y3u(1:3), NaN, y3u(5:6)], eps) 459s ***** assert (gpcdf (x, -1, [1, 1, 1, NaN, 1, 1], 0, "upper"), ... 459s [y3u(1:3), NaN, y3u(5:6)], eps) 459s ***** assert (gpcdf (x, [-1, -1, -1, NaN, -1, -1], 1, 0, "upper"), ... 459s [y3u(1:3), NaN, y3u(5:6)], eps) 459s ***** assert (gpcdf ([x(1:3), NaN, x(5:6)], -1, 1, 0, "upper"), ... 459s [y3u(1:3), NaN, y3u(5:6)], eps) 459s ***** assert (gpcdf (single ([x, NaN]), 0, 1, 0), single ([y1, NaN]), eps("single")) 459s ***** assert (gpcdf ([x, NaN], 0, 1, single (0)), single ([y1, NaN]), eps("single")) 459s ***** assert (gpcdf ([x, NaN], 0, single (1), 0), single ([y1, NaN]), eps("single")) 459s ***** assert (gpcdf ([x, NaN], single (0), 1, 0), single ([y1, NaN]), eps("single")) 459s ***** assert (gpcdf (single ([x, NaN]), 1, 1, 0), single ([y2, NaN]), eps("single")) 459s ***** assert (gpcdf ([x, NaN], 1, 1, single (0)), single ([y2, NaN]), eps("single")) 459s ***** assert (gpcdf ([x, NaN], 1, single (1), 0), single ([y2, NaN]), eps("single")) 459s ***** assert (gpcdf ([x, NaN], single (1), 1, 0), single ([y2, NaN]), eps("single")) 459s ***** assert (gpcdf (single ([x, NaN]), -1, 1, 0), single ([y3, NaN]), eps("single")) 459s ***** assert (gpcdf ([x, NaN], -1, 1, single (0)), single ([y3, NaN]), eps("single")) 459s ***** assert (gpcdf ([x, NaN], -1, single (1), 0), single ([y3, NaN]), eps("single")) 459s ***** assert (gpcdf ([x, NaN], single (-1), 1, 0), single ([y3, NaN]), eps("single")) 459s ***** error gpcdf () 459s ***** error gpcdf (1) 459s ***** error gpcdf (1, 2) 459s ***** error gpcdf (1, 2, 3) 459s ***** error gpcdf (1, 2, 3, 4, "tail") 459s ***** error gpcdf (1, 2, 3, 4, 5) 459s ***** error ... 459s gpcdf (ones (3), ones (2), ones(2), ones(2)) 459s ***** error ... 459s gpcdf (ones (2), ones (3), ones(2), ones(2)) 459s ***** error ... 459s gpcdf (ones (2), ones (2), ones(3), ones(2)) 459s ***** error ... 459s gpcdf (ones (2), ones (2), ones(2), ones(3)) 459s ***** error gpcdf (i, 2, 3, 4) 459s ***** error gpcdf (1, i, 3, 4) 459s ***** error gpcdf (1, 2, i, 4) 459s ***** error gpcdf (1, 2, 3, i) 459s 76 tests, 76 passed, 0 known failure, 0 skipped 459s [inst/dist_fun/gpinv.m] 459s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/gpinv.m 459s ***** demo 459s ## Plot various iCDFs from the generalized Pareto distribution 459s p = 0.001:0.001:0.999; 459s x1 = gpinv (p, 1, 1, 0); 459s x2 = gpinv (p, 5, 1, 0); 459s x3 = gpinv (p, 20, 1, 0); 459s x4 = gpinv (p, 1, 2, 0); 459s x5 = gpinv (p, 5, 2, 0); 459s x6 = gpinv (p, 20, 2, 0); 459s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", ... 459s p, x4, "-c", p, x5, "-m", p, x6, "-k") 459s grid on 459s ylim ([0, 5]) 459s legend ({"k = 1, σ = 1, θ = 0", "k = 5, σ = 1, θ = 0", ... 459s "k = 20, σ = 1, θ = 0", "k = 1, σ = 2, θ = 0", ... 459s "k = 5, σ = 2, θ = 0", "k = 20, σ = 2, θ = 0"}, ... 459s "location", "southeast") 459s title ("Generalized Pareto iCDF") 459s xlabel ("probability") 459s ylabel ("values in x") 459s ***** shared p, y1, y2, y3 459s p = [-1, 0, 1/2, 1, 2]; 459s y1 = [NaN, 0, 0.6931471805599453, Inf, NaN]; 459s y2 = [NaN, 0, 1, Inf, NaN]; 459s y3 = [NaN, 0, 1/2, 1, NaN]; 459s ***** assert (gpinv (p, zeros (1,5), ones (1,5), zeros (1,5)), y1) 459s ***** assert (gpinv (p, 0, 1, zeros (1,5)), y1) 459s ***** assert (gpinv (p, 0, ones (1,5), 0), y1) 459s ***** assert (gpinv (p, zeros (1,5), 1, 0), y1) 459s ***** assert (gpinv (p, 0, 1, 0), y1) 459s ***** assert (gpinv (p, 0, 1, [0, 0, NaN, 0, 0]), [y1(1:2), NaN, y1(4:5)]) 459s ***** assert (gpinv (p, 0, [1, 1, NaN, 1, 1], 0), [y1(1:2), NaN, y1(4:5)]) 459s ***** assert (gpinv (p, [0, 0, NaN, 0, 0], 1, 0), [y1(1:2), NaN, y1(4:5)]) 459s ***** assert (gpinv ([p(1:2), NaN, p(4:5)], 0, 1, 0), [y1(1:2), NaN, y1(4:5)]) 459s ***** assert (gpinv (p, ones (1,5), ones (1,5), zeros (1,5)), y2) 459s ***** assert (gpinv (p, 1, 1, zeros (1,5)), y2) 459s ***** assert (gpinv (p, 1, ones (1,5), 0), y2) 459s ***** assert (gpinv (p, ones (1,5), 1, 0), y2) 459s ***** assert (gpinv (p, 1, 1, 0), y2) 459s ***** assert (gpinv (p, 1, 1, [0, 0, NaN, 0, 0]), [y2(1:2), NaN, y2(4:5)]) 459s ***** assert (gpinv (p, 1, [1, 1, NaN, 1, 1], 0), [y2(1:2), NaN, y2(4:5)]) 459s ***** assert (gpinv (p, [1, 1, NaN, 1, 1], 1, 0), [y2(1:2), NaN, y2(4:5)]) 459s ***** assert (gpinv ([p(1:2), NaN, p(4:5)], 1, 1, 0), [y2(1:2), NaN, y2(4:5)]) 459s ***** assert (gpinv (p, -ones (1,5), ones (1,5), zeros (1,5)), y3) 459s ***** assert (gpinv (p, -1, 1, zeros (1,5)), y3) 459s ***** assert (gpinv (p, -1, ones (1,5), 0), y3) 459s ***** assert (gpinv (p, -ones (1,5), 1, 0), y3) 459s ***** assert (gpinv (p, -1, 1, 0), y3) 459s ***** assert (gpinv (p, -1, 1, [0, 0, NaN, 0, 0]), [y3(1:2), NaN, y3(4:5)]) 459s ***** assert (gpinv (p, -1, [1, 1, NaN, 1, 1], 0), [y3(1:2), NaN, y3(4:5)]) 459s ***** assert (gpinv (p, -[1, 1, NaN, 1, 1], 1, 0), [y3(1:2), NaN, y3(4:5)]) 459s ***** assert (gpinv ([p(1:2), NaN, p(4:5)], -1, 1, 0), [y3(1:2), NaN, y3(4:5)]) 459s ***** assert (gpinv (single ([p, NaN]), 0, 1, 0), single ([y1, NaN])) 459s ***** assert (gpinv ([p, NaN], 0, 1, single (0)), single ([y1, NaN])) 459s ***** assert (gpinv ([p, NaN], 0, single (1), 0), single ([y1, NaN])) 459s ***** assert (gpinv ([p, NaN], single (0), 1, 0), single ([y1, NaN])) 459s ***** assert (gpinv (single ([p, NaN]), 1, 1, 0), single ([y2, NaN])) 459s ***** assert (gpinv ([p, NaN], 1, 1, single (0)), single ([y2, NaN])) 459s ***** assert (gpinv ([p, NaN], 1, single (1), 0), single ([y2, NaN])) 459s ***** assert (gpinv ([p, NaN], single (1), 1, 0), single ([y2, NaN])) 459s ***** assert (gpinv (single ([p, NaN]), -1, 1, 0), single ([y3, NaN])) 459s ***** assert (gpinv ([p, NaN], -1, 1, single (0)), single ([y3, NaN])) 459s ***** assert (gpinv ([p, NaN], -1, single (1), 0), single ([y3, NaN])) 459s ***** assert (gpinv ([p, NaN], single (-1), 1, 0), single ([y3, NaN])) 459s ***** error gpinv () 459s ***** error gpinv (1) 459s ***** error gpinv (1, 2) 459s ***** error gpinv (1, 2, 3) 459s ***** error ... 459s gpinv (ones (3), ones (2), ones(2), ones(2)) 459s ***** error ... 459s gpinv (ones (2), ones (3), ones(2), ones(2)) 459s ***** error ... 459s gpinv (ones (2), ones (2), ones(3), ones(2)) 459s ***** error ... 459s gpinv (ones (2), ones (2), ones(2), ones(3)) 459s ***** error gpinv (i, 2, 3, 4) 459s ***** error gpinv (1, i, 3, 4) 459s ***** error gpinv (1, 2, i, 4) 459s ***** error gpinv (1, 2, 3, i) 459s 51 tests, 51 passed, 0 known failure, 0 skipped 459s [inst/dist_fun/gppdf.m] 459s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/gppdf.m 459s ***** demo 459s ## Plot various PDFs from the generalized Pareto distribution 459s x = 0:0.001:5; 459s y1 = gppdf (x, 1, 1, 0); 459s y2 = gppdf (x, 5, 1, 0); 459s y3 = gppdf (x, 20, 1, 0); 459s y4 = gppdf (x, 1, 2, 0); 459s y5 = gppdf (x, 5, 2, 0); 459s y6 = gppdf (x, 20, 2, 0); 459s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", ... 459s x, y4, "-c", x, y5, "-m", x, y6, "-k") 459s grid on 459s xlim ([0, 5]) 459s ylim ([0, 1]) 459s legend ({"k = 1, σ = 1, θ = 0", "k = 5, σ = 1, θ = 0", ... 459s "k = 20, σ = 1, θ = 0", "k = 1, σ = 2, θ = 0", ... 459s "k = 5, σ = 2, θ = 0", "k = 20, σ = 2, θ = 0"}, ... 459s "location", "northeast") 459s title ("Generalized Pareto PDF") 459s xlabel ("values in x") 459s ylabel ("density") 459s ***** shared x, y1, y2, y3 459s x = [-Inf, -1, 0, 1/2, 1, Inf]; 459s y1 = [0, 0, 1, 0.6065306597126334, 0.36787944117144233, 0]; 459s y2 = [0, 0, 1, 4/9, 1/4, 0]; 459s y3 = [0, 0, 1, 1, 1, 0]; 459s ***** assert (gppdf (x, zeros (1,6), ones (1,6), zeros (1,6)), y1, eps) 459s ***** assert (gppdf (x, 0, 1, zeros (1,6)), y1, eps) 459s ***** assert (gppdf (x, 0, ones (1,6), 0), y1, eps) 459s ***** assert (gppdf (x, zeros (1,6), 1, 0), y1, eps) 459s ***** assert (gppdf (x, 0, 1, 0), y1, eps) 459s ***** assert (gppdf (x, 0, 1, [0, 0, 0, NaN, 0, 0]), [y1(1:3), NaN, y1(5:6)]) 459s ***** assert (gppdf (x, 0, [1, 1, 1, NaN, 1, 1], 0), [y1(1:3), NaN, y1(5:6)]) 459s ***** assert (gppdf (x, [0, 0, 0, NaN, 0, 0], 1, 0), [y1(1:3), NaN, y1(5:6)]) 459s ***** assert (gppdf ([x(1:3), NaN, x(5:6)], 0, 1, 0), [y1(1:3), NaN, y1(5:6)]) 459s ***** assert (gppdf (x, ones (1,6), ones (1,6), zeros (1,6)), y2, eps) 459s ***** assert (gppdf (x, 1, 1, zeros (1,6)), y2, eps) 459s ***** assert (gppdf (x, 1, ones (1,6), 0), y2, eps) 459s ***** assert (gppdf (x, ones (1,6), 1, 0), y2, eps) 459s ***** assert (gppdf (x, 1, 1, 0), y2, eps) 459s ***** assert (gppdf (x, 1, 1, [0, 0, 0, NaN, 0, 0]), [y2(1:3), NaN, y2(5:6)]) 459s ***** assert (gppdf (x, 1, [1, 1, 1, NaN, 1, 1], 0), [y2(1:3), NaN, y2(5:6)]) 459s ***** assert (gppdf (x, [1, 1, 1, NaN, 1, 1], 1, 0), [y2(1:3), NaN, y2(5:6)]) 459s ***** assert (gppdf ([x(1:3), NaN, x(5:6)], 1, 1, 0), [y2(1:3), NaN, y2(5:6)]) 459s ***** assert (gppdf (x, -ones (1,6), ones (1,6), zeros (1,6)), y3, eps) 459s ***** assert (gppdf (x, -1, 1, zeros (1,6)), y3, eps) 459s ***** assert (gppdf (x, -1, ones (1,6), 0), y3, eps) 459s ***** assert (gppdf (x, -ones (1,6), 1, 0), y3, eps) 459s ***** assert (gppdf (x, -1, 1, 0), y3, eps) 459s ***** assert (gppdf (x, -1, 1, [0, 0, 0, NaN, 0, 0]), [y3(1:3), NaN, y3(5:6)]) 459s ***** assert (gppdf (x, -1, [1, 1, 1, NaN, 1, 1], 0), [y3(1:3), NaN, y3(5:6)]) 459s ***** assert (gppdf (x, [-1, -1, -1, NaN, -1, -1], 1, 0), [y3(1:3), NaN, y3(5:6)]) 459s ***** assert (gppdf ([x(1:3), NaN, x(5:6)], -1, 1, 0), [y3(1:3), NaN, y3(5:6)]) 460s ***** assert (gppdf (single ([x, NaN]), 0, 1, 0), single ([y1, NaN])) 460s ***** assert (gppdf ([x, NaN], 0, 1, single (0)), single ([y1, NaN])) 460s ***** assert (gppdf ([x, NaN], 0, single (1), 0), single ([y1, NaN])) 460s ***** assert (gppdf ([x, NaN], single (0), 1, 0), single ([y1, NaN])) 460s ***** assert (gppdf (single ([x, NaN]), 1, 1, 0), single ([y2, NaN])) 460s ***** assert (gppdf ([x, NaN], 1, 1, single (0)), single ([y2, NaN])) 460s ***** assert (gppdf ([x, NaN], 1, single (1), 0), single ([y2, NaN])) 460s ***** assert (gppdf ([x, NaN], single (1), 1, 0), single ([y2, NaN])) 460s ***** assert (gppdf (single ([x, NaN]), -1, 1, 0), single ([y3, NaN])) 460s ***** assert (gppdf ([x, NaN], -1, 1, single (0)), single ([y3, NaN])) 460s ***** assert (gppdf ([x, NaN], -1, single (1), 0), single ([y3, NaN])) 460s ***** assert (gppdf ([x, NaN], single (-1), 1, 0), single ([y3, NaN])) 460s ***** error gpcdf () 460s ***** error gpcdf (1) 460s ***** error gpcdf (1, 2) 460s ***** error gpcdf (1, 2, 3) 460s ***** error ... 460s gpcdf (ones (3), ones (2), ones(2), ones(2)) 460s ***** error ... 460s gpcdf (ones (2), ones (3), ones(2), ones(2)) 460s ***** error ... 460s gpcdf (ones (2), ones (2), ones(3), ones(2)) 460s ***** error ... 460s gpcdf (ones (2), ones (2), ones(2), ones(3)) 460s ***** error gpcdf (i, 2, 3, 4) 460s ***** error gpcdf (1, i, 3, 4) 460s ***** error gpcdf (1, 2, i, 4) 460s ***** error gpcdf (1, 2, 3, i) 460s 51 tests, 51 passed, 0 known failure, 0 skipped 460s [inst/dist_fun/gprnd.m] 460s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/gprnd.m 460s ***** assert (size (gprnd (0, 1, 0)), [1, 1]) 460s ***** assert (size (gprnd (0, 1, zeros (2,1))), [2, 1]) 460s ***** assert (size (gprnd (0, 1, zeros (2,2))), [2, 2]) 460s ***** assert (size (gprnd (0, ones (2,1), 0)), [2, 1]) 460s ***** assert (size (gprnd (0, ones (2,2), 0)), [2, 2]) 460s ***** assert (size (gprnd (zeros (2,1), 1, 0)), [2, 1]) 460s ***** assert (size (gprnd (zeros (2,2), 1, 0)), [2, 2]) 460s ***** assert (size (gprnd (0, 1, 0, 3)), [3, 3]) 460s ***** assert (size (gprnd (0, 1, 0, [4 1])), [4, 1]) 460s ***** assert (size (gprnd (0, 1, 0, 4, 1)), [4, 1]) 460s ***** assert (size (gprnd (1,1,0)), [1, 1]) 460s ***** assert (size (gprnd (1, 1, zeros (2,1))), [2, 1]) 460s ***** assert (size (gprnd (1, 1, zeros (2,2))), [2, 2]) 460s ***** assert (size (gprnd (1, ones (2,1), 0)), [2, 1]) 460s ***** assert (size (gprnd (1, ones (2,2), 0)), [2, 2]) 460s ***** assert (size (gprnd (ones (2,1), 1, 0)), [2, 1]) 460s ***** assert (size (gprnd (ones (2,2), 1, 0)), [2, 2]) 460s ***** assert (size (gprnd (1, 1, 0, 3)), [3, 3]) 460s ***** assert (size (gprnd (1, 1, 0, [4 1])), [4, 1]) 460s ***** assert (size (gprnd (1, 1, 0, 4, 1)), [4, 1]) 460s ***** assert (size (gprnd (-1, 1, 0)), [1, 1]) 460s ***** assert (size (gprnd (-1, 1, zeros (2,1))), [2, 1]) 460s ***** assert (size (gprnd (1, -1, zeros (2,2))), [2, 2]) 460s ***** assert (size (gprnd (-1, ones (2,1), 0)), [2, 1]) 460s ***** assert (size (gprnd (-1, ones (2,2), 0)), [2, 2]) 460s ***** assert (size (gprnd (-ones (2,1), 1, 0)), [2, 1]) 460s ***** assert (size (gprnd (-ones (2,2), 1, 0)), [2, 2]) 460s ***** assert (size (gprnd (-1, 1, 0, 3)), [3, 3]) 460s ***** assert (size (gprnd (-1, 1, 0, [4, 1])), [4, 1]) 460s ***** assert (size (gprnd (-1, 1, 0, 4, 1)), [4, 1]) 460s ***** assert (class (gprnd (0, 1, 0)), "double") 460s ***** assert (class (gprnd (0, 1, single (0))), "single") 460s ***** assert (class (gprnd (0, 1, single ([0, 0]))), "single") 460s ***** assert (class (gprnd (0, single (1),0)), "single") 460s ***** assert (class (gprnd (0, single ([1, 1]),0)), "single") 460s ***** assert (class (gprnd (single (0), 1, 0)), "single") 460s ***** assert (class (gprnd (single ([0, 0]), 1, 0)), "single") 460s ***** error gprnd () 460s ***** error gprnd (1) 460s ***** error gprnd (1, 2) 460s ***** error ... 460s gprnd (ones (3), ones (2), ones (2)) 460s ***** error ... 460s gprnd (ones (2), ones (3), ones (2)) 460s ***** error ... 460s gprnd (ones (2), ones (2), ones (3)) 460s ***** error gprnd (i, 2, 3) 460s ***** error gprnd (1, i, 3) 460s ***** error gprnd (1, 2, i) 460s ***** error ... 460s gprnd (1, 2, 3, -1) 460s ***** error ... 460s gprnd (1, 2, 3, 1.2) 460s ***** error ... 460s gprnd (1, 2, 3, ones (2)) 460s ***** error ... 460s gprnd (1, 2, 3, [2 -1 2]) 460s ***** error ... 460s gprnd (1, 2, 3, [2 0 2.5]) 460s ***** error ... 460s gprnd (1, 2, 3, 2, -1, 5) 460s ***** error ... 460s gprnd (1, 2, 3, 2, 1.5, 5) 460s ***** error ... 460s gprnd (2, ones (2), 2, 3) 460s ***** error ... 460s gprnd (2, ones (2), 2, [3, 2]) 460s ***** error ... 460s gprnd (2, ones (2), 2, 3, 2) 460s 56 tests, 56 passed, 0 known failure, 0 skipped 460s [inst/dist_fun/gumbelcdf.m] 460s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/gumbelcdf.m 460s ***** demo 460s ## Plot various CDFs from the Gumbel distribution 460s x = -5:0.01:20; 460s p1 = gumbelcdf (x, 0.5, 2); 460s p2 = gumbelcdf (x, 1.0, 2); 460s p3 = gumbelcdf (x, 1.5, 3); 460s p4 = gumbelcdf (x, 3.0, 4); 460s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-c") 460s grid on 460s legend ({"μ = 0.5, β = 2", "μ = 1.0, β = 2", ... 460s "μ = 1.5, β = 3", "μ = 3.0, β = 4"}, "location", "southeast") 460s title ("Gumbel CDF") 460s xlabel ("values in x") 460s ylabel ("probability") 460s ***** shared x, y 460s x = [-Inf, 1, 2, Inf]; 460s y = [0, 0.3679, 0.6922, 1]; 460s ***** assert (gumbelcdf (x, ones (1,4), ones (1,4)), y, 1e-4) 460s ***** assert (gumbelcdf (x, 1, ones (1,4)), y, 1e-4) 460s ***** assert (gumbelcdf (x, ones (1,4), 1), y, 1e-4) 460s ***** assert (gumbelcdf (x, [0, -Inf, NaN, Inf], 1), [0, 1, NaN, NaN], 1e-4) 460s ***** assert (gumbelcdf (x, 1, [Inf, NaN, -1, 0]), [NaN, NaN, NaN, NaN], 1e-4) 460s ***** assert (gumbelcdf ([x(1:2), NaN, x(4)], 1, 1), [y(1:2), NaN, y(4)], 1e-4) 460s ***** assert (gumbelcdf (x, "upper"), [1, 0.3078, 0.1266, 0], 1e-4) 460s ***** assert (gumbelcdf ([x, NaN], 1, 1), [y, NaN], 1e-4) 460s ***** assert (gumbelcdf (single ([x, NaN]), 1, 1), single ([y, NaN]), 1e-4) 460s ***** assert (gumbelcdf ([x, NaN], single (1), 1), single ([y, NaN]), 1e-4) 460s ***** assert (gumbelcdf ([x, NaN], 1, single (1)), single ([y, NaN]), 1e-4) 460s ***** error gumbelcdf () 460s ***** error gumbelcdf (1,2,3,4,5,6,7) 460s ***** error gumbelcdf (1, 2, 3, 4, "uper") 460s ***** error ... 460s gumbelcdf (ones (3), ones (2), ones (2)) 460s ***** error gumbelcdf (2, 3, 4, [1, 2]) 460s ***** error ... 460s [p, plo, pup] = gumbelcdf (1, 2, 3) 460s ***** error [p, plo, pup] = ... 460s gumbelcdf (1, 2, 3, [1, 0; 0, 1], 0) 460s ***** error [p, plo, pup] = ... 460s gumbelcdf (1, 2, 3, [1, 0; 0, 1], 1.22) 460s ***** error [p, plo, pup] = ... 460s gumbelcdf (1, 2, 3, [1, 0; 0, 1], "alpha", "upper") 460s ***** error gumbelcdf (i, 2, 2) 460s ***** error gumbelcdf (2, i, 2) 460s ***** error gumbelcdf (2, 2, i) 460s ***** error ... 460s [p, plo, pup] = gumbelcdf (1, 2, 3, [1, 0; 0, -inf], 0.04) 460s 24 tests, 24 passed, 0 known failure, 0 skipped 460s [inst/dist_fun/gumbelinv.m] 460s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/gumbelinv.m 460s ***** demo 460s ## Plot various iCDFs from the Gumbel distribution 460s p = 0.001:0.001:0.999; 460s x1 = gumbelinv (p, 0.5, 2); 460s x2 = gumbelinv (p, 1.0, 2); 460s x3 = gumbelinv (p, 1.5, 3); 460s x4 = gumbelinv (p, 3.0, 4); 460s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-c") 460s grid on 460s ylim ([-5, 20]) 460s legend ({"μ = 0.5, β = 2", "μ = 1.0, β = 2", ... 460s "μ = 1.5, β = 3", "μ = 3.0, β = 4"}, "location", "northwest") 460s title ("Gumbel iCDF") 460s xlabel ("probability") 460s ylabel ("values in x") 460s ***** shared p, x 460s p = [0, 0.05, 0.5 0.95]; 460s x = [-Inf, -1.0972, 0.3665, 2.9702]; 460s ***** assert (gumbelinv (p), x, 1e-4) 460s ***** assert (gumbelinv (p, zeros (1,4), ones (1,4)), x, 1e-4) 460s ***** assert (gumbelinv (p, 0, ones (1,4)), x, 1e-4) 460s ***** assert (gumbelinv (p, zeros (1,4), 1), x, 1e-4) 460s ***** assert (gumbelinv (p, [0, -Inf, NaN, Inf], 1), [-Inf, -Inf, NaN, Inf], 1e-4) 460s ***** assert (gumbelinv (p, 0, [Inf, NaN, -1, 0]), [-Inf, NaN, NaN, NaN], 1e-4) 460s ***** assert (gumbelinv ([p(1:2), NaN, p(4)], 0, 1), [x(1:2), NaN, x(4)], 1e-4) 460s ***** assert (gumbelinv ([p, NaN], 0, 1), [x, NaN], 1e-4) 460s ***** assert (gumbelinv (single ([p, NaN]), 0, 1), single ([x, NaN]), 1e-4) 460s ***** assert (gumbelinv ([p, NaN], single (0), 1), single ([x, NaN]), 1e-4) 460s ***** assert (gumbelinv ([p, NaN], 0, single (1)), single ([x, NaN]), 1e-4) 460s p = [0.05, 0.5, 0.95]; 460s x = gumbelinv(p); 460s ***** assert (gumbelcdf(x), p, 1e-4) 460s ***** error gumbelinv () 460s ***** error gumbelinv (1,2,3,4,5,6) 460s ***** error ... 460s gumbelinv (ones (3), ones (2), ones (2)) 460s ***** error ... 460s [p, plo, pup] = gumbelinv (2, 3, 4, [1, 2]) 460s ***** error ... 460s [p, plo, pup] = gumbelinv (1, 2, 3) 460s ***** error [p, plo, pup] = ... 460s gumbelinv (1, 2, 3, [1, 0; 0, 1], 0) 460s ***** error [p, plo, pup] = ... 460s gumbelinv (1, 2, 3, [1, 0; 0, 1], 1.22) 460s ***** error gumbelinv (i, 2, 2) 460s ***** error gumbelinv (2, i, 2) 460s ***** error gumbelinv (2, 2, i) 460s ***** error ... 460s [p, plo, pup] = gumbelinv (1, 2, 3, [-1, 10; -Inf, -Inf], 0.04) 460s 23 tests, 23 passed, 0 known failure, 0 skipped 460s [inst/dist_fun/gumbelpdf.m] 460s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/gumbelpdf.m 460s ***** demo 460s ## Plot various PDFs from the Extreme value distribution 460s x = -5:0.001:20; 460s y1 = gumbelpdf (x, 0.5, 2); 460s y2 = gumbelpdf (x, 1.0, 2); 460s y3 = gumbelpdf (x, 1.5, 3); 460s y4 = gumbelpdf (x, 3.0, 4); 460s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-c") 460s grid on 460s ylim ([0, 0.2]) 460s legend ({"μ = 0.5, β = 2", "μ = 1.0, β = 2", ... 460s "μ = 1.5, β = 3", "μ = 3.0, β = 4"}, "location", "northeast") 460s title ("Extreme value PDF") 460s xlabel ("values in x") 460s ylabel ("density") 460s ***** shared x, y0, y1 460s x = [-5, 0, 1, 2, 3]; 460s y0 = [0, 0.3679, 0.2547, 0.1182, 0.0474]; 460s y1 = [0, 0.1794, 0.3679, 0.2547, 0.1182]; 460s ***** assert (gumbelpdf (x), y0, 1e-4) 460s ***** assert (gumbelpdf (x, zeros (1,5), ones (1,5)), y0, 1e-4) 460s ***** assert (gumbelpdf (x, ones (1,5), ones (1,5)), y1, 1e-4) 460s ***** error gumbelpdf () 460s ***** error ... 460s gumbelpdf (ones (3), ones (2), ones (2)) 460s ***** error gumbelpdf (i, 2, 2) 460s ***** error gumbelpdf (2, i, 2) 460s ***** error gumbelpdf (2, 2, i) 460s 8 tests, 8 passed, 0 known failure, 0 skipped 460s [inst/dist_fun/gumbelrnd.m] 460s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/gumbelrnd.m 460s ***** assert (size (gumbelrnd (1, 1)), [1 1]) 460s ***** assert (size (gumbelrnd (1, ones (2,1))), [2, 1]) 460s ***** assert (size (gumbelrnd (1, ones (2,2))), [2, 2]) 460s ***** assert (size (gumbelrnd (ones (2,1), 1)), [2, 1]) 460s ***** assert (size (gumbelrnd (ones (2,2), 1)), [2, 2]) 460s ***** assert (size (gumbelrnd (1, 1, 3)), [3, 3]) 460s ***** assert (size (gumbelrnd (1, 1, [4, 1])), [4, 1]) 460s ***** assert (size (gumbelrnd (1, 1, 4, 1)), [4, 1]) 460s ***** assert (size (gumbelrnd (1, 1, 4, 1, 5)), [4, 1, 5]) 460s ***** assert (size (gumbelrnd (1, 1, 0, 1)), [0, 1]) 460s ***** assert (size (gumbelrnd (1, 1, 1, 0)), [1, 0]) 460s ***** assert (size (gumbelrnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 460s ***** assert (class (gumbelrnd (1, 1)), "double") 460s ***** assert (class (gumbelrnd (1, single (1))), "single") 460s ***** assert (class (gumbelrnd (1, single ([1, 1]))), "single") 460s ***** assert (class (gumbelrnd (single (1), 1)), "single") 460s ***** assert (class (gumbelrnd (single ([1, 1]), 1)), "single") 460s ***** error gumbelrnd () 460s ***** error gumbelrnd (1) 460s ***** error ... 460s gumbelrnd (ones (3), ones (2)) 460s ***** error ... 460s gumbelrnd (ones (2), ones (3)) 460s ***** error gumbelrnd (i, 2, 3) 460s ***** error gumbelrnd (1, i, 3) 460s ***** error ... 460s gumbelrnd (1, 2, -1) 460s ***** error ... 460s gumbelrnd (1, 2, 1.2) 460s ***** error ... 460s gumbelrnd (1, 2, ones (2)) 460s ***** error ... 460s gumbelrnd (1, 2, [2 -1 2]) 460s ***** error ... 460s gumbelrnd (1, 2, [2 0 2.5]) 460s ***** error ... 460s gumbelrnd (1, 2, 2, -1, 5) 460s ***** error ... 460s gumbelrnd (1, 2, 2, 1.5, 5) 460s ***** error ... 460s gumbelrnd (2, ones (2), 3) 460s ***** error ... 460s gumbelrnd (2, ones (2), [3, 2]) 460s ***** error ... 460s gumbelrnd (2, ones (2), 3, 2) 460s 33 tests, 33 passed, 0 known failure, 0 skipped 460s [inst/dist_fun/hncdf.m] 460s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/hncdf.m 460s ***** demo 460s ## Plot various CDFs from the half-normal distribution 460s x = 0:0.001:10; 460s p1 = hncdf (x, 0, 1); 460s p2 = hncdf (x, 0, 2); 460s p3 = hncdf (x, 0, 3); 460s p4 = hncdf (x, 0, 5); 460s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-c") 460s grid on 460s xlim ([0, 10]) 460s legend ({"μ = 0, σ = 1", "μ = 0, σ = 2", ... 460s "μ = 0, σ = 3", "μ = 0, σ = 5"}, "location", "southeast") 460s title ("Half-normal CDF") 460s xlabel ("values in x") 460s ylabel ("probability") 460s ***** demo 460s ## Plot half-normal against normal cumulative distribution function 460s x = -5:0.001:5; 460s p1 = hncdf (x, 0, 1); 460s p2 = normcdf (x); 460s plot (x, p1, "-b", x, p2, "-g") 460s grid on 460s xlim ([-5, 5]) 460s legend ({"half-normal with μ = 0, σ = 1", ... 460s "standart normal (μ = 0, σ = 1)"}, "location", "southeast") 460s title ("Half-normal against standard normal CDF") 460s xlabel ("values in x") 460s ylabel ("probability") 460s ***** shared x, p1, p1u, y2, y2u, y3, y3u 460s x = [-Inf, -1, 0, 1/2, 1, Inf]; 460s p1 = [0, 0, 0, 0.3829, 0.6827, 1]; 460s p1u = [1, 1, 1, 0.6171, 0.3173, 0]; 460s ***** assert (hncdf (x, zeros (1,6), ones (1,6)), p1, 1e-4) 460s ***** assert (hncdf (x, 0, 1), p1, 1e-4) 460s ***** assert (hncdf (x, 0, ones (1,6)), p1, 1e-4) 460s ***** assert (hncdf (x, zeros (1,6), 1), p1, 1e-4) 460s ***** assert (hncdf (x, 0, [1, 1, 1, NaN, 1, 1]), [p1(1:3), NaN, p1(5:6)], 1e-4) 460s ***** assert (hncdf (x, [0, 0, 0, NaN, 0, 0], 1), [p1(1:3), NaN, p1(5:6)], 1e-4) 460s ***** assert (hncdf ([x(1:3), NaN, x(5:6)], 0, 1), [p1(1:3), NaN, p1(5:6)], 1e-4) 460s ***** assert (hncdf (x, zeros (1,6), ones (1,6), "upper"), p1u, 1e-4) 460s ***** assert (hncdf (x, 0, 1, "upper"), p1u, 1e-4) 460s ***** assert (hncdf (x, 0, ones (1,6), "upper"), p1u, 1e-4) 460s ***** assert (hncdf (x, zeros (1,6), 1, "upper"), p1u, 1e-4) 460s ***** assert (class (hncdf (single ([x, NaN]), 0, 1)), "single") 460s ***** assert (class (hncdf ([x, NaN], 0, single (1))), "single") 460s ***** assert (class (hncdf ([x, NaN], single (0), 1)), "single") 460s ***** error hncdf () 460s ***** error hncdf (1) 460s ***** error hncdf (1, 2) 460s ***** error hncdf (1, 2, 3, "tail") 460s ***** error hncdf (1, 2, 3, 5) 460s ***** error ... 460s hncdf (ones (3), ones (2), ones(2)) 460s ***** error ... 460s hncdf (ones (2), ones (3), ones(2)) 460s ***** error ... 460s hncdf (ones (2), ones (2), ones(3)) 460s ***** error hncdf (i, 2, 3) 460s ***** error hncdf (1, i, 3) 460s ***** error hncdf (1, 2, i) 460s 25 tests, 25 passed, 0 known failure, 0 skipped 460s [inst/dist_fun/hninv.m] 460s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/hninv.m 460s ***** demo 460s ## Plot various iCDFs from the half-normal distribution 460s p = 0.001:0.001:0.999; 460s x1 = hninv (p, 0, 1); 460s x2 = hninv (p, 0, 2); 460s x3 = hninv (p, 0, 3); 460s x4 = hninv (p, 0, 5); 460s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-c") 460s grid on 460s ylim ([0, 10]) 460s legend ({"μ = 0, σ = 1", "μ = 0, σ = 2", ... 460s "μ = 0, σ = 3", "μ = 0, σ = 5"}, "location", "northwest") 460s title ("Half-normal iCDF") 460s xlabel ("probability") 460s ylabel ("x") 460s ***** shared p, x 460s p = [0, 0.3829, 0.6827, 1]; 460s x = [0, 1/2, 1, Inf]; 460s ***** assert (hninv (p, 0, 1), x, 1e-4); 460s ***** assert (hninv (p, 5, 1), x + 5, 1e-4); 460s ***** assert (hninv (p, 0, ones (1,4)), x, 1e-4); 460s ***** assert (hninv (p, 0, [-1, 0, 1, 1]), [NaN, NaN, x(3:4)], 1e-4) 460s ***** assert (class (hninv (single ([p, NaN]), 0, 1)), "single") 460s ***** assert (class (hninv ([p, NaN], single (0), 1)), "single") 460s ***** assert (class (hninv ([p, NaN], 0, single (1))), "single") 460s ***** error hninv (1) 460s ***** error hninv (1, 2) 460s ***** error ... 460s hninv (1, ones (2), ones (3)) 460s ***** error ... 460s hninv (ones (2), 1, ones (3)) 460s ***** error ... 460s hninv (ones (2), ones (3), 1) 460s ***** error hninv (i, 2, 3) 460s ***** error hninv (1, i, 3) 460s ***** error hninv (1, 2, i) 460s 15 tests, 15 passed, 0 known failure, 0 skipped 460s [inst/dist_fun/hnpdf.m] 460s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/hnpdf.m 460s ***** demo 460s ## Plot various PDFs from the half-normal distribution 460s x = 0:0.001:10; 460s y1 = hnpdf (x, 0, 1); 460s y2 = hnpdf (x, 0, 2); 460s y3 = hnpdf (x, 0, 3); 460s y4 = hnpdf (x, 0, 5); 460s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-c") 460s grid on 460s xlim ([0, 10]) 460s ylim ([0, 0.9]) 460s legend ({"μ = 0, σ = 1", "μ = 0, σ = 2", ... 460s "μ = 0, σ = 3", "μ = 0, σ = 5"}, "location", "northeast") 460s title ("Half-normal PDF") 460s xlabel ("values in x") 460s ylabel ("density") 460s ***** demo 460s ## Plot half-normal against normal probability density function 460s x = -5:0.001:5; 460s y1 = hnpdf (x, 0, 1); 460s y2 = normpdf (x); 460s plot (x, y1, "-b", x, y2, "-g") 460s grid on 460s xlim ([-5, 5]) 460s ylim ([0, 0.9]) 460s legend ({"half-normal with μ = 0, σ = 1", ... 460s "standart normal (μ = 0, σ = 1)"}, "location", "northeast") 460s title ("Half-normal against standard normal PDF") 460s xlabel ("values in x") 460s ylabel ("density") 460s ***** shared x, y 460s x = [-Inf, -1, 0, 1/2, 1, Inf]; 460s y = [0, 0, 0.7979, 0.7041, 0.4839, 0]; 460s ***** assert (hnpdf ([x, NaN], 0, 1), [y, NaN], 1e-4) 460s ***** assert (hnpdf (x, 0, [-2, -1, 0, 1, 1, 1]), [nan(1,3), y([4:6])], 1e-4) 460s ***** assert (class (hncdf (single ([x, NaN]), 0, 1)), "single") 460s ***** assert (class (hncdf ([x, NaN], 0, single (1))), "single") 460s ***** assert (class (hncdf ([x, NaN], single (0), 1)), "single") 460s ***** error hnpdf () 460s ***** error hnpdf (1) 460s ***** error hnpdf (1, 2) 460s ***** error ... 460s hnpdf (1, ones (2), ones (3)) 460s ***** error ... 460s hnpdf (ones (2), 1, ones (3)) 460s ***** error ... 460s hnpdf (ones (2), ones (3), 1) 460s ***** error hnpdf (i, 2, 3) 460s ***** error hnpdf (1, i, 3) 460s ***** error hnpdf (1, 2, i) 460s 14 tests, 14 passed, 0 known failure, 0 skipped 460s [inst/dist_fun/hnrnd.m] 460s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/hnrnd.m 460s ***** assert (size (hnrnd (1, 1, 1)), [1, 1]) 460s ***** assert (size (hnrnd (1, 1, 2)), [2, 2]) 460s ***** assert (size (hnrnd (1, 1, [2, 1])), [2, 1]) 460s ***** assert (size (hnrnd (1, zeros (2, 2))), [2, 2]) 460s ***** assert (size (hnrnd (1, ones (2, 1))), [2, 1]) 460s ***** assert (size (hnrnd (1, ones (2, 2))), [2, 2]) 460s ***** assert (size (hnrnd (ones (2, 1), 1)), [2, 1]) 460s ***** assert (size (hnrnd (ones (2, 2), 1)), [2, 2]) 460s ***** assert (size (hnrnd (1, 1, 3)), [3, 3]) 460s ***** assert (size (hnrnd (1, 1, [4 1])), [4, 1]) 460s ***** assert (size (hnrnd (1, 1, 4, 1)), [4, 1]) 460s ***** test 460s r = hnrnd (1, [1, 0, -1]); 460s assert (r([2:3]), [NaN, NaN]) 460s ***** assert (class (hnrnd (1, 0)), "double") 460s ***** assert (class (hnrnd (1, single (0))), "single") 460s ***** assert (class (hnrnd (1, single ([0 0]))), "single") 460s ***** assert (class (hnrnd (1, single (1))), "single") 460s ***** assert (class (hnrnd (1, single ([1 1]))), "single") 460s ***** assert (class (hnrnd (single (1), 1)), "single") 461s ***** assert (class (hnrnd (single ([1 1]), 1)), "single") 461s ***** error hnrnd () 461s ***** error hnrnd (1) 461s ***** error ... 461s hnrnd (ones (3), ones (2)) 461s ***** error ... 461s hnrnd (ones (2), ones (3)) 461s ***** error hnrnd (i, 2, 3) 461s ***** error hnrnd (1, i, 3) 461s ***** error ... 461s hnrnd (1, 2, -1) 461s ***** error ... 461s hnrnd (1, 2, 1.2) 461s ***** error ... 461s hnrnd (1, 2, ones (2)) 461s ***** error ... 461s hnrnd (1, 2, [2 -1 2]) 461s ***** error ... 461s hnrnd (1, 2, [2 0 2.5]) 461s ***** error ... 461s hnrnd (1, 2, 2, -1, 5) 461s ***** error ... 461s hnrnd (1, 2, 2, 1.5, 5) 461s ***** error ... 461s hnrnd (2, ones (2), 3) 461s ***** error ... 461s hnrnd (2, ones (2), [3, 2]) 461s ***** error ... 461s hnrnd (2, ones (2), 3, 2) 461s 35 tests, 35 passed, 0 known failure, 0 skipped 461s [inst/dist_fun/hygecdf.m] 461s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/hygecdf.m 461s ***** demo 461s ## Plot various CDFs from the hypergeometric distribution 461s x = 0:60; 461s p1 = hygecdf (x, 500, 50, 100); 461s p2 = hygecdf (x, 500, 60, 200); 461s p3 = hygecdf (x, 500, 70, 300); 461s plot (x, p1, "*b", x, p2, "*g", x, p3, "*r") 461s grid on 461s xlim ([0, 60]) 461s legend ({"m = 500, k = 50, n = 100", "m = 500, k = 60, n = 200", ... 461s "m = 500, k = 70, n = 300"}, "location", "southeast") 461s title ("Hypergeometric CDF") 461s xlabel ("values in x (number of successes)") 461s ylabel ("probability") 461s ***** shared x, y 461s x = [-1 0 1 2 3]; 461s y = [0 1/6 5/6 1 1]; 461s ***** assert (hygecdf (x, 4*ones (1,5), 2, 2), y, 5*eps) 461s ***** assert (hygecdf (x, 4, 2*ones (1,5), 2), y, 5*eps) 461s ***** assert (hygecdf (x, 4, 2, 2*ones (1,5)), y, 5*eps) 461s ***** assert (hygecdf (x, 4*[1 -1 NaN 1.1 1], 2, 2), [y(1) NaN NaN NaN y(5)], 5*eps) 461s ***** assert (hygecdf (x, 4*[1 -1 NaN 1.1 1], 2, 2, "upper"), ... 461s [y(5) NaN NaN NaN y(1)], 5*eps) 461s ***** assert (hygecdf (x, 4, 2*[1 -1 NaN 1.1 1], 2), [y(1) NaN NaN NaN y(5)], 5*eps) 461s ***** assert (hygecdf (x, 4, 2*[1 -1 NaN 1.1 1], 2, "upper"), ... 461s [y(5) NaN NaN NaN y(1)], 5*eps) 461s ***** assert (hygecdf (x, 4, 5, 2), [NaN NaN NaN NaN NaN]) 461s ***** assert (hygecdf (x, 4, 2, 2*[1 -1 NaN 1.1 1]), [y(1) NaN NaN NaN y(5)], 5*eps) 461s ***** assert (hygecdf (x, 4, 2, 2*[1 -1 NaN 1.1 1], "upper"), ... 461s [y(5) NaN NaN NaN y(1)], 5*eps) 461s ***** assert (hygecdf (x, 4, 2, 5), [NaN NaN NaN NaN NaN]) 461s ***** assert (hygecdf ([x(1:2) NaN x(4:5)], 4, 2, 2), [y(1:2) NaN y(4:5)], 5*eps) 461s ***** test 461s p = hygecdf (x, 10, [1 2 3 4 5], 2, "upper"); 461s assert (p, [1, 34/90, 2/30, 0, 0], 10*eps); 461s ***** test 461s p = hygecdf (2*x, 10, [1 2 3 4 5], 2, "upper"); 461s assert (p, [1, 34/90, 0, 0, 0], 10*eps); 461s ***** assert (hygecdf ([x, NaN], 4, 2, 2), [y, NaN], 5*eps) 461s ***** assert (hygecdf (single ([x, NaN]), 4, 2, 2), single ([y, NaN]), ... 461s eps ("single")) 461s ***** assert (hygecdf ([x, NaN], single (4), 2, 2), single ([y, NaN]), ... 461s eps ("single")) 461s ***** assert (hygecdf ([x, NaN], 4, single (2), 2), single ([y, NaN]), ... 461s eps ("single")) 461s ***** assert (hygecdf ([x, NaN], 4, 2, single (2)), single ([y, NaN]), ... 461s eps ("single")) 461s ***** error hygecdf () 461s ***** error hygecdf (1) 461s ***** error hygecdf (1,2) 461s ***** error hygecdf (1,2,3) 461s ***** error hygecdf (1,2,3,4,5) 461s ***** error hygecdf (1,2,3,4,"uper") 461s ***** error ... 461s hygecdf (ones (2), ones (3), 1, 1) 461s ***** error ... 461s hygecdf (1, ones (2), ones (3), 1) 461s ***** error ... 461s hygecdf (1, 1, ones (2), ones (3)) 461s ***** error hygecdf (i, 2, 2, 2) 461s ***** error hygecdf (2, i, 2, 2) 461s ***** error hygecdf (2, 2, i, 2) 461s ***** error hygecdf (2, 2, 2, i) 461s 32 tests, 32 passed, 0 known failure, 0 skipped 461s [inst/dist_fun/hygeinv.m] 461s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/hygeinv.m 461s ***** demo 461s ## Plot various iCDFs from the hypergeometric distribution 461s p = 0.001:0.001:0.999; 461s x1 = hygeinv (p, 500, 50, 100); 461s x2 = hygeinv (p, 500, 60, 200); 461s x3 = hygeinv (p, 500, 70, 300); 461s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r") 461s grid on 461s ylim ([0, 60]) 461s legend ({"m = 500, k = 50, n = 100", "m = 500, k = 60, n = 200", ... 461s "m = 500, k = 70, n = 300"}, "location", "northwest") 461s title ("Hypergeometric iCDF") 461s xlabel ("probability") 461s ylabel ("values in p (number of successes)") 461s ***** shared p 461s p = [-1 0 0.5 1 2]; 461s ***** assert (hygeinv (p, 4*ones (1,5), 2*ones (1,5), 2*ones (1,5)), [NaN 0 1 2 NaN]) 461s ***** assert (hygeinv (p, 4*ones (1,5), 2, 2), [NaN 0 1 2 NaN]) 461s ***** assert (hygeinv (p, 4, 2*ones (1,5), 2), [NaN 0 1 2 NaN]) 461s ***** assert (hygeinv (p, 4, 2, 2*ones (1,5)), [NaN 0 1 2 NaN]) 461s ***** assert (hygeinv (p, 4*[1 -1 NaN 1.1 1], 2, 2), [NaN NaN NaN NaN NaN]) 461s ***** assert (hygeinv (p, 4, 2*[1 -1 NaN 1.1 1], 2), [NaN NaN NaN NaN NaN]) 461s ***** assert (hygeinv (p, 4, 5, 2), [NaN NaN NaN NaN NaN]) 461s ***** assert (hygeinv (p, 4, 2, 2*[1 -1 NaN 1.1 1]), [NaN NaN NaN NaN NaN]) 461s ***** assert (hygeinv (p, 4, 2, 5), [NaN NaN NaN NaN NaN]) 461s ***** assert (hygeinv ([p(1:2) NaN p(4:5)], 4, 2, 2), [NaN 0 NaN 2 NaN]) 461s ***** assert (hygeinv ([p, NaN], 4, 2, 2), [NaN 0 1 2 NaN NaN]) 461s ***** assert (hygeinv (single ([p, NaN]), 4, 2, 2), single ([NaN 0 1 2 NaN NaN])) 461s ***** assert (hygeinv ([p, NaN], single (4), 2, 2), single ([NaN 0 1 2 NaN NaN])) 461s ***** assert (hygeinv ([p, NaN], 4, single (2), 2), single ([NaN 0 1 2 NaN NaN])) 461s ***** assert (hygeinv ([p, NaN], 4, 2, single (2)), single ([NaN 0 1 2 NaN NaN])) 461s ***** error hygeinv () 461s ***** error hygeinv (1) 461s ***** error hygeinv (1,2) 461s ***** error hygeinv (1,2,3) 461s ***** error ... 461s hygeinv (ones (2), ones (3), 1, 1) 461s ***** error ... 461s hygeinv (1, ones (2), ones (3), 1) 461s ***** error ... 461s hygeinv (1, 1, ones (2), ones (3)) 461s ***** error hygeinv (i, 2, 2, 2) 461s ***** error hygeinv (2, i, 2, 2) 461s ***** error hygeinv (2, 2, i, 2) 461s ***** error hygeinv (2, 2, 2, i) 461s 26 tests, 26 passed, 0 known failure, 0 skipped 461s [inst/dist_fun/hygepdf.m] 461s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/hygepdf.m 461s ***** demo 461s ## Plot various PDFs from the hypergeometric distribution 461s x = 0:60; 461s y1 = hygepdf (x, 500, 50, 100); 461s y2 = hygepdf (x, 500, 60, 200); 461s y3 = hygepdf (x, 500, 70, 300); 461s plot (x, y1, "*b", x, y2, "*g", x, y3, "*r") 461s grid on 461s xlim ([0, 60]) 461s ylim ([0, 0.18]) 461s legend ({"m = 500, k = 50, μ = 100", "m = 500, k = 60, μ = 200", ... 461s "m = 500, k = 70, μ = 300"}, "location", "northeast") 461s title ("Hypergeometric PDF") 461s xlabel ("values in x (number of successes)") 461s ylabel ("density") 461s ***** shared x, y 461s x = [-1 0 1 2 3]; 461s y = [0 1/6 4/6 1/6 0]; 461s ***** assert (hygepdf (x, 4 * ones (1, 5), 2, 2), y, 3 * eps) 461s ***** assert (hygepdf (x, 4, 2 * ones (1, 5), 2), y, 3 * eps) 461s ***** assert (hygepdf (x, 4, 2, 2 * ones (1, 5)), y, 3 * eps) 461s ***** assert (hygepdf (x, 4 * [1, -1, NaN, 1.1, 1], 2, 2), [0, NaN, NaN, NaN, 0]) 461s ***** assert (hygepdf (x, 4, 2 * [1, -1, NaN, 1.1, 1], 2), [0, NaN, NaN, NaN, 0]) 461s ***** assert (hygepdf (x, 4, 5, 2), [NaN, NaN, NaN, NaN, NaN], 3 * eps) 461s ***** assert (hygepdf (x, 4, 2, 2 * [1, -1, NaN, 1.1, 1]), [0, NaN, NaN, NaN, 0]) 461s ***** assert (hygepdf (x, 4, 2, 5), [NaN, NaN, NaN, NaN, NaN], 3 * eps) 461s ***** assert (hygepdf ([x, NaN], 4, 2, 2), [y, NaN], 3 * eps) 461s ***** assert (hygepdf (single ([x, NaN]), 4, 2, 2), single ([y, NaN]), eps ("single")) 461s ***** assert (hygepdf ([x, NaN], single (4), 2, 2), single ([y, NaN]), eps ("single")) 461s ***** assert (hygepdf ([x, NaN], 4, single (2), 2), single ([y, NaN]), eps ("single")) 461s ***** assert (hygepdf ([x, NaN], 4, 2, single (2)), single ([y, NaN]), eps ("single")) 461s ***** test 461s z = zeros(3,5); 461s z([4,5,6,8,9,12]) = [1, 0.5, 1/6, 0.5, 2/3, 1/6]; 461s assert (hygepdf (x, 4, [0, 1, 2], 2, "vectorexpand"), z, 3 * eps); 461s assert (hygepdf (x, 4, [0, 1, 2]', 2, "vectorexpand"), z, 3 * eps); 461s assert (hygepdf (x', 4, [0, 1, 2], 2, "vectorexpand"), z, 3 * eps); 461s assert (hygepdf (2, 4, [0 ,1, 2], 2, "vectorexpand"), z(:,4), 3 * eps); 461s assert (hygepdf (x, 4, 1, 2, "vectorexpand"), z(2,:), 3 *eps); 461s assert (hygepdf ([NaN, x], 4, [0 1 2]', 2, "vectorexpand"), [NaN(3, 1), z], 3 * eps); 461s ***** error hygepdf () 461s ***** error hygepdf (1) 461s ***** error hygepdf (1,2) 461s ***** error hygepdf (1,2,3) 461s ***** error ... 461s hygepdf (1, ones (3), ones (2), ones (2)) 461s ***** error ... 461s hygepdf (1, ones (2), ones (3), ones (2)) 461s ***** error ... 461s hygepdf (1, ones (2), ones (2), ones (3)) 461s ***** error hygepdf (i, 2, 2, 2) 461s ***** error hygepdf (2, i, 2, 2) 461s ***** error hygepdf (2, 2, i, 2) 461s ***** error hygepdf (2, 2, 2, i) 461s 25 tests, 25 passed, 0 known failure, 0 skipped 461s [inst/dist_fun/hygernd.m] 461s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/hygernd.m 461s ***** assert (size (hygernd (4,2,2)), [1, 1]) 461s ***** assert (size (hygernd (4*ones (2,1), 2,2)), [2, 1]) 461s ***** assert (size (hygernd (4*ones (2,2), 2,2)), [2, 2]) 461s ***** assert (size (hygernd (4, 2*ones (2,1), 2)), [2, 1]) 461s ***** assert (size (hygernd (4, 2*ones (2,2), 2)), [2, 2]) 461s ***** assert (size (hygernd (4, 2, 2*ones (2,1))), [2, 1]) 461s ***** assert (size (hygernd (4, 2, 2*ones (2,2))), [2, 2]) 461s ***** assert (size (hygernd (4, 2, 2, 3)), [3, 3]) 461s ***** assert (size (hygernd (4, 2, 2, [4 1])), [4, 1]) 461s ***** assert (size (hygernd (4, 2, 2, 4, 1)), [4, 1]) 461s ***** assert (class (hygernd (4,2,2)), "double") 461s ***** assert (class (hygernd (single (4),2,2)), "single") 461s ***** assert (class (hygernd (single ([4 4]),2,2)), "single") 461s ***** assert (class (hygernd (4,single (2),2)), "single") 461s ***** assert (class (hygernd (4,single ([2 2]),2)), "single") 461s ***** assert (class (hygernd (4,2,single (2))), "single") 461s ***** assert (class (hygernd (4,2,single ([2 2]))), "single") 461s ***** error hygernd () 461s ***** error hygernd (1) 461s ***** error hygernd (1, 2) 461s ***** error ... 461s hygernd (ones (3), ones (2), ones (2)) 461s ***** error ... 461s hygernd (ones (2), ones (3), ones (2)) 461s ***** error ... 461s hygernd (ones (2), ones (2), ones (3)) 461s ***** error hygernd (i, 2, 3) 461s ***** error hygernd (1, i, 3) 461s ***** error hygernd (1, 2, i) 461s ***** error ... 461s hygernd (1, 2, 3, -1) 461s ***** error ... 461s hygernd (1, 2, 3, 1.2) 461s ***** error ... 461s hygernd (1, 2, 3, ones (2)) 461s ***** error ... 461s hygernd (1, 2, 3, [2 -1 2]) 461s ***** error ... 461s hygernd (1, 2, 3, [2 0 2.5]) 461s ***** error ... 461s hygernd (1, 2, 3, 2, -1, 5) 461s ***** error ... 461s hygernd (1, 2, 3, 2, 1.5, 5) 461s ***** error ... 461s hygernd (2, ones (2), 2, 3) 461s ***** error ... 461s hygernd (2, ones (2), 2, [3, 2]) 461s ***** error ... 461s hygernd (2, ones (2), 2, 3, 2) 461s 36 tests, 36 passed, 0 known failure, 0 skipped 461s [inst/dist_fun/invgcdf.m] 461s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/invgcdf.m 461s ***** demo 461s ## Plot various CDFs from the inverse Gaussian distribution 461s x = 0:0.001:3; 461s p1 = invgcdf (x, 1, 0.2); 461s p2 = invgcdf (x, 1, 1); 461s p3 = invgcdf (x, 1, 3); 461s p4 = invgcdf (x, 3, 0.2); 461s p5 = invgcdf (x, 3, 1); 461s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-c", x, p5, "-y") 461s grid on 461s xlim ([0, 3]) 461s legend ({"μ = 1, σ = 0.2", "μ = 1, σ = 1", "μ = 1, σ = 3", ... 461s "μ = 3, σ = 0.2", "μ = 3, σ = 1"}, "location", "southeast") 461s title ("Inverse Gaussian CDF") 461s xlabel ("values in x") 461s ylabel ("probability") 461s ***** shared x, p1, p1u, y2, y2u, y3, y3u 461s x = [-Inf, -1, 0, 1/2, 1, Inf]; 461s p1 = [0, 0, 0, 0.3650, 0.6681, 1]; 461s p1u = [1, 1, 1, 0.6350, 0.3319, 0]; 461s ***** assert (invgcdf (x, ones (1,6), ones (1,6)), p1, 1e-4) 461s ***** assert (invgcdf (x, 1, 1), p1, 1e-4) 461s ***** assert (invgcdf (x, 1, ones (1,6)), p1, 1e-4) 461s ***** assert (invgcdf (x, ones (1,6), 1), p1, 1e-4) 461s ***** assert (invgcdf (x, 1, [1, 1, 1, NaN, 1, 1]), [p1(1:3), NaN, p1(5:6)], 1e-4) 461s ***** assert (invgcdf (x, [1, 1, 1, NaN, 1, 1], 1), [p1(1:3), NaN, p1(5:6)], 1e-4) 461s ***** assert (invgcdf ([x(1:3), NaN, x(5:6)], 1, 1), [p1(1:3), NaN, p1(5:6)], 1e-4) 461s ***** assert (invgcdf (x, ones (1,6), ones (1,6), "upper"), p1u, 1e-4) 461s ***** assert (invgcdf (x, 1, 1, "upper"), p1u, 1e-4) 461s ***** assert (invgcdf (x, 1, ones (1,6), "upper"), p1u, 1e-4) 461s ***** assert (invgcdf (x, ones (1,6), 1, "upper"), p1u, 1e-4) 461s ***** assert (class (invgcdf (single ([x, NaN]), 1, 1)), "single") 461s ***** assert (class (invgcdf ([x, NaN], 1, single (1))), "single") 461s ***** assert (class (invgcdf ([x, NaN], single (1), 1)), "single") 461s ***** error invgcdf () 461s ***** error invgcdf (1) 461s ***** error invgcdf (1, 2) 461s ***** error invgcdf (1, 2, 3, "tail") 461s ***** error invgcdf (1, 2, 3, 5) 461s ***** error ... 461s invgcdf (ones (3), ones (2), ones(2)) 461s ***** error ... 461s invgcdf (ones (2), ones (3), ones(2)) 461s ***** error ... 461s invgcdf (ones (2), ones (2), ones(3)) 461s ***** error invgcdf (i, 2, 3) 461s ***** error invgcdf (1, i, 3) 461s ***** error invgcdf (1, 2, i) 461s 25 tests, 25 passed, 0 known failure, 0 skipped 461s [inst/dist_fun/invginv.m] 461s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/invginv.m 461s ***** demo 461s ## Plot various iCDFs from the inverse Gaussian distribution 461s p = 0.001:0.001:0.999; 461s x1 = invginv (p, 1, 0.2); 461s x2 = invginv (p, 1, 1); 461s x3 = invginv (p, 1, 3); 461s x4 = invginv (p, 3, 0.2); 461s x5 = invginv (p, 3, 1); 461s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-c", p, x5, "-y") 461s grid on 461s ylim ([0, 3]) 461s legend ({"μ = 1, σ = 0.2", "μ = 1, σ = 1", "μ = 1, σ = 3", ... 461s "μ = 3, σ = 0.2", "μ = 3, σ = 1"}, "location", "northwest") 461s title ("Inverse Gaussian iCDF") 461s xlabel ("probability") 461s ylabel ("x") 461s ***** shared p, x 461s p = [0, 0.3829, 0.6827, 1]; 461s x = [0, 0.5207, 1.0376, Inf]; 461s ***** assert (invginv (p, 1, 1), x, 1e-4); 461s ***** assert (invginv (p, 1, ones (1,4)), x, 1e-4); 461s ***** assert (invginv (p, 1, [-1, 0, 1, 1]), [NaN, NaN, x(3:4)], 1e-4) 461s ***** assert (invginv (p, [-1, 0, 1, 1], 1), [NaN, NaN, x(3:4)], 1e-4) 461s ***** assert (class (invginv (single ([p, NaN]), 0, 1)), "single") 461s ***** assert (class (invginv ([p, NaN], single (0), 1)), "single") 461s ***** assert (class (invginv ([p, NaN], 0, single (1))), "single") 461s ***** error invginv (1) 461s ***** error invginv (1, 2) 461s ***** error ... 461s invginv (1, ones (2), ones (3)) 461s ***** error ... 461s invginv (ones (2), 1, ones (3)) 461s ***** error ... 461s invginv (ones (2), ones (3), 1) 461s ***** error invginv (i, 2, 3) 461s ***** error invginv (1, i, 3) 461s ***** error invginv (1, 2, i) 461s 15 tests, 15 passed, 0 known failure, 0 skipped 461s [inst/dist_fun/invgpdf.m] 461s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/invgpdf.m 461s ***** demo 461s ## Plot various PDFs from the inverse Gaussian distribution 461s x = 0:0.001:3; 461s y1 = invgpdf (x, 1, 0.2); 461s y2 = invgpdf (x, 1, 1); 461s y3 = invgpdf (x, 1, 3); 461s y4 = invgpdf (x, 3, 0.2); 461s y5 = invgpdf (x, 3, 1); 461s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-c", x, y5, "-y") 461s grid on 461s xlim ([0, 3]) 461s ylim ([0, 3]) 461s legend ({"μ = 1, σ = 0.2", "μ = 1, σ = 1", "μ = 1, σ = 3", ... 461s "μ = 3, σ = 0.2", "μ = 3, σ = 1"}, "location", "northeast") 461s title ("Inverse Gaussian PDF") 461s xlabel ("values in x") 461s ylabel ("density") 461s ***** shared x, y 461s x = [-Inf, -1, 0, 1/2, 1, Inf]; 461s y = [0, 0, 0, 0.8788, 0.3989, 0]; 461s ***** assert (invgpdf ([x, NaN], 1, 1), [y, NaN], 1e-4) 461s ***** assert (invgpdf (x, 1, [-2, -1, 0, 1, 1, 1]), [nan(1,3), y([4:6])], 1e-4) 461s ***** assert (class (hncdf (single ([x, NaN]), 1, 1)), "single") 461s ***** assert (class (hncdf ([x, NaN], 1, single (1))), "single") 461s ***** assert (class (hncdf ([x, NaN], single (1), 1)), "single") 461s ***** error invgpdf () 461s ***** error invgpdf (1) 461s ***** error invgpdf (1, 2) 461s ***** error ... 461s invgpdf (1, ones (2), ones (3)) 461s ***** error ... 461s invgpdf (ones (2), 1, ones (3)) 461s ***** error ... 461s invgpdf (ones (2), ones (3), 1) 461s ***** error invgpdf (i, 2, 3) 461s ***** error invgpdf (1, i, 3) 461s ***** error invgpdf (1, 2, i) 461s 14 tests, 14 passed, 0 known failure, 0 skipped 461s [inst/dist_fun/invgrnd.m] 461s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/invgrnd.m 461s ***** assert (size (invgrnd (1, 1, 1)), [1, 1]) 461s ***** assert (size (invgrnd (1, 1, 2)), [2, 2]) 461s ***** assert (size (invgrnd (1, 1, [2, 1])), [2, 1]) 461s ***** assert (size (invgrnd (1, zeros (2, 2))), [2, 2]) 461s ***** assert (size (invgrnd (1, ones (2, 1))), [2, 1]) 461s ***** assert (size (invgrnd (1, ones (2, 2))), [2, 2]) 461s ***** assert (size (invgrnd (ones (2, 1), 1)), [2, 1]) 461s ***** assert (size (invgrnd (ones (2, 2), 1)), [2, 2]) 461s ***** assert (size (invgrnd (1, 1, 3)), [3, 3]) 461s ***** assert (size (invgrnd (1, 1, [4 1])), [4, 1]) 461s ***** assert (size (invgrnd (1, 1, 4, 1)), [4, 1]) 461s ***** test 461s r = invgrnd (1, [1, 0, -1]); 461s assert (r([2:3]), [NaN, NaN]) 461s ***** assert (class (invgrnd (1, 0)), "double") 461s ***** assert (class (invgrnd (1, single (0))), "single") 461s ***** assert (class (invgrnd (1, single ([0 0]))), "single") 461s ***** assert (class (invgrnd (1, single (1))), "single") 461s ***** assert (class (invgrnd (1, single ([1 1]))), "single") 461s ***** assert (class (invgrnd (single (1), 1)), "single") 461s ***** assert (class (invgrnd (single ([1 1]), 1)), "single") 461s ***** error invgrnd () 461s ***** error invgrnd (1) 462s ***** error ... 462s invgrnd (ones (3), ones (2)) 462s ***** error ... 462s invgrnd (ones (2), ones (3)) 462s ***** error invgrnd (i, 2, 3) 462s ***** error invgrnd (1, i, 3) 462s ***** error ... 462s invgrnd (1, 2, -1) 462s ***** error ... 462s invgrnd (1, 2, 1.2) 462s ***** error ... 462s invgrnd (1, 2, ones (2)) 462s ***** error ... 462s invgrnd (1, 2, [2 -1 2]) 462s ***** error ... 462s invgrnd (1, 2, [2 0 2.5]) 462s ***** error ... 462s invgrnd (1, 2, 2, -1, 5) 462s ***** error ... 462s invgrnd (1, 2, 2, 1.5, 5) 462s ***** error ... 462s invgrnd (2, ones (2), 3) 462s ***** error ... 462s invgrnd (2, ones (2), [3, 2]) 462s ***** error ... 462s invgrnd (2, ones (2), 3, 2) 462s 35 tests, 35 passed, 0 known failure, 0 skipped 462s [inst/dist_fun/iwishpdf.m] 462s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/iwishpdf.m 462s ***** assert(iwishpdf(4, 3, 3.1), 0.04226595, 1E-7); 462s ***** assert(iwishpdf([2 -0.3;-0.3 4], [1 0.3;0.3 1], 4), 1.60166e-05, 1E-10); 462s ***** assert(iwishpdf([6 2 5; 2 10 -5; 5 -5 25], ... 462s [9 5 5; 5 10 -8; 5 -8 22], 5.1), 4.946831e-12, 1E-17); 462s ***** error iwishpdf () 462s ***** error iwishpdf (1, 2) 462s ***** error iwishpdf (1, 2, 0) 462s 6 tests, 6 passed, 0 known failure, 0 skipped 462s [inst/dist_fun/iwishrnd.m] 462s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/iwishrnd.m 462s ***** assert(size (iwishrnd (1,2,1)), [1, 1]); 462s ***** assert(size (iwishrnd ([],2,1)), [1, 1]); 462s ***** assert(size (iwishrnd ([3 1; 1 3], 2.00001, [], 1)), [2, 2]); 462s ***** assert(size (iwishrnd (eye(2), 2, [], 3)), [2, 2, 3]); 462s ***** error iwishrnd () 462s ***** error iwishrnd (1) 462s ***** error iwishrnd ([-3 1; 1 3],1) 462s ***** error iwishrnd ([1; 1],1) 462s 8 tests, 8 passed, 0 known failure, 0 skipped 462s [inst/dist_fun/jsucdf.m] 462s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/jsucdf.m 462s ***** error jsucdf () 462s ***** error jsucdf (1, 2, 3, 4) 462s ***** error ... 462s jsucdf (1, ones (2), ones (3)) 462s 3 tests, 3 passed, 0 known failure, 0 skipped 462s [inst/dist_fun/jsupdf.m] 462s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/jsupdf.m 462s ***** error jsupdf () 462s ***** error jsupdf (1, 2, 3, 4) 462s ***** error ... 462s jsupdf (1, ones (2), ones (3)) 462s 3 tests, 3 passed, 0 known failure, 0 skipped 462s [inst/dist_fun/laplacecdf.m] 462s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/laplacecdf.m 462s ***** demo 462s ## Plot various CDFs from the Laplace distribution 462s x = -10:0.01:10; 462s p1 = laplacecdf (x, 0, 1); 462s p2 = laplacecdf (x, 0, 2); 462s p3 = laplacecdf (x, 0, 4); 462s p4 = laplacecdf (x, -5, 4); 462s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-c") 462s grid on 462s xlim ([-10, 10]) 462s legend ({"μ = 0, β = 1", "μ = 0, β = 2", ... 462s "μ = 0, β = 4", "μ = -5, β = 4"}, "location", "southeast") 462s title ("Laplace CDF") 462s xlabel ("values in x") 462s ylabel ("probability") 462s ***** shared x, y 462s x = [-Inf, -log(2), 0, log(2), Inf]; 462s y = [0, 1/4, 1/2, 3/4, 1]; 462s ***** assert (laplacecdf ([x, NaN], 0, 1), [y, NaN]) 462s ***** assert (laplacecdf (x, 0, [-2, -1, 0, 1, 2]), [nan(1, 3), 0.75, 1]) 462s ***** assert (laplacecdf (single ([x, NaN]), 0, 1), single ([y, NaN]), eps ("single")) 462s ***** assert (laplacecdf ([x, NaN], single (0), 1), single ([y, NaN]), eps ("single")) 462s ***** assert (laplacecdf ([x, NaN], 0, single (1)), single ([y, NaN]), eps ("single")) 462s ***** error laplacecdf () 462s ***** error laplacecdf (1) 462s ***** error ... 462s laplacecdf (1, 2) 462s ***** error ... 462s laplacecdf (1, 2, 3, 4, 5) 462s ***** error laplacecdf (1, 2, 3, "tail") 462s ***** error laplacecdf (1, 2, 3, 4) 462s ***** error ... 462s laplacecdf (ones (3), ones (2), ones (2)) 462s ***** error ... 462s laplacecdf (ones (2), ones (3), ones (2)) 462s ***** error ... 462s laplacecdf (ones (2), ones (2), ones (3)) 462s ***** error laplacecdf (i, 2, 2) 462s ***** error laplacecdf (2, i, 2) 462s ***** error laplacecdf (2, 2, i) 462s 17 tests, 17 passed, 0 known failure, 0 skipped 462s [inst/dist_fun/laplaceinv.m] 462s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/laplaceinv.m 462s ***** demo 462s ## Plot various iCDFs from the Laplace distribution 462s p = 0.001:0.001:0.999; 462s x1 = cauchyinv (p, 0, 1); 462s x2 = cauchyinv (p, 0, 2); 462s x3 = cauchyinv (p, 0, 4); 462s x4 = cauchyinv (p, -5, 4); 462s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-c") 462s grid on 462s ylim ([-10, 10]) 462s legend ({"μ = 0, β = 1", "μ = 0, β = 2", ... 462s "μ = 0, β = 4", "μ = -5, β = 4"}, "location", "northwest") 462s title ("Laplace iCDF") 462s xlabel ("probability") 462s ylabel ("values in x") 462s ***** shared p, x 462s p = [-1 0 0.5 1 2]; 462s x = [NaN, -Inf, 0, Inf, NaN]; 462s ***** assert (laplaceinv (p, 0, 1), x) 462s ***** assert (laplaceinv (p, 0, [-2, -1, 0, 1, 2]), [nan(1, 3), Inf, NaN]) 462s ***** assert (laplaceinv ([p, NaN], 0, 1), [x, NaN]) 462s ***** assert (laplaceinv (single ([p, NaN]), 0, 1), single ([x, NaN])) 462s ***** assert (laplaceinv ([p, NaN], single (0), 1), single ([x, NaN])) 462s ***** assert (laplaceinv ([p, NaN], 0, single (1)), single ([x, NaN])) 462s ***** error laplaceinv () 462s ***** error laplaceinv (1) 462s ***** error ... 462s laplaceinv (1, 2) 462s ***** error laplaceinv (1, 2, 3, 4) 462s ***** error ... 462s laplaceinv (1, ones (2), ones (3)) 462s ***** error ... 462s laplaceinv (ones (2), 1, ones (3)) 462s ***** error ... 462s laplaceinv (ones (2), ones (3), 1) 462s ***** error laplaceinv (i, 2, 3) 462s ***** error laplaceinv (1, i, 3) 462s ***** error laplaceinv (1, 2, i) 462s 16 tests, 16 passed, 0 known failure, 0 skipped 462s [inst/dist_fun/laplacepdf.m] 462s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/laplacepdf.m 462s ***** demo 462s ## Plot various PDFs from the Laplace distribution 462s x = -10:0.01:10; 462s y1 = laplacepdf (x, 0, 1); 462s y2 = laplacepdf (x, 0, 2); 462s y3 = laplacepdf (x, 0, 4); 462s y4 = laplacepdf (x, -5, 4); 462s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-c") 462s grid on 462s xlim ([-10, 10]) 462s ylim ([0, 0.6]) 462s legend ({"μ = 0, β = 1", "μ = 0, β = 2", ... 462s "μ = 0, β = 4", "μ = -5, β = 4"}, "location", "northeast") 462s title ("Laplace PDF") 462s xlabel ("values in x") 462s ylabel ("density") 462s ***** shared x, y 462s x = [-Inf -log(2) 0 log(2) Inf]; 462s y = [0, 1/4, 1/2, 1/4, 0]; 462s ***** assert (laplacepdf ([x, NaN], 0, 1), [y, NaN]) 462s ***** assert (laplacepdf (x, 0, [-2, -1, 0, 1, 2]), [nan(1, 3), 0.25, 0]) 462s ***** assert (laplacepdf (single ([x, NaN]), 0, 1), single ([y, NaN])) 462s ***** assert (laplacepdf ([x, NaN], single (0), 1), single ([y, NaN])) 462s ***** assert (laplacepdf ([x, NaN], 0, single (1)), single ([y, NaN])) 462s ***** error laplacepdf () 462s ***** error laplacepdf (1) 462s ***** error ... 462s laplacepdf (1, 2) 462s ***** error laplacepdf (1, 2, 3, 4) 462s ***** error ... 462s laplacepdf (1, ones (2), ones (3)) 462s ***** error ... 462s laplacepdf (ones (2), 1, ones (3)) 462s ***** error ... 462s laplacepdf (ones (2), ones (3), 1) 462s ***** error laplacepdf (i, 2, 3) 462s ***** error laplacepdf (1, i, 3) 462s ***** error laplacepdf (1, 2, i) 462s 15 tests, 15 passed, 0 known failure, 0 skipped 462s [inst/dist_fun/laplacernd.m] 462s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/laplacernd.m 462s ***** assert (size (laplacernd (1, 1)), [1 1]) 462s ***** assert (size (laplacernd (1, ones (2,1))), [2, 1]) 462s ***** assert (size (laplacernd (1, ones (2,2))), [2, 2]) 462s ***** assert (size (laplacernd (ones (2,1), 1)), [2, 1]) 462s ***** assert (size (laplacernd (ones (2,2), 1)), [2, 2]) 462s ***** assert (size (laplacernd (1, 1, 3)), [3, 3]) 462s ***** assert (size (laplacernd (1, 1, [4, 1])), [4, 1]) 462s ***** assert (size (laplacernd (1, 1, 4, 1)), [4, 1]) 462s ***** assert (size (laplacernd (1, 1, 4, 1, 5)), [4, 1, 5]) 462s ***** assert (size (laplacernd (1, 1, 0, 1)), [0, 1]) 462s ***** assert (size (laplacernd (1, 1, 1, 0)), [1, 0]) 462s ***** assert (size (laplacernd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 462s ***** assert (class (laplacernd (1, 1)), "double") 462s ***** assert (class (laplacernd (1, single (1))), "single") 462s ***** assert (class (laplacernd (1, single ([1, 1]))), "single") 462s ***** assert (class (laplacernd (single (1), 1)), "single") 462s ***** assert (class (laplacernd (single ([1, 1]), 1)), "single") 462s ***** error laplacernd () 462s ***** error laplacernd (1) 462s ***** error ... 462s laplacernd (ones (3), ones (2)) 462s ***** error ... 462s laplacernd (ones (2), ones (3)) 462s ***** error laplacernd (i, 2, 3) 462s ***** error laplacernd (1, i, 3) 462s ***** error ... 462s laplacernd (1, 2, -1) 462s ***** error ... 462s laplacernd (1, 2, 1.2) 462s ***** error ... 462s laplacernd (1, 2, ones (2)) 462s ***** error ... 462s laplacernd (1, 2, [2 -1 2]) 462s ***** error ... 462s laplacernd (1, 2, [2 0 2.5]) 462s ***** error ... 462s laplacernd (1, 2, 2, -1, 5) 462s ***** error ... 462s laplacernd (1, 2, 2, 1.5, 5) 462s ***** error ... 462s laplacernd (2, ones (2), 3) 462s ***** error ... 462s laplacernd (2, ones (2), [3, 2]) 462s ***** error ... 462s laplacernd (2, ones (2), 3, 2) 462s 33 tests, 33 passed, 0 known failure, 0 skipped 462s [inst/dist_fun/logicdf.m] 462s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/logicdf.m 462s ***** demo 462s ## Plot various CDFs from the logistic distribution 462s x = -5:0.01:20; 462s p1 = logicdf (x, 5, 2); 462s p2 = logicdf (x, 9, 3); 462s p3 = logicdf (x, 9, 4); 462s p4 = logicdf (x, 6, 2); 462s p5 = logicdf (x, 2, 1); 462s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-c", x, p5, "-m") 462s grid on 462s legend ({"μ = 5, σ = 2", "μ = 9, σ = 3", "μ = 9, σ = 4", ... 462s "μ = 6, σ = 2", "μ = 2, σ = 1"}, "location", "southeast") 462s title ("Logistic CDF") 462s xlabel ("values in x") 462s ylabel ("probability") 462s ***** shared x, y 462s x = [-Inf -log(3) 0 log(3) Inf]; 462s y = [0, 1/4, 1/2, 3/4, 1]; 462s ***** assert (logicdf ([x, NaN], 0, 1), [y, NaN], eps) 462s ***** assert (logicdf (x, 0, [-2, -1, 0, 1, 2]), [nan(1, 3), 0.75, 1], eps) 462s ***** assert (logicdf (single ([x, NaN]), 0, 1), single ([y, NaN]), eps ("single")) 462s ***** assert (logicdf ([x, NaN], single (0), 1), single ([y, NaN]), eps ("single")) 462s ***** assert (logicdf ([x, NaN], 0, single (1)), single ([y, NaN]), eps ("single")) 462s ***** error logicdf () 462s ***** error logicdf (1) 462s ***** error ... 462s logicdf (1, 2) 462s ***** error logicdf (1, 2, 3, "tail") 462s ***** error logicdf (1, 2, 3, 4) 462s ***** error ... 462s logicdf (1, ones (2), ones (3)) 462s ***** error ... 462s logicdf (ones (2), 1, ones (3)) 462s ***** error ... 462s logicdf (ones (2), ones (3), 1) 462s ***** error logicdf (i, 2, 3) 462s ***** error logicdf (1, i, 3) 462s ***** error logicdf (1, 2, i) 462s 16 tests, 16 passed, 0 known failure, 0 skipped 462s [inst/dist_fun/logiinv.m] 462s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/logiinv.m 462s ***** demo 462s ## Plot various iCDFs from the logistic distribution 462s p = 0.001:0.001:0.999; 462s x1 = logiinv (p, 5, 2); 462s x2 = logiinv (p, 9, 3); 462s x3 = logiinv (p, 9, 4); 462s x4 = logiinv (p, 6, 2); 462s x5 = logiinv (p, 2, 1); 462s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-c", p, x5, "-m") 462s grid on 462s legend ({"μ = 5, σ = 2", "μ = 9, σ = 3", "μ = 9, σ = 4", ... 462s "μ = 6, σ = 2", "μ = 2, σ = 1"}, "location", "southeast") 462s title ("Logistic iCDF") 462s xlabel ("probability") 462s ylabel ("x") 462s ***** test 462s p = [0.01:0.01:0.99]; 462s assert (logiinv (p, 0, 1), log (p ./ (1-p)), 25*eps); 462s ***** shared p 462s p = [-1 0 0.5 1 2]; 462s ***** assert (logiinv (p, 0, 1), [NaN -Inf 0 Inf NaN]) 462s ***** assert (logiinv (p, 0, [-1, 0, 1, 2, 3]), [NaN NaN 0 Inf NaN]) 462s ***** assert (logiinv ([p, NaN], 0, 1), [NaN -Inf 0 Inf NaN NaN]) 462s ***** assert (logiinv (single ([p, NaN]), 0, 1), single ([NaN -Inf 0 Inf NaN NaN])) 462s ***** assert (logiinv ([p, NaN], single (0), 1), single ([NaN -Inf 0 Inf NaN NaN])) 462s ***** assert (logiinv ([p, NaN], 0, single (1)), single ([NaN -Inf 0 Inf NaN NaN])) 462s ***** error logiinv () 462s ***** error logiinv (1) 462s ***** error ... 462s logiinv (1, 2) 462s ***** error ... 462s logiinv (1, ones (2), ones (3)) 462s ***** error ... 462s logiinv (ones (2), 1, ones (3)) 462s ***** error ... 462s logiinv (ones (2), ones (3), 1) 462s ***** error logiinv (i, 2, 3) 462s ***** error logiinv (1, i, 3) 462s ***** error logiinv (1, 2, i) 462s 16 tests, 16 passed, 0 known failure, 0 skipped 462s [inst/dist_fun/logipdf.m] 462s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/logipdf.m 462s ***** demo 462s ## Plot various PDFs from the logistic distribution 462s x = -5:0.01:20; 462s y1 = logipdf (x, 5, 2); 462s y2 = logipdf (x, 9, 3); 462s y3 = logipdf (x, 9, 4); 462s y4 = logipdf (x, 6, 2); 462s y5 = logipdf (x, 2, 1); 462s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-c", x, y5, "-m") 462s grid on 462s ylim ([0, 0.3]) 462s legend ({"μ = 5, σ = 2", "μ = 9, σ = 3", "μ = 9, σ = 4", ... 462s "μ = 6, σ = 2", "μ = 2, σ = 1"}, "location", "northeast") 462s title ("Logistic PDF") 462s xlabel ("values in x") 462s ylabel ("density") 462s ***** shared x, y 462s x = [-Inf -log(4) 0 log(4) Inf]; 462s y = [0, 0.16, 1/4, 0.16, 0]; 462s ***** assert (logipdf ([x, NaN], 0, 1), [y, NaN], eps) 462s ***** assert (logipdf (x, 0, [-2, -1, 0, 1, 2]), [nan(1, 3), y([4:5])], eps) 462s ***** assert (logipdf (single ([x, NaN]), 0, 1), single ([y, NaN]), eps ("single")) 462s ***** assert (logipdf ([x, NaN], single (0), 1), single ([y, NaN]), eps ("single")) 462s ***** assert (logipdf ([x, NaN], 0, single (1)), single ([y, NaN]), eps ("single")) 462s ***** error logipdf () 462s ***** error logipdf (1) 462s ***** error ... 462s logipdf (1, 2) 462s ***** error ... 462s logipdf (1, ones (2), ones (3)) 462s ***** error ... 462s logipdf (ones (2), 1, ones (3)) 462s ***** error ... 462s logipdf (ones (2), ones (3), 1) 462s ***** error logipdf (i, 2, 3) 462s ***** error logipdf (1, i, 3) 462s ***** error logipdf (1, 2, i) 462s 14 tests, 14 passed, 0 known failure, 0 skipped 462s [inst/dist_fun/logirnd.m] 462s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/logirnd.m 462s ***** assert (size (logirnd (1, 1)), [1 1]) 462s ***** assert (size (logirnd (1, ones (2,1))), [2, 1]) 462s ***** assert (size (logirnd (1, ones (2,2))), [2, 2]) 462s ***** assert (size (logirnd (ones (2,1), 1)), [2, 1]) 462s ***** assert (size (logirnd (ones (2,2), 1)), [2, 2]) 462s ***** assert (size (logirnd (1, 1, 3)), [3, 3]) 462s ***** assert (size (logirnd (1, 1, [4, 1])), [4, 1]) 462s ***** assert (size (logirnd (1, 1, 4, 1)), [4, 1]) 462s ***** assert (size (logirnd (1, 1, 4, 1, 5)), [4, 1, 5]) 462s ***** assert (size (logirnd (1, 1, 0, 1)), [0, 1]) 462s ***** assert (size (logirnd (1, 1, 1, 0)), [1, 0]) 462s ***** assert (size (logirnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 462s ***** assert (class (logirnd (1, 1)), "double") 462s ***** assert (class (logirnd (1, single (1))), "single") 462s ***** assert (class (logirnd (1, single ([1, 1]))), "single") 462s ***** assert (class (logirnd (single (1), 1)), "single") 462s ***** assert (class (logirnd (single ([1, 1]), 1)), "single") 462s ***** error logirnd () 462s ***** error logirnd (1) 462s ***** error ... 462s logirnd (ones (3), ones (2)) 462s ***** error ... 462s logirnd (ones (2), ones (3)) 462s ***** error logirnd (i, 2, 3) 462s ***** error logirnd (1, i, 3) 462s ***** error ... 462s logirnd (1, 2, -1) 462s ***** error ... 462s logirnd (1, 2, 1.2) 462s ***** error ... 462s logirnd (1, 2, ones (2)) 462s ***** error ... 462s logirnd (1, 2, [2 -1 2]) 462s ***** error ... 462s logirnd (1, 2, [2 0 2.5]) 462s ***** error ... 462s logirnd (1, 2, 2, -1, 5) 462s ***** error ... 462s logirnd (1, 2, 2, 1.5, 5) 462s ***** error ... 462s logirnd (2, ones (2), 3) 462s ***** error ... 462s logirnd (2, ones (2), [3, 2]) 462s ***** error ... 462s logirnd (2, ones (2), 3, 2) 462s 33 tests, 33 passed, 0 known failure, 0 skipped 462s [inst/dist_fun/loglcdf.m] 462s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/loglcdf.m 462s ***** demo 462s ## Plot various CDFs from the log-logistic distribution 462s x = 0:0.001:2; 462s p1 = loglcdf (x, log (1), 1/0.5); 462s p2 = loglcdf (x, log (1), 1); 462s p3 = loglcdf (x, log (1), 1/2); 462s p4 = loglcdf (x, log (1), 1/4); 462s p5 = loglcdf (x, log (1), 1/8); 462s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-c", x, p5, "-m") 462s legend ({"σ = 2 (β = 0.5)", "σ = 1 (β = 1)", "σ = 0.5 (β = 2)", ... 462s "σ = 0.25 (β = 4)", "σ = 0.125 (β = 8)"}, "location", "northwest") 462s grid on 462s title ("Log-logistic CDF") 462s xlabel ("values in x") 462s ylabel ("probability") 462s text (0.05, 0.64, "μ = 0 (α = 1), values of σ (β) as shown in legend") 462s ***** shared out1, out2 462s out1 = [0, 0.5, 0.66666667, 0.75, 0.8, 0.83333333]; 462s out2 = [0, 0.4174, 0.4745, 0.5082, 0.5321, 0.5506]; 462s ***** assert (loglcdf ([0:5], 0, 1), out1, 1e-8) 462s ***** assert (loglcdf ([0:5], 0, 1, "upper"), 1 - out1, 1e-8) 462s ***** assert (loglcdf ([0:5], 0, 1), out1, 1e-8) 462s ***** assert (loglcdf ([0:5], 0, 1, "upper"), 1 - out1, 1e-8) 462s ***** assert (loglcdf ([0:5], 1, 3), out2, 1e-4) 462s ***** assert (loglcdf ([0:5], 1, 3, "upper"), 1 - out2, 1e-4) 462s ***** assert (class (loglcdf (single (1), 2, 3)), "single") 462s ***** assert (class (loglcdf (1, single (2), 3)), "single") 462s ***** assert (class (loglcdf (1, 2, single (3))), "single") 462s ***** error loglcdf (1) 462s ***** error loglcdf (1, 2) 462s ***** error ... 462s loglcdf (1, 2, 3, 4) 462s ***** error ... 462s loglcdf (1, 2, 3, "uper") 462s ***** error ... 462s loglcdf (1, ones (2), ones (3)) 462s ***** error ... 462s loglcdf (1, ones (2), ones (3), "upper") 462s ***** error ... 462s loglcdf (ones (2), 1, ones (3)) 462s ***** error ... 462s loglcdf (ones (2), 1, ones (3), "upper") 462s ***** error ... 462s loglcdf (ones (2), ones (3), 1) 462s ***** error ... 462s loglcdf (ones (2), ones (3), 1, "upper") 462s ***** error loglcdf (i, 2, 3) 462s ***** error loglcdf (i, 2, 3, "upper") 462s ***** error loglcdf (1, i, 3) 462s ***** error loglcdf (1, i, 3, "upper") 462s ***** error loglcdf (1, 2, i) 462s ***** error loglcdf (1, 2, i, "upper") 462s 25 tests, 25 passed, 0 known failure, 0 skipped 462s [inst/dist_fun/loglinv.m] 462s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/loglinv.m 462s ***** demo 462s ## Plot various iCDFs from the log-logistic distribution 462s p = 0.001:0.001:0.999; 462s x1 = loglinv (p, log (1), 1/0.5); 462s x2 = loglinv (p, log (1), 1); 462s x3 = loglinv (p, log (1), 1/2); 462s x4 = loglinv (p, log (1), 1/4); 462s x5 = loglinv (p, log (1), 1/8); 462s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-c", p, x5, "-m") 462s ylim ([0, 20]) 462s grid on 462s legend ({"σ = 2 (β = 0.5)", "σ = 1 (β = 1)", "σ = 0.5 (β = 2)", ... 462s "σ = 0.25 (β = 4)", "σ = 0.125 (β = 8)"}, "location", "northwest") 462s title ("Log-logistic iCDF") 462s xlabel ("probability") 462s ylabel ("x") 462s text (0.03, 12.5, "μ = 0 (α = 1), values of σ (β) as shown in legend") 462s ***** shared p, out1, out2 462s p = [-1, 0, 0.2, 0.5, 0.8, 0.95, 1, 2]; 462s out1 = [NaN, 0, 0.25, 1, 4, 19, Inf, NaN]; 462s out2 = [NaN, 0, 0.0424732, 2.718282, 173.970037, 18644.695061, Inf, NaN]; 462s ***** assert (loglinv (p, 0, 1), out1, 1e-8) 462s ***** assert (loglinv (p, 0, 1), out1, 1e-8) 462s ***** assert (loglinv (p, 1, 3), out2, 1e-6) 462s ***** assert (class (loglinv (single (1), 2, 3)), "single") 462s ***** assert (class (loglinv (1, single (2), 3)), "single") 462s ***** assert (class (loglinv (1, 2, single (3))), "single") 462s ***** error loglinv (1) 462s ***** error loglinv (1, 2) 462s ***** error ... 462s loglinv (1, ones (2), ones (3)) 462s ***** error ... 462s loglinv (ones (2), 1, ones (3)) 463s ***** error ... 463s loglinv (ones (2), ones (3), 1) 463s ***** error loglinv (i, 2, 3) 463s ***** error loglinv (1, i, 3) 463s ***** error loglinv (1, 2, i) 463s 14 tests, 14 passed, 0 known failure, 0 skipped 463s [inst/dist_fun/loglpdf.m] 463s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/loglpdf.m 463s ***** demo 463s ## Plot various PDFs from the log-logistic distribution 463s x = 0.001:0.001:2; 463s y1 = loglpdf (x, log (1), 1/0.5); 463s y2 = loglpdf (x, log (1), 1); 463s y3 = loglpdf (x, log (1), 1/2); 463s y4 = loglpdf (x, log (1), 1/4); 463s y5 = loglpdf (x, log (1), 1/8); 463s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-c", x, y5, "-m") 463s grid on 463s ylim ([0,3]) 463s legend ({"σ = 2 (β = 0.5)", "σ = 1 (β = 1)", "σ = 0.5 (β = 2)", ... 463s "σ = 0.25 (β = 4)", "σ = 0.125 (β = 8)"}, "location", "northeast") 463s title ("Log-logistic PDF") 463s xlabel ("values in x") 463s ylabel ("density") 463s text (0.1, 2.8, "μ = 0 (α = 1), values of σ (β) as shown in legend") 463s ***** shared out1, out2 463s out1 = [0, 0, 1, 0.2500, 0.1111, 0.0625, 0.0400, 0.0278, 0]; 463s out2 = [0, 0, 0.0811, 0.0416, 0.0278, 0.0207, 0.0165, 0]; 463s ***** assert (loglpdf ([-1,0,realmin,1:5,Inf], 0, 1), out1, 1e-4) 463s ***** assert (loglpdf ([-1,0,realmin,1:5,Inf], 0, 1), out1, 1e-4) 463s ***** assert (loglpdf ([-1:5,Inf], 1, 3), out2, 1e-4) 463s ***** assert (class (loglpdf (single (1), 2, 3)), "single") 463s ***** assert (class (loglpdf (1, single (2), 3)), "single") 463s ***** assert (class (loglpdf (1, 2, single (3))), "single") 463s ***** error loglpdf (1) 463s ***** error loglpdf (1, 2) 463s ***** error ... 463s loglpdf (1, ones (2), ones (3)) 463s ***** error ... 463s loglpdf (ones (2), 1, ones (3)) 463s ***** error ... 463s loglpdf (ones (2), ones (3), 1) 463s ***** error loglpdf (i, 2, 3) 463s ***** error loglpdf (1, i, 3) 463s ***** error loglpdf (1, 2, i) 463s 14 tests, 14 passed, 0 known failure, 0 skipped 463s [inst/dist_fun/loglrnd.m] 463s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/loglrnd.m 463s ***** assert (size (loglrnd (1, 1)), [1 1]) 463s ***** assert (size (loglrnd (1, ones (2,1))), [2, 1]) 463s ***** assert (size (loglrnd (1, ones (2,2))), [2, 2]) 463s ***** assert (size (loglrnd (ones (2,1), 1)), [2, 1]) 463s ***** assert (size (loglrnd (ones (2,2), 1)), [2, 2]) 463s ***** assert (size (loglrnd (1, 1, 3)), [3, 3]) 463s ***** assert (size (loglrnd (1, 1, [4, 1])), [4, 1]) 463s ***** assert (size (loglrnd (1, 1, 4, 1)), [4, 1]) 463s ***** assert (size (loglrnd (1, 1, 4, 1, 5)), [4, 1, 5]) 463s ***** assert (size (loglrnd (1, 1, 0, 1)), [0, 1]) 463s ***** assert (size (loglrnd (1, 1, 1, 0)), [1, 0]) 463s ***** assert (size (loglrnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 463s ***** assert (class (loglrnd (1, 1)), "double") 463s ***** assert (class (loglrnd (1, single (1))), "single") 463s ***** assert (class (loglrnd (1, single ([1, 1]))), "single") 463s ***** assert (class (loglrnd (single (1), 1)), "single") 463s ***** assert (class (loglrnd (single ([1, 1]), 1)), "single") 463s ***** error loglrnd () 463s ***** error loglrnd (1) 463s ***** error ... 463s loglrnd (ones (3), ones (2)) 463s ***** error ... 463s loglrnd (ones (2), ones (3)) 463s ***** error loglrnd (i, 2, 3) 463s ***** error loglrnd (1, i, 3) 463s ***** error ... 463s loglrnd (1, 2, -1) 463s ***** error ... 463s loglrnd (1, 2, 1.2) 463s ***** error ... 463s loglrnd (1, 2, ones (2)) 463s ***** error ... 463s loglrnd (1, 2, [2 -1 2]) 463s ***** error ... 463s loglrnd (1, 2, [2 0 2.5]) 463s ***** error ... 463s loglrnd (1, 2, 2, -1, 5) 463s ***** error ... 463s loglrnd (1, 2, 2, 1.5, 5) 463s ***** error ... 463s loglrnd (2, ones (2), 3) 463s ***** error ... 463s loglrnd (2, ones (2), [3, 2]) 463s ***** error ... 463s loglrnd (2, ones (2), 3, 2) 463s 33 tests, 33 passed, 0 known failure, 0 skipped 463s [inst/dist_fun/logncdf.m] 463s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/logncdf.m 463s ***** demo 463s ## Plot various CDFs from the log-normal distribution 463s x = 0:0.01:3; 463s p1 = logncdf (x, 0, 1); 463s p2 = logncdf (x, 0, 0.5); 463s p3 = logncdf (x, 0, 0.25); 463s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r") 463s grid on 463s legend ({"μ = 0, σ = 1", "μ = 0, σ = 0.5", "μ = 0, σ = 0.25"}, ... 463s "location", "southeast") 463s title ("Log-normal CDF") 463s xlabel ("values in x") 463s ylabel ("probability") 463s ***** shared x, y 463s x = [-1, 0, 1, e, Inf]; 463s y = [0, 0, 0.5, 1/2+1/2*erf(1/2), 1]; 463s ***** assert (logncdf (x, zeros (1,5), sqrt(2)*ones (1,5)), y, eps) 463s ***** assert (logncdf (x, zeros (1,5), sqrt(2)*ones (1,5), []), y, eps) 463s ***** assert (logncdf (x, 0, sqrt(2)*ones (1,5)), y, eps) 463s ***** assert (logncdf (x, zeros (1,5), sqrt(2)), y, eps) 463s ***** assert (logncdf (x, [0 1 NaN 0 1], sqrt(2)), [0 0 NaN y(4:5)], eps) 463s ***** assert (logncdf (x, 0, sqrt(2)*[0 NaN Inf 1 1]), [NaN NaN y(3:5)], eps) 463s ***** assert (logncdf ([x(1:3) NaN x(5)], 0, sqrt(2)), [y(1:3) NaN y(5)], eps) 463s ***** assert (logncdf ([x, NaN], 0, sqrt(2)), [y, NaN], eps) 463s ***** assert (logncdf (single ([x, NaN]), 0, sqrt(2)), single ([y, NaN]), eps ("single")) 463s ***** assert (logncdf ([x, NaN], single (0), sqrt(2)), single ([y, NaN]), eps ("single")) 463s ***** assert (logncdf ([x, NaN], 0, single (sqrt(2))), single ([y, NaN]), eps ("single")) 463s ***** error logncdf () 463s ***** error logncdf (1,2,3,4,5,6,7) 463s ***** error logncdf (1, 2, 3, 4, "uper") 463s ***** error ... 463s logncdf (ones (3), ones (2), ones (2)) 463s ***** error logncdf (2, 3, 4, [1, 2]) 463s ***** error ... 463s [p, plo, pup] = logncdf (1, 2, 3) 463s ***** error [p, plo, pup] = ... 463s logncdf (1, 2, 3, [1, 0; 0, 1], 0) 463s ***** error [p, plo, pup] = ... 463s logncdf (1, 2, 3, [1, 0; 0, 1], 1.22) 463s ***** error [p, plo, pup] = ... 463s logncdf (1, 2, 3, [1, 0; 0, 1], "alpha", "upper") 463s ***** error logncdf (i, 2, 2) 463s ***** error logncdf (2, i, 2) 463s ***** error logncdf (2, 2, i) 463s ***** error ... 463s [p, plo, pup] =logncdf (1, 2, 3, [1, 0; 0, -inf], 0.04) 463s 24 tests, 24 passed, 0 known failure, 0 skipped 463s [inst/dist_fun/logninv.m] 463s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/logninv.m 463s ***** demo 463s ## Plot various iCDFs from the log-normal distribution 463s p = 0.001:0.001:0.999; 463s x1 = logninv (p, 0, 1); 463s x2 = logninv (p, 0, 0.5); 463s x3 = logninv (p, 0, 0.25); 463s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r") 463s grid on 463s ylim ([0, 3]) 463s legend ({"μ = 0, σ = 1", "μ = 0, σ = 0.5", "μ = 0, σ = 0.25"}, ... 463s "location", "northwest") 463s title ("Log-normal iCDF") 463s xlabel ("probability") 463s ylabel ("values in x") 463s ***** shared p 463s p = [-1 0 0.5 1 2]; 463s ***** assert (logninv (p, ones (1,5), ones (1,5)), [NaN 0 e Inf NaN], 2*eps) 463s ***** assert (logninv (p, 1, ones (1,5)), [NaN 0 e Inf NaN], 2*eps) 463s ***** assert (logninv (p, ones (1,5), 1), [NaN 0 e Inf NaN], 2*eps) 463s ***** assert (logninv (p, [1 1 NaN 0 1], 1), [NaN 0 NaN Inf NaN]) 463s ***** assert (logninv (p, 1, [1 0 NaN Inf 1]), [NaN NaN NaN NaN NaN]) 463s ***** assert (logninv ([p(1:2) NaN p(4:5)], 1, 2), [NaN 0 NaN Inf NaN]) 463s ***** assert (logninv ([p, NaN], 1, 1), [NaN 0 e Inf NaN NaN], 2*eps) 463s ***** assert (logninv (single ([p, NaN]), 1, 1), single ([NaN 0 e Inf NaN NaN])) 463s ***** assert (logninv ([p, NaN], single (1), 1), single ([NaN 0 e Inf NaN NaN])) 463s ***** assert (logninv ([p, NaN], 1, single (1)), single ([NaN 0 e Inf NaN NaN])) 463s ***** error logninv () 463s ***** error logninv (1,2,3,4) 463s ***** error logninv (ones (3), ones (2), ones (2)) 463s ***** error logninv (ones (2), ones (3), ones (2)) 463s ***** error logninv (ones (2), ones (2), ones (3)) 463s ***** error logninv (i, 2, 2) 463s ***** error logninv (2, i, 2) 463s ***** error logninv (2, 2, i) 463s 18 tests, 18 passed, 0 known failure, 0 skipped 463s [inst/dist_fun/lognpdf.m] 463s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/lognpdf.m 463s ***** demo 463s ## Plot various PDFs from the log-normal distribution 463s x = 0:0.01:5; 463s y1 = lognpdf (x, 0, 1); 463s y2 = lognpdf (x, 0, 0.5); 463s y3 = lognpdf (x, 0, 0.25); 463s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r") 463s grid on 463s ylim ([0, 2]) 463s legend ({"μ = 0, σ = 1", "μ = 0, σ = 0.5", "μ = 0, σ = 0.25"}, ... 463s "location", "northeast") 463s title ("Log-normal PDF") 463s xlabel ("values in x") 463s ylabel ("density") 463s ***** shared x, y 463s x = [-1 0 e Inf]; 463s y = [0, 0, 1/(e*sqrt(2*pi)) * exp(-1/2), 0]; 463s ***** assert (lognpdf (x, zeros (1,4), ones (1,4)), y, eps) 463s ***** assert (lognpdf (x, 0, ones (1,4)), y, eps) 463s ***** assert (lognpdf (x, zeros (1,4), 1), y, eps) 463s ***** assert (lognpdf (x, [0 1 NaN 0], 1), [0 0 NaN y(4)], eps) 463s ***** assert (lognpdf (x, 0, [0 NaN Inf 1]), [NaN NaN NaN y(4)], eps) 463s ***** assert (lognpdf ([x, NaN], 0, 1), [y, NaN], eps) 463s ***** assert (lognpdf (single ([x, NaN]), 0, 1), single ([y, NaN]), eps ("single")) 463s ***** assert (lognpdf ([x, NaN], single (0), 1), single ([y, NaN]), eps ("single")) 463s ***** assert (lognpdf ([x, NaN], 0, single (1)), single ([y, NaN]), eps ("single")) 463s ***** error lognpdf () 463s ***** error lognpdf (1,2,3,4) 463s ***** error lognpdf (ones (3), ones (2), ones (2)) 463s ***** error lognpdf (ones (2), ones (3), ones (2)) 463s ***** error lognpdf (ones (2), ones (2), ones (3)) 463s ***** error lognpdf (i, 2, 2) 463s ***** error lognpdf (2, i, 2) 463s ***** error lognpdf (2, 2, i) 463s 17 tests, 17 passed, 0 known failure, 0 skipped 463s [inst/dist_fun/lognrnd.m] 463s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/lognrnd.m 463s ***** assert (size (lognrnd (1, 1)), [1 1]) 463s ***** assert (size (lognrnd (1, ones (2,1))), [2, 1]) 463s ***** assert (size (lognrnd (1, ones (2,2))), [2, 2]) 463s ***** assert (size (lognrnd (ones (2,1), 1)), [2, 1]) 463s ***** assert (size (lognrnd (ones (2,2), 1)), [2, 2]) 463s ***** assert (size (lognrnd (1, 1, 3)), [3, 3]) 463s ***** assert (size (lognrnd (1, 1, [4, 1])), [4, 1]) 463s ***** assert (size (lognrnd (1, 1, 4, 1)), [4, 1]) 463s ***** assert (size (lognrnd (1, 1, 4, 1, 5)), [4, 1, 5]) 463s ***** assert (size (lognrnd (1, 1, 0, 1)), [0, 1]) 463s ***** assert (size (lognrnd (1, 1, 1, 0)), [1, 0]) 463s ***** assert (size (lognrnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 463s ***** assert (class (lognrnd (1, 1)), "double") 463s ***** assert (class (lognrnd (1, single (1))), "single") 463s ***** assert (class (lognrnd (1, single ([1, 1]))), "single") 463s ***** assert (class (lognrnd (single (1), 1)), "single") 463s ***** assert (class (lognrnd (single ([1, 1]), 1)), "single") 463s ***** error lognrnd () 463s ***** error lognrnd (1) 463s ***** error ... 463s lognrnd (ones (3), ones (2)) 463s ***** error ... 463s lognrnd (ones (2), ones (3)) 463s ***** error lognrnd (i, 2, 3) 463s ***** error lognrnd (1, i, 3) 463s ***** error ... 463s lognrnd (1, 2, -1) 463s ***** error ... 463s lognrnd (1, 2, 1.2) 463s ***** error ... 463s lognrnd (1, 2, ones (2)) 463s ***** error ... 463s lognrnd (1, 2, [2 -1 2]) 463s ***** error ... 463s lognrnd (1, 2, [2 0 2.5]) 463s ***** error ... 463s lognrnd (1, 2, 2, -1, 5) 463s ***** error ... 463s lognrnd (1, 2, 2, 1.5, 5) 463s ***** error ... 463s lognrnd (2, ones (2), 3) 463s ***** error ... 463s lognrnd (2, ones (2), [3, 2]) 463s ***** error ... 463s lognrnd (2, ones (2), 3, 2) 463s 33 tests, 33 passed, 0 known failure, 0 skipped 463s [inst/dist_fun/mnpdf.m] 463s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/mnpdf.m 463s ***** test 463s x = [1, 4, 2]; 463s pk = [0.2, 0.5, 0.3]; 463s y = mnpdf (x, pk); 463s assert (y, 0.11812, 0.001); 463s ***** test 463s x = [1, 4, 2; 1, 0, 9]; 463s pk = [0.2, 0.5, 0.3; 0.1, 0.1, 0.8]; 463s y = mnpdf (x, pk); 463s assert (y, [0.11812; 0.13422], 0.001); 463s 2 tests, 2 passed, 0 known failure, 0 skipped 463s [inst/dist_fun/mnrnd.m] 463s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/mnrnd.m 463s ***** test 463s n = 10; 463s pk = [0.2, 0.5, 0.3]; 463s r = mnrnd (n, pk); 463s assert (size (r), size (pk)); 463s assert (all (r >= 0)); 463s assert (all (round (r) == r)); 463s assert (sum (r) == n); 463s ***** test 463s n = 10 * ones (3, 1); 463s pk = [0.2, 0.5, 0.3]; 463s r = mnrnd (n, pk); 463s assert (size (r), [length(n), length(pk)]); 463s assert (all (r >= 0)); 463s assert (all (round (r) == r)); 463s assert (all (sum (r, 2) == n)); 463s ***** test 463s n = (1:2)'; 463s pk = [0.2, 0.5, 0.3; 0.1, 0.1, 0.8]; 463s r = mnrnd (n, pk); 463s assert (size (r), size (pk)); 463s assert (all (r >= 0)); 463s assert (all (round (r) == r)); 463s assert (all (sum (r, 2) == n)); 463s 3 tests, 3 passed, 0 known failure, 0 skipped 463s [inst/dist_fun/mvncdf.m] 463s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/mvncdf.m 463s ***** demo 463s mu = [1, -1]; 463s Sigma = [0.9, 0.4; 0.4, 0.3]; 463s [X1, X2] = meshgrid (linspace (-1, 3, 25)', linspace (-3, 1, 25)'); 463s X = [X1(:), X2(:)]; 463s p = mvncdf (X, mu, Sigma); 463s Z = reshape (p, 25, 25); 463s surf (X1, X2, Z); 463s title ("Bivariate Normal Distribution"); 463s ylabel "X1" 463s xlabel "X2" 463s ***** demo 463s mu = [0, 0]; 463s Sigma = [0.25, 0.3; 0.3, 1]; 463s p = mvncdf ([0 0], [1 1], mu, Sigma); 463s x1 = -3:.2:3; 463s x2 = -3:.2:3; 463s [X1, X2] = meshgrid (x1, x2); 463s X = [X1(:), X2(:)]; 463s p = mvnpdf (X, mu, Sigma); 463s p = reshape (p, length (x2), length (x1)); 463s contour (x1, x2, p, [0.0001, 0.001, 0.01, 0.05, 0.15, 0.25, 0.35]); 463s xlabel ("x"); 463s ylabel ("p"); 463s title ("Probability over Rectangular Region"); 463s line ([0, 0, 1, 1, 0], [1, 0, 0, 1, 1], "Linestyle", "--", "Color", "k"); 463s ***** test 463s fD = (-2:2)'; 463s X = repmat (fD, 1, 4); 463s p = mvncdf (X); 463s assert (p, [0; 0.0006; 0.0625; 0.5011; 0.9121], ones (5, 1) * 1e-4); 463s ***** test 463s mu = [1, -1]; 463s Sigma = [0.9, 0.4; 0.4, 0.3]; 463s [X1,X2] = meshgrid (linspace (-1, 3, 25)', linspace (-3, 1, 25)'); 463s X = [X1(:), X2(:)]; 463s p = mvncdf (X, mu, Sigma); 463s p_out = [0.00011878988774500, 0.00034404112322371, ... 463s 0.00087682502191813, 0.00195221905058185, ... 463s 0.00378235566873474, 0.00638175749734415, ... 463s 0.00943764224329656, 0.01239164888125426, ... 463s 0.01472750274376648, 0.01623228313374828]'; 463s assert (p([1:10]), p_out, 1e-16); 463s ***** test 463s mu = [1, -1]; 463s Sigma = [0.9, 0.4; 0.4, 0.3]; 463s [X1,X2] = meshgrid (linspace (-1, 3, 25)', linspace (-3, 1, 25)'); 463s X = [X1(:), X2(:)]; 463s p = mvncdf (X, mu, Sigma); 463s p_out = [0.8180695783608276, 0.8854485749482751, ... 463s 0.9308108777385832, 0.9579855743025508, ... 463s 0.9722897881414742, 0.9788150170059926, ... 463s 0.9813597788804785, 0.9821977956568989, ... 463s 0.9824283794464095, 0.9824809345614861]'; 463s assert (p([616:625]), p_out, 3e-16); 463s ***** test 463s mu = [0, 0]; 463s Sigma = [0.25, 0.3; 0.3, 1]; 463s [p, err] = mvncdf ([0, 0], [1, 1], mu, Sigma); 463s assert (p, 0.2097424404755626, 1e-16); 463s assert (err, 1e-08); 463s ***** test 463s x = [1 2]; 463s mu = [0.5 1.5]; 463s sigma = [1.0, 0.5; 0.5, 1.0]; 463s p = mvncdf (x, mu, sigma); 463s assert (p, 0.546244443857090, 1e-15); 463s ***** test 463s x = [1 2]; 463s mu = [0.5 1.5]; 463s sigma = [1.0, 0.5; 0.5, 1.0]; 463s a = [-inf 0]; 463s p = mvncdf (a, x, mu, sigma); 463s assert (p, 0.482672935215631, 1e-15); 463s ***** error p = mvncdf (randn (25,26), [], eye (26)); 463s ***** error p = mvncdf (randn (25,8), [], eye (9)); 463s ***** error p = mvncdf (randn (25,4), randn (25,5), [], eye (4)); 463s ***** error p = mvncdf (randn (25,4), randn (25,4), [2, 3; 2, 3], eye (4)); 463s ***** error p = mvncdf (randn (25,4), randn (25,4), ones (1, 5), eye (4)); 463s ***** error p = mvncdf ([-inf, 0], [1, 2], [0.5, 1.5], [1.0, 0.5; 0.5, 1.0], option) 463s 12 tests, 12 passed, 0 known failure, 0 skipped 463s [inst/dist_fun/mvnpdf.m] 463s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/mvnpdf.m 463s ***** demo 463s mu = [1, -1]; 463s sigma = [0.9, 0.4; 0.4, 0.3]; 463s [X1, X2] = meshgrid (linspace (-1, 3, 25)', linspace (-3, 1, 25)'); 463s x = [X1(:), X2(:)]; 463s p = mvnpdf (x, mu, sigma); 463s surf (X1, X2, reshape (p, 25, 25)); 463s ***** error y = mvnpdf (); 463s ***** error y = mvnpdf ([]); 463s ***** error y = mvnpdf (ones (3,3,3)); 463s ***** error ... 463s y = mvnpdf (ones (10, 2), [4, 2, 3]); 463s ***** error ... 463s y = mvnpdf (ones (10, 2), [4, 2; 3, 2]); 463s ***** error ... 463s y = mvnpdf (ones (10, 2), ones (3, 3, 3)); 463s ***** shared x, mu, sigma 463s x = [1, 2, 5, 4, 6]; 463s mu = [2, 0, -1, 1, 4]; 463s sigma = [2, 2, 2, 2, 2]; 463s ***** assert (mvnpdf (x), 1.579343404440977e-20, 1e-30); 463s ***** assert (mvnpdf (x, mu), 1.899325144348102e-14, 1e-25); 463s ***** assert (mvnpdf (x, mu, sigma), 2.449062307156273e-09, 1e-20); 463s 9 tests, 9 passed, 0 known failure, 0 skipped 463s [inst/dist_fun/mvnrnd.m] 463s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/mvnrnd.m 463s ***** error mvnrnd () 463s ***** error mvnrnd ([2, 3, 4]) 463s ***** error mvnrnd (ones (2, 2, 2), ones (1, 2, 3, 4)) 463s ***** error mvnrnd (ones (1, 3), ones (1, 2, 3, 4)) 463s ***** assert (size (mvnrnd ([2, 3, 4], [2, 2, 2])), [1, 3]) 463s ***** assert (size (mvnrnd ([2, 3, 4], [2, 2, 2], 10)), [10, 3]) 463s 6 tests, 6 passed, 0 known failure, 0 skipped 463s [inst/dist_fun/mvtcdf.m] 463s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/mvtcdf.m 463s ***** demo 463s ## Compute the cdf of a multivariate Student's t distribution with 463s ## correlation parameters rho = [1, 0.4; 0.4, 1] and 2 degrees of freedom. 463s 463s rho = [1, 0.4; 0.4, 1]; 463s df = 2; 463s [X1, X2] = meshgrid (linspace (-2, 2, 25)', linspace (-2, 2, 25)'); 463s X = [X1(:), X2(:)]; 463s p = mvtcdf (X, rho, df); 463s surf (X1, X2, reshape (p, 25, 25)); 463s title ("Bivariate Student's t cumulative distribution function"); 463s ***** test 463s x = [1, 2]; 463s rho = [1, 0.5; 0.5, 1]; 463s df = 4; 463s a = [-1, 0]; 463s assert (mvtcdf(a, x, rho, df), 0.294196905339283, 1e-14); 463s ***** test 463s x = [1, 2;2, 4;1, 5]; 463s rho = [1, 0.5; 0.5, 1]; 463s df = 4; 463s p =[0.790285178602166; 0.938703291727784; 0.81222737321336]; 463s assert (mvtcdf(x, rho, df), p, 1e-14); 463s ***** test 463s x = [1, 2, 2, 4, 1, 5]; 463s rho = eye (6); 463s rho(rho == 0) = 0.5; 463s df = 4; 463s assert (mvtcdf(x, rho, df), 0.6874, 1e-4); 481s ***** error mvtcdf (1) 481s ***** error mvtcdf (1, 2) 481s ***** error ... 481s mvtcdf (1, [2, 3; 3, 2], 1) 481s ***** error ... 481s mvtcdf ([2, 3, 4], ones (2), 1) 481s ***** error ... 481s mvtcdf ([1, 2, 3], [2, 3], ones (2), 1) 481s ***** error ... 481s mvtcdf ([2, 3], ones (2), [1, 2, 3]) 481s ***** error ... 481s mvtcdf ([2, 3], [1, 0.5; 0.5, 1], [1, 2, 3]) 481s 10 tests, 10 passed, 0 known failure, 0 skipped 481s [inst/dist_fun/mvtcdfqmc.m] 481s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/mvtcdfqmc.m 481s ***** error mvtcdfqmc (1, 2, 3); 481s ***** error mvtcdfqmc (1, 2, 3, 4, 5, 6, 7, 8); 481s 2 tests, 2 passed, 0 known failure, 0 skipped 481s [inst/dist_fun/mvtpdf.m] 481s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/mvtpdf.m 481s ***** demo 481s ## Compute the pdf of a multivariate t distribution with correlation 481s ## parameters rho = [1 .4; .4 1] and 2 degrees of freedom. 481s 481s rho = [1, 0.4; 0.4, 1]; 481s df = 2; 481s [X1, X2] = meshgrid (linspace (-2, 2, 25)', linspace (-2, 2, 25)'); 481s X = [X1(:), X2(:)]; 481s y = mvtpdf (X, rho, df); 481s surf (X1, X2, reshape (y, 25, 25)); 481s title ("Bivariate Student's t probability density function"); 481s ***** assert (mvtpdf ([0 0], eye(2), 1), 0.1591549, 1E-7) 481s ***** assert (mvtpdf ([1 0], [1 0.5; 0.5 1], 2), 0.06615947, 1E-7) 481s ***** assert (mvtpdf ([1 0.4 0; 1.2 0.5 0.5; 1.4 0.6 1], ... 481s [1 0.5 0.3; 0.5 1 0.6; 0.3 0.6 1], [5 6 7]), ... 481s [0.04713313 0.03722421 0.02069011]', 1E-7) 481s 3 tests, 3 passed, 0 known failure, 0 skipped 481s [inst/dist_fun/mvtrnd.m] 481s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/mvtrnd.m 481s ***** test 481s rho = [1, 0.5; 0.5, 1]; 481s df = 3; 481s n = 10; 481s r = mvtrnd (rho, df, n); 481s assert (size (r), [10, 2]); 481s ***** test 481s rho = [1, 0.5; 0.5, 1]; 481s df = [2; 3]; 481s n = 2; 481s r = mvtrnd (rho, df, 2); 481s assert (size (r), [2, 2]); 481s 2 tests, 2 passed, 0 known failure, 0 skipped 481s [inst/dist_fun/nakacdf.m] 481s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/nakacdf.m 481s ***** demo 481s ## Plot various CDFs from the Nakagami distribution 481s x = 0:0.01:3; 481s p1 = nakacdf (x, 0.5, 1); 481s p2 = nakacdf (x, 1, 1); 481s p3 = nakacdf (x, 1, 2); 481s p4 = nakacdf (x, 1, 3); 481s p5 = nakacdf (x, 2, 1); 481s p6 = nakacdf (x, 2, 2); 481s p7 = nakacdf (x, 5, 1); 481s plot (x, p1, "-r", x, p2, "-g", x, p3, "-y", x, p4, "-m", ... 481s x, p5, "-k", x, p6, "-b", x, p7, "-c") 481s grid on 481s xlim ([0, 3]) 481s legend ({"μ = 0.5, ω = 1", "μ = 1, ω = 1", "μ = 1, ω = 2", ... 481s "μ = 1, ω = 3", "μ = 2, ω = 1", "μ = 2, ω = 2", ... 481s "μ = 5, ω = 1"}, "location", "southeast") 481s title ("Nakagami CDF") 481s xlabel ("values in x") 481s ylabel ("probability") 481s ***** shared x, y 481s x = [-1, 0, 1, 2, Inf]; 481s y = [0, 0, 0.63212055882855778, 0.98168436111126578, 1]; 481s ***** assert (nakacdf (x, ones (1,5), ones (1,5)), y, eps) 481s ***** assert (nakacdf (x, 1, 1), y, eps) 481s ***** assert (nakacdf (x, [1, 1, NaN, 1, 1], 1), [y(1:2), NaN, y(4:5)]) 481s ***** assert (nakacdf (x, 1, [1, 1, NaN, 1, 1]), [y(1:2), NaN, y(4:5)]) 481s ***** assert (nakacdf ([x, NaN], 1, 1), [y, NaN], eps) 481s ***** assert (nakacdf (single ([x, NaN]), 1, 1), single ([y, NaN]), eps("single")) 481s ***** assert (nakacdf ([x, NaN], single (1), 1), single ([y, NaN]), eps("single")) 481s ***** assert (nakacdf ([x, NaN], 1, single (1)), single ([y, NaN]), eps("single")) 481s ***** error nakacdf () 481s ***** error nakacdf (1) 481s ***** error nakacdf (1, 2) 481s ***** error nakacdf (1, 2, 3, "tail") 481s ***** error nakacdf (1, 2, 3, 4) 481s ***** error ... 481s nakacdf (ones (3), ones (2), ones (2)) 481s ***** error ... 481s nakacdf (ones (2), ones (3), ones (2)) 481s ***** error ... 481s nakacdf (ones (2), ones (2), ones (3)) 481s ***** error nakacdf (i, 2, 2) 481s ***** error nakacdf (2, i, 2) 481s ***** error nakacdf (2, 2, i) 481s 19 tests, 19 passed, 0 known failure, 0 skipped 481s [inst/dist_fun/nakainv.m] 481s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/nakainv.m 481s ***** demo 481s ## Plot various iCDFs from the Nakagami distribution 481s p = 0.001:0.001:0.999; 481s x1 = nakainv (p, 0.5, 1); 481s x2 = nakainv (p, 1, 1); 481s x3 = nakainv (p, 1, 2); 481s x4 = nakainv (p, 1, 3); 481s x5 = nakainv (p, 2, 1); 481s x6 = nakainv (p, 2, 2); 481s x7 = nakainv (p, 5, 1); 481s plot (p, x1, "-r", p, x2, "-g", p, x3, "-y", p, x4, "-m", ... 481s p, x5, "-k", p, x6, "-b", p, x7, "-c") 481s grid on 481s ylim ([0, 3]) 481s legend ({"μ = 0.5, ω = 1", "μ = 1, ω = 1", "μ = 1, ω = 2", ... 481s "μ = 1, ω = 3", "μ = 2, ω = 1", "μ = 2, ω = 2", ... 481s "μ = 5, ω = 1"}, "location", "northwest") 481s title ("Nakagami iCDF") 481s xlabel ("probability") 481s ylabel ("values in x") 481s ***** shared p, y 481s p = [-Inf, -1, 0, 1/2, 1, 2, Inf]; 481s y = [NaN, NaN, 0, 0.83255461115769769, Inf, NaN, NaN]; 481s ***** assert (nakainv (p, ones (1,7), ones (1,7)), y, eps) 481s ***** assert (nakainv (p, 1, 1), y, eps) 481s ***** assert (nakainv (p, [1, 1, 1, NaN, 1, 1, 1], 1), [y(1:3), NaN, y(5:7)], eps) 481s ***** assert (nakainv (p, 1, [1, 1, 1, NaN, 1, 1, 1]), [y(1:3), NaN, y(5:7)], eps) 481s ***** assert (nakainv ([p, NaN], 1, 1), [y, NaN], eps) 481s ***** assert (nakainv (single ([p, NaN]), 1, 1), single ([y, NaN])) 481s ***** assert (nakainv ([p, NaN], single (1), 1), single ([y, NaN])) 481s ***** assert (nakainv ([p, NaN], 1, single (1)), single ([y, NaN])) 481s ***** error nakainv () 481s ***** error nakainv (1) 481s ***** error nakainv (1, 2) 481s ***** error ... 481s nakainv (ones (3), ones (2), ones(2)) 481s ***** error ... 481s nakainv (ones (2), ones (3), ones(2)) 481s ***** error ... 481s nakainv (ones (2), ones (2), ones(3)) 481s ***** error nakainv (i, 4, 3) 481s ***** error nakainv (1, i, 3) 481s ***** error nakainv (1, 4, i) 481s 17 tests, 17 passed, 0 known failure, 0 skipped 481s [inst/dist_fun/nakapdf.m] 481s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/nakapdf.m 481s ***** demo 481s ## Plot various PDFs from the Nakagami distribution 481s x = 0:0.01:3; 481s y1 = nakapdf (x, 0.5, 1); 481s y2 = nakapdf (x, 1, 1); 481s y3 = nakapdf (x, 1, 2); 481s y4 = nakapdf (x, 1, 3); 481s y5 = nakapdf (x, 2, 1); 481s y6 = nakapdf (x, 2, 2); 481s y7 = nakapdf (x, 5, 1); 481s plot (x, y1, "-r", x, y2, "-g", x, y3, "-y", x, y4, "-m", ... 481s x, y5, "-k", x, y6, "-b", x, y7, "-c") 481s grid on 481s xlim ([0, 3]) 481s ylim ([0, 2]) 481s legend ({"μ = 0.5, ω = 1", "μ = 1, ω = 1", "μ = 1, ω = 2", ... 481s "μ = 1, ω = 3", "μ = 2, ω = 1", "μ = 2, ω = 2", ... 481s "μ = 5, ω = 1"}, "location", "northeast") 481s title ("Nakagami PDF") 481s xlabel ("values in x") 481s ylabel ("density") 481s ***** shared x, y 481s x = [-1, 0, 1, 2, Inf]; 481s y = [0, 0, 0.73575888234288467, 0.073262555554936715, 0]; 481s ***** assert (nakapdf (x, ones (1,5), ones (1,5)), y, eps) 481s ***** assert (nakapdf (x, 1, 1), y, eps) 481s ***** assert (nakapdf (x, [1, 1, NaN, 1, 1], 1), [y(1:2), NaN, y(4:5)], eps) 481s ***** assert (nakapdf (x, 1, [1, 1, NaN, 1, 1]), [y(1:2), NaN, y(4:5)], eps) 481s ***** assert (nakapdf ([x, NaN], 1, 1), [y, NaN], eps) 481s ***** assert (nakapdf (single ([x, NaN]), 1, 1), single ([y, NaN])) 481s ***** assert (nakapdf ([x, NaN], single (1), 1), single ([y, NaN])) 481s ***** assert (nakapdf ([x, NaN], 1, single (1)), single ([y, NaN])) 481s ***** error nakapdf () 481s ***** error nakapdf (1) 481s ***** error nakapdf (1, 2) 481s ***** error ... 481s nakapdf (ones (3), ones (2), ones(2)) 481s ***** error ... 481s nakapdf (ones (2), ones (3), ones(2)) 481s ***** error ... 481s nakapdf (ones (2), ones (2), ones(3)) 481s ***** error nakapdf (i, 4, 3) 481s ***** error nakapdf (1, i, 3) 481s ***** error nakapdf (1, 4, i) 481s 17 tests, 17 passed, 0 known failure, 0 skipped 481s [inst/dist_fun/nakarnd.m] 481s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/nakarnd.m 481s ***** assert (size (nakarnd (1, 1)), [1 1]) 481s ***** assert (size (nakarnd (1, ones (2,1))), [2, 1]) 481s ***** assert (size (nakarnd (1, ones (2,2))), [2, 2]) 481s ***** assert (size (nakarnd (ones (2,1), 1)), [2, 1]) 481s ***** assert (size (nakarnd (ones (2,2), 1)), [2, 2]) 481s ***** assert (size (nakarnd (1, 1, 3)), [3, 3]) 481s ***** assert (size (nakarnd (1, 1, [4, 1])), [4, 1]) 481s ***** assert (size (nakarnd (1, 1, 4, 1)), [4, 1]) 481s ***** assert (size (nakarnd (1, 1, 4, 1, 5)), [4, 1, 5]) 481s ***** assert (size (nakarnd (1, 1, 0, 1)), [0, 1]) 481s ***** assert (size (nakarnd (1, 1, 1, 0)), [1, 0]) 481s ***** assert (size (nakarnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 481s ***** assert (class (nakarnd (1, 1)), "double") 481s ***** assert (class (nakarnd (1, single (1))), "single") 481s ***** assert (class (nakarnd (1, single ([1, 1]))), "single") 481s ***** assert (class (nakarnd (single (1), 1)), "single") 481s ***** assert (class (nakarnd (single ([1, 1]), 1)), "single") 481s ***** error nakarnd () 481s ***** error nakarnd (1) 481s ***** error ... 481s nakarnd (ones (3), ones (2)) 481s ***** error ... 481s nakarnd (ones (2), ones (3)) 481s ***** error nakarnd (i, 2, 3) 481s ***** error nakarnd (1, i, 3) 481s ***** error ... 481s nakarnd (1, 2, -1) 481s ***** error ... 481s nakarnd (1, 2, 1.2) 481s ***** error ... 481s nakarnd (1, 2, ones (2)) 481s ***** error ... 481s nakarnd (1, 2, [2 -1 2]) 481s ***** error ... 481s nakarnd (1, 2, [2 0 2.5]) 481s ***** error ... 481s nakarnd (1, 2, 2, -1, 5) 481s ***** error ... 481s nakarnd (1, 2, 2, 1.5, 5) 481s ***** error ... 481s nakarnd (2, ones (2), 3) 481s ***** error ... 481s nakarnd (2, ones (2), [3, 2]) 481s ***** error ... 481s nakarnd (2, ones (2), 3, 2) 481s 33 tests, 33 passed, 0 known failure, 0 skipped 481s [inst/dist_fun/nbincdf.m] 481s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/nbincdf.m 481s ***** demo 481s ## Plot various CDFs from the negative binomial distribution 481s x = 0:50; 481s p1 = nbincdf (x, 2, 0.15); 481s p2 = nbincdf (x, 5, 0.2); 481s p3 = nbincdf (x, 4, 0.4); 481s p4 = nbincdf (x, 10, 0.3); 481s plot (x, p1, "*r", x, p2, "*g", x, p3, "*k", x, p4, "*m") 481s grid on 481s xlim ([0, 40]) 481s legend ({"r = 2, ps = 0.15", "r = 5, ps = 0.2", "r = 4, p = 0.4", ... 481s "r = 10, ps = 0.3"}, "location", "southeast") 481s title ("Negative binomial CDF") 481s xlabel ("values in x (number of failures)") 481s ylabel ("probability") 481s ***** shared x, y 481s x = [-1 0 1 2 Inf]; 481s y = [0 1/2 3/4 7/8 1]; 481s ***** assert (nbincdf (x, ones (1,5), 0.5*ones (1,5)), y) 481s ***** assert (nbincdf (x, 1, 0.5*ones (1,5)), y) 481s ***** assert (nbincdf (x, ones (1,5), 0.5), y) 481s ***** assert (nbincdf (x, ones (1,5), 0.5, "upper"), 1 - y, eps) 481s ***** assert (nbincdf ([x(1:3) 0 x(5)], [0 1 NaN 1.5 Inf], 0.5), ... 481s [NaN 1/2 NaN nbinpdf(0,1.5,0.5) NaN], eps) 481s ***** assert (nbincdf (x, 1, 0.5*[-1 NaN 4 1 1]), [NaN NaN NaN y(4:5)]) 481s ***** assert (nbincdf ([x(1:2) NaN x(4:5)], 1, 0.5), [y(1:2) NaN y(4:5)]) 481s ***** assert (nbincdf ([x, NaN], 1, 0.5), [y, NaN]) 481s ***** assert (nbincdf (single ([x, NaN]), 1, 0.5), single ([y, NaN])) 482s ***** assert (nbincdf ([x, NaN], single (1), 0.5), single ([y, NaN])) 482s ***** assert (nbincdf ([x, NaN], 1, single (0.5)), single ([y, NaN])) 482s ***** error nbincdf () 482s ***** error nbincdf (1) 482s ***** error nbincdf (1, 2) 482s ***** error nbincdf (1, 2, 3, 4) 482s ***** error nbincdf (1, 2, 3, "some") 482s ***** error ... 482s nbincdf (ones (3), ones (2), ones (2)) 482s ***** error ... 482s nbincdf (ones (2), ones (3), ones (2)) 482s ***** error ... 482s nbincdf (ones (2), ones (2), ones (3)) 482s ***** error nbincdf (i, 2, 2) 482s ***** error nbincdf (2, i, 2) 482s ***** error nbincdf (2, 2, i) 482s 22 tests, 22 passed, 0 known failure, 0 skipped 482s [inst/dist_fun/nbininv.m] 482s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/nbininv.m 482s ***** demo 482s ## Plot various iCDFs from the negative binomial distribution 482s p = 0.001:0.001:0.999; 482s x1 = nbininv (p, 2, 0.15); 482s x2 = nbininv (p, 5, 0.2); 482s x3 = nbininv (p, 4, 0.4); 482s x4 = nbininv (p, 10, 0.3); 482s plot (p, x1, "-r", p, x2, "-g", p, x3, "-k", p, x4, "-m") 482s grid on 482s ylim ([0, 40]) 482s legend ({"r = 2, ps = 0.15", "r = 5, ps = 0.2", "r = 4, p = 0.4", ... 482s "r = 10, ps = 0.3"}, "location", "northwest") 482s title ("Negative binomial iCDF") 482s xlabel ("probability") 482s ylabel ("values in x (number of failures)") 482s ***** shared p 482s p = [-1 0 3/4 1 2]; 482s ***** assert (nbininv (p, ones (1,5), 0.5*ones (1,5)), [NaN 0 1 Inf NaN]) 482s ***** assert (nbininv (p, 1, 0.5*ones (1,5)), [NaN 0 1 Inf NaN]) 482s ***** assert (nbininv (p, ones (1,5), 0.5), [NaN 0 1 Inf NaN]) 482s ***** assert (nbininv (p, [1 0 NaN Inf 1], 0.5), [NaN NaN NaN NaN NaN]) 482s ***** assert (nbininv (p, [1 0 1.5 Inf 1], 0.5), [NaN NaN 2 NaN NaN]) 482s ***** assert (nbininv (p, 1, 0.5*[1 -Inf NaN Inf 1]), [NaN NaN NaN NaN NaN]) 482s ***** assert (nbininv ([p(1:2) NaN p(4:5)], 1, 0.5), [NaN 0 NaN Inf NaN]) 482s ***** assert (nbininv ([p, NaN], 1, 0.5), [NaN 0 1 Inf NaN NaN]) 482s ***** assert (nbininv (single ([p, NaN]), 1, 0.5), single ([NaN 0 1 Inf NaN NaN])) 482s ***** assert (nbininv ([p, NaN], single (1), 0.5), single ([NaN 0 1 Inf NaN NaN])) 482s ***** assert (nbininv ([p, NaN], 1, single (0.5)), single ([NaN 0 1 Inf NaN NaN])) 482s ***** shared y, tol 482s y = magic (3) + 1; 482s tol = 1; 482s ***** assert (nbininv (nbincdf (1:10, 3, 0.1), 3, 0.1), 1:10, tol) 482s ***** assert (nbininv (nbincdf (1:10, 3./(1:10), 0.1), 3./(1:10), 0.1), 1:10, tol) 482s ***** assert (nbininv (nbincdf (y, 3./y, 1./y), 3./y, 1./y), y, tol) 482s ***** error nbininv () 482s ***** error nbininv (1) 482s ***** error nbininv (1, 2) 482s ***** error ... 482s nbininv (ones (3), ones (2), ones (2)) 482s ***** error ... 482s nbininv (ones (2), ones (3), ones (2)) 482s ***** error ... 482s nbininv (ones (2), ones (2), ones (3)) 482s ***** error nbininv (i, 2, 2) 482s ***** error nbininv (2, i, 2) 482s ***** error nbininv (2, 2, i) 482s 23 tests, 23 passed, 0 known failure, 0 skipped 482s [inst/dist_fun/nbinpdf.m] 482s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/nbinpdf.m 482s ***** demo 482s ## Plot various PDFs from the negative binomial distribution 482s x = 0:40; 482s y1 = nbinpdf (x, 2, 0.15); 482s y2 = nbinpdf (x, 5, 0.2); 482s y3 = nbinpdf (x, 4, 0.4); 482s y4 = nbinpdf (x, 10, 0.3); 482s plot (x, y1, "*r", x, y2, "*g", x, y3, "*k", x, y4, "*m") 482s grid on 482s xlim ([0, 40]) 482s ylim ([0, 0.12]) 482s legend ({"r = 2, ps = 0.15", "r = 5, ps = 0.2", "r = 4, p = 0.4", ... 482s "r = 10, ps = 0.3"}, "location", "northeast") 482s title ("Negative binomial PDF") 482s xlabel ("values in x (number of failures)") 482s ylabel ("density") 482s ***** shared x, y 482s x = [-1 0 1 2 Inf]; 482s y = [0 1/2 1/4 1/8 NaN]; 482s ***** assert (nbinpdf (x, ones (1,5), 0.5*ones (1,5)), y) 482s ***** assert (nbinpdf (x, 1, 0.5*ones (1,5)), y) 482s ***** assert (nbinpdf (x, ones (1,5), 0.5), y) 482s ***** assert (nbinpdf (x, [0 1 NaN 1.5 Inf], 0.5), [NaN 1/2 NaN 1.875*0.5^1.5/4 NaN], eps) 482s ***** assert (nbinpdf (x, 1, 0.5*[-1 NaN 4 1 1]), [NaN NaN NaN y(4:5)]) 482s ***** assert (nbinpdf ([x, NaN], 1, 0.5), [y, NaN]) 482s ***** assert (nbinpdf (single ([x, NaN]), 1, 0.5), single ([y, NaN])) 482s ***** assert (nbinpdf ([x, NaN], single (1), 0.5), single ([y, NaN])) 482s ***** assert (nbinpdf ([x, NaN], 1, single (0.5)), single ([y, NaN])) 482s ***** error nbinpdf () 482s ***** error nbinpdf (1) 482s ***** error nbinpdf (1, 2) 482s ***** error ... 482s nbinpdf (ones (3), ones (2), ones (2)) 482s ***** error ... 482s nbinpdf (ones (2), ones (3), ones (2)) 482s ***** error ... 482s nbinpdf (ones (2), ones (2), ones (3)) 482s ***** error nbinpdf (i, 2, 2) 482s ***** error nbinpdf (2, i, 2) 482s ***** error nbinpdf (2, 2, i) 482s 18 tests, 18 passed, 0 known failure, 0 skipped 482s [inst/dist_fun/nbinrnd.m] 482s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/nbinrnd.m 482s ***** assert (size (nbinrnd (1, 0.5)), [1 1]) 482s ***** assert (size (nbinrnd (1, 0.5 * ones (2,1))), [2, 1]) 482s ***** assert (size (nbinrnd (1, 0.5 * ones (2,2))), [2, 2]) 482s ***** assert (size (nbinrnd (ones (2,1), 0.5)), [2, 1]) 482s ***** assert (size (nbinrnd (ones (2,2), 0.5)), [2, 2]) 482s ***** assert (size (nbinrnd (1, 0.5, 3)), [3, 3]) 482s ***** assert (size (nbinrnd (1, 0.5, [4, 1])), [4, 1]) 482s ***** assert (size (nbinrnd (1, 0.5, 4, 1)), [4, 1]) 482s ***** assert (size (nbinrnd (1, 0.5, 4, 1, 5)), [4, 1, 5]) 482s ***** assert (size (nbinrnd (1, 0.5, 0, 1)), [0, 1]) 482s ***** assert (size (nbinrnd (1, 0.5, 1, 0)), [1, 0]) 482s ***** assert (size (nbinrnd (1, 0.5, 1, 2, 0, 5)), [1, 2, 0, 5]) 482s ***** assert (class (nbinrnd (1, 0.5)), "double") 482s ***** assert (class (nbinrnd (1, single (0.5))), "single") 482s ***** assert (class (nbinrnd (1, single ([0.5, 0.5]))), "single") 482s ***** assert (class (nbinrnd (single (1), 0.5)), "single") 482s ***** assert (class (nbinrnd (single ([1, 1]), 0.5)), "single") 482s ***** error nbinrnd () 482s ***** error nbinrnd (1) 482s ***** error ... 482s nbinrnd (ones (3), ones (2)) 482s ***** error ... 482s nbinrnd (ones (2), ones (3)) 482s ***** error nbinrnd (i, 2, 3) 482s ***** error nbinrnd (1, i, 3) 482s ***** error ... 482s nbinrnd (1, 2, -1) 482s ***** error ... 482s nbinrnd (1, 2, 1.2) 482s ***** error ... 482s nbinrnd (1, 2, ones (2)) 482s ***** error ... 482s nbinrnd (1, 2, [2 -1 2]) 482s ***** error ... 482s nbinrnd (1, 2, [2 0 2.5]) 482s ***** error ... 482s nbinrnd (1, 2, 2, -1, 5) 482s ***** error ... 482s nbinrnd (1, 2, 2, 1.5, 5) 482s ***** error ... 482s nbinrnd (2, ones (2), 3) 482s ***** error ... 482s nbinrnd (2, ones (2), [3, 2]) 482s ***** error ... 482s nbinrnd (2, ones (2), 3, 2) 482s 33 tests, 33 passed, 0 known failure, 0 skipped 482s [inst/dist_fun/ncfcdf.m] 482s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/ncfcdf.m 482s ***** demo 482s ## Plot various CDFs from the noncentral F distribution 482s x = 0:0.01:5; 482s p1 = ncfcdf (x, 2, 5, 1); 482s p2 = ncfcdf (x, 2, 5, 2); 482s p3 = ncfcdf (x, 5, 10, 1); 482s p4 = ncfcdf (x, 10, 20, 10); 482s plot (x, p1, "-r", x, p2, "-g", x, p3, "-k", x, p4, "-m") 482s grid on 482s xlim ([0, 5]) 482s legend ({"df1 = 2, df2 = 5, λ = 1", "df1 = 2, df2 = 5, λ = 2", ... 482s "df1 = 5, df2 = 10, λ = 1", "df1 = 10, df2 = 20, λ = 10"}, ... 482s "location", "southeast") 482s title ("Noncentral F CDF") 482s xlabel ("values in x") 482s ylabel ("probability") 482s ***** demo 482s ## Compare the noncentral F CDF with LAMBDA = 10 to the F CDF with the 482s ## same number of numerator and denominator degrees of freedom (5, 20) 482s 482s x = 0.01:0.1:10.01; 482s p1 = ncfcdf (x, 5, 20, 10); 482s p2 = fcdf (x, 5, 20); 482s plot (x, p1, "-", x, p2, "-"); 482s grid on 482s xlim ([0, 10]) 482s legend ({"Noncentral F(5,20,10)", "F(5,20)"}, "location", "southeast") 482s title ("Noncentral F vs F CDFs") 482s xlabel ("values in x") 482s ylabel ("probability") 482s ***** test 482s x = -2:0.1:2; 482s p = ncfcdf (x, 10, 1, 3); 482s assert (p([1:21]), zeros (1, 21), 1e-76); 482s assert (p(22), 0.004530737275319753, 1e-14); 482s assert (p(30), 0.255842099135669, 1e-14); 482s assert (p(41), 0.4379890998457305, 1e-14); 482s ***** test 482s p = ncfcdf (12, 10, 3, 2); 482s assert (p, 0.9582287900447416, 1e-14); 482s ***** test 482s p = ncfcdf (2, 3, 2, 1); 482s assert (p, 0.5731985522994989, 1e-14); 482s ***** test 482s p = ncfcdf (2, 3, 2, 1, "upper"); 482s assert (p, 0.4268014477004823, 1e-14); 482s ***** test 482s p = ncfcdf ([3, 6], 3, 2, 5, "upper"); 482s assert (p, [0.530248523596927, 0.3350482341323044], 1e-14); 482s ***** error ncfcdf () 482s ***** error ncfcdf (1) 482s ***** error ncfcdf (1, 2) 482s ***** error ncfcdf (1, 2, 3) 482s ***** error ncfcdf (1, 2, 3, 4, "tail") 482s ***** error ncfcdf (1, 2, 3, 4, 5) 482s ***** error ... 482s ncfcdf (ones (3), ones (2), ones (2), ones (2)) 482s ***** error ... 482s ncfcdf (ones (2), ones (3), ones (2), ones (2)) 482s ***** error ... 482s ncfcdf (ones (2), ones (2), ones (3), ones (2)) 482s ***** error ... 482s ncfcdf (ones (2), ones (2), ones (2), ones (3)) 482s ***** error ncfcdf (i, 2, 2, 2) 482s ***** error ncfcdf (2, i, 2, 2) 482s ***** error ncfcdf (2, 2, i, 2) 482s ***** error ncfcdf (2, 2, 2, i) 482s 19 tests, 19 passed, 0 known failure, 0 skipped 482s [inst/dist_fun/ncfinv.m] 482s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/ncfinv.m 482s ***** demo 482s ## Plot various iCDFs from the noncentral F distribution 482s p = 0.001:0.001:0.999; 482s x1 = ncfinv (p, 2, 5, 1); 482s x2 = ncfinv (p, 2, 5, 2); 482s x3 = ncfinv (p, 5, 10, 1); 482s x4 = ncfinv (p, 10, 20, 10); 482s plot (p, x1, "-r", p, x2, "-g", p, x3, "-k", p, x4, "-m") 482s grid on 482s ylim ([0, 5]) 482s legend ({"df1 = 2, df2 = 5, λ = 1", "df1 = 2, df2 = 5, λ = 2", ... 482s "df1 = 5, df2 = 10, λ = 1", "df1 = 10, df2 = 20, λ = 10"}, ... 482s "location", "northwest") 482s title ("Noncentral F iCDF") 482s xlabel ("probability") 482s ylabel ("values in x") 482s ***** demo 482s ## Compare the noncentral F iCDF with LAMBDA = 10 to the F iCDF with the 482s ## same number of numerator and denominator degrees of freedom (5, 20) 482s 482s p = 0.001:0.001:0.999; 482s x1 = ncfinv (p, 5, 20, 10); 482s x2 = finv (p, 5, 20); 482s plot (p, x1, "-", p, x2, "-"); 482s grid on 482s ylim ([0, 10]) 482s legend ({"Noncentral F(5,20,10)", "F(5,20)"}, "location", "northwest") 482s title ("Noncentral F vs F quantile functions") 482s xlabel ("probability") 482s ylabel ("values in x") 482s ***** test 482s x = [0,0.1775,0.3864,0.6395,0.9564,1.3712,1.9471,2.8215,4.3679,8.1865,Inf]; 482s assert (ncfinv ([0:0.1:1], 2, 3, 1), x, 1e-4); 482s ***** test 482s x = [0,0.7492,1.3539,2.0025,2.7658,3.7278,5.0324,6.9826,10.3955,18.7665,Inf]; 482s assert (ncfinv ([0:0.1:1], 2, 3, 5), x, 1e-4); 482s ***** test 482s x = [0,0.2890,0.8632,1.5653,2.4088,3.4594,4.8442,6.8286,10.0983,17.3736,Inf]; 482s assert (ncfinv ([0:0.1:1], 1, 4, 3), x, 1e-4); 482s ***** test 482s x = [0.078410, 0.212716, 0.288618, 0.335752, 0.367963, 0.391460]; 482s assert (ncfinv (0.05, [1, 2, 3, 4, 5, 6], 10, 3), x, 1e-6); 482s ***** test 482s x = [0.2574, 0.2966, 0.3188, 0.3331, 0.3432, 0.3507]; 482s assert (ncfinv (0.05, 5, [1, 2, 3, 4, 5, 6], 3), x, 1e-4); 482s ***** test 482s x = [1.6090, 1.8113, 1.9215, 1.9911, NaN, 2.0742]; 482s assert (ncfinv (0.05, 1, [1, 2, 3, 4, -1, 6], 10), x, 1e-4); 483s ***** test 483s assert (ncfinv (0.996, 3, 5, 8), 58.0912074080671, 4e-12); 483s ***** error ncfinv () 483s ***** error ncfinv (1) 483s ***** error ncfinv (1, 2) 483s ***** error ncfinv (1, 2, 3) 483s ***** error ... 483s ncfinv (ones (3), ones (2), ones (2), ones (2)) 483s ***** error ... 483s ncfinv (ones (2), ones (3), ones (2), ones (2)) 483s ***** error ... 483s ncfinv (ones (2), ones (2), ones (3), ones (2)) 483s ***** error ... 483s ncfinv (ones (2), ones (2), ones (2), ones (3)) 483s ***** error ncfinv (i, 2, 2, 2) 483s ***** error ncfinv (2, i, 2, 2) 483s ***** error ncfinv (2, 2, i, 2) 483s ***** error ncfinv (2, 2, 2, i) 483s 19 tests, 19 passed, 0 known failure, 0 skipped 483s [inst/dist_fun/ncfpdf.m] 483s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/ncfpdf.m 483s ***** demo 483s ## Plot various PDFs from the noncentral F distribution 483s x = 0:0.01:5; 483s y1 = ncfpdf (x, 2, 5, 1); 483s y2 = ncfpdf (x, 2, 5, 2); 483s y3 = ncfpdf (x, 5, 10, 1); 483s y4 = ncfpdf (x, 10, 20, 10); 483s plot (x, y1, "-r", x, y2, "-g", x, y3, "-k", x, y4, "-m") 483s grid on 483s xlim ([0, 5]) 483s ylim ([0, 0.8]) 483s legend ({"df1 = 2, df2 = 5, λ = 1", "df1 = 2, df2 = 5, λ = 2", ... 483s "df1 = 5, df2 = 10, λ = 1", "df1 = 10, df2 = 20, λ = 10"}, ... 483s "location", "northeast") 483s title ("Noncentral F PDF") 483s xlabel ("values in x") 483s ylabel ("density") 483s ***** demo 483s ## Compare the noncentral F PDF with LAMBDA = 10 to the F PDF with the 483s ## same number of numerator and denominator degrees of freedom (5, 20) 483s 483s x = 0.01:0.1:10.01; 483s y1 = ncfpdf (x, 5, 20, 10); 483s y2 = fpdf (x, 5, 20); 483s plot (x, y1, "-", x, y2, "-"); 483s grid on 483s xlim ([0, 10]) 483s ylim ([0, 0.8]) 483s legend ({"Noncentral F(5,20,10)", "F(5,20)"}, "location", "northeast") 483s title ("Noncentral F vs F PDFs") 483s xlabel ("values in x") 483s ylabel ("density") 483s ***** shared x1, df1, df2, lambda 483s x1 = [-Inf, 2, NaN, 4, Inf]; 483s df1 = [2, 0, -1, 1, 4]; 483s df2 = [2, 4, 5, 6, 8]; 483s lambda = [1, NaN, 3, -1, 2]; 483s ***** assert (ncfpdf (x1, df1, df2, lambda), [0, NaN, NaN, NaN, NaN]); 483s ***** assert (ncfpdf (x1, df1, df2, 1), [0, NaN, NaN, ... 483s 0.05607937264237208, NaN], 1e-14); 483s ***** assert (ncfpdf (x1, df1, df2, 3), [0, NaN, NaN, ... 483s 0.080125760971946518, NaN], 1e-14); 483s ***** assert (ncfpdf (x1, df1, df2, 2), [0, NaN, NaN, ... 483s 0.0715902008258656, NaN], 1e-14); 483s ***** assert (ncfpdf (x1, 3, 5, lambda), [0, NaN, NaN, NaN, NaN]); 483s ***** assert (ncfpdf (2, df1, df2, lambda), [0.1254046999837947, NaN, NaN, ... 483s NaN, 0.2152571783045893], 1e-14); 483s ***** assert (ncfpdf (4, df1, df2, lambda), [0.05067089541001374, NaN, NaN, ... 483s NaN, 0.05560846335398539], 1e-14); 483s ***** error ncfpdf () 483s ***** error ncfpdf (1) 483s ***** error ncfpdf (1, 2) 483s ***** error ncfpdf (1, 2, 3) 483s ***** error ... 483s ncfpdf (ones (3), ones (2), ones (2), ones (2)) 483s ***** error ... 483s ncfpdf (ones (2), ones (3), ones (2), ones (2)) 483s ***** error ... 483s ncfpdf (ones (2), ones (2), ones (3), ones (2)) 483s ***** error ... 483s ncfpdf (ones (2), ones (2), ones (2), ones (3)) 483s ***** error ncfpdf (i, 2, 2, 2) 483s ***** error ncfpdf (2, i, 2, 2) 483s ***** error ncfpdf (2, 2, i, 2) 483s ***** error ncfpdf (2, 2, 2, i) 483s 19 tests, 19 passed, 0 known failure, 0 skipped 483s [inst/dist_fun/ncfrnd.m] 483s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/ncfrnd.m 483s ***** assert (size (ncfrnd (1, 1, 1)), [1 1]) 483s ***** assert (size (ncfrnd (1, ones (2,1), 1)), [2, 1]) 483s ***** assert (size (ncfrnd (1, ones (2,2), 1)), [2, 2]) 483s ***** assert (size (ncfrnd (ones (2,1), 1, 1)), [2, 1]) 483s ***** assert (size (ncfrnd (ones (2,2), 1, 1)), [2, 2]) 483s ***** assert (size (ncfrnd (1, 1, 1, 3)), [3, 3]) 483s ***** assert (size (ncfrnd (1, 1, 1, [4, 1])), [4, 1]) 483s ***** assert (size (ncfrnd (1, 1, 1, 4, 1)), [4, 1]) 483s ***** assert (size (ncfrnd (1, 1, 1, 4, 1, 5)), [4, 1, 5]) 483s ***** assert (size (ncfrnd (1, 1, 1, 0, 1)), [0, 1]) 483s ***** assert (size (ncfrnd (1, 1, 1, 1, 0)), [1, 0]) 483s ***** assert (size (ncfrnd (1, 1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 483s ***** assert (class (ncfrnd (1, 1, 1)), "double") 483s ***** assert (class (ncfrnd (1, single (1), 1)), "single") 483s ***** assert (class (ncfrnd (1, 1, single (1))), "single") 483s ***** assert (class (ncfrnd (1, single ([1, 1]), 1)), "single") 483s ***** assert (class (ncfrnd (1, 1, single ([1, 1]))), "single") 483s ***** assert (class (ncfrnd (single (1), 1, 1)), "single") 483s ***** assert (class (ncfrnd (single ([1, 1]), 1, 1)), "single") 483s ***** error ncfrnd () 483s ***** error ncfrnd (1) 483s ***** error ncfrnd (1, 2) 483s ***** error ... 483s ncfrnd (ones (3), ones (2), ones (2)) 483s ***** error ... 483s ncfrnd (ones (2), ones (3), ones (2)) 483s ***** error ... 483s ncfrnd (ones (2), ones (2), ones (3)) 483s ***** error ncfrnd (i, 2, 3) 483s ***** error ncfrnd (1, i, 3) 483s ***** error ncfrnd (1, 2, i) 483s ***** error ... 483s ncfrnd (1, 2, 3, -1) 483s ***** error ... 483s ncfrnd (1, 2, 3, 1.2) 483s ***** error ... 483s ncfrnd (1, 2, 3, ones (2)) 483s ***** error ... 483s ncfrnd (1, 2, 3, [2 -1 2]) 483s ***** error ... 483s ncfrnd (1, 2, 3, [2 0 2.5]) 483s ***** error ... 483s ncfrnd (1, 2, 3, 2, -1, 5) 483s ***** error ... 483s ncfrnd (1, 2, 3, 2, 1.5, 5) 483s ***** error ... 483s ncfrnd (2, ones (2), 2, 3) 483s ***** error ... 483s ncfrnd (2, ones (2), 2, [3, 2]) 483s ***** error ... 483s ncfrnd (2, ones (2), 2, 3, 2) 483s 38 tests, 38 passed, 0 known failure, 0 skipped 483s [inst/dist_fun/nctcdf.m] 483s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/nctcdf.m 483s ***** demo 483s ## Plot various CDFs from the noncentral Τ distribution 483s x = -5:0.01:5; 483s p1 = nctcdf (x, 1, 0); 483s p2 = nctcdf (x, 4, 0); 483s p3 = nctcdf (x, 1, 2); 483s p4 = nctcdf (x, 4, 2); 483s plot (x, p1, "-r", x, p2, "-g", x, p3, "-k", x, p4, "-m") 483s grid on 483s xlim ([-5, 5]) 483s legend ({"df = 1, μ = 0", "df = 4, μ = 0", ... 483s "df = 1, μ = 2", "df = 4, μ = 2"}, "location", "southeast") 483s title ("Noncentral Τ CDF") 483s xlabel ("values in x") 483s ylabel ("probability") 483s ***** demo 483s ## Compare the noncentral T CDF with MU = 1 to the T CDF 483s ## with the same number of degrees of freedom (10). 483s 483s x = -5:0.1:5; 483s p1 = nctcdf (x, 10, 1); 483s p2 = tcdf (x, 10); 483s plot (x, p1, "-", x, p2, "-") 483s grid on 483s xlim ([-5, 5]) 483s legend ({"Noncentral T(10,1)", "T(10)"}, "location", "southeast") 483s title ("Noncentral T vs T CDFs") 483s xlabel ("values in x") 483s ylabel ("probability") 483s ***** test 483s x = -2:0.1:2; 483s p = nctcdf (x, 10, 1); 483s assert (p(1), 0.003302485766631558, 1e-14); 483s assert (p(2), 0.004084668193532631, 1e-14); 483s assert (p(3), 0.005052800319478737, 1e-14); 483s assert (p(41), 0.8076115625303751, 1e-14); 483s ***** test 483s p = nctcdf (12, 10, 3); 483s assert (p, 0.9997719343243797, 1e-14); 483s ***** test 483s p = nctcdf (2, 3, 2); 483s assert (p, 0.4430757822176028, 1e-14); 483s ***** test 483s p = nctcdf (2, 3, 2, "upper"); 483s assert (p, 0.5569242177823971, 1e-14); 483s ***** test 483s p = nctcdf ([3, 6], 3, 2, "upper"); 483s assert (p, [0.3199728259444777, 0.07064855592441913], 1e-14); 483s ***** error nctcdf () 483s ***** error nctcdf (1) 483s ***** error nctcdf (1, 2) 483s ***** error nctcdf (1, 2, 3, "tail") 483s ***** error nctcdf (1, 2, 3, 4) 483s ***** error ... 483s nctcdf (ones (3), ones (2), ones (2)) 483s ***** error ... 483s nctcdf (ones (2), ones (3), ones (2)) 483s ***** error ... 483s nctcdf (ones (2), ones (2), ones (3)) 483s ***** error nctcdf (i, 2, 2) 483s ***** error nctcdf (2, i, 2) 483s ***** error nctcdf (2, 2, i) 483s 16 tests, 16 passed, 0 known failure, 0 skipped 483s [inst/dist_fun/nctinv.m] 483s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/nctinv.m 483s ***** demo 483s ## Plot various iCDFs from the noncentral T distribution 483s p = 0.001:0.001:0.999; 483s x1 = nctinv (p, 1, 0); 483s x2 = nctinv (p, 4, 0); 483s x3 = nctinv (p, 1, 2); 483s x4 = nctinv (p, 4, 2); 483s plot (p, x1, "-r", p, x2, "-g", p, x3, "-k", p, x4, "-m") 483s grid on 483s ylim ([-5, 5]) 483s legend ({"df = 1, μ = 0", "df = 4, μ = 0", ... 483s "df = 1, μ = 2", "df = 4, μ = 2"}, "location", "northwest") 483s title ("Noncentral T iCDF") 483s xlabel ("probability") 483s ylabel ("values in x") 483s ***** demo 483s ## Compare the noncentral T iCDF with MU = 1 to the T iCDF 483s ## with the same number of degrees of freedom (10). 483s 483s p = 0.001:0.001:0.999; 483s x1 = nctinv (p, 10, 1); 483s x2 = tinv (p, 10); 483s plot (p, x1, "-", p, x2, "-"); 483s grid on 483s ylim ([-5, 5]) 483s legend ({"Noncentral T(10,1)", "T(10)"}, "location", "northwest") 483s title ("Noncentral T vs T quantile functions") 483s xlabel ("probability") 483s ylabel ("values in x") 483s ***** test 483s x = [-Inf,-0.3347,0.1756,0.5209,0.8279,1.1424,1.5021,1.9633,2.6571,4.0845,Inf]; 483s assert (nctinv ([0:0.1:1], 2, 1), x, 1e-4); 484s ***** test 484s x = [-Inf,1.5756,2.0827,2.5343,3.0043,3.5406,4.2050,5.1128,6.5510,9.6442,Inf]; 484s assert (nctinv ([0:0.1:1], 2, 3), x, 1e-4); 485s ***** test 485s x = [-Inf,2.2167,2.9567,3.7276,4.6464,5.8455,7.5619,10.3327,15.7569,31.8159,Inf]; 485s assert (nctinv ([0:0.1:1], 1, 4), x, 1e-4); 486s ***** test 486s x = [1.7791 1.9368 2.0239 2.0801 2.1195 2.1489]; 486s assert (nctinv (0.05, [1, 2, 3, 4, 5, 6], 4), x, 1e-4); 487s ***** test 487s x = [-0.7755, 0.3670, 1.2554, 2.0239, 2.7348, 3.4154]; 487s assert (nctinv (0.05, 3, [1, 2, 3, 4, 5, 6]), x, 1e-4); 488s ***** test 488s x = [-0.7183, 0.3624, 1.2878, 2.1195, -3.5413, 3.6430]; 488s assert (nctinv (0.05, 5, [1, 2, 3, 4, -1, 6]), x, 1e-4); 490s ***** test 490s assert (nctinv (0.996, 5, 8), 30.02610554063658, 2e-11); 492s ***** error nctinv () 492s ***** error nctinv (1) 492s ***** error nctinv (1, 2) 492s ***** error ... 492s nctinv (ones (3), ones (2), ones (2)) 492s ***** error ... 492s nctinv (ones (2), ones (3), ones (2)) 492s ***** error ... 492s nctinv (ones (2), ones (2), ones (3)) 492s ***** error nctinv (i, 2, 2) 492s ***** error nctinv (2, i, 2) 492s ***** error nctinv (2, 2, i) 492s 16 tests, 16 passed, 0 known failure, 0 skipped 492s [inst/dist_fun/nctpdf.m] 492s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/nctpdf.m 492s ***** demo 492s ## Plot various PDFs from the noncentral T distribution 492s x = -5:0.01:10; 492s y1 = nctpdf (x, 1, 0); 492s y2 = nctpdf (x, 4, 0); 492s y3 = nctpdf (x, 1, 2); 492s y4 = nctpdf (x, 4, 2); 492s plot (x, y1, "-r", x, y2, "-g", x, y3, "-k", x, y4, "-m") 492s grid on 492s xlim ([-5, 10]) 492s ylim ([0, 0.4]) 492s legend ({"df = 1, μ = 0", "df = 4, μ = 0", ... 492s "df = 1, μ = 2", "df = 4, μ = 2"}, "location", "northeast") 492s title ("Noncentral T PDF") 492s xlabel ("values in x") 492s ylabel ("density") 492s ***** demo 492s ## Compare the noncentral T PDF with MU = 1 to the T PDF 492s ## with the same number of degrees of freedom (10). 492s 492s x = -5:0.1:5; 492s y1 = nctpdf (x, 10, 1); 492s y2 = tpdf (x, 10); 492s plot (x, y1, "-", x, y2, "-"); 492s grid on 492s xlim ([-5, 5]) 492s ylim ([0, 0.4]) 492s legend ({"Noncentral χ^2(4,2)", "χ^2(4)"}, "location", "northwest") 492s title ("Noncentral T vs T PDFs") 492s xlabel ("values in x") 492s ylabel ("density") 492s ***** shared x1, df, mu 492s x1 = [-Inf, 2, NaN, 4, Inf]; 492s df = [2, 0, -1, 1, 4]; 492s mu = [1, NaN, 3, -1, 2]; 492s ***** assert (nctpdf (x1, df, mu), [0, NaN, NaN, 0.00401787561306999, 0], 1e-14); 492s ***** assert (nctpdf (x1, df, 1), [0, NaN, NaN, 0.0482312135423008, 0], 1e-14); 492s ***** assert (nctpdf (x1, df, 3), [0, NaN, NaN, 0.1048493126401585, 0], 1e-14); 492s ***** assert (nctpdf (x1, df, 2), [0, NaN, NaN, 0.08137377919890307, 0], 1e-14); 492s ***** assert (nctpdf (x1, 3, mu), [0, NaN, NaN, 0.001185305171654381, 0], 1e-14); 492s ***** assert (nctpdf (2, df, mu), [0.1791097459405861, NaN, NaN, ... 492s 0.0146500727180389, 0.3082302682110299], 1e-14); 492s ***** assert (nctpdf (4, df, mu), [0.04467929612254971, NaN, NaN, ... 492s 0.00401787561306999, 0.0972086534042828], 1e-14); 492s ***** error nctpdf () 492s ***** error nctpdf (1) 492s ***** error nctpdf (1, 2) 492s ***** error ... 492s nctpdf (ones (3), ones (2), ones (2)) 492s ***** error ... 492s nctpdf (ones (2), ones (3), ones (2)) 492s ***** error ... 492s nctpdf (ones (2), ones (2), ones (3)) 492s ***** error nctpdf (i, 2, 2) 492s ***** error nctpdf (2, i, 2) 492s ***** error nctpdf (2, 2, i) 492s 16 tests, 16 passed, 0 known failure, 0 skipped 492s [inst/dist_fun/nctrnd.m] 492s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/nctrnd.m 492s ***** assert (size (nctrnd (1, 1)), [1 1]) 492s ***** assert (size (nctrnd (1, ones (2,1))), [2, 1]) 492s ***** assert (size (nctrnd (1, ones (2,2))), [2, 2]) 492s ***** assert (size (nctrnd (ones (2,1), 1)), [2, 1]) 492s ***** assert (size (nctrnd (ones (2,2), 1)), [2, 2]) 492s ***** assert (size (nctrnd (1, 1, 3)), [3, 3]) 492s ***** assert (size (nctrnd (1, 1, [4, 1])), [4, 1]) 492s ***** assert (size (nctrnd (1, 1, 4, 1)), [4, 1]) 492s ***** assert (size (nctrnd (1, 1, 4, 1, 5)), [4, 1, 5]) 492s ***** assert (size (nctrnd (1, 1, 0, 1)), [0, 1]) 492s ***** assert (size (nctrnd (1, 1, 1, 0)), [1, 0]) 492s ***** assert (size (nctrnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 492s ***** assert (class (nctrnd (1, 1)), "double") 492s ***** assert (class (nctrnd (1, single (1))), "single") 492s ***** assert (class (nctrnd (1, single ([1, 1]))), "single") 492s ***** assert (class (nctrnd (single (1), 1)), "single") 492s ***** assert (class (nctrnd (single ([1, 1]), 1)), "single") 492s ***** error nctrnd () 492s ***** error nctrnd (1) 492s ***** error ... 492s nctrnd (ones (3), ones (2)) 492s ***** error ... 492s nctrnd (ones (2), ones (3)) 492s ***** error nctrnd (i, 2) 492s ***** error nctrnd (1, i) 492s ***** error ... 492s nctrnd (1, 2, -1) 492s ***** error ... 492s nctrnd (1, 2, 1.2) 492s ***** error ... 492s nctrnd (1, 2, ones (2)) 492s ***** error ... 492s nctrnd (1, 2, [2 -1 2]) 492s ***** error ... 492s nctrnd (1, 2, [2 0 2.5]) 492s ***** error ... 492s nctrnd (1, 2, 2, -1, 5) 492s ***** error ... 492s nctrnd (1, 2, 2, 1.5, 5) 492s ***** error ... 492s nctrnd (2, ones (2), 3) 492s ***** error ... 492s nctrnd (2, ones (2), [3, 2]) 492s ***** error ... 492s nctrnd (2, ones (2), 3, 2) 492s 33 tests, 33 passed, 0 known failure, 0 skipped 492s [inst/dist_fun/ncx2cdf.m] 492s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/ncx2cdf.m 492s ***** demo 492s ## Plot various CDFs from the noncentral chi-squared distribution 492s x = 0:0.1:10; 492s p1 = ncx2cdf (x, 2, 1); 492s p2 = ncx2cdf (x, 2, 2); 492s p3 = ncx2cdf (x, 2, 3); 492s p4 = ncx2cdf (x, 4, 1); 492s p5 = ncx2cdf (x, 4, 2); 492s p6 = ncx2cdf (x, 4, 3); 492s plot (x, p1, "-r", x, p2, "-g", x, p3, "-k", ... 492s x, p4, "-m", x, p5, "-c", x, p6, "-y") 492s grid on 492s xlim ([0, 10]) 492s legend ({"df = 2, λ = 1", "df = 2, λ = 2", ... 492s "df = 2, λ = 3", "df = 4, λ = 1", ... 492s "df = 4, λ = 2", "df = 4, λ = 3"}, "location", "southeast") 492s title ("Noncentral chi-squared CDF") 492s xlabel ("values in x") 492s ylabel ("probability") 492s ***** demo 492s ## Compare the noncentral chi-squared CDF with LAMBDA = 2 to the 492s ## chi-squared CDF with the same number of degrees of freedom (4). 492s 492s x = 0:0.1:10; 492s p1 = ncx2cdf (x, 4, 2); 492s p2 = chi2cdf (x, 4); 492s plot (x, p1, "-", x, p2, "-") 492s grid on 492s xlim ([0, 10]) 492s legend ({"Noncentral χ^2(4,2)", "χ^2(4)"}, "location", "northwest") 492s title ("Noncentral chi-squared vs chi-squared CDFs") 492s xlabel ("values in x") 492s ylabel ("probability") 492s ***** test 492s x = -2:0.1:2; 492s p = ncx2cdf (x, 10, 1); 492s assert (p([1:21]), zeros (1, 21), 3e-84); 492s assert (p(22), 1.521400636466575e-09, 1e-14); 492s assert (p(30), 6.665480510026046e-05, 1e-14); 492s assert (p(41), 0.002406447308399836, 1e-14); 492s ***** test 492s p = ncx2cdf (12, 10, 3); 492s assert (p, 0.4845555602398649, 1e-14); 493s ***** test 493s p = ncx2cdf (2, 3, 2); 493s assert (p, 0.2207330870741212, 1e-14); 493s ***** test 493s p = ncx2cdf (2, 3, 2, "upper"); 493s assert (p, 0.7792669129258789, 1e-14); 493s ***** test 493s p = ncx2cdf ([3, 6], 3, 2, "upper"); 493s assert (p, [0.6423318186400054, 0.3152299878943012], 1e-14); 493s ***** error ncx2cdf () 493s ***** error ncx2cdf (1) 493s ***** error ncx2cdf (1, 2) 493s ***** error ncx2cdf (1, 2, 3, "tail") 493s ***** error ncx2cdf (1, 2, 3, 4) 493s ***** error ... 493s ncx2cdf (ones (3), ones (2), ones (2)) 493s ***** error ... 493s ncx2cdf (ones (2), ones (3), ones (2)) 493s ***** error ... 493s ncx2cdf (ones (2), ones (2), ones (3)) 493s ***** error ncx2cdf (i, 2, 2) 493s ***** error ncx2cdf (2, i, 2) 493s ***** error ncx2cdf (2, 2, i) 493s 16 tests, 16 passed, 0 known failure, 0 skipped 493s [inst/dist_fun/ncx2inv.m] 493s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/ncx2inv.m 493s ***** demo 493s ## Plot various iCDFs from the noncentral chi-squared distribution 493s p = 0.001:0.001:0.999; 493s x1 = ncx2inv (p, 2, 1); 493s x2 = ncx2inv (p, 2, 2); 493s x3 = ncx2inv (p, 2, 3); 493s x4 = ncx2inv (p, 4, 1); 493s x5 = ncx2inv (p, 4, 2); 493s x6 = ncx2inv (p, 4, 3); 493s plot (p, x1, "-r", p, x2, "-g", p, x3, "-k", ... 493s p, x4, "-m", p, x5, "-c", p, x6, "-y") 493s grid on 493s ylim ([0, 10]) 493s legend ({"df = 2, λ = 1", "df = 2, λ = 2", ... 493s "df = 2, λ = 3", "df = 4, λ = 1", ... 493s "df = 4, λ = 2", "df = 4, λ = 3"}, "location", "northwest") 493s title ("Noncentral chi-squared iCDF") 493s xlabel ("probability") 493s ylabel ("values in x") 493s ***** demo 493s ## Compare the noncentral chi-squared CDF with LAMBDA = 2 to the 493s ## chi-squared CDF with the same number of degrees of freedom (4). 493s 493s p = 0.001:0.001:0.999; 493s x1 = ncx2inv (p, 4, 2); 493s x2 = chi2inv (p, 4); 493s plot (p, x1, "-", p, x2, "-"); 493s grid on 493s ylim ([0, 10]) 493s legend ({"Noncentral χ^2(4,2)", "χ^2(4)"}, "location", "northwest") 493s title ("Noncentral chi-squared vs chi-squared quantile functions") 493s xlabel ("probability") 493s ylabel ("values in x") 493s ***** test 493s x = [0,0.3443,0.7226,1.1440,1.6220,2.1770,2.8436,3.6854,4.8447,6.7701,Inf]; 493s assert (ncx2inv ([0:0.1:1], 2, 1), x, 1e-4); 493s ***** test 493s x = [0,0.8295,1.6001,2.3708,3.1785,4.0598,5.0644,6.2765,7.8763,10.4199,Inf]; 493s assert (ncx2inv ([0:0.1:1], 2, 3), x, 1e-4); 493s ***** test 493s x = [0,0.5417,1.3483,2.1796,3.0516,4.0003,5.0777,6.3726,8.0748,10.7686,Inf]; 493s assert (ncx2inv ([0:0.1:1], 1, 4), x, 1e-4); 493s ***** test 493s x = [0.1808, 0.6456, 1.1842, 1.7650, 2.3760, 3.0105]; 493s assert (ncx2inv (0.05, [1, 2, 3, 4, 5, 6], 4), x, 1e-4); 493s ***** test 493s x = [0.4887, 0.6699, 0.9012, 1.1842, 1.5164, 1.8927]; 493s assert (ncx2inv (0.05, 3, [1, 2, 3, 4, 5, 6]), x, 1e-4); 494s ***** test 494s x = [1.3941, 1.6824, 2.0103, 2.3760, NaN, 3.2087]; 494s assert (ncx2inv (0.05, 5, [1, 2, 3, 4, -1, 6]), x, 1e-4); 494s ***** test 494s assert (ncx2inv (0.996, 5, 8), 35.51298862765576, 3e-13); 494s ***** error ncx2inv () 494s ***** error ncx2inv (1) 494s ***** error ncx2inv (1, 2) 494s ***** error ... 494s ncx2inv (ones (3), ones (2), ones (2)) 494s ***** error ... 494s ncx2inv (ones (2), ones (3), ones (2)) 494s ***** error ... 494s ncx2inv (ones (2), ones (2), ones (3)) 494s ***** error ncx2inv (i, 2, 2) 494s ***** error ncx2inv (2, i, 2) 494s ***** error ncx2inv (2, 2, i) 494s 16 tests, 16 passed, 0 known failure, 0 skipped 494s [inst/dist_fun/ncx2pdf.m] 494s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/ncx2pdf.m 494s ***** demo 494s ## Plot various PDFs from the noncentral chi-squared distribution 494s x = 0:0.1:10; 494s y1 = ncx2pdf (x, 2, 1); 494s y2 = ncx2pdf (x, 2, 2); 494s y3 = ncx2pdf (x, 2, 3); 494s y4 = ncx2pdf (x, 4, 1); 494s y5 = ncx2pdf (x, 4, 2); 494s y6 = ncx2pdf (x, 4, 3); 494s plot (x, y1, "-r", x, y2, "-g", x, y3, "-k", ... 494s x, y4, "-m", x, y5, "-c", x, y6, "-y") 494s grid on 494s xlim ([0, 10]) 494s ylim ([0, 0.32]) 494s legend ({"df = 2, λ = 1", "df = 2, λ = 2", ... 494s "df = 2, λ = 3", "df = 4, λ = 1", ... 494s "df = 4, λ = 2", "df = 4, λ = 3"}, "location", "northeast") 494s title ("Noncentral chi-squared PDF") 494s xlabel ("values in x") 494s ylabel ("density") 494s ***** demo 494s ## Compare the noncentral chi-squared PDF with LAMBDA = 2 to the 494s ## chi-squared PDF with the same number of degrees of freedom (4). 494s 494s x = 0:0.1:10; 494s y1 = ncx2pdf (x, 4, 2); 494s y2 = chi2pdf (x, 4); 494s plot (x, y1, "-", x, y2, "-"); 494s grid on 494s xlim ([0, 10]) 494s ylim ([0, 0.32]) 494s legend ({"Noncentral T(10,1)", "T(10)"}, "location", "northwest") 494s title ("Noncentral chi-squared vs chi-squared PDFs") 494s xlabel ("values in x") 494s ylabel ("density") 494s ***** shared x1, df, d1 494s x1 = [-Inf, 2, NaN, 4, Inf]; 494s df = [2, 0, -1, 1, 4]; 494s d1 = [1, NaN, 3, -1, 2]; 494s ***** assert (ncx2pdf (x1, df, d1), [0, NaN, NaN, NaN, 0]); 494s ***** assert (ncx2pdf (x1, df, 1), [0, 0.07093996461786045, NaN, ... 494s 0.06160064323277038, 0], 1e-14); 494s ***** assert (ncx2pdf (x1, df, 3), [0, 0.1208364909271113, NaN, ... 494s 0.09631299762429098, 0], 1e-14); 494s ***** assert (ncx2pdf (x1, df, 2), [0, 0.1076346446244688, NaN, ... 494s 0.08430464047296625, 0], 1e-14); 494s ***** assert (ncx2pdf (x1, 2, d1), [0, NaN, NaN, NaN, 0]); 494s ***** assert (ncx2pdf (2, df, d1), [0.1747201674611283, NaN, NaN, ... 494s NaN, 0.1076346446244688], 1e-14); 494s ***** assert (ncx2pdf (4, df, d1), [0.09355987820265799, NaN, NaN, ... 494s NaN, 0.1192317192431485], 1e-14); 494s ***** error ncx2pdf () 494s ***** error ncx2pdf (1) 494s ***** error ncx2pdf (1, 2) 495s ***** error ... 495s ncx2pdf (ones (3), ones (2), ones (2)) 495s ***** error ... 495s ncx2pdf (ones (2), ones (3), ones (2)) 495s ***** error ... 495s ncx2pdf (ones (2), ones (2), ones (3)) 495s ***** error ncx2pdf (i, 2, 2) 495s ***** error ncx2pdf (2, i, 2) 495s ***** error ncx2pdf (2, 2, i) 495s 16 tests, 16 passed, 0 known failure, 0 skipped 495s [inst/dist_fun/ncx2rnd.m] 495s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/ncx2rnd.m 495s ***** assert (size (ncx2rnd (1, 1)), [1 1]) 495s ***** assert (size (ncx2rnd (1, ones (2,1))), [2, 1]) 495s ***** assert (size (ncx2rnd (1, ones (2,2))), [2, 2]) 495s ***** assert (size (ncx2rnd (ones (2,1), 1)), [2, 1]) 495s ***** assert (size (ncx2rnd (ones (2,2), 1)), [2, 2]) 495s ***** assert (size (ncx2rnd (1, 1, 3)), [3, 3]) 495s ***** assert (size (ncx2rnd (1, 1, [4, 1])), [4, 1]) 495s ***** assert (size (ncx2rnd (1, 1, 4, 1)), [4, 1]) 495s ***** assert (size (ncx2rnd (1, 1, 4, 1, 5)), [4, 1, 5]) 495s ***** assert (size (ncx2rnd (1, 1, 0, 1)), [0, 1]) 495s ***** assert (size (ncx2rnd (1, 1, 1, 0)), [1, 0]) 495s ***** assert (size (ncx2rnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 495s ***** assert (class (ncx2rnd (1, 1)), "double") 495s ***** assert (class (ncx2rnd (1, single (1))), "single") 495s ***** assert (class (ncx2rnd (1, single ([1, 1]))), "single") 495s ***** assert (class (ncx2rnd (single (1), 1)), "single") 495s ***** assert (class (ncx2rnd (single ([1, 1]), 1)), "single") 495s ***** error ncx2rnd () 495s ***** error ncx2rnd (1) 495s ***** error ... 495s ncx2rnd (ones (3), ones (2)) 495s ***** error ... 495s ncx2rnd (ones (2), ones (3)) 495s ***** error ncx2rnd (i, 2) 495s ***** error ncx2rnd (1, i) 495s ***** error ... 495s ncx2rnd (1, 2, -1) 495s ***** error ... 495s ncx2rnd (1, 2, 1.2) 495s ***** error ... 495s ncx2rnd (1, 2, ones (2)) 495s ***** error ... 495s ncx2rnd (1, 2, [2 -1 2]) 495s ***** error ... 495s ncx2rnd (1, 2, [2 0 2.5]) 495s ***** error ... 495s ncx2rnd (1, 2, 2, -1, 5) 495s ***** error ... 495s ncx2rnd (1, 2, 2, 1.5, 5) 495s ***** error ... 495s ncx2rnd (2, ones (2), 3) 495s ***** error ... 495s ncx2rnd (2, ones (2), [3, 2]) 495s ***** error ... 495s ncx2rnd (2, ones (2), 3, 2) 495s 33 tests, 33 passed, 0 known failure, 0 skipped 495s [inst/dist_fun/normcdf.m] 495s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/normcdf.m 495s ***** demo 495s ## Plot various CDFs from the normal distribution 495s x = -5:0.01:5; 495s p1 = normcdf (x, 0, 0.5); 495s p2 = normcdf (x, 0, 1); 495s p3 = normcdf (x, 0, 2); 495s p4 = normcdf (x, -2, 0.8); 495s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-c") 495s grid on 495s xlim ([-5, 5]) 495s legend ({"μ = 0, σ = 0.5", "μ = 0, σ = 1", ... 495s "μ = 0, σ = 2", "μ = -2, σ = 0.8"}, "location", "southeast") 495s title ("Normal CDF") 495s xlabel ("values in x") 495s ylabel ("probability") 495s ***** shared x, y 495s x = [-Inf 1 2 Inf]; 495s y = [0, 0.5, 1/2*(1+erf(1/sqrt(2))), 1]; 495s ***** assert (normcdf (x, ones (1,4), ones (1,4)), y) 495s ***** assert (normcdf (x, 1, ones (1,4)), y) 495s ***** assert (normcdf (x, ones (1,4), 1), y) 495s ***** assert (normcdf (x, [0, -Inf, NaN, Inf], 1), [0, 1, NaN, NaN]) 495s ***** assert (normcdf (x, 1, [Inf, NaN, -1, 0]), [NaN, NaN, NaN, 1]) 495s ***** assert (normcdf ([x(1:2), NaN, x(4)], 1, 1), [y(1:2), NaN, y(4)]) 495s ***** assert (normcdf (x, "upper"), [1, 0.1587, 0.0228, 0], 1e-4) 495s ***** assert (normcdf ([x, NaN], 1, 1), [y, NaN]) 495s ***** assert (normcdf (single ([x, NaN]), 1, 1), single ([y, NaN]), eps ("single")) 495s ***** assert (normcdf ([x, NaN], single (1), 1), single ([y, NaN]), eps ("single")) 495s ***** assert (normcdf ([x, NaN], 1, single (1)), single ([y, NaN]), eps ("single")) 495s ***** error normcdf () 495s ***** error normcdf (1,2,3,4,5,6,7) 495s ***** error normcdf (1, 2, 3, 4, "uper") 495s ***** error ... 495s normcdf (ones (3), ones (2), ones (2)) 495s ***** error normcdf (2, 3, 4, [1, 2]) 495s ***** error ... 495s [p, plo, pup] = normcdf (1, 2, 3) 495s ***** error [p, plo, pup] = ... 495s normcdf (1, 2, 3, [1, 0; 0, 1], 0) 495s ***** error [p, plo, pup] = ... 495s normcdf (1, 2, 3, [1, 0; 0, 1], 1.22) 495s ***** error [p, plo, pup] = ... 495s normcdf (1, 2, 3, [1, 0; 0, 1], "alpha", "upper") 495s ***** error normcdf (i, 2, 2) 495s ***** error normcdf (2, i, 2) 495s ***** error normcdf (2, 2, i) 495s ***** error ... 495s [p, plo, pup] =normcdf (1, 2, 3, [1, 0; 0, -inf], 0.04) 495s 24 tests, 24 passed, 0 known failure, 0 skipped 495s [inst/dist_fun/norminv.m] 495s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/norminv.m 495s ***** demo 495s ## Plot various iCDFs from the normal distribution 495s p = 0.001:0.001:0.999; 495s x1 = norminv (p, 0, 0.5); 495s x2 = norminv (p, 0, 1); 495s x3 = norminv (p, 0, 2); 495s x4 = norminv (p, -2, 0.8); 495s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-c") 495s grid on 495s ylim ([-5, 5]) 495s legend ({"μ = 0, σ = 0.5", "μ = 0, σ = 1", ... 495s "μ = 0, σ = 2", "μ = -2, σ = 0.8"}, "location", "northwest") 495s title ("Normal iCDF") 495s xlabel ("probability") 495s ylabel ("values in x") 495s ***** shared p 495s p = [-1 0 0.5 1 2]; 495s ***** assert (norminv (p, ones (1,5), ones (1,5)), [NaN -Inf 1 Inf NaN]) 495s ***** assert (norminv (p, 1, ones (1,5)), [NaN -Inf 1 Inf NaN]) 495s ***** assert (norminv (p, ones (1,5), 1), [NaN -Inf 1 Inf NaN]) 495s ***** assert (norminv (p, [1 -Inf NaN Inf 1], 1), [NaN NaN NaN NaN NaN]) 495s ***** assert (norminv (p, 1, [1 0 NaN Inf 1]), [NaN NaN NaN NaN NaN]) 495s ***** assert (norminv ([p(1:2) NaN p(4:5)], 1, 1), [NaN -Inf NaN Inf NaN]) 495s ***** assert (norminv (p), probit (p)) 495s ***** assert (norminv (0.31254), probit (0.31254)) 495s ***** assert (norminv ([p, NaN], 1, 1), [NaN -Inf 1 Inf NaN NaN]) 495s ***** assert (norminv (single ([p, NaN]), 1, 1), single ([NaN -Inf 1 Inf NaN NaN])) 495s ***** assert (norminv ([p, NaN], single (1), 1), single ([NaN -Inf 1 Inf NaN NaN])) 495s ***** assert (norminv ([p, NaN], 1, single (1)), single ([NaN -Inf 1 Inf NaN NaN])) 495s ***** error norminv () 495s ***** error ... 495s norminv (ones (3), ones (2), ones (2)) 495s ***** error ... 495s norminv (ones (2), ones (3), ones (2)) 495s ***** error ... 495s norminv (ones (2), ones (2), ones (3)) 495s ***** error norminv (i, 2, 2) 495s ***** error norminv (2, i, 2) 495s ***** error norminv (2, 2, i) 495s 19 tests, 19 passed, 0 known failure, 0 skipped 495s [inst/dist_fun/normpdf.m] 495s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/normpdf.m 495s ***** demo 495s ## Plot various PDFs from the normal distribution 495s x = -5:0.01:5; 495s y1 = normpdf (x, 0, 0.5); 495s y2 = normpdf (x, 0, 1); 495s y3 = normpdf (x, 0, 2); 495s y4 = normpdf (x, -2, 0.8); 495s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-c") 495s grid on 495s xlim ([-5, 5]) 495s ylim ([0, 0.9]) 495s legend ({"μ = 0, σ = 0.5", "μ = 0, σ = 1", ... 495s "μ = 0, σ = 2", "μ = -2, σ = 0.8"}, "location", "northeast") 495s title ("Normal PDF") 495s xlabel ("values in x") 495s ylabel ("density") 495s ***** shared x, y 495s x = [-Inf, 1, 2, Inf]; 495s y = 1 / sqrt (2 * pi) * exp (-(x - 1) .^ 2 / 2); 495s ***** assert (normpdf (x, ones (1,4), ones (1,4)), y, eps) 495s ***** assert (normpdf (x, 1, ones (1,4)), y, eps) 495s ***** assert (normpdf (x, ones (1,4), 1), y, eps) 495s ***** assert (normpdf (x, [0 -Inf NaN Inf], 1), [y(1) NaN NaN NaN], eps) 495s ***** assert (normpdf (x, 1, [Inf NaN -1 0]), [NaN NaN NaN NaN], eps) 495s ***** assert (normpdf ([x, NaN], 1, 1), [y, NaN], eps) 495s ***** assert (normpdf (single ([x, NaN]), 1, 1), single ([y, NaN]), eps ("single")) 495s ***** assert (normpdf ([x, NaN], single (1), 1), single ([y, NaN]), eps ("single")) 495s ***** assert (normpdf ([x, NaN], 1, single (1)), single ([y, NaN]), eps ("single")) 495s ***** error normpdf () 495s ***** error ... 495s normpdf (ones (3), ones (2), ones (2)) 495s ***** error ... 495s normpdf (ones (2), ones (3), ones (2)) 495s ***** error ... 495s normpdf (ones (2), ones (2), ones (3)) 495s ***** error normpdf (i, 2, 2) 495s ***** error normpdf (2, i, 2) 495s ***** error normpdf (2, 2, i) 495s 16 tests, 16 passed, 0 known failure, 0 skipped 495s [inst/dist_fun/normrnd.m] 495s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/normrnd.m 495s ***** assert (size (normrnd (1, 1)), [1 1]) 495s ***** assert (size (normrnd (1, ones (2,1))), [2, 1]) 495s ***** assert (size (normrnd (1, ones (2,2))), [2, 2]) 495s ***** assert (size (normrnd (ones (2,1), 1)), [2, 1]) 495s ***** assert (size (normrnd (ones (2,2), 1)), [2, 2]) 495s ***** assert (size (normrnd (1, 1, 3)), [3, 3]) 495s ***** assert (size (normrnd (1, 1, [4, 1])), [4, 1]) 495s ***** assert (size (normrnd (1, 1, 4, 1)), [4, 1]) 495s ***** assert (size (normrnd (1, 1, 4, 1, 5)), [4, 1, 5]) 495s ***** assert (size (normrnd (1, 1, 0, 1)), [0, 1]) 495s ***** assert (size (normrnd (1, 1, 1, 0)), [1, 0]) 495s ***** assert (size (normrnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 495s ***** assert (class (normrnd (1, 1)), "double") 495s ***** assert (class (normrnd (1, single (1))), "single") 495s ***** assert (class (normrnd (1, single ([1, 1]))), "single") 495s ***** assert (class (normrnd (single (1), 1)), "single") 495s ***** assert (class (normrnd (single ([1, 1]), 1)), "single") 495s ***** error normrnd () 495s ***** error normrnd (1) 495s ***** error ... 495s normrnd (ones (3), ones (2)) 495s ***** error ... 495s normrnd (ones (2), ones (3)) 495s ***** error normrnd (i, 2, 3) 495s ***** error normrnd (1, i, 3) 495s ***** error ... 495s normrnd (1, 2, -1) 495s ***** error ... 495s normrnd (1, 2, 1.2) 495s ***** error ... 495s normrnd (1, 2, ones (2)) 495s ***** error ... 495s normrnd (1, 2, [2 -1 2]) 495s ***** error ... 495s normrnd (1, 2, [2 0 2.5]) 495s ***** error ... 495s normrnd (1, 2, 2, -1, 5) 495s ***** error ... 495s normrnd (1, 2, 2, 1.5, 5) 495s ***** error ... 495s normrnd (2, ones (2), 3) 495s ***** error ... 495s normrnd (2, ones (2), [3, 2]) 495s ***** error ... 495s normrnd (2, ones (2), 3, 2) 495s 33 tests, 33 passed, 0 known failure, 0 skipped 495s [inst/dist_fun/plcdf.m] 495s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/plcdf.m 495s ***** demo 495s ## Plot various CDFs from the Piecewise linear distribution 495s data = 0:0.01:10; 495s x1 = [0, 1, 3, 4, 7, 10]; 495s Fx1 = [0, 0.2, 0.5, 0.6, 0.7, 1]; 495s x2 = [0, 2, 5, 6, 7, 8]; 495s Fx2 = [0, 0.1, 0.3, 0.6, 0.9, 1]; 495s p1 = plcdf (data, x1, Fx1); 495s p2 = plcdf (data, x2, Fx2); 495s plot (data, p1, "-b", data, p2, "g") 495s grid on 495s ylim ([0, 1]) 495s xlim ([0, 10]) 495s legend ({"x1, Fx1", "x2, Fx2"}, "location", "southeast") 495s title ("Piecewise linear CDF") 495s xlabel ("values in data") 495s ylabel ("probability") 495s ***** test 495s data = 0:0.2:1; 495s p = plcdf (data, [0, 1], [0, 1]); 495s assert (p, data); 495s ***** test 495s data = 0:0.2:1; 495s p = plcdf (data, [0, 2], [0, 1]); 495s assert (p, 0.5 * data); 495s ***** test 495s data = 0:0.2:1; 495s p = plcdf (data, [0, 1], [0, 0.5]); 495s assert (p, 0.5 * data); 495s ***** test 495s data = 0:0.2:1; 495s p = plcdf (data, [0, 0.5], [0, 1]); 495s assert (p, [0, 0.4, 0.8, 1, 1, 1]); 495s ***** test 495s data = 0:0.2:1; 495s p = plcdf (data, [0, 1], [0, 1], "upper"); 495s assert (p, 1 - data); 495s ***** error plcdf () 495s ***** error plcdf (1) 495s ***** error plcdf (1, 2) 495s ***** error plcdf (1, 2, 3, "uper") 495s ***** error plcdf (1, 2, 3, 4) 495s ***** error ... 495s plcdf (1, [0, 1, 2], [0, 1]) 495s ***** error ... 495s plcdf (1, [0], [1]) 495s ***** error ... 495s plcdf (1, [0, 1, 2], [0, 1, 1.5]) 495s ***** error ... 495s plcdf (1, [0, 1, 2], [0, i, 1]) 495s ***** error ... 495s plcdf (i, [0, 1, 2], [0, 0.5, 1]) 495s ***** error ... 495s plcdf (1, [0, i, 2], [0, 0.5, 1]) 495s ***** error ... 495s plcdf (1, [0, 1, 2], [0, 0.5i, 1]) 495s 17 tests, 17 passed, 0 known failure, 0 skipped 495s [inst/dist_fun/plinv.m] 495s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/plinv.m 495s ***** demo 495s ## Plot various iCDFs from the Piecewise linear distribution 495s p = 0.001:0.001:0.999; 495s x1 = [0, 1, 3, 4, 7, 10]; 495s Fx1 = [0, 0.2, 0.5, 0.6, 0.7, 1]; 495s x2 = [0, 2, 5, 6, 7, 8]; 495s Fx2 = [0, 0.1, 0.3, 0.6, 0.9, 1]; 495s data1 = plinv (p, x1, Fx1); 495s data2 = plinv (p, x2, Fx2); 495s plot (p, data1, "-b", p, data2, "-g") 495s grid on 495s legend ({"x1, Fx1", "x2, Fx2"}, "location", "northwest") 495s title ("Piecewise linear iCDF") 495s xlabel ("probability") 495s ylabel ("values in data") 495s ***** test 495s p = 0:0.2:1; 495s data = plinv (p, [0, 1], [0, 1]); 495s assert (data, p); 495s ***** test 495s p = 0:0.2:1; 495s data = plinv (p, [0, 2], [0, 1]); 495s assert (data, 2 * p); 495s ***** test 495s p = 0:0.2:1; 495s data_out = 1:6; 495s data = plinv (p, [0, 1], [0, 0.5]); 495s assert (data, [0, 0.4, 0.8, NA, NA, NA]); 495s ***** test 495s p = 0:0.2:1; 495s data_out = 1:6; 495s data = plinv (p, [0, 0.5], [0, 1]); 495s assert (data, [0:0.1:0.5]); 495s ***** error plinv () 495s ***** error plinv (1) 495s ***** error plinv (1, 2) 495s ***** error ... 495s plinv (1, [0, 1, 2], [0, 1]) 495s ***** error ... 495s plinv (1, [0], [1]) 495s ***** error ... 495s plinv (1, [0, 1, 2], [0, 1, 1.5]) 495s ***** error ... 495s plinv (1, [0, 1, 2], [0, i, 1]) 495s ***** error ... 495s plinv (i, [0, 1, 2], [0, 0.5, 1]) 495s ***** error ... 495s plinv (1, [0, i, 2], [0, 0.5, 1]) 495s ***** error ... 495s plinv (1, [0, 1, 2], [0, 0.5i, 1]) 495s 14 tests, 14 passed, 0 known failure, 0 skipped 495s [inst/dist_fun/plpdf.m] 495s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/plpdf.m 495s ***** demo 495s ## Plot various PDFs from the Piecewise linear distribution 495s data = 0:0.01:10; 495s x1 = [0, 1, 3, 4, 7, 10]; 495s Fx1 = [0, 0.2, 0.5, 0.6, 0.7, 1]; 495s x2 = [0, 2, 5, 6, 7, 8]; 495s Fx2 = [0, 0.1, 0.3, 0.6, 0.9, 1]; 495s y1 = plpdf (data, x1, Fx1); 495s y2 = plpdf (data, x2, Fx2); 495s plot (data, y1, "-b", data, y2, "g") 495s grid on 495s ylim ([0, 0.6]) 495s xlim ([0, 10]) 495s legend ({"x1, Fx1", "x2, Fx2"}, "location", "northeast") 495s title ("Piecewise linear CDF") 495s xlabel ("values in data") 495s ylabel ("density") 495s ***** shared x, Fx 495s x = [0, 1, 3, 4, 7, 10]; 495s Fx = [0, 0.2, 0.5, 0.6, 0.7, 1]; 495s ***** assert (plpdf (0.5, x, Fx), 0.2, eps); 495s ***** assert (plpdf (1.5, x, Fx), 0.15, eps); 495s ***** assert (plpdf (3.5, x, Fx), 0.1, eps); 495s ***** assert (plpdf (5, x, Fx), 0.1/3, eps); 495s ***** assert (plpdf (8, x, Fx), 0.1, eps); 495s ***** error plpdf () 495s ***** error plpdf (1) 495s ***** error plpdf (1, 2) 495s ***** error ... 495s plpdf (1, [0, 1, 2], [0, 1]) 495s ***** error ... 495s plpdf (1, [0], [1]) 495s ***** error ... 495s plpdf (1, [0, 1, 2], [0, 1, 1.5]) 495s ***** error ... 495s plpdf (1, [0, 1, 2], [0, i, 1]) 495s ***** error ... 495s plpdf (i, [0, 1, 2], [0, 0.5, 1]) 495s ***** error ... 495s plpdf (1, [0, i, 2], [0, 0.5, 1]) 495s ***** error ... 495s plpdf (1, [0, 1, 2], [0, 0.5i, 1]) 495s 15 tests, 15 passed, 0 known failure, 0 skipped 495s [inst/dist_fun/plrnd.m] 495s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/plrnd.m 495s ***** shared x, Fx 495s x = [0, 1, 3, 4, 7, 10]; 495s Fx = [0, 0.2, 0.5, 0.6, 0.7, 1]; 495s ***** assert (size (plrnd (x, Fx)), [1, 1]) 495s ***** assert (size (plrnd (x, Fx, 3)), [3, 3]) 495s ***** assert (size (plrnd (x, Fx, [4, 1])), [4, 1]) 495s ***** assert (size (plrnd (x, Fx, 4, 1)), [4, 1]) 495s ***** assert (size (plrnd (x, Fx, 4, 1, 5)), [4, 1, 5]) 495s ***** assert (size (plrnd (x, Fx, 0, 1)), [0, 1]) 495s ***** assert (size (plrnd (x, Fx, 1, 0)), [1, 0]) 495s ***** assert (size (plrnd (x, Fx, 1, 2, 0, 5)), [1, 2, 0, 5]) 495s ***** assert (class (plrnd (x, Fx)), "double") 495s ***** assert (class (plrnd (x, single (Fx))), "single") 495s ***** assert (class (plrnd (single (x), Fx)), "single") 495s ***** error plrnd () 495s ***** error plrnd (1) 495s ***** error ... 495s plrnd ([0, 1, 2], [0, 1]) 495s ***** error ... 495s plrnd ([0], [1]) 495s ***** error ... 495s plrnd ([0, 1, 2], [0, 1, 1.5]) 495s ***** error ... 495s plrnd ([0, 1, 2], [0, i, 1]) 495s ***** error ... 495s plrnd ([0, i, 2], [0, 0.5, 1]) 495s ***** error ... 495s plrnd ([0, i, 2], [0, 0.5i, 1]) 495s ***** error ... 495s plrnd (x, Fx, -1) 495s ***** error ... 495s plrnd (x, Fx, 1.2) 495s ***** error ... 495s plrnd (x, Fx, ones (2)) 495s ***** error ... 495s plrnd (x, Fx, [2 -1 2]) 495s ***** error ... 495s plrnd (x, Fx, [2 0 2.5]) 495s ***** error ... 495s plrnd (x, Fx, 2, -1, 5) 495s ***** error ... 495s plrnd (x, Fx, 2, 1.5, 5) 495s 26 tests, 26 passed, 0 known failure, 0 skipped 495s [inst/dist_fun/poisscdf.m] 495s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/poisscdf.m 495s ***** demo 495s ## Plot various CDFs from the Poisson distribution 495s x = 0:20; 495s p1 = poisscdf (x, 1); 495s p2 = poisscdf (x, 4); 495s p3 = poisscdf (x, 10); 495s plot (x, p1, "*b", x, p2, "*g", x, p3, "*r") 495s grid on 495s ylim ([0, 1]) 495s legend ({"λ = 1", "λ = 4", "λ = 10"}, "location", "southeast") 495s title ("Poisson CDF") 495s xlabel ("values in x (number of occurences)") 495s ylabel ("probability") 495s ***** shared x, y 495s x = [-1 0 1 2 Inf]; 495s y = [0, gammainc(1, (x(2:4) +1), "upper"), 1]; 495s ***** assert (poisscdf (x, ones (1,5)), y) 495s ***** assert (poisscdf (x, 1), y) 495s ***** assert (poisscdf (x, [1 0 NaN 1 1]), [y(1) 1 NaN y(4:5)]) 495s ***** assert (poisscdf ([x(1:2) NaN Inf x(5)], 1), [y(1:2) NaN 1 y(5)]) 495s ***** assert (poisscdf ([x, NaN], 1), [y, NaN]) 496s ***** assert (poisscdf (single ([x, NaN]), 1), single ([y, NaN]), eps ("single")) 496s ***** assert (poisscdf ([x, NaN], single (1)), single ([y, NaN]), eps ("single")) 496s ***** error poisscdf () 496s ***** error poisscdf (1) 496s ***** error poisscdf (1, 2, 3) 496s ***** error poisscdf (1, 2, "tail") 496s ***** error ... 496s poisscdf (ones (3), ones (2)) 496s ***** error ... 496s poisscdf (ones (2), ones (3)) 496s ***** error poisscdf (i, 2) 496s ***** error poisscdf (2, i) 496s 15 tests, 15 passed, 0 known failure, 0 skipped 496s [inst/dist_fun/poissinv.m] 496s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/poissinv.m 496s ***** demo 496s ## Plot various iCDFs from the Poisson distribution 496s p = 0.001:0.001:0.999; 496s x1 = poissinv (p, 13); 496s x2 = poissinv (p, 4); 496s x3 = poissinv (p, 10); 496s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r") 496s grid on 496s ylim ([0, 20]) 496s legend ({"λ = 1", "λ = 4", "λ = 10"}, "location", "northwest") 496s title ("Poisson iCDF") 496s xlabel ("probability") 496s ylabel ("values in x (number of occurences)") 496s ***** shared p 496s p = [-1 0 0.5 1 2]; 496s ***** assert (poissinv (p, ones (1,5)), [NaN 0 1 Inf NaN]) 496s ***** assert (poissinv (p, 1), [NaN 0 1 Inf NaN]) 496s ***** assert (poissinv (p, [1 0 NaN 1 1]), [NaN NaN NaN Inf NaN]) 496s ***** assert (poissinv ([p(1:2) NaN p(4:5)], 1), [NaN 0 NaN Inf NaN]) 496s ***** assert (poissinv ([p, NaN], 1), [NaN 0 1 Inf NaN NaN]) 496s ***** assert (poissinv (single ([p, NaN]), 1), single ([NaN 0 1 Inf NaN NaN])) 496s ***** assert (poissinv ([p, NaN], single (1)), single ([NaN 0 1 Inf NaN NaN])) 496s ***** error poissinv () 496s ***** error poissinv (1) 496s ***** error ... 496s poissinv (ones (3), ones (2)) 496s ***** error ... 496s poissinv (ones (2), ones (3)) 496s ***** error poissinv (i, 2) 496s ***** error poissinv (2, i) 496s 13 tests, 13 passed, 0 known failure, 0 skipped 496s [inst/dist_fun/poisspdf.m] 496s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/poisspdf.m 496s ***** demo 496s ## Plot various PDFs from the Poisson distribution 496s x = 0:20; 496s y1 = poisspdf (x, 1); 496s y2 = poisspdf (x, 4); 496s y3 = poisspdf (x, 10); 496s plot (x, y1, "*b", x, y2, "*g", x, y3, "*r") 496s grid on 496s ylim ([0, 0.4]) 496s legend ({"λ = 1", "λ = 4", "λ = 10"}, "location", "northeast") 496s title ("Poisson PDF") 496s xlabel ("values in x (number of occurences)") 496s ylabel ("density") 496s ***** shared x, y 496s x = [-1 0 1 2 Inf]; 496s y = [0, exp(-1)*[1 1 0.5], 0]; 496s ***** assert (poisspdf (x, ones (1,5)), y, eps) 496s ***** assert (poisspdf (x, 1), y, eps) 496s ***** assert (poisspdf (x, [1 0 NaN 1 1]), [y(1) NaN NaN y(4:5)], eps) 496s ***** assert (poisspdf ([x, NaN], 1), [y, NaN], eps) 496s ***** assert (poisspdf (single ([x, NaN]), 1), single ([y, NaN]), eps ("single")) 496s ***** assert (poisspdf ([x, NaN], single (1)), single ([y, NaN]), eps ("single")) 496s ***** error poisspdf () 496s ***** error poisspdf (1) 496s ***** error ... 496s poisspdf (ones (3), ones (2)) 496s ***** error ... 496s poisspdf (ones (2), ones (3)) 496s ***** error poisspdf (i, 2) 496s ***** error poisspdf (2, i) 496s 12 tests, 12 passed, 0 known failure, 0 skipped 496s [inst/dist_fun/poissrnd.m] 496s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/poissrnd.m 496s ***** assert (size (poissrnd (2)), [1, 1]) 496s ***** assert (size (poissrnd (ones (2,1))), [2, 1]) 496s ***** assert (size (poissrnd (ones (2,2))), [2, 2]) 496s ***** assert (size (poissrnd (1, 3)), [3, 3]) 496s ***** assert (size (poissrnd (1, [4 1])), [4, 1]) 496s ***** assert (size (poissrnd (1, 4, 1)), [4, 1]) 496s ***** assert (size (poissrnd (1, 4, 1)), [4, 1]) 496s ***** assert (size (poissrnd (1, 4, 1, 5)), [4, 1, 5]) 496s ***** assert (size (poissrnd (1, 0, 1)), [0, 1]) 496s ***** assert (size (poissrnd (1, 1, 0)), [1, 0]) 496s ***** assert (size (poissrnd (1, 1, 2, 0, 5)), [1, 2, 0, 5]) 496s ***** assert (poissrnd (0, 1, 1), 0) 496s ***** assert (poissrnd ([0, 0, 0], [1, 3]), [0 0 0]) 496s ***** assert (class (poissrnd (2)), "double") 496s ***** assert (class (poissrnd (single (2))), "single") 496s ***** assert (class (poissrnd (single ([2 2]))), "single") 496s ***** error poissrnd () 496s ***** error poissrnd (i) 496s ***** error ... 496s poissrnd (1, -1) 496s ***** error ... 496s poissrnd (1, 1.2) 496s ***** error ... 496s poissrnd (1, ones (2)) 496s ***** error ... 496s poissrnd (1, [2 -1 2]) 496s ***** error ... 496s poissrnd (1, [2 0 2.5]) 496s ***** error ... 496s poissrnd (ones (2), ones (2)) 496s ***** error ... 496s poissrnd (1, 2, -1, 5) 496s ***** error ... 496s poissrnd (1, 2, 1.5, 5) 496s ***** error poissrnd (ones (2,2), 3) 496s ***** error poissrnd (ones (2,2), [3, 2]) 496s ***** error poissrnd (ones (2,2), 2, 3) 496s 29 tests, 29 passed, 0 known failure, 0 skipped 496s [inst/dist_fun/raylcdf.m] 496s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/raylcdf.m 496s ***** demo 496s ## Plot various CDFs from the Rayleigh distribution 496s x = 0:0.01:10; 496s p1 = raylcdf (x, 0.5); 496s p2 = raylcdf (x, 1); 496s p3 = raylcdf (x, 2); 496s p4 = raylcdf (x, 3); 496s p5 = raylcdf (x, 4); 496s plot (x, p1, "-b", x, p2, "g", x, p3, "-r", x, p4, "-m", x, p5, "-k") 496s grid on 496s ylim ([0, 1]) 496s legend ({"σ = 0.5", "σ = 1", "σ = 2", ... 496s "σ = 3", "σ = 4"}, "location", "southeast") 496s title ("Rayleigh CDF") 496s xlabel ("values in x") 496s ylabel ("probability") 496s ***** test 496s x = 0:0.5:2.5; 496s sigma = 1:6; 496s p = raylcdf (x, sigma); 496s expected_p = [0.0000, 0.0308, 0.0540, 0.0679, 0.0769, 0.0831]; 496s assert (p, expected_p, 0.001); 496s ***** test 496s x = 0:0.5:2.5; 496s p = raylcdf (x, 0.5); 496s expected_p = [0.0000, 0.3935, 0.8647, 0.9889, 0.9997, 1.0000]; 496s assert (p, expected_p, 0.001); 496s ***** shared x, p 496s x = [-1, 0, 1, 2, Inf]; 496s p = [0, 0, 0.39346934028737, 0.86466471676338, 1]; 496s ***** assert (raylcdf (x, 1), p, 1e-14) 496s ***** assert (raylcdf (x, 1, "upper"), 1 - p, 1e-14) 496s ***** error raylcdf () 496s ***** error raylcdf (1) 496s ***** error raylcdf (1, 2, "uper") 496s ***** error raylcdf (1, 2, 3) 496s ***** error ... 496s raylcdf (ones (3), ones (2)) 496s ***** error ... 496s raylcdf (ones (2), ones (3)) 496s ***** error raylcdf (i, 2) 496s ***** error raylcdf (2, i) 496s 12 tests, 12 passed, 0 known failure, 0 skipped 496s [inst/dist_fun/raylinv.m] 496s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/raylinv.m 496s ***** demo 496s ## Plot various iCDFs from the Rayleigh distribution 496s p = 0.001:0.001:0.999; 496s x1 = raylinv (p, 0.5); 496s x2 = raylinv (p, 1); 496s x3 = raylinv (p, 2); 496s x4 = raylinv (p, 3); 496s x5 = raylinv (p, 4); 496s plot (p, x1, "-b", p, x2, "g", p, x3, "-r", p, x4, "-m", p, x5, "-k") 496s grid on 496s ylim ([0, 10]) 496s legend ({"σ = 0,5", "σ = 1", "σ = 2", ... 496s "σ = 3", "σ = 4"}, "location", "northwest") 496s title ("Rayleigh iCDF") 496s xlabel ("probability") 496s ylabel ("values in x") 496s ***** test 496s p = 0:0.1:0.5; 496s sigma = 1:6; 496s x = raylinv (p, sigma); 496s expected_x = [0.0000, 0.9181, 2.0041, 3.3784, 5.0538, 7.0645]; 496s assert (x, expected_x, 0.001); 496s ***** test 496s p = 0:0.1:0.5; 496s x = raylinv (p, 0.5); 496s expected_x = [0.0000, 0.2295, 0.3340, 0.4223, 0.5054, 0.5887]; 496s assert (x, expected_x, 0.001); 496s ***** error raylinv () 496s ***** error raylinv (1) 496s ***** error ... 496s raylinv (ones (3), ones (2)) 496s ***** error ... 496s raylinv (ones (2), ones (3)) 496s ***** error raylinv (i, 2) 496s ***** error raylinv (2, i) 496s 8 tests, 8 passed, 0 known failure, 0 skipped 496s [inst/dist_fun/raylpdf.m] 496s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/raylpdf.m 496s ***** demo 496s ## Plot various PDFs from the Rayleigh distribution 496s x = 0:0.01:10; 496s y1 = raylpdf (x, 0.5); 496s y2 = raylpdf (x, 1); 496s y3 = raylpdf (x, 2); 496s y4 = raylpdf (x, 3); 496s y5 = raylpdf (x, 4); 496s plot (x, y1, "-b", x, y2, "g", x, y3, "-r", x, y4, "-m", x, y5, "-k") 496s grid on 496s ylim ([0, 1.25]) 496s legend ({"σ = 0,5", "σ = 1", "σ = 2", ... 496s "σ = 3", "σ = 4"}, "location", "northeast") 496s title ("Rayleigh PDF") 496s xlabel ("values in x") 496s ylabel ("density") 496s ***** test 496s x = 0:0.5:2.5; 496s sigma = 1:6; 496s y = raylpdf (x, sigma); 496s expected_y = [0.0000, 0.1212, 0.1051, 0.0874, 0.0738, 0.0637]; 496s assert (y, expected_y, 0.001); 496s ***** test 496s x = 0:0.5:2.5; 496s y = raylpdf (x, 0.5); 496s expected_y = [0.0000, 1.2131, 0.5413, 0.0667, 0.0027, 0.0000]; 496s assert (y, expected_y, 0.001); 496s ***** error raylpdf () 496s ***** error raylpdf (1) 496s ***** error ... 496s raylpdf (ones (3), ones (2)) 496s ***** error ... 496s raylpdf (ones (2), ones (3)) 496s ***** error raylpdf (i, 2) 496s ***** error raylpdf (2, i) 496s 8 tests, 8 passed, 0 known failure, 0 skipped 496s [inst/dist_fun/raylrnd.m] 496s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/raylrnd.m 496s ***** assert (size (raylrnd (2)), [1, 1]) 496s ***** assert (size (raylrnd (ones (2,1))), [2, 1]) 496s ***** assert (size (raylrnd (ones (2,2))), [2, 2]) 496s ***** assert (size (raylrnd (1, 3)), [3, 3]) 496s ***** assert (size (raylrnd (1, [4 1])), [4, 1]) 496s ***** assert (size (raylrnd (1, 4, 1)), [4, 1]) 496s ***** assert (size (raylrnd (1, 4, 1)), [4, 1]) 496s ***** assert (size (raylrnd (1, 4, 1, 5)), [4, 1, 5]) 496s ***** assert (size (raylrnd (1, 0, 1)), [0, 1]) 496s ***** assert (size (raylrnd (1, 1, 0)), [1, 0]) 496s ***** assert (size (raylrnd (1, 1, 2, 0, 5)), [1, 2, 0, 5]) 496s ***** assert (raylrnd (0, 1, 1), NaN) 496s ***** assert (raylrnd ([0, 0, 0], [1, 3]), [NaN, NaN, NaN]) 496s ***** assert (class (raylrnd (2)), "double") 496s ***** assert (class (raylrnd (single (2))), "single") 496s ***** assert (class (raylrnd (single ([2 2]))), "single") 496s ***** error raylrnd () 496s ***** error raylrnd (i) 496s ***** error ... 496s raylrnd (1, -1) 496s ***** error ... 496s raylrnd (1, 1.2) 496s ***** error ... 496s raylrnd (1, ones (2)) 496s ***** error ... 496s raylrnd (1, [2 -1 2]) 496s ***** error ... 496s raylrnd (1, [2 0 2.5]) 496s ***** error ... 496s raylrnd (ones (2), ones (2)) 496s ***** error ... 496s raylrnd (1, 2, -1, 5) 496s ***** error ... 496s raylrnd (1, 2, 1.5, 5) 496s ***** error raylrnd (ones (2,2), 3) 496s ***** error raylrnd (ones (2,2), [3, 2]) 496s ***** error raylrnd (ones (2,2), 2, 3) 496s 29 tests, 29 passed, 0 known failure, 0 skipped 496s [inst/dist_fun/ricecdf.m] 496s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/ricecdf.m 496s ***** demo 496s ## Plot various CDFs from the Rician distribution 496s x = 0:0.01:10; 496s p1 = ricecdf (x, 0, 1); 496s p2 = ricecdf (x, 0.5, 1); 496s p3 = ricecdf (x, 1, 1); 496s p4 = ricecdf (x, 2, 1); 496s p5 = ricecdf (x, 4, 1); 496s plot (x, p1, "-b", x, p2, "g", x, p3, "-r", x, p4, "-m", x, p5, "-k") 496s grid on 496s ylim ([0, 1]) 496s xlim ([0, 8]) 496s legend ({"s = 0, σ = 1", "s = 0.5, σ = 1", "s = 1, σ = 1", ... 496s "s = 2, σ = 1", "s = 4, σ = 1"}, "location", "southeast") 496s title ("Rician CDF") 496s xlabel ("values in x") 496s ylabel ("probability") 496s ***** demo 496s ## Plot various CDFs from the Rician distribution 496s x = 0:0.01:10; 496s p1 = ricecdf (x, 0, 0.5); 496s p2 = ricecdf (x, 0, 2); 496s p3 = ricecdf (x, 0, 3); 496s p4 = ricecdf (x, 2, 2); 496s p5 = ricecdf (x, 4, 2); 496s plot (x, p1, "-b", x, p2, "g", x, p3, "-r", x, p4, "-m", x, p5, "-k") 496s grid on 496s ylim ([0, 1]) 496s xlim ([0, 8]) 496s legend ({"ν = 0, σ = 0.5", "ν = 0, σ = 2", "ν = 0, σ = 3", ... 496s "ν = 2, σ = 2", "ν = 4, σ = 2"}, "location", "southeast") 496s title ("Rician CDF") 496s xlabel ("values in x") 496s ylabel ("probability") 496s ***** test 496s x = 0:0.5:2.5; 496s s = 1:6; 496s p = ricecdf (x, s, 1); 496s expected_p = [0.0000, 0.0179, 0.0108, 0.0034, 0.0008, 0.0001]; 496s assert (p, expected_p, 0.001); 496s ***** test 496s x = 0:0.5:2.5; 496s sigma = 1:6; 496s p = ricecdf (x, 1, sigma); 496s expected_p = [0.0000, 0.0272, 0.0512, 0.0659, 0.0754, 0.0820]; 496s assert (p, expected_p, 0.001); 496s ***** test 496s x = 0:0.5:2.5; 496s p = ricecdf (x, 0, 1); 496s expected_p = [0.0000, 0.1175, 0.3935, 0.6753, 0.8647, 0.9561]; 496s assert (p, expected_p, 0.001); 496s ***** test 496s x = 0:0.5:2.5; 496s p = ricecdf (x, 1, 1); 496s expected_p = [0.0000, 0.0735, 0.2671, 0.5120, 0.7310, 0.8791]; 496s assert (p, expected_p, 0.001); 496s ***** shared x, p 496s x = [-1, 0, 1, 2, Inf]; 496s p = [0, 0, 0.26712019620318, 0.73098793996409, 1]; 496s ***** assert (ricecdf (x, 1, 1), p, 1e-14) 496s ***** assert (ricecdf (x, 1, 1, "upper"), 1 - p, 1e-14) 496s ***** error ricecdf () 496s ***** error ricecdf (1) 496s ***** error ricecdf (1, 2) 496s ***** error ricecdf (1, 2, 3, "uper") 496s ***** error ricecdf (1, 2, 3, 4) 496s ***** error ... 496s ricecdf (ones (3), ones (2), ones (2)) 496s ***** error ... 496s ricecdf (ones (2), ones (3), ones (2)) 496s ***** error ... 496s ricecdf (ones (2), ones (2), ones (3)) 496s ***** error ricecdf (i, 2, 3) 496s ***** error ricecdf (2, i, 3) 496s ***** error ricecdf (2, 2, i) 496s 17 tests, 17 passed, 0 known failure, 0 skipped 496s [inst/dist_fun/riceinv.m] 496s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/riceinv.m 496s ***** demo 496s ## Plot various iCDFs from the Rician distribution 496s p = 0.001:0.001:0.999; 496s x1 = riceinv (p, 0, 1); 496s x2 = riceinv (p, 0.5, 1); 496s x3 = riceinv (p, 1, 1); 496s x4 = riceinv (p, 2, 1); 496s x5 = riceinv (p, 4, 1); 496s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-m", p, x5, "-k") 496s grid on 496s legend ({"s = 0, σ = 1", "s = 0.5, σ = 1", "s = 1, σ = 1", ... 496s "s = 2, σ = 1", "s = 4, σ = 1"}, "location", "northwest") 496s title ("Rician iCDF") 496s xlabel ("probability") 496s ylabel ("values in x") 496s ***** shared p 496s p = [-1 0 0.75 1 2]; 496s ***** assert (riceinv (p, ones (1,5), 2*ones (1,5)), [NaN 0 3.5354 Inf NaN], 1e-4) 496s ***** assert (riceinv (p, 1, 2*ones (1,5)), [NaN 0 3.5354 Inf NaN], 1e-4) 496s ***** assert (riceinv (p, ones (1,5), 2), [NaN 0 3.5354 Inf NaN], 1e-4) 496s ***** assert (riceinv (p, [1 0 NaN 1 1], 2), [NaN 0 NaN Inf NaN]) 496s ***** assert (riceinv (p, 1, 2*[1 0 NaN 1 1]), [NaN NaN NaN Inf NaN]) 496s ***** assert (riceinv ([p(1:2) NaN p(4:5)], 1, 2), [NaN 0 NaN Inf NaN]) 496s ***** assert (riceinv ([p, NaN], 1, 2), [NaN 0 3.5354 Inf NaN NaN], 1e-4) 497s ***** assert (riceinv (single ([p, NaN]), 1, 2), ... 497s single ([NaN 0 3.5354 Inf NaN NaN]), 1e-4) 497s ***** assert (riceinv ([p, NaN], single (1), 2), ... 497s single ([NaN 0 3.5354 Inf NaN NaN]), 1e-4) 497s ***** assert (riceinv ([p, NaN], 1, single (2)), ... 497s single ([NaN 0 3.5354 Inf NaN NaN]), 1e-4) 497s ***** error riceinv () 497s ***** error riceinv (1) 497s ***** error riceinv (1,2) 497s ***** error riceinv (1,2,3,4) 497s ***** error ... 497s riceinv (ones (3), ones (2), ones (2)) 497s ***** error ... 497s riceinv (ones (2), ones (3), ones (2)) 497s ***** error ... 497s riceinv (ones (2), ones (2), ones (3)) 497s ***** error riceinv (i, 2, 2) 497s ***** error riceinv (2, i, 2) 497s ***** error riceinv (2, 2, i) 497s 20 tests, 20 passed, 0 known failure, 0 skipped 497s [inst/dist_fun/ricepdf.m] 497s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/ricepdf.m 497s ***** demo 497s ## Plot various PDFs from the Rician distribution 497s x = 0:0.01:8; 497s y1 = ricepdf (x, 0, 1); 497s y2 = ricepdf (x, 0.5, 1); 497s y3 = ricepdf (x, 1, 1); 497s y4 = ricepdf (x, 2, 1); 497s y5 = ricepdf (x, 4, 1); 497s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-m", x, y5, "-k") 497s grid on 497s ylim ([0, 0.65]) 497s xlim ([0, 8]) 497s legend ({"s = 0, σ = 1", "s = 0.5, σ = 1", "s = 1, σ = 1", ... 497s "s = 2, σ = 1", "s = 4, σ = 1"}, "location", "northeast") 497s title ("Rician PDF") 497s xlabel ("values in x") 497s ylabel ("density") 497s ***** shared x, y 497s x = [-1 0 0.5 1 2]; 497s y = [0 0 0.1073 0.1978 0.2846]; 497s ***** assert (ricepdf (x, ones (1, 5), 2 * ones (1, 5)), y, 1e-4) 497s ***** assert (ricepdf (x, 1, 2 * ones (1, 5)), y, 1e-4) 497s ***** assert (ricepdf (x, ones (1, 5), 2), y, 1e-4) 497s ***** assert (ricepdf (x, [0 NaN 1 1 1], 2), [0 NaN y(3:5)], 1e-4) 497s ***** assert (ricepdf (x, 1, 2 * [0 NaN 1 1 1]), [0 NaN y(3:5)], 1e-4) 497s ***** assert (ricepdf ([x, NaN], 1, 2), [y, NaN], 1e-4) 497s ***** assert (ricepdf (single ([x, NaN]), 1, 2), single ([y, NaN]), 1e-4) 497s ***** assert (ricepdf ([x, NaN], single (1), 2), single ([y, NaN]), 1e-4) 497s ***** assert (ricepdf ([x, NaN], 1, single (2)), single ([y, NaN]), 1e-4) 497s ***** error ricepdf () 497s ***** error ricepdf (1) 497s ***** error ricepdf (1,2) 497s ***** error ricepdf (1,2,3,4) 497s ***** error ... 497s ricepdf (ones (3), ones (2), ones (2)) 497s ***** error ... 497s ricepdf (ones (2), ones (3), ones (2)) 497s ***** error ... 497s ricepdf (ones (2), ones (2), ones (3)) 497s ***** error ricepdf (i, 2, 2) 497s ***** error ricepdf (2, i, 2) 497s ***** error ricepdf (2, 2, i) 497s 19 tests, 19 passed, 0 known failure, 0 skipped 497s [inst/dist_fun/ricernd.m] 497s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/ricernd.m 497s ***** assert (size (ricernd (2, 1/2)), [1, 1]) 497s ***** assert (size (ricernd (2 * ones (2, 1), 1/2)), [2, 1]) 497s ***** assert (size (ricernd (2 * ones (2, 2), 1/2)), [2, 2]) 497s ***** assert (size (ricernd (2, 1/2 * ones (2, 1))), [2, 1]) 497s ***** assert (size (ricernd (1, 1/2 * ones (2, 2))), [2, 2]) 497s ***** assert (size (ricernd (ones (2, 1), 1)), [2, 1]) 497s ***** assert (size (ricernd (ones (2, 2), 1)), [2, 2]) 497s ***** assert (size (ricernd (2, 1/2, 3)), [3, 3]) 497s ***** assert (size (ricernd (1, 1, [4, 1])), [4, 1]) 497s ***** assert (size (ricernd (1, 1, 4, 1)), [4, 1]) 497s ***** assert (size (ricernd (1, 1, 4, 1, 5)), [4, 1, 5]) 497s ***** assert (size (ricernd (1, 1, 0, 1)), [0, 1]) 497s ***** assert (size (ricernd (1, 1, 1, 0)), [1, 0]) 497s ***** assert (size (ricernd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 497s ***** assert (class (ricernd (1, 1)), "double") 497s ***** assert (class (ricernd (1, single (0))), "single") 497s ***** assert (class (ricernd (1, single ([0, 0]))), "single") 497s ***** assert (class (ricernd (1, single (1), 2)), "single") 497s ***** assert (class (ricernd (1, single ([1, 1]), 1, 2)), "single") 497s ***** assert (class (ricernd (single (1), 1, 2)), "single") 497s ***** assert (class (ricernd (single ([1, 1]), 1, 1, 2)), "single") 497s ***** error ricernd () 497s ***** error ricernd (1) 497s ***** error ... 497s ricernd (ones (3), ones (2)) 497s ***** error ... 497s ricernd (ones (2), ones (3)) 497s ***** error ricernd (i, 2) 497s ***** error ricernd (1, i) 497s ***** error ... 497s ricernd (1, 1/2, -1) 497s ***** error ... 497s ricernd (1, 1/2, 1.2) 497s ***** error ... 497s ricernd (1, 1/2, ones (2)) 497s ***** error ... 497s ricernd (1, 1/2, [2 -1 2]) 497s ***** error ... 497s ricernd (1, 1/2, [2 0 2.5]) 497s ***** error ... 497s ricernd (1, 1/2, 2, -1, 5) 497s ***** error ... 497s ricernd (1, 1/2, 2, 1.5, 5) 497s ***** error ... 497s ricernd (2, 1/2 * ones (2), 3) 497s ***** error ... 497s ricernd (2, 1/2 * ones (2), [3, 2]) 497s ***** error ... 497s ricernd (2, 1/2 * ones (2), 3, 2) 497s ***** error ... 497s ricernd (2 * ones (2), 1/2, 3) 497s ***** error ... 497s ricernd (2 * ones (2), 1/2, [3, 2]) 497s ***** error ... 497s ricernd (2 * ones (2), 1/2, 3, 2) 497s 40 tests, 40 passed, 0 known failure, 0 skipped 497s [inst/dist_fun/tcdf.m] 497s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/tcdf.m 497s ***** demo 497s ## Plot various CDFs from the Student's T distribution 497s x = -5:0.01:5; 497s p1 = tcdf (x, 1); 497s p2 = tcdf (x, 2); 497s p3 = tcdf (x, 5); 497s p4 = tcdf (x, Inf); 497s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-m") 497s grid on 497s xlim ([-5, 5]) 497s ylim ([0, 1]) 497s legend ({"df = 1", "df = 2", ... 497s "df = 5", 'df = \infty'}, "location", "southeast") 497s title ("Student's T CDF") 497s xlabel ("values in x") 497s ylabel ("probability") 497s ***** shared x,y 497s x = [-Inf 0 1 Inf]; 497s y = [0 1/2 3/4 1]; 497s ***** assert (tcdf (x, ones (1,4)), y, eps) 497s ***** assert (tcdf (x, 1), y, eps) 497s ***** assert (tcdf (x, [0 1 NaN 1]), [NaN 1/2 NaN 1], eps) 497s ***** assert (tcdf ([x(1:2) NaN x(4)], 1), [y(1:2) NaN y(4)], eps) 497s ***** assert (tcdf (2, 3, "upper"), 0.0697, 1e-4) 497s ***** assert (tcdf (205, 5, "upper"), 2.6206e-11, 1e-14) 497s ***** assert (tcdf ([x, NaN], 1), [y, NaN], eps) 497s ***** assert (tcdf (single ([x, NaN]), 1), single ([y, NaN]), eps ("single")) 497s ***** assert (tcdf ([x, NaN], single (1)), single ([y, NaN]), eps ("single")) 497s ***** error tcdf () 497s ***** error tcdf (1) 497s ***** error tcdf (1, 2, "uper") 497s ***** error tcdf (1, 2, 3) 497s ***** error ... 497s tcdf (ones (3), ones (2)) 497s ***** error ... 497s tcdf (ones (3), ones (2)) 497s ***** error ... 497s tcdf (ones (3), ones (2), "upper") 497s ***** error tcdf (i, 2) 497s ***** error tcdf (2, i) 497s ***** shared tol_rel 497s tol_rel = 10 * eps; 497s ***** assert (tcdf (10^(-10), 2.5), 0.50000000003618087, -tol_rel) 497s ***** assert (tcdf (10^(-11), 2.5), 0.50000000000361809, -tol_rel) 497s ***** assert (tcdf (10^(-12), 2.5), 0.50000000000036181, -tol_rel) 497s ***** assert (tcdf (10^(-13), 2.5), 0.50000000000003618, -tol_rel) 497s ***** assert (tcdf (10^(-14), 2.5), 0.50000000000000362, -tol_rel) 497s ***** assert (tcdf (10^(-15), 2.5), 0.50000000000000036, -tol_rel) 497s ***** assert (tcdf (10^(-16), 2.5), 0.50000000000000004, -tol_rel) 497s ***** assert (tcdf (-10^1, 2.5), 2.2207478836537124e-03, -tol_rel) 497s ***** assert (tcdf (-10^2, 2.5), 7.1916492116661878e-06, -tol_rel) 497s ***** assert (tcdf (-10^3, 2.5), 2.2747463948307452e-08, -tol_rel) 497s ***** assert (tcdf (-10^4, 2.5), 7.1933970159922115e-11, -tol_rel) 497s ***** assert (tcdf (-10^5, 2.5), 2.2747519231756221e-13, -tol_rel) 497s 30 tests, 30 passed, 0 known failure, 0 skipped 497s [inst/dist_fun/tinv.m] 497s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/tinv.m 497s ***** demo 497s ## Plot various iCDFs from the Student's T distribution 497s p = 0.001:0.001:0.999; 497s x1 = tinv (p, 1); 497s x2 = tinv (p, 2); 497s x3 = tinv (p, 5); 497s x4 = tinv (p, Inf); 497s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-m") 497s grid on 497s xlim ([0, 1]) 497s ylim ([-5, 5]) 497s legend ({"df = 1", "df = 2", ... 497s "df = 5", 'df = \infty'}, "location", "northwest") 497s title ("Student's T iCDF") 497s xlabel ("probability") 497s ylabel ("values in x") 497s ***** shared p 497s p = [-1 0 0.5 1 2]; 497s ***** assert (tinv (p, ones (1,5)), [NaN -Inf 0 Inf NaN]) 497s ***** assert (tinv (p, 1), [NaN -Inf 0 Inf NaN], eps) 497s ***** assert (tinv (p, [1 0 NaN 1 1]), [NaN NaN NaN Inf NaN], eps) 497s ***** assert (tinv ([p(1:2) NaN p(4:5)], 1), [NaN -Inf NaN Inf NaN]) 497s ***** assert (tinv ([p, NaN], 1), [NaN -Inf 0 Inf NaN NaN], eps) 497s ***** assert (tinv (single ([p, NaN]), 1), single ([NaN -Inf 0 Inf NaN NaN]), eps ("single")) 497s ***** assert (tinv ([p, NaN], single (1)), single ([NaN -Inf 0 Inf NaN NaN]), eps ("single")) 497s ***** error tinv () 497s ***** error tinv (1) 497s ***** error ... 497s tinv (ones (3), ones (2)) 497s ***** error ... 497s tinv (ones (2), ones (3)) 497s ***** error tinv (i, 2) 497s ***** error tinv (2, i) 497s 13 tests, 13 passed, 0 known failure, 0 skipped 497s [inst/dist_fun/tlscdf.m] 497s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/tlscdf.m 497s ***** demo 497s ## Plot various CDFs from the location-scale Student's T distribution 497s x = -8:0.01:8; 497s p1 = tlscdf (x, 0, 1, 1); 497s p2 = tlscdf (x, 0, 2, 2); 497s p3 = tlscdf (x, 3, 2, 5); 497s p4 = tlscdf (x, -1, 3, Inf); 497s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-m") 497s grid on 497s xlim ([-8, 8]) 497s ylim ([0, 1]) 497s legend ({"mu = 0, sigma = 1, nu = 1", "mu = 0, sigma = 2, nu = 2", ... 497s "mu = 3, sigma = 2, nu = 5", 'mu = -1, sigma = 3, nu = \infty'}, ... 497s "location", "northwest") 497s title ("Location-scale Student's T CDF") 497s xlabel ("values in x") 497s ylabel ("probability") 497s ***** shared x,y 497s x = [-Inf 0 1 Inf]; 497s y = [0 1/2 3/4 1]; 497s ***** assert (tlscdf (x, 0, 1, ones (1,4)), y, eps) 497s ***** assert (tlscdf (x, 0, 1, 1), y, eps) 497s ***** assert (tlscdf (x, 0, 1, [0 1 NaN 1]), [NaN 1/2 NaN 1], eps) 497s ***** assert (tlscdf ([x(1:2) NaN x(4)], 0, 1, 1), [y(1:2) NaN y(4)], eps) 497s ***** assert (tlscdf (2, 0, 1, 3, "upper"), 0.0697, 1e-4) 497s ***** assert (tlscdf (205, 0, 1, 5, "upper"), 2.6206e-11, 1e-14) 497s ***** assert (tlscdf ([x, NaN], 0, 1, 1), [y, NaN], eps) 497s ***** assert (tlscdf (single ([x, NaN]), 0, 1, 1), single ([y, NaN]), eps ("single")) 497s ***** assert (tlscdf ([x, NaN], single (0), 1, 1), single ([y, NaN]), eps ("single")) 497s ***** assert (tlscdf ([x, NaN], 0, single (1), 1), single ([y, NaN]), eps ("single")) 497s ***** assert (tlscdf ([x, NaN], 0, 1, single (1)), single ([y, NaN]), eps ("single")) 497s ***** error tlscdf () 497s ***** error tlscdf (1) 497s ***** error tlscdf (1, 2) 497s ***** error tlscdf (1, 2, 3) 497s ***** error tlscdf (1, 2, 3, 4, "uper") 497s ***** error tlscdf (1, 2, 3, 4, 5) 497s ***** error ... 497s tlscdf (ones (3), ones (2), 1, 1) 497s ***** error ... 497s tlscdf (ones (3), 1, ones (2), 1) 497s ***** error ... 497s tlscdf (ones (3), 1, 1, ones (2)) 497s ***** error ... 497s tlscdf (ones (3), ones (2), 1, 1, "upper") 497s ***** error ... 497s tlscdf (ones (3), 1, ones (2), 1, "upper") 497s ***** error ... 497s tlscdf (ones (3), 1, 1, ones (2), "upper") 497s ***** error tlscdf (i, 2, 1, 1) 497s ***** error tlscdf (2, i, 1, 1) 497s ***** error tlscdf (2, 1, i, 1) 497s ***** error tlscdf (2, 1, 1, i) 497s 27 tests, 27 passed, 0 known failure, 0 skipped 497s [inst/dist_fun/tlsinv.m] 497s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/tlsinv.m 497s ***** demo 497s ## Plot various iCDFs from the location-scale Student's T distribution 497s p = 0.001:0.001:0.999; 497s x1 = tlsinv (p, 0, 1, 1); 497s x2 = tlsinv (p, 0, 2, 2); 497s x3 = tlsinv (p, 3, 2, 5); 497s x4 = tlsinv (p, -1, 3, Inf); 497s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-m") 497s grid on 497s xlim ([0, 1]) 497s ylim ([-8, 8]) 497s legend ({"mu = 0, sigma = 1, nu = 1", "mu = 0, sigma = 2, nu = 2", ... 497s "mu = 3, sigma = 2, nu = 5", 'mu = -1, sigma = 3, nu = \infty'}, ... 497s "location", "southeast") 497s title ("Location-scale Student's T iCDF") 497s xlabel ("probability") 497s ylabel ("values in x") 497s ***** shared p 497s p = [-1 0 0.5 1 2]; 497s ***** assert (tlsinv (p, 0, 1, ones (1,5)), [NaN -Inf 0 Inf NaN]) 497s ***** assert (tlsinv (p, 0, 1, 1), [NaN -Inf 0 Inf NaN], eps) 497s ***** assert (tlsinv (p, 0, 1, [1 0 NaN 1 1]), [NaN NaN NaN Inf NaN], eps) 497s ***** assert (tlsinv ([p(1:2) NaN p(4:5)], 0, 1, 1), [NaN -Inf NaN Inf NaN]) 497s ***** assert (class (tlsinv ([p, NaN], 0, 1, 1)), "double") 497s ***** assert (class (tlsinv (single ([p, NaN]), 0, 1, 1)), "single") 497s ***** assert (class (tlsinv ([p, NaN], single (0), 1, 1)), "single") 497s ***** assert (class (tlsinv ([p, NaN], 0, single (1), 1)), "single") 497s ***** assert (class (tlsinv ([p, NaN], 0, 1, single (1))), "single") 497s ***** error tlsinv () 497s ***** error tlsinv (1) 497s ***** error tlsinv (1, 2) 497s ***** error tlsinv (1, 2, 3) 497s ***** error ... 497s tlsinv (ones (3), ones (2), 1, 1) 497s ***** error ... 497s tlsinv (ones (2), 1, ones (3), 1) 497s ***** error ... 497s tlsinv (ones (2), 1, 1, ones (3)) 497s ***** error tlsinv (i, 2, 3, 4) 497s ***** error tlsinv (2, i, 3, 4) 497s ***** error tlsinv (2, 2, i, 4) 497s ***** error tlsinv (2, 2, 3, i) 497s 20 tests, 20 passed, 0 known failure, 0 skipped 497s [inst/dist_fun/tlspdf.m] 497s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/tlspdf.m 497s ***** demo 497s ## Plot various PDFs from the Student's T distribution 497s x = -8:0.01:8; 497s y1 = tlspdf (x, 0, 1, 1); 497s y2 = tlspdf (x, 0, 2, 2); 497s y3 = tlspdf (x, 3, 2, 5); 497s y4 = tlspdf (x, -1, 3, Inf); 497s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-m") 497s grid on 497s xlim ([-8, 8]) 497s ylim ([0, 0.41]) 497s legend ({"mu = 0, sigma = 1, nu = 1", "mu = 0, sigma = 2, nu = 2", ... 497s "mu = 3, sigma = 2, nu = 5", 'mu = -1, sigma = 3, nu = \infty'}, ... 497s "location", "northwest") 497s title ("Location-scale Student's T PDF") 497s xlabel ("values in x") 497s ylabel ("density") 497s ***** test 497s x = rand (10,1); 497s y = 1./(pi * (1 + x.^2)); 497s assert (tlspdf (x, 0, 1, 1), y, 5*eps); 497s assert (tlspdf (x+5, 5, 1, 1), y, 5*eps); 497s assert (tlspdf (x.*2, 0, 2, 1), y./2, 5*eps); 497s ***** shared x, y 497s x = [-Inf 0 0.5 1 Inf]; 497s y = 1./(pi * (1 + x.^2)); 497s ***** assert (tlspdf (x, 0, 1, ones (1,5)), y, eps) 498s ***** assert (tlspdf (x, 0, 1, 1), y, eps) 498s ***** assert (tlspdf (x, 0, 1, [0 NaN 1 1 1]), [NaN NaN y(3:5)], eps) 498s ***** assert (tlspdf (x, 0, 1, Inf), normpdf (x)) 498s ***** assert (class (tlspdf ([x, NaN], 1, 1, 1)), "double") 498s ***** assert (class (tlspdf (single ([x, NaN]), 1, 1, 1)), "single") 498s ***** assert (class (tlspdf ([x, NaN], single (1), 1, 1)), "single") 498s ***** assert (class (tlspdf ([x, NaN], 1, single (1), 1)), "single") 498s ***** assert (class (tlspdf ([x, NaN], 1, 1, single (1))), "single") 498s ***** error tlspdf () 498s ***** error tlspdf (1) 498s ***** error tlspdf (1, 2) 498s ***** error tlspdf (1, 2, 3) 498s ***** error ... 498s tlspdf (ones (3), ones (2), 1, 1) 498s ***** error ... 498s tlspdf (ones (2), 1, ones (3), 1) 498s ***** error ... 498s tlspdf (ones (2), 1, 1, ones (3)) 498s ***** error tlspdf (i, 2, 1, 1) 498s ***** error tlspdf (2, i, 1, 1) 498s ***** error tlspdf (2, 1, i, 1) 498s ***** error tlspdf (2, 1, 1, i) 498s 21 tests, 21 passed, 0 known failure, 0 skipped 498s [inst/dist_fun/tlsrnd.m] 498s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/tlsrnd.m 498s ***** assert (size (tlsrnd (1, 2, 3)), [1, 1]) 498s ***** assert (size (tlsrnd (ones (2,1), 2, 3)), [2, 1]) 498s ***** assert (size (tlsrnd (ones (2,2), 2, 3)), [2, 2]) 498s ***** assert (size (tlsrnd (1, 2, 3, 3)), [3, 3]) 498s ***** assert (size (tlsrnd (1, 2, 3, [4 1])), [4, 1]) 498s ***** assert (size (tlsrnd (1, 2, 3, 4, 1)), [4, 1]) 498s ***** assert (size (tlsrnd (1, 2, 3, 4, 1)), [4, 1]) 498s ***** assert (size (tlsrnd (1, 2, 3, 4, 1, 5)), [4, 1, 5]) 498s ***** assert (size (tlsrnd (1, 2, 3, 0, 1)), [0, 1]) 498s ***** assert (size (tlsrnd (1, 2, 3, 1, 0)), [1, 0]) 498s ***** assert (size (tlsrnd (1, 2, 3, 1, 2, 0, 5)), [1, 2, 0, 5]) 498s ***** assert (tlsrnd (1, 2, 0, 1, 1), NaN) 498s ***** assert (tlsrnd (1, 2, [0, 0, 0], [1, 3]), [NaN, NaN, NaN]) 498s ***** assert (class (tlsrnd (1, 2, 3)), "double") 498s ***** assert (class (tlsrnd (single (1), 2, 3)), "single") 498s ***** assert (class (tlsrnd (single ([1, 1]), 2, 3)), "single") 498s ***** assert (class (tlsrnd (1, single (2), 3)), "single") 498s ***** assert (class (tlsrnd (1, single ([2, 2]), 3)), "single") 498s ***** assert (class (tlsrnd (1, 2, single (3))), "single") 498s ***** assert (class (tlsrnd (1, 2, single ([3, 3]))), "single") 498s ***** error tlsrnd () 498s ***** error tlsrnd (1) 498s ***** error tlsrnd (1, 2) 498s ***** error ... 498s tlsrnd (ones (3), ones (2), 1) 498s ***** error ... 498s tlsrnd (ones (2), 1, ones (3)) 498s ***** error ... 498s tlsrnd (1, ones (2), ones (3)) 498s ***** error tlsrnd (i, 2, 3) 498s ***** error tlsrnd (1, i, 3) 498s ***** error tlsrnd (1, 2, i) 498s ***** error ... 498s tlsrnd (1, 2, 3, -1) 498s ***** error ... 498s tlsrnd (1, 2, 3, 1.2) 498s ***** error ... 498s tlsrnd (1, 2, 3, ones (2)) 498s ***** error ... 498s tlsrnd (1, 2, 3, [2 -1 2]) 498s ***** error ... 498s tlsrnd (1, 2, 3, [2 0 2.5]) 498s ***** error ... 498s tlsrnd (ones (2), 2, 3, ones (2)) 498s ***** error ... 498s tlsrnd (1, 2, 3, 2, -1, 5) 498s ***** error ... 498s tlsrnd (1, 2, 3, 2, 1.5, 5) 498s ***** error ... 498s tlsrnd (ones (2,2), 2, 3, 3) 498s ***** error ... 498s tlsrnd (1, ones (2,2), 3, 3) 498s ***** error ... 498s tlsrnd (1, 2, ones (2,2), 3) 498s ***** error ... 498s tlsrnd (1, 2, ones (2,2), [3, 3]) 498s ***** error ... 498s tlsrnd (1, 2, ones (2,2), 2, 3) 498s 42 tests, 42 passed, 0 known failure, 0 skipped 498s [inst/dist_fun/tpdf.m] 498s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/tpdf.m 498s ***** demo 498s ## Plot various PDFs from the Student's T distribution 498s x = -5:0.01:5; 498s y1 = tpdf (x, 1); 498s y2 = tpdf (x, 2); 498s y3 = tpdf (x, 5); 498s y4 = tpdf (x, Inf); 498s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-m") 498s grid on 498s xlim ([-5, 5]) 498s ylim ([0, 0.41]) 498s legend ({"df = 1", "df = 2", ... 498s "df = 5", 'df = \infty'}, "location", "northeast") 498s title ("Student's T PDF") 498s xlabel ("values in x") 498s ylabel ("density") 498s ***** test 498s x = rand (10,1); 498s y = 1./(pi * (1 + x.^2)); 498s assert (tpdf (x, 1), y, 5*eps); 498s ***** shared x, y 498s x = [-Inf 0 0.5 1 Inf]; 498s y = 1./(pi * (1 + x.^2)); 498s ***** assert (tpdf (x, ones (1,5)), y, eps) 498s ***** assert (tpdf (x, 1), y, eps) 498s ***** assert (tpdf (x, [0 NaN 1 1 1]), [NaN NaN y(3:5)], eps) 498s ***** assert (tpdf (x, Inf), normpdf (x)) 498s ***** assert (tpdf ([x, NaN], 1), [y, NaN], eps) 498s ***** assert (tpdf (single ([x, NaN]), 1), single ([y, NaN]), eps ("single")) 498s ***** assert (tpdf ([x, NaN], single (1)), single ([y, NaN]), eps ("single")) 498s ***** error tpdf () 498s ***** error tpdf (1) 498s ***** error ... 498s tpdf (ones (3), ones (2)) 498s ***** error ... 498s tpdf (ones (2), ones (3)) 498s ***** error tpdf (i, 2) 498s ***** error tpdf (2, i) 498s 14 tests, 14 passed, 0 known failure, 0 skipped 498s [inst/dist_fun/tricdf.m] 498s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/tricdf.m 498s ***** demo 498s ## Plot various CDFs from the triangular distribution 498s x = 0.001:0.001:10; 498s p1 = tricdf (x, 3, 4, 6); 498s p2 = tricdf (x, 1, 2, 5); 498s p3 = tricdf (x, 2, 3, 9); 498s p4 = tricdf (x, 2, 5, 9); 498s plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-c") 498s grid on 498s xlim ([0, 10]) 498s legend ({"a = 3, b = 4, c = 6", "a = 1, b = 2, c = 5", ... 498s "a = 2, b = 3, c = 9", "a = 2, b = 5, c = 9"}, ... 498s "location", "southeast") 498s title ("Triangular CDF") 498s xlabel ("values in x") 498s ylabel ("probability") 498s ***** shared x, y 498s x = [-1, 0, 0.1, 0.5, 0.9, 1, 2] + 1; 498s y = [0, 0, 0.02, 0.5, 0.98, 1 1]; 498s ***** assert (tricdf (x, ones (1,7), 1.5 * ones (1, 7), 2 * ones (1, 7)), y, eps) 498s ***** assert (tricdf (x, 1 * ones (1, 7), 1.5, 2), y, eps) 498s ***** assert (tricdf (x, 1 * ones (1, 7), 1.5, 2, "upper"), 1 - y, eps) 498s ***** assert (tricdf (x, 1, 1.5, 2 * ones (1, 7)), y, eps) 498s ***** assert (tricdf (x, 1, 1.5 * ones (1, 7), 2), y, eps) 498s ***** assert (tricdf (x, 1, 1.5, 2), y, eps) 498s ***** assert (tricdf (x, [1, 1, NaN, 1, 1, 1, 1], 1.5, 2), ... 498s [y(1:2), NaN, y(4:7)], eps) 498s ***** assert (tricdf (x, 1, 1.5, 2*[1, 1, NaN, 1, 1, 1, 1]), ... 498s [y(1:2), NaN, y(4:7)], eps) 498s ***** assert (tricdf (x, 1, 1.5, 2*[1, 1, NaN, 1, 1, 1, 1]), ... 498s [y(1:2), NaN, y(4:7)], eps) 498s ***** assert (tricdf ([x, NaN], 1, 1.5, 2), [y, NaN], eps) 498s ***** assert (tricdf (single ([x, NaN]), 1, 1.5, 2), ... 498s single ([y, NaN]), eps("single")) 498s ***** assert (tricdf ([x, NaN], single (1), 1.5, 2), ... 498s single ([y, NaN]), eps("single")) 498s ***** assert (tricdf ([x, NaN], 1, single (1.5), 2), ... 498s single ([y, NaN]), eps("single")) 498s ***** assert (tricdf ([x, NaN], 1, 1.5, single (2)), ... 498s single ([y, NaN]), eps("single")) 498s ***** error tricdf () 498s ***** error tricdf (1) 498s ***** error tricdf (1, 2) 498s ***** error tricdf (1, 2, 3) 498s ***** error ... 498s tricdf (1, 2, 3, 4, 5, 6) 498s ***** error tricdf (1, 2, 3, 4, "tail") 498s ***** error tricdf (1, 2, 3, 4, 5) 498s ***** error ... 498s tricdf (ones (3), ones (2), ones(2), ones(2)) 498s ***** error ... 498s tricdf (ones (2), ones (3), ones(2), ones(2)) 498s ***** error ... 498s tricdf (ones (2), ones (2), ones(3), ones(2)) 498s ***** error ... 498s tricdf (ones (2), ones (2), ones(2), ones(3)) 498s ***** error tricdf (i, 2, 3, 4) 498s ***** error tricdf (1, i, 3, 4) 498s ***** error tricdf (1, 2, i, 4) 498s ***** error tricdf (1, 2, 3, i) 498s 29 tests, 29 passed, 0 known failure, 0 skipped 498s [inst/dist_fun/triinv.m] 498s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/triinv.m 498s ***** demo 498s ## Plot various iCDFs from the triangular distribution 498s p = 0.001:0.001:0.999; 498s x1 = triinv (p, 3, 6, 4); 498s x2 = triinv (p, 1, 5, 2); 498s x3 = triinv (p, 2, 9, 3); 498s x4 = triinv (p, 2, 9, 5); 498s plot (p, x1, "-b", p, x2, "-g", p, x3, "-r", p, x4, "-c") 498s grid on 498s ylim ([0, 10]) 498s legend ({"a = 3, b = 6, c = 4", "a = 1, b = 5, c = 2", ... 498s "a = 2, b = 9, c = 3", "a = 2, b = 9, c = 5"}, ... 498s "location", "northwest") 498s title ("Triangular CDF") 498s xlabel ("probability") 498s ylabel ("values in x") 498s ***** shared p, y 498s p = [-1, 0, 0.02, 0.5, 0.98, 1, 2]; 498s y = [NaN, 0, 0.1, 0.5, 0.9, 1, NaN] + 1; 498s ***** assert (triinv (p, ones (1, 7), 1.5 * ones (1, 7), 2 * ones (1, 7)), y, eps) 498s ***** assert (triinv (p, 1 * ones (1, 7), 1.5, 2), y, eps) 498s ***** assert (triinv (p, 1, 1.5, 2 * ones (1, 7)), y, eps) 498s ***** assert (triinv (p, 1, 1.5*ones (1,7), 2), y, eps) 498s ***** assert (triinv (p, 1, 1.5, 2), y, eps) 498s ***** assert (triinv (p, [1, 1, NaN, 1, 1, 1, 1], 1.5, 2), [y(1:2), NaN, y(4:7)], eps) 498s ***** assert (triinv (p, 1, 1.5 * [1, 1, NaN, 1, 1, 1, 1], 2), [y(1:2), NaN, y(4:7)], eps) 498s ***** assert (triinv (p, 1, 1.5, 2 * [1, 1, NaN, 1, 1, 1, 1]), [y(1:2), NaN, y(4:7)], eps) 498s ***** assert (triinv ([p, NaN], 1, 1.5, 2), [y, NaN], eps) 498s ***** assert (triinv (single ([p, NaN]), 1, 1.5, 2), single ([y, NaN]), eps('single')) 498s ***** assert (triinv ([p, NaN], single (1), 1.5, 2), single ([y, NaN]), eps('single')) 498s ***** assert (triinv ([p, NaN], 1, single (1.5), 2), single ([y, NaN]), eps('single')) 498s ***** assert (triinv ([p, NaN], 1, 1.5, single (2)), single ([y, NaN]), eps('single')) 498s ***** error triinv () 498s ***** error triinv (1) 498s ***** error triinv (1, 2) 498s ***** error triinv (1, 2, 3) 498s ***** error ... 498s triinv (1, 2, 3, 4, 5) 498s ***** error ... 498s triinv (ones (3), ones (2), ones(2), ones(2)) 498s ***** error ... 498s triinv (ones (2), ones (3), ones(2), ones(2)) 498s ***** error ... 498s triinv (ones (2), ones (2), ones(3), ones(2)) 498s ***** error ... 498s triinv (ones (2), ones (2), ones(2), ones(3)) 498s ***** error triinv (i, 2, 3, 4) 498s ***** error triinv (1, i, 3, 4) 498s ***** error triinv (1, 2, i, 4) 498s ***** error triinv (1, 2, 3, i) 498s 26 tests, 26 passed, 0 known failure, 0 skipped 498s [inst/dist_fun/tripdf.m] 498s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/tripdf.m 498s ***** demo 498s ## Plot various CDFs from the triangular distribution 498s x = 0.001:0.001:10; 498s y1 = tripdf (x, 3, 4, 6); 498s y2 = tripdf (x, 1, 2, 5); 498s y3 = tripdf (x, 2, 3, 9); 498s y4 = tripdf (x, 2, 5, 9); 498s plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-c") 498s grid on 498s xlim ([0, 10]) 498s legend ({"a = 3, b = 4, c = 6", "a = 1, b = 2, c = 5", ... 498s "a = 2, b = 3, c = 9", "a = 2, b = 5, c = 9"}, ... 498s "location", "northeast") 498s title ("Triangular CDF") 498s xlabel ("values in x") 498s ylabel ("probability") 498s ***** shared x, y, deps 498s x = [-1, 0, 0.1, 0.5, 0.9, 1, 2] + 1; 498s y = [0, 0, 0.4, 2, 0.4, 0, 0]; 498s deps = 2*eps; 498s ***** assert (tripdf (x, ones (1,7), 1.5*ones (1,7), 2*ones (1,7)), y, deps) 498s ***** assert (tripdf (x, 1*ones (1,7), 1.5, 2), y, deps) 498s ***** assert (tripdf (x, 1, 1.5, 2*ones (1,7)), y, deps) 498s ***** assert (tripdf (x, 1, 1.5*ones (1,7), 2), y, deps) 498s ***** assert (tripdf (x, 1, 1.5, 2), y, deps) 498s ***** assert (tripdf (x, [1, 1, NaN, 1, 1, 1, 1], 1.5, 2), [y(1:2), NaN, y(4:7)], deps) 498s ***** assert (tripdf (x, 1, 1.5, 2*[1, 1, NaN, 1, 1, 1, 1]), [y(1:2), NaN, y(4:7)], deps) 498s ***** assert (tripdf (x, 1, 1.5*[1, 1, NaN, 1, 1, 1, 1], 2), [y(1:2), NaN, y(4:7)], deps) 498s ***** assert (tripdf ([x, NaN], 1, 1.5, 2), [y, NaN], deps) 498s ***** assert (tripdf (single ([x, NaN]), 1, 1.5, 2), single ([y, NaN]), eps("single")) 498s ***** assert (tripdf ([x, NaN], single (1), 1.5, 2), single ([y, NaN]), eps("single")) 498s ***** assert (tripdf ([x, NaN], 1, 1.5, single (2)), single ([y, NaN]), eps("single")) 498s ***** assert (tripdf ([x, NaN], 1, single (1.5), 2), single ([y, NaN]), eps("single")) 498s ***** error tripdf () 498s ***** error tripdf (1) 498s ***** error tripdf (1, 2) 498s ***** error tripdf (1, 2, 3) 498s ***** error ... 498s tripdf (1, 2, 3, 4, 5) 498s ***** error ... 498s tripdf (ones (3), ones (2), ones(2), ones(2)) 498s ***** error ... 498s tripdf (ones (2), ones (3), ones(2), ones(2)) 498s ***** error ... 498s tripdf (ones (2), ones (2), ones(3), ones(2)) 498s ***** error ... 498s tripdf (ones (2), ones (2), ones(2), ones(3)) 498s ***** error tripdf (i, 2, 3, 4) 498s ***** error tripdf (1, i, 3, 4) 498s ***** error tripdf (1, 2, i, 4) 498s ***** error tripdf (1, 2, 3, i) 498s 26 tests, 26 passed, 0 known failure, 0 skipped 498s [inst/dist_fun/trirnd.m] 498s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/trirnd.m 498s ***** assert (size (trirnd (1, 1.5, 2)), [1, 1]) 498s ***** assert (size (trirnd (1 * ones (2, 1), 1.5, 2)), [2, 1]) 498s ***** assert (size (trirnd (1 * ones (2, 2), 1.5, 2)), [2, 2]) 498s ***** assert (size (trirnd (1, 1.5 * ones (2, 1), 2)), [2, 1]) 498s ***** assert (size (trirnd (1, 1.5 * ones (2, 2), 2)), [2, 2]) 498s ***** assert (size (trirnd (1, 1.5, 2 * ones (2, 1))), [2, 1]) 498s ***** assert (size (trirnd (1, 1.5, 2 * ones (2, 2))), [2, 2]) 498s ***** assert (size (trirnd (1, 1.5, 2, 3)), [3, 3]) 498s ***** assert (size (trirnd (1, 1.5, 2, [4, 1])), [4, 1]) 498s ***** assert (size (trirnd (1, 1.5, 2, 4, 1)), [4, 1]) 498s ***** assert (class (trirnd (1, 1.5, 2)), "double") 498s ***** assert (class (trirnd (single (1), 1.5, 2)), "single") 498s ***** assert (class (trirnd (single ([1, 1]), 1.5, 2)), "single") 498s ***** assert (class (trirnd (1, single (1.5), 2)), "single") 498s ***** assert (class (trirnd (1, single ([1.5, 1.5]), 2)), "single") 498s ***** assert (class (trirnd (1, 1.5, single (1.5))), "single") 498s ***** assert (class (trirnd (1, 1.5, single ([2, 2]))), "single") 498s ***** error trirnd () 498s ***** error trirnd (1) 498s ***** error trirnd (1, 2) 498s ***** error ... 498s trirnd (ones (3), 5 * ones (2), ones (2)) 498s ***** error ... 498s trirnd (ones (2), 5 * ones (3), ones (2)) 498s ***** error ... 498s trirnd (ones (2), 5 * ones (2), ones (3)) 498s ***** error trirnd (i, 5, 3) 498s ***** error trirnd (1, 5+i, 3) 498s ***** error trirnd (1, 5, i) 498s ***** error ... 498s trirnd (1, 5, 3, -1) 498s ***** error ... 498s trirnd (1, 5, 3, 1.2) 498s ***** error ... 498s trirnd (1, 5, 3, ones (2)) 498s ***** error ... 498s trirnd (1, 5, 3, [2 -1 2]) 498s ***** error ... 498s trirnd (1, 5, 3, [2 0 2.5]) 498s ***** error ... 498s trirnd (1, 5, 3, 2, -1, 5) 498s ***** error ... 498s trirnd (1, 5, 3, 2, 1.5, 5) 498s ***** error ... 498s trirnd (2, 5 * ones (2), 2, 3) 498s ***** error ... 498s trirnd (2, 5 * ones (2), 2, [3, 2]) 498s ***** error ... 498s trirnd (2, 5 * ones (2), 2, 3, 2) 498s 36 tests, 36 passed, 0 known failure, 0 skipped 498s [inst/dist_fun/trnd.m] 498s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/trnd.m 498s ***** assert (size (trnd (2)), [1, 1]) 498s ***** assert (size (trnd (ones (2,1))), [2, 1]) 498s ***** assert (size (trnd (ones (2,2))), [2, 2]) 498s ***** assert (size (trnd (1, 3)), [3, 3]) 498s ***** assert (size (trnd (1, [4 1])), [4, 1]) 498s ***** assert (size (trnd (1, 4, 1)), [4, 1]) 498s ***** assert (size (trnd (1, 4, 1)), [4, 1]) 498s ***** assert (size (trnd (1, 4, 1, 5)), [4, 1, 5]) 498s ***** assert (size (trnd (1, 0, 1)), [0, 1]) 498s ***** assert (size (trnd (1, 1, 0)), [1, 0]) 498s ***** assert (size (trnd (1, 1, 2, 0, 5)), [1, 2, 0, 5]) 498s ***** assert (trnd (0, 1, 1), NaN) 498s ***** assert (trnd ([0, 0, 0], [1, 3]), [NaN, NaN, NaN]) 498s ***** assert (class (trnd (2)), "double") 498s ***** assert (class (trnd (single (2))), "single") 498s ***** assert (class (trnd (single ([2 2]))), "single") 498s ***** error trnd () 498s ***** error trnd (i) 498s ***** error ... 498s trnd (1, -1) 498s ***** error ... 498s trnd (1, 1.2) 498s ***** error ... 498s trnd (1, ones (2)) 498s ***** error ... 498s trnd (1, [2 -1 2]) 498s ***** error ... 498s trnd (1, [2 0 2.5]) 498s ***** error ... 498s trnd (ones (2), ones (2)) 498s ***** error ... 498s trnd (1, 2, -1, 5) 498s ***** error ... 498s trnd (1, 2, 1.5, 5) 498s ***** error trnd (ones (2,2), 3) 498s ***** error trnd (ones (2,2), [3, 2]) 498s ***** error trnd (ones (2,2), 2, 3) 498s 29 tests, 29 passed, 0 known failure, 0 skipped 498s [inst/dist_fun/unidcdf.m] 498s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/unidcdf.m 498s ***** demo 498s ## Plot various CDFs from the discrete uniform distribution 498s x = 0:10; 498s p1 = unidcdf (x, 5); 498s p2 = unidcdf (x, 9); 498s plot (x, p1, "*b", x, p2, "*g") 498s grid on 498s xlim ([0, 10]) 498s ylim ([0, 1]) 498s legend ({"N = 5", "N = 9"}, "location", "southeast") 498s title ("Discrete uniform CDF") 498s xlabel ("values in x") 498s ylabel ("probability") 498s ***** shared x, y 498s x = [0 1 2.5 10 11]; 498s y = [0, 0.1 0.2 1.0 1.0]; 498s ***** assert (unidcdf (x, 10*ones (1,5)), y) 498s ***** assert (unidcdf (x, 10*ones (1,5), "upper"), 1 - y) 498s ***** assert (unidcdf (x, 10), y) 499s ***** assert (unidcdf (x, 10, "upper"), 1 - y) 499s ***** assert (unidcdf (x, 10*[0 1 NaN 1 1]), [NaN 0.1 NaN y(4:5)]) 499s ***** assert (unidcdf ([x(1:2) NaN Inf x(5)], 10), [y(1:2) NaN 1 y(5)]) 499s ***** assert (unidcdf ([x, NaN], 10), [y, NaN]) 499s ***** assert (unidcdf (single ([x, NaN]), 10), single ([y, NaN])) 499s ***** assert (unidcdf ([x, NaN], single (10)), single ([y, NaN])) 499s ***** error unidcdf () 499s ***** error unidcdf (1) 499s ***** error unidcdf (1, 2, 3) 499s ***** error unidcdf (1, 2, "tail") 499s ***** error ... 499s unidcdf (ones (3), ones (2)) 499s ***** error ... 499s unidcdf (ones (2), ones (3)) 499s ***** error unidcdf (i, 2) 499s ***** error unidcdf (2, i) 499s 17 tests, 17 passed, 0 known failure, 0 skipped 499s [inst/dist_fun/unidinv.m] 499s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/unidinv.m 499s ***** demo 499s ## Plot various iCDFs from the discrete uniform distribution 499s p = 0.001:0.001:0.999; 499s x1 = unidinv (p, 5); 499s x2 = unidinv (p, 9); 499s plot (p, x1, "-b", p, x2, "-g") 499s grid on 499s xlim ([0, 1]) 499s ylim ([0, 10]) 499s legend ({"N = 5", "N = 9"}, "location", "northwest") 499s title ("Discrete uniform iCDF") 499s xlabel ("probability") 499s ylabel ("values in x") 499s ***** shared p 499s p = [-1 0 0.5 1 2]; 499s ***** assert (unidinv (p, 10*ones (1,5)), [NaN NaN 5 10 NaN], eps) 499s ***** assert (unidinv (p, 10), [NaN NaN 5 10 NaN], eps) 499s ***** assert (unidinv (p, 10*[0 1 NaN 1 1]), [NaN NaN NaN 10 NaN], eps) 499s ***** assert (unidinv ([p(1:2) NaN p(4:5)], 10), [NaN NaN NaN 10 NaN], eps) 499s ***** assert (unidinv ([p, NaN], 10), [NaN NaN 5 10 NaN NaN], eps) 499s ***** assert (unidinv (single ([p, NaN]), 10), single ([NaN NaN 5 10 NaN NaN]), eps) 499s ***** assert (unidinv ([p, NaN], single (10)), single ([NaN NaN 5 10 NaN NaN]), eps) 499s ***** error unidinv () 499s ***** error unidinv (1) 499s ***** error ... 499s unidinv (ones (3), ones (2)) 499s ***** error ... 499s unidinv (ones (2), ones (3)) 499s ***** error unidinv (i, 2) 499s ***** error unidinv (2, i) 499s 13 tests, 13 passed, 0 known failure, 0 skipped 499s [inst/dist_fun/unidpdf.m] 499s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/unidpdf.m 499s ***** demo 499s ## Plot various PDFs from the discrete uniform distribution 499s x = 0:10; 499s y1 = unidpdf (x, 5); 499s y2 = unidpdf (x, 9); 499s plot (x, y1, "*b", x, y2, "*g") 499s grid on 499s xlim ([0, 10]) 499s ylim ([0, 0.25]) 499s legend ({"N = 5", "N = 9"}, "location", "northeast") 499s title ("Discrete uniform PDF") 499s xlabel ("values in x") 499s ylabel ("density") 499s ***** shared x, y 499s x = [-1 0 1 2 10 11]; 499s y = [0 0 0.1 0.1 0.1 0]; 499s ***** assert (unidpdf (x, 10*ones (1,6)), y) 499s ***** assert (unidpdf (x, 10), y) 499s ***** assert (unidpdf (x, 10*[0 NaN 1 1 1 1]), [NaN NaN y(3:6)]) 499s ***** assert (unidpdf ([x, NaN], 10), [y, NaN]) 499s ***** assert (unidpdf (single ([x, NaN]), 10), single ([y, NaN])) 499s ***** assert (unidpdf ([x, NaN], single (10)), single ([y, NaN])) 499s ***** error unidpdf () 499s ***** error unidpdf (1) 499s ***** error ... 499s unidpdf (ones (3), ones (2)) 499s ***** error ... 499s unidpdf (ones (2), ones (3)) 499s ***** error unidpdf (i, 2) 499s ***** error unidpdf (2, i) 499s 12 tests, 12 passed, 0 known failure, 0 skipped 499s [inst/dist_fun/unidrnd.m] 499s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/unidrnd.m 499s ***** assert (size (unidrnd (2)), [1, 1]) 499s ***** assert (size (unidrnd (ones (2,1))), [2, 1]) 499s ***** assert (size (unidrnd (ones (2,2))), [2, 2]) 499s ***** assert (size (unidrnd (1, 3)), [3, 3]) 499s ***** assert (size (unidrnd (1, [4 1])), [4, 1]) 499s ***** assert (size (unidrnd (1, 4, 1)), [4, 1]) 499s ***** assert (size (unidrnd (1, 4, 1)), [4, 1]) 499s ***** assert (size (unidrnd (1, 4, 1, 5)), [4, 1, 5]) 499s ***** assert (size (unidrnd (1, 0, 1)), [0, 1]) 499s ***** assert (size (unidrnd (1, 1, 0)), [1, 0]) 499s ***** assert (size (unidrnd (1, 1, 2, 0, 5)), [1, 2, 0, 5]) 499s ***** assert (unidrnd (0, 1, 1), NaN) 499s ***** assert (unidrnd ([0, 0, 0], [1, 3]), [NaN, NaN, NaN]) 499s ***** assert (class (unidrnd (2)), "double") 499s ***** assert (class (unidrnd (single (2))), "single") 499s ***** assert (class (unidrnd (single ([2 2]))), "single") 499s ***** error unidrnd () 499s ***** error unidrnd (i) 499s ***** error ... 499s unidrnd (1, -1) 499s ***** error ... 499s unidrnd (1, 1.2) 499s ***** error ... 499s unidrnd (1, ones (2)) 499s ***** error ... 499s unidrnd (1, [2 -1 2]) 499s ***** error ... 499s unidrnd (1, [2 0 2.5]) 499s ***** error ... 499s unidrnd (ones (2), ones (2)) 499s ***** error ... 499s unidrnd (1, 2, -1, 5) 499s ***** error ... 499s unidrnd (1, 2, 1.5, 5) 499s ***** error unidrnd (ones (2,2), 3) 499s ***** error unidrnd (ones (2,2), [3, 2]) 499s ***** error unidrnd (ones (2,2), 2, 3) 499s 29 tests, 29 passed, 0 known failure, 0 skipped 499s [inst/dist_fun/unifcdf.m] 499s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/unifcdf.m 499s ***** demo 499s ## Plot various CDFs from the continuous uniform distribution 499s x = 0:0.1:10; 499s p1 = unifcdf (x, 2, 5); 499s p2 = unifcdf (x, 3, 9); 499s plot (x, p1, "-b", x, p2, "-g") 499s grid on 499s xlim ([0, 10]) 499s ylim ([0, 1]) 499s legend ({"a = 2, b = 5", "a = 3, b = 9"}, "location", "southeast") 499s title ("Continuous uniform CDF") 499s xlabel ("values in x") 499s ylabel ("probability") 499s ***** shared x, y 499s x = [-1 0 0.5 1 2] + 1; 499s y = [0 0 0.5 1 1]; 499s ***** assert (unifcdf (x, ones (1,5), 2*ones (1,5)), y) 499s ***** assert (unifcdf (x, ones (1,5), 2*ones (1,5), "upper"), 1 - y) 499s ***** assert (unifcdf (x, 1, 2*ones (1,5)), y) 499s ***** assert (unifcdf (x, 1, 2*ones (1,5), "upper"), 1 - y) 499s ***** assert (unifcdf (x, ones (1,5), 2), y) 499s ***** assert (unifcdf (x, ones (1,5), 2, "upper"), 1 - y) 499s ***** assert (unifcdf (x, [2 1 NaN 1 1], 2), [NaN 0 NaN 1 1]) 499s ***** assert (unifcdf (x, [2 1 NaN 1 1], 2, "upper"), 1 - [NaN 0 NaN 1 1]) 499s ***** assert (unifcdf (x, 1, 2*[0 1 NaN 1 1]), [NaN 0 NaN 1 1]) 499s ***** assert (unifcdf (x, 1, 2*[0 1 NaN 1 1], "upper"), 1 - [NaN 0 NaN 1 1]) 499s ***** assert (unifcdf ([x(1:2) NaN x(4:5)], 1, 2), [y(1:2) NaN y(4:5)]) 499s ***** assert (unifcdf ([x(1:2) NaN x(4:5)], 1, 2, "upper"), 1 - [y(1:2) NaN y(4:5)]) 499s ***** assert (unifcdf ([x, NaN], 1, 2), [y, NaN]) 499s ***** assert (unifcdf (single ([x, NaN]), 1, 2), single ([y, NaN])) 499s ***** assert (unifcdf ([x, NaN], single (1), 2), single ([y, NaN])) 499s ***** assert (unifcdf ([x, NaN], 1, single (2)), single ([y, NaN])) 499s ***** error unifcdf () 499s ***** error unifcdf (1) 499s ***** error unifcdf (1, 2) 499s ***** error unifcdf (1, 2, 3, 4) 499s ***** error unifcdf (1, 2, 3, "tail") 499s ***** error ... 499s unifcdf (ones (3), ones (2), ones (2)) 499s ***** error ... 499s unifcdf (ones (2), ones (3), ones (2)) 499s ***** error ... 499s unifcdf (ones (2), ones (2), ones (3)) 499s ***** error unifcdf (i, 2, 2) 499s ***** error unifcdf (2, i, 2) 499s ***** error unifcdf (2, 2, i) 499s 27 tests, 27 passed, 0 known failure, 0 skipped 499s [inst/dist_fun/unifinv.m] 499s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/unifinv.m 499s ***** demo 499s ## Plot various iCDFs from the continuous uniform distribution 499s p = 0.001:0.001:0.999; 499s x1 = unifinv (p, 2, 5); 499s x2 = unifinv (p, 3, 9); 499s plot (p, x1, "-b", p, x2, "-g") 499s grid on 499s xlim ([0, 1]) 499s ylim ([0, 10]) 499s legend ({"a = 2, b = 5", "a = 3, b = 9"}, "location", "northwest") 499s title ("Continuous uniform iCDF") 499s xlabel ("probability") 499s ylabel ("values in x") 499s ***** shared p 499s p = [-1 0 0.5 1 2]; 499s ***** assert (unifinv (p, ones (1,5), 2*ones (1,5)), [NaN 1 1.5 2 NaN]) 499s ***** assert (unifinv (p, 0, 1), [NaN 1 1.5 2 NaN] - 1) 499s ***** assert (unifinv (p, 1, 2*ones (1,5)), [NaN 1 1.5 2 NaN]) 499s ***** assert (unifinv (p, ones (1,5), 2), [NaN 1 1.5 2 NaN]) 499s ***** assert (unifinv (p, [1 2 NaN 1 1], 2), [NaN NaN NaN 2 NaN]) 499s ***** assert (unifinv (p, 1, 2*[1 0 NaN 1 1]), [NaN NaN NaN 2 NaN]) 499s ***** assert (unifinv ([p(1:2) NaN p(4:5)], 1, 2), [NaN 1 NaN 2 NaN]) 499s ***** assert (unifinv ([p, NaN], 1, 2), [NaN 1 1.5 2 NaN NaN]) 499s ***** assert (unifinv (single ([p, NaN]), 1, 2), single ([NaN 1 1.5 2 NaN NaN])) 499s ***** assert (unifinv ([p, NaN], single (1), 2), single ([NaN 1 1.5 2 NaN NaN])) 499s ***** assert (unifinv ([p, NaN], 1, single (2)), single ([NaN 1 1.5 2 NaN NaN])) 499s ***** error unifinv () 499s ***** error unifinv (1, 2) 499s ***** error ... 499s unifinv (ones (3), ones (2), ones (2)) 499s ***** error ... 499s unifinv (ones (2), ones (3), ones (2)) 499s ***** error ... 499s unifinv (ones (2), ones (2), ones (3)) 499s ***** error unifinv (i, 2, 2) 499s ***** error unifinv (2, i, 2) 499s ***** error unifinv (2, 2, i) 499s 19 tests, 19 passed, 0 known failure, 0 skipped 499s [inst/dist_fun/unifpdf.m] 499s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/unifpdf.m 499s ***** demo 499s ## Plot various PDFs from the continuous uniform distribution 499s x = 0:0.001:10; 499s y1 = unifpdf (x, 2, 5); 499s y2 = unifpdf (x, 3, 9); 499s plot (x, y1, "-b", x, y2, "-g") 499s grid on 499s xlim ([0, 10]) 499s ylim ([0, 0.4]) 499s legend ({"a = 2, b = 5", "a = 3, b = 9"}, "location", "northeast") 499s title ("Continuous uniform PDF") 499s xlabel ("values in x") 499s ylabel ("density") 499s ***** shared x, y 499s x = [-1 0 0.5 1 2] + 1; 499s y = [0 1 1 1 0]; 499s ***** assert (unifpdf (x, ones (1,5), 2*ones (1,5)), y) 499s ***** assert (unifpdf (x, 1, 2*ones (1,5)), y) 499s ***** assert (unifpdf (x, ones (1,5), 2), y) 499s ***** assert (unifpdf (x, [2 NaN 1 1 1], 2), [NaN NaN y(3:5)]) 499s ***** assert (unifpdf (x, 1, 2*[0 NaN 1 1 1]), [NaN NaN y(3:5)]) 499s ***** assert (unifpdf ([x, NaN], 1, 2), [y, NaN]) 499s ***** assert (unifpdf (x, 0, 1), [1 1 0 0 0]) 499s ***** assert (unifpdf (single ([x, NaN]), 1, 2), single ([y, NaN])) 499s ***** assert (unifpdf (single ([x, NaN]), single (1), 2), single ([y, NaN])) 499s ***** assert (unifpdf ([x, NaN], 1, single (2)), single ([y, NaN])) 499s ***** error unifpdf () 499s ***** error unifpdf (1) 499s ***** error unifpdf (1, 2) 499s ***** error ... 499s unifpdf (ones (3), ones (2), ones (2)) 499s ***** error ... 499s unifpdf (ones (2), ones (3), ones (2)) 499s ***** error ... 499s unifpdf (ones (2), ones (2), ones (3)) 499s ***** error unifpdf (i, 2, 2) 499s ***** error unifpdf (2, i, 2) 499s ***** error unifpdf (2, 2, i) 499s 19 tests, 19 passed, 0 known failure, 0 skipped 499s [inst/dist_fun/unifrnd.m] 499s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/unifrnd.m 499s ***** assert (size (unifrnd (1, 1)), [1 1]) 499s ***** assert (size (unifrnd (1, ones (2,1))), [2, 1]) 499s ***** assert (size (unifrnd (1, ones (2,2))), [2, 2]) 499s ***** assert (size (unifrnd (ones (2,1), 1)), [2, 1]) 499s ***** assert (size (unifrnd (ones (2,2), 1)), [2, 2]) 499s ***** assert (size (unifrnd (1, 1, 3)), [3, 3]) 499s ***** assert (size (unifrnd (1, 1, [4, 1])), [4, 1]) 499s ***** assert (size (unifrnd (1, 1, 4, 1)), [4, 1]) 499s ***** assert (size (unifrnd (1, 1, 4, 1, 5)), [4, 1, 5]) 499s ***** assert (size (unifrnd (1, 1, 0, 1)), [0, 1]) 499s ***** assert (size (unifrnd (1, 1, 1, 0)), [1, 0]) 499s ***** assert (size (unifrnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 499s ***** assert (class (unifrnd (1, 1)), "double") 499s ***** assert (class (unifrnd (1, single (1))), "single") 499s ***** assert (class (unifrnd (1, single ([1, 1]))), "single") 499s ***** assert (class (unifrnd (single (1), 1)), "single") 499s ***** assert (class (unifrnd (single ([1, 1]), 1)), "single") 499s ***** error unifrnd () 499s ***** error unifrnd (1) 499s ***** error ... 499s unifrnd (ones (3), ones (2)) 499s ***** error ... 499s unifrnd (ones (2), ones (3)) 499s ***** error unifrnd (i, 2, 3) 499s ***** error unifrnd (1, i, 3) 499s ***** error ... 499s unifrnd (1, 2, -1) 499s ***** error ... 499s unifrnd (1, 2, 1.2) 499s ***** error ... 499s unifrnd (1, 2, ones (2)) 499s ***** error ... 499s unifrnd (1, 2, [2 -1 2]) 499s ***** error ... 499s unifrnd (1, 2, [2 0 2.5]) 499s ***** error ... 499s unifrnd (1, 2, 2, -1, 5) 499s ***** error ... 499s unifrnd (1, 2, 2, 1.5, 5) 499s ***** error ... 499s unifrnd (2, ones (2), 3) 499s ***** error ... 499s unifrnd (2, ones (2), [3, 2]) 499s ***** error ... 499s unifrnd (2, ones (2), 3, 2) 499s 33 tests, 33 passed, 0 known failure, 0 skipped 499s [inst/dist_fun/vmcdf.m] 499s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/vmcdf.m 499s ***** demo 499s ## Plot various CDFs from the von Mises distribution 499s x1 = [-pi:0.1:pi]; 499s p1 = vmcdf (x1, 0, 0.5); 499s p2 = vmcdf (x1, 0, 1); 499s p3 = vmcdf (x1, 0, 2); 499s p4 = vmcdf (x1, 0, 4); 499s plot (x1, p1, "-r", x1, p2, "-g", x1, p3, "-b", x1, p4, "-c") 499s grid on 499s xlim ([-pi, pi]) 499s legend ({"μ = 0, k = 0.5", "μ = 0, k = 1", ... 499s "μ = 0, k = 2", "μ = 0, k = 4"}, "location", "northwest") 499s title ("Von Mises CDF") 499s xlabel ("values in x") 499s ylabel ("probability") 499s ***** shared x, p0, p1 499s x = [-pi:pi/2:pi]; 499s p0 = [0, 0.10975, 0.5, 0.89025, 1]; 499s p1 = [0, 0.03752, 0.5, 0.99622, 1]; 499s ***** assert (vmcdf (x, 0, 1), p0, 1e-5) 500s ***** assert (vmcdf (x, 0, 1, "upper"), 1 - p0, 1e-5) 500s ***** assert (vmcdf (x, zeros (1,5), ones (1,5)), p0, 1e-5) 500s ***** assert (vmcdf (x, zeros (1,5), ones (1,5), "upper"), 1 - p0, 1e-5) 500s ***** assert (vmcdf (x, 0, [1 2 3 4 5]), p1, 1e-5) 501s ***** assert (vmcdf (x, 0, [1 2 3 4 5], "upper"), 1 - p1, 1e-5) 501s ***** assert (isa (vmcdf (single (pi), 0, 1), "single"), true) 501s ***** assert (isa (vmcdf (pi, single (0), 1), "single"), true) 501s ***** assert (isa (vmcdf (pi, 0, single (1)), "single"), true) 501s ***** error vmcdf () 501s ***** error vmcdf (1) 501s ***** error vmcdf (1, 2) 501s ***** error vmcdf (1, 2, 3, "tail") 501s ***** error vmcdf (1, 2, 3, 4) 501s ***** error ... 501s vmcdf (ones (3), ones (2), ones (2)) 501s ***** error ... 501s vmcdf (ones (2), ones (3), ones (2)) 501s ***** error ... 501s vmcdf (ones (2), ones (2), ones (3)) 501s ***** error vmcdf (i, 2, 2) 501s ***** error vmcdf (2, i, 2) 501s ***** error vmcdf (2, 2, i) 501s 20 tests, 20 passed, 0 known failure, 0 skipped 501s [inst/dist_fun/vminv.m] 501s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/vminv.m 501s ***** demo 501s ## Plot various iCDFs from the von Mises distribution 501s p1 = [0,0.005,0.01:0.01:0.1,0.15,0.2:0.1:0.8,0.85,0.9:0.01:0.99,0.995,1]; 501s x1 = vminv (p1, 0, 0.5); 501s x2 = vminv (p1, 0, 1); 501s x3 = vminv (p1, 0, 2); 501s x4 = vminv (p1, 0, 4); 501s plot (p1, x1, "-r", p1, x2, "-g", p1, x3, "-b", p1, x4, "-c") 501s grid on 501s ylim ([-pi, pi]) 501s legend ({"μ = 0, k = 0.5", "μ = 0, k = 1", ... 501s "μ = 0, k = 2", "μ = 0, k = 4"}, "location", "northwest") 501s title ("Von Mises iCDF") 501s xlabel ("probability") 501s ylabel ("values in x") 501s ***** shared x, p0, p1 501s x = [-pi:pi/2:pi]; 501s p0 = [0, 0.10975, 0.5, 0.89025, 1]; 501s p1 = [0, 0.03752, 0.5, 0.99622, 1]; 501s ***** assert (vminv (p0, 0, 1), x, 5e-5) 502s ***** assert (vminv (p0, zeros (1,5), ones (1,5)), x, 5e-5) 504s ***** assert (vminv (p1, 0, [1 2 3 4 5]), x, [5e-5, 5e-4, 5e-5, 5e-4, 5e-5]) 506s ***** error vminv () 506s ***** error vminv (1) 506s ***** error vminv (1, 2) 506s ***** error ... 506s vminv (ones (3), ones (2), ones (2)) 506s ***** error ... 506s vminv (ones (2), ones (3), ones (2)) 506s ***** error ... 506s vminv (ones (2), ones (2), ones (3)) 506s ***** error vminv (i, 2, 2) 506s ***** error vminv (2, i, 2) 506s ***** error vminv (2, 2, i) 506s 12 tests, 12 passed, 0 known failure, 0 skipped 506s [inst/dist_fun/vmpdf.m] 506s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/vmpdf.m 506s ***** demo 506s ## Plot various PDFs from the von Mises distribution 506s x1 = [-pi:0.1:pi]; 506s y1 = vmpdf (x1, 0, 0.5); 506s y2 = vmpdf (x1, 0, 1); 506s y3 = vmpdf (x1, 0, 2); 506s y4 = vmpdf (x1, 0, 4); 506s plot (x1, y1, "-r", x1, y2, "-g", x1, y3, "-b", x1, y4, "-c") 506s grid on 506s xlim ([-pi, pi]) 506s ylim ([0, 0.8]) 506s legend ({"μ = 0, k = 0.5", "μ = 0, k = 1", ... 506s "μ = 0, k = 2", "μ = 0, k = 4"}, "location", "northwest") 506s title ("Von Mises PDF") 506s xlabel ("values in x") 506s ylabel ("density") 506s ***** shared x, y0, y1 506s x = [-pi:pi/2:pi]; 506s y0 = [0.046245, 0.125708, 0.341710, 0.125708, 0.046245]; 506s y1 = [0.046245, 0.069817, 0.654958, 0.014082, 0.000039]; 506s ***** assert (vmpdf (x, 0, 1), y0, 1e-5) 506s ***** assert (vmpdf (x, zeros (1,5), ones (1,5)), y0, 1e-6) 506s ***** assert (vmpdf (x, 0, [1 2 3 4 5]), y1, 1e-6) 506s ***** assert (isa (vmpdf (single (pi), 0, 1), "single"), true) 506s ***** assert (isa (vmpdf (pi, single (0), 1), "single"), true) 506s ***** assert (isa (vmpdf (pi, 0, single (1)), "single"), true) 506s ***** error vmpdf () 506s ***** error vmpdf (1) 506s ***** error vmpdf (1, 2) 506s ***** error ... 506s vmpdf (ones (3), ones (2), ones (2)) 506s ***** error ... 506s vmpdf (ones (2), ones (3), ones (2)) 506s ***** error ... 506s vmpdf (ones (2), ones (2), ones (3)) 506s ***** error vmpdf (i, 2, 2) 506s ***** error vmpdf (2, i, 2) 506s ***** error vmpdf (2, 2, i) 506s 15 tests, 15 passed, 0 known failure, 0 skipped 506s [inst/dist_fun/vmrnd.m] 506s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/vmrnd.m 506s ***** assert (size (vmrnd (1, 1)), [1 1]) 506s ***** assert (size (vmrnd (1, ones (2,1))), [2, 1]) 506s ***** assert (size (vmrnd (1, ones (2,2))), [2, 2]) 506s ***** assert (size (vmrnd (ones (2,1), 1)), [2, 1]) 506s ***** assert (size (vmrnd (ones (2,2), 1)), [2, 2]) 506s ***** assert (size (vmrnd (1, 1, 3)), [3, 3]) 506s ***** assert (size (vmrnd (1, 1, [4, 1])), [4, 1]) 506s ***** assert (size (vmrnd (1, 1, 4, 1)), [4, 1]) 506s ***** assert (size (vmrnd (1, 1, 4, 1, 5)), [4, 1, 5]) 506s ***** assert (size (vmrnd (1, 1, 0, 1)), [0, 1]) 506s ***** assert (size (vmrnd (1, 1, 1, 0)), [1, 0]) 506s ***** assert (size (vmrnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 506s ***** assert (class (vmrnd (1, 1)), "double") 506s ***** assert (class (vmrnd (1, single (1))), "single") 506s ***** assert (class (vmrnd (1, single ([1, 1]))), "single") 506s ***** assert (class (vmrnd (single (1), 1)), "single") 506s ***** assert (class (vmrnd (single ([1, 1]), 1)), "single") 506s ***** error vmrnd () 506s ***** error vmrnd (1) 506s ***** error ... 506s vmrnd (ones (3), ones (2)) 506s ***** error ... 506s vmrnd (ones (2), ones (3)) 506s ***** error vmrnd (i, 2, 3) 506s ***** error vmrnd (1, i, 3) 506s ***** error ... 506s vmrnd (1, 2, -1) 506s ***** error ... 506s vmrnd (1, 2, 1.2) 506s ***** error ... 506s vmrnd (1, 2, ones (2)) 506s ***** error ... 506s vmrnd (1, 2, [2 -1 2]) 506s ***** error ... 506s vmrnd (1, 2, [2 0 2.5]) 506s ***** error ... 506s vmrnd (1, 2, 2, -1, 5) 506s ***** error ... 506s vmrnd (1, 2, 2, 1.5, 5) 506s ***** error ... 506s vmrnd (2, ones (2), 3) 506s ***** error ... 506s vmrnd (2, ones (2), [3, 2]) 506s ***** error ... 506s vmrnd (2, ones (2), 3, 2) 506s 33 tests, 33 passed, 0 known failure, 0 skipped 506s [inst/dist_fun/wblcdf.m] 506s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/wblcdf.m 506s ***** demo 506s ## Plot various CDFs from the Weibull distribution 506s x = 0:0.001:2.5; 506s p1 = wblcdf (x, 1, 0.5); 506s p2 = wblcdf (x, 1, 1); 506s p3 = wblcdf (x, 1, 1.5); 506s p4 = wblcdf (x, 1, 5); 506s plot (x, p1, "-b", x, p2, "-r", x, p3, "-m", x, p4, "-g") 506s grid on 506s legend ({"λ = 1, k = 0.5", "λ = 1, k = 1", ... 506s "λ = 1, k = 1.5", "λ = 1, k = 5"}, "location", "southeast") 506s title ("Weibull CDF") 506s xlabel ("values in x") 506s ylabel ("probability") 506s ***** shared x, y 506s x = [-1 0 0.5 1 Inf]; 506s y = [0, 1-exp(-x(2:4)), 1]; 506s ***** assert (wblcdf (x, ones (1,5), ones (1,5)), y, 1e-16) 506s ***** assert (wblcdf (x, ones (1,5), ones (1,5), "upper"), 1 - y) 506s ***** assert (wblcdf (x, "upper"), 1 - y) 506s ***** assert (wblcdf (x, 1, ones (1,5)), y, 1e-16) 506s ***** assert (wblcdf (x, ones (1,5), 1), y, 1e-16) 506s ***** assert (wblcdf (x, [0 1 NaN Inf 1], 1), [NaN 0 NaN 0 1]) 506s ***** assert (wblcdf (x, [0 1 NaN Inf 1], 1, "upper"), 1 - [NaN 0 NaN 0 1]) 506s ***** assert (wblcdf (x, 1, [0 1 NaN Inf 1]), [NaN 0 NaN y(4:5)]) 506s ***** assert (wblcdf (x, 1, [0 1 NaN Inf 1], "upper"), 1 - [NaN 0 NaN y(4:5)]) 506s ***** assert (wblcdf ([x(1:2) NaN x(4:5)], 1, 1), [y(1:2) NaN y(4:5)]) 506s ***** assert (wblcdf ([x(1:2) NaN x(4:5)], 1, 1, "upper"), 1 - [y(1:2) NaN y(4:5)]) 506s ***** assert (wblcdf ([x, NaN], 1, 1), [y, NaN], 1e-16) 506s ***** assert (wblcdf (single ([x, NaN]), 1, 1), single ([y, NaN])) 506s ***** assert (wblcdf ([x, NaN], single (1), 1), single ([y, NaN])) 506s ***** assert (wblcdf ([x, NaN], 1, single (1)), single ([y, NaN])) 506s ***** error wblcdf () 506s ***** error wblcdf (1,2,3,4,5,6,7) 506s ***** error wblcdf (1, 2, 3, 4, "uper") 506s ***** error ... 506s wblcdf (ones (3), ones (2), ones (2)) 506s ***** error wblcdf (2, 3, 4, [1, 2]) 506s ***** error ... 506s [p, plo, pup] = wblcdf (1, 2, 3) 506s ***** error [p, plo, pup] = ... 506s wblcdf (1, 2, 3, [1, 0; 0, 1], 0) 506s ***** error [p, plo, pup] = ... 506s wblcdf (1, 2, 3, [1, 0; 0, 1], 1.22) 506s ***** error [p, plo, pup] = ... 506s wblcdf (1, 2, 3, [1, 0; 0, 1], "alpha", "upper") 506s ***** error wblcdf (i, 2, 2) 506s ***** error wblcdf (2, i, 2) 506s ***** error wblcdf (2, 2, i) 506s ***** error ... 506s [p, plo, pup] =wblcdf (1, 2, 3, [1, 0; 0, -inf], 0.04) 506s 28 tests, 28 passed, 0 known failure, 0 skipped 506s [inst/dist_fun/wblinv.m] 506s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/wblinv.m 506s ***** demo 506s ## Plot various iCDFs from the Weibull distribution 506s p = 0.001:0.001:0.999; 506s x1 = wblinv (p, 1, 0.5); 506s x2 = wblinv (p, 1, 1); 506s x3 = wblinv (p, 1, 1.5); 506s x4 = wblinv (p, 1, 5); 506s plot (p, x1, "-b", p, x2, "-r", p, x3, "-m", p, x4, "-g") 506s ylim ([0, 2.5]) 506s grid on 506s legend ({"λ = 1, k = 0.5", "λ = 1, k = 1", ... 506s "λ = 1, k = 1.5", "λ = 1, k = 5"}, "location", "northwest") 506s title ("Weibull iCDF") 506s xlabel ("probability") 506s ylabel ("x") 506s ***** shared p 506s p = [-1 0 0.63212055882855778 1 2]; 506s ***** assert (wblinv (p, ones (1,5), ones (1,5)), [NaN 0 1 Inf NaN], eps) 506s ***** assert (wblinv (p, 1, ones (1,5)), [NaN 0 1 Inf NaN], eps) 506s ***** assert (wblinv (p, ones (1,5), 1), [NaN 0 1 Inf NaN], eps) 506s ***** assert (wblinv (p, [1 -1 NaN Inf 1], 1), [NaN NaN NaN NaN NaN]) 506s ***** assert (wblinv (p, 1, [1 -1 NaN Inf 1]), [NaN NaN NaN NaN NaN]) 506s ***** assert (wblinv ([p(1:2) NaN p(4:5)], 1, 1), [NaN 0 NaN Inf NaN]) 506s ***** assert (wblinv ([p, NaN], 1, 1), [NaN 0 1 Inf NaN NaN], eps) 506s ***** assert (wblinv (single ([p, NaN]), 1, 1), single ([NaN 0 1 Inf NaN NaN]), eps ("single")) 506s ***** assert (wblinv ([p, NaN], single (1), 1), single ([NaN 0 1 Inf NaN NaN]), eps ("single")) 506s ***** assert (wblinv ([p, NaN], 1, single (1)), single ([NaN 0 1 Inf NaN NaN]), eps ("single")) 506s ***** error wblinv () 506s ***** error wblinv (1,2,3,4) 506s ***** error ... 506s wblinv (ones (3), ones (2), ones (2)) 506s ***** error ... 506s wblinv (ones (2), ones (3), ones (2)) 506s ***** error ... 506s wblinv (ones (2), ones (2), ones (3)) 506s ***** error wblinv (i, 2, 2) 506s ***** error wblinv (2, i, 2) 506s ***** error wblinv (2, 2, i) 506s 18 tests, 18 passed, 0 known failure, 0 skipped 506s [inst/dist_fun/wblpdf.m] 506s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/wblpdf.m 506s ***** demo 506s ## Plot various PDFs from the Weibul distribution 506s x = 0:0.001:2.5; 506s y1 = wblpdf (x, 1, 0.5); 506s y2 = wblpdf (x, 1, 1); 506s y3 = wblpdf (x, 1, 1.5); 506s y4 = wblpdf (x, 1, 5); 506s plot (x, y1, "-b", x, y2, "-r", x, y3, "-m", x, y4, "-g") 506s grid on 506s ylim ([0, 2.5]) 506s legend ({"λ = 5, k = 0.5", "λ = 9, k = 1", ... 506s "λ = 6, k = 1.5", "λ = 2, k = 5"}, "location", "northeast") 506s title ("Weibul PDF") 506s xlabel ("values in x") 506s ylabel ("density") 506s ***** shared x,y 506s x = [-1 0 0.5 1 Inf]; 506s y = [0, exp(-x(2:4)), NaN]; 506s ***** assert (wblpdf (x, ones (1,5), ones (1,5)), y) 506s ***** assert (wblpdf (x, 1, ones (1,5)), y) 506s ***** assert (wblpdf (x, ones (1,5), 1), y) 506s ***** assert (wblpdf (x, [0 NaN Inf 1 1], 1), [NaN NaN NaN y(4:5)]) 506s ***** assert (wblpdf (x, 1, [0 NaN Inf 1 1]), [NaN NaN NaN y(4:5)]) 506s ***** assert (wblpdf ([x, NaN], 1, 1), [y, NaN]) 506s ***** assert (wblpdf (single ([x, NaN]), 1, 1), single ([y, NaN])) 506s ***** assert (wblpdf ([x, NaN], single (1), 1), single ([y, NaN])) 506s ***** assert (wblpdf ([x, NaN], 1, single (1)), single ([y, NaN])) 506s ***** error wblpdf () 506s ***** error wblpdf (1,2,3,4) 506s ***** error wblpdf (ones (3), ones (2), ones (2)) 506s ***** error wblpdf (ones (2), ones (3), ones (2)) 506s ***** error wblpdf (ones (2), ones (2), ones (3)) 506s ***** error wblpdf (i, 2, 2) 506s ***** error wblpdf (2, i, 2) 506s ***** error wblpdf (2, 2, i) 506s 17 tests, 17 passed, 0 known failure, 0 skipped 506s [inst/dist_fun/wblrnd.m] 506s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/wblrnd.m 506s ***** assert (size (wblrnd (1, 1)), [1 1]) 506s ***** assert (size (wblrnd (1, ones (2,1))), [2, 1]) 506s ***** assert (size (wblrnd (1, ones (2,2))), [2, 2]) 506s ***** assert (size (wblrnd (ones (2,1), 1)), [2, 1]) 506s ***** assert (size (wblrnd (ones (2,2), 1)), [2, 2]) 506s ***** assert (size (wblrnd (1, 1, 3)), [3, 3]) 506s ***** assert (size (wblrnd (1, 1, [4, 1])), [4, 1]) 506s ***** assert (size (wblrnd (1, 1, 4, 1)), [4, 1]) 507s ***** assert (size (wblrnd (1, 1, 4, 1, 5)), [4, 1, 5]) 507s ***** assert (size (wblrnd (1, 1, 0, 1)), [0, 1]) 507s ***** assert (size (wblrnd (1, 1, 1, 0)), [1, 0]) 507s ***** assert (size (wblrnd (1, 1, 1, 2, 0, 5)), [1, 2, 0, 5]) 507s ***** assert (class (wblrnd (1, 1)), "double") 507s ***** assert (class (wblrnd (1, single (1))), "single") 507s ***** assert (class (wblrnd (1, single ([1, 1]))), "single") 507s ***** assert (class (wblrnd (single (1), 1)), "single") 507s ***** assert (class (wblrnd (single ([1, 1]), 1)), "single") 507s ***** error wblrnd () 507s ***** error wblrnd (1) 507s ***** error ... 507s wblrnd (ones (3), ones (2)) 507s ***** error ... 507s wblrnd (ones (2), ones (3)) 507s ***** error wblrnd (i, 2, 3) 507s ***** error wblrnd (1, i, 3) 507s ***** error ... 507s wblrnd (1, 2, -1) 507s ***** error ... 507s wblrnd (1, 2, 1.2) 507s ***** error ... 507s wblrnd (1, 2, ones (2)) 507s ***** error ... 507s wblrnd (1, 2, [2 -1 2]) 507s ***** error ... 507s wblrnd (1, 2, [2 0 2.5]) 507s ***** error ... 507s wblrnd (1, 2, 2, -1, 5) 507s ***** error ... 507s wblrnd (1, 2, 2, 1.5, 5) 507s ***** error ... 507s wblrnd (2, ones (2), 3) 507s ***** error ... 507s wblrnd (2, ones (2), [3, 2]) 507s ***** error ... 507s wblrnd (2, ones (2), 3, 2) 507s 33 tests, 33 passed, 0 known failure, 0 skipped 507s [inst/dist_fun/wienrnd.m] 507s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/wienrnd.m 507s ***** error wienrnd (0) 507s ***** error wienrnd (1, 3, -50) 507s ***** error wienrnd (5, 0) 507s ***** error wienrnd (0.4, 3, 5) 507s ***** error wienrnd ([1 4], 3, 5) 507s 5 tests, 5 passed, 0 known failure, 0 skipped 507s [inst/dist_fun/wishpdf.m] 507s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/wishpdf.m 507s ***** assert(wishpdf(4, 3, 3.1), 0.07702496, 1E-7); 507s ***** assert(wishpdf([2 -0.3;-0.3 4], [1 0.3;0.3 1], 4), 0.004529741, 1E-7); 507s ***** assert(wishpdf([6 2 5; 2 10 -5; 5 -5 25], [9 5 5; 5 10 -8; 5 -8 22], 5.1), 4.474865e-10, 1E-15); 507s ***** error wishpdf () 507s ***** error wishpdf (1, 2) 507s ***** error wishpdf (1, 2, 0) 507s ***** error wishpdf (1, 2) 507s 7 tests, 7 passed, 0 known failure, 0 skipped 507s [inst/dist_fun/wishrnd.m] 507s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_fun/wishrnd.m 507s ***** assert(size (wishrnd (1,2)), [1, 1]); 507s ***** assert(size (wishrnd (1,2,[])), [1, 1]); 507s ***** assert(size (wishrnd (1,2,1)), [1, 1]); 507s ***** assert(size (wishrnd ([],2,1)), [1, 1]); 507s ***** assert(size (wishrnd ([3 1; 1 3], 2.00001, [], 1)), [2, 2]); 507s ***** assert(size (wishrnd (eye(2), 2, [], 3)), [2, 2, 3]); 507s ***** error wishrnd () 507s ***** error wishrnd (1) 507s ***** error wishrnd ([1; 1], 2) 507s 9 tests, 9 passed, 0 known failure, 0 skipped 507s [inst/dist_obj/BetaDistribution.m] 507s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_obj/BetaDistribution.m 507s ***** demo 507s ## Generate a data set of 5000 random samples from a Beta distribution with 507s ## parameters a = 2 and b = 5. Fit a Beta distribution to this data and plot 507s ## a PDF of the fitted distribution superimposed on a histogram of the data. 507s 507s pd_fixed = makedist ("Beta", "a", 2, "b", 5) 507s randg ("seed", 2); 507s data = random (pd_fixed, 5000, 1); 507s pd_fitted = fitdist (data, "Beta") 507s plot (pd_fitted) 507s msg = "Fitted Beta distribution with a = %0.2f and b = %0.2f"; 507s title (sprintf (msg, pd_fitted.a, pd_fitted.b)) 507s ***** shared pd, t 507s pd = BetaDistribution; 507s t = truncate (pd, 0.2, 0.8); 507s ***** assert (cdf (pd, [0:0.2:1]), [0, 0.2, 0.4, 0.6, 0.8, 1], 1e-4); 507s ***** assert (cdf (t, [0:0.2:1]), [0, 0, 0.3333, 0.6667, 1, 1], 1e-4); 507s ***** assert (cdf (pd, [-1, 1, NaN]), [0, 1, NaN], 1e-4); 507s ***** assert (cdf (t, [-1, 1, NaN]), [0, 1, NaN], 1e-4); 507s ***** assert (icdf (pd, [0:0.2:1]), [0, 0.2, 0.4, 0.6, 0.8, 1], 1e-4); 507s ***** assert (icdf (t, [0:0.2:1]), [0.2, 0.32, 0.44, 0.56, 0.68, 0.8], 1e-4); 507s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 0.4, 0.6, 0.8, 1, NaN], 1e-4); 507s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 0.44, 0.56, 0.68, 0.8, NaN], 1e-4); 507s ***** assert (iqr (pd), 0.5, 1e-4); 507s ***** assert (iqr (t), 0.3, 1e-4); 507s ***** assert (mean (pd), 0.5); 507s ***** assert (mean (t), 0.5, 1e-6); 507s ***** assert (median (pd), 0.5); 507s ***** assert (median (t), 0.5, 1e-6); 507s ***** assert (pdf (pd, [0:0.2:1]), [1, 1, 1, 1, 1, 1], 1e-4); 507s ***** assert (pdf (t, [0:0.2:1]), [0, 1.6667, 1.6667, 1.6667, 1.6667, 0], 1e-4); 507s ***** assert (pdf (pd, [-1, 1, NaN]), [0, 1, NaN], 1e-4); 507s ***** assert (pdf (t, [-1, 1, NaN]), [0, 0, NaN], 1e-4); 507s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 507s ***** assert (any (random (t, 1000, 1) < 0.2), false); 507s ***** assert (any (random (t, 1000, 1) > 0.8), false); 507s ***** assert (std (pd), 0.2887, 1e-4); 507s ***** assert (std (t), 0.1732, 1e-4); 507s ***** assert (var (pd), 0.0833, 1e-4); 507s ***** assert (var (t), 0.0300, 1e-4); 508s ***** error ... 508s BetaDistribution(0, 1) 508s ***** error ... 508s BetaDistribution(Inf, 1) 508s ***** error ... 508s BetaDistribution(i, 1) 508s ***** error ... 508s BetaDistribution("a", 1) 508s ***** error ... 508s BetaDistribution([1, 2], 1) 508s ***** error ... 508s BetaDistribution(NaN, 1) 508s ***** error ... 508s BetaDistribution(1, 0) 508s ***** error ... 508s BetaDistribution(1, -1) 508s ***** error ... 508s BetaDistribution(1, Inf) 508s ***** error ... 508s BetaDistribution(1, i) 508s ***** error ... 508s BetaDistribution(1, "a") 508s ***** error ... 508s BetaDistribution(1, [1, 2]) 508s ***** error ... 508s BetaDistribution(1, NaN) 508s ***** error ... 508s cdf (BetaDistribution, 2, "uper") 508s ***** error ... 508s cdf (BetaDistribution, 2, 3) 508s ***** shared x 508s randg ("seed", 1); 508s x = betarnd (1, 1, [100, 1]); 508s ***** error ... 508s paramci (BetaDistribution.fit (x), "alpha") 508s ***** error ... 508s paramci (BetaDistribution.fit (x), "alpha", 0) 508s ***** error ... 508s paramci (BetaDistribution.fit (x), "alpha", 1) 508s ***** error ... 508s paramci (BetaDistribution.fit (x), "alpha", [0.5 2]) 508s ***** error ... 508s paramci (BetaDistribution.fit (x), "alpha", "") 508s ***** error ... 508s paramci (BetaDistribution.fit (x), "alpha", {0.05}) 508s ***** error ... 508s paramci (BetaDistribution.fit (x), "parameter", "a", "alpha", {0.05}) 508s ***** error ... 508s paramci (BetaDistribution.fit (x), "parameter", {"a", "b", "param"}) 508s ***** error ... 508s paramci (BetaDistribution.fit (x), "alpha", 0.01, ... 508s "parameter", {"a", "b", "param"}) 508s ***** error ... 508s paramci (BetaDistribution.fit (x), "parameter", "param") 508s ***** error ... 508s paramci (BetaDistribution.fit (x), "alpha", 0.01, "parameter", "param") 508s ***** error ... 508s paramci (BetaDistribution.fit (x), "NAME", "value") 508s ***** error ... 508s paramci (BetaDistribution.fit (x), "alpha", 0.01, "NAME", "value") 508s ***** error ... 508s paramci (BetaDistribution.fit (x), "alpha", 0.01, "parameter", "a", ... 508s "NAME", "value") 508s ***** error ... 508s plot (BetaDistribution, "Parent") 508s ***** error ... 508s plot (BetaDistribution, "PlotType", 12) 508s ***** error ... 508s plot (BetaDistribution, "PlotType", {"pdf", "cdf"}) 508s ***** error ... 508s plot (BetaDistribution, "PlotType", "pdfcdf") 508s ***** error ... 508s plot (BetaDistribution, "Discrete", "pdfcdf") 508s ***** error ... 508s plot (BetaDistribution, "Discrete", [1, 0]) 508s ***** error ... 508s plot (BetaDistribution, "Discrete", {true}) 508s ***** error ... 508s plot (BetaDistribution, "Parent", 12) 508s ***** error ... 508s plot (BetaDistribution, "Parent", "hax") 508s ***** error ... 508s plot (BetaDistribution, "invalidNAME", "pdf") 508s ***** error ... 508s plot (BetaDistribution, "PlotType", "probability") 508s ***** error ... 508s proflik (BetaDistribution, 2) 508s ***** error ... 508s proflik (BetaDistribution.fit (x), 3) 508s ***** error ... 508s proflik (BetaDistribution.fit (x), [1, 2]) 508s ***** error ... 508s proflik (BetaDistribution.fit (x), {1}) 508s ***** error ... 508s proflik (BetaDistribution.fit (x), 1, ones (2)) 508s ***** error ... 508s proflik (BetaDistribution.fit (x), 1, "Display") 508s ***** error ... 508s proflik (BetaDistribution.fit (x), 1, "Display", 1) 508s ***** error ... 508s proflik (BetaDistribution.fit (x), 1, "Display", {1}) 508s ***** error ... 508s proflik (BetaDistribution.fit (x), 1, "Display", {"on"}) 508s ***** error ... 508s proflik (BetaDistribution.fit (x), 1, "Display", ["on"; "on"]) 508s ***** error ... 508s proflik (BetaDistribution.fit (x), 1, "Display", "onnn") 508s ***** error ... 508s proflik (BetaDistribution.fit (x), 1, "NAME", "on") 508s ***** error ... 508s proflik (BetaDistribution.fit (x), 1, {"NAME"}, "on") 508s ***** error ... 508s proflik (BetaDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 508s ***** error ... 508s truncate (BetaDistribution) 508s ***** error ... 508s truncate (BetaDistribution, 2) 508s ***** error ... 508s truncate (BetaDistribution, 4, 2) 508s ***** shared pd 508s pd = BetaDistribution(1, 1); 508s pd(2) = BetaDistribution(1, 3); 508s ***** error cdf (pd, 1) 508s ***** error icdf (pd, 0.5) 508s ***** error iqr (pd) 508s ***** error mean (pd) 508s ***** error median (pd) 508s ***** error negloglik (pd) 508s ***** error paramci (pd) 508s ***** error pdf (pd, 1) 508s ***** error plot (pd) 508s ***** error proflik (pd, 2) 508s ***** error random (pd) 508s ***** error std (pd) 508s ***** error ... 508s truncate (pd, 2, 4) 508s ***** error var (pd) 508s 96 tests, 96 passed, 0 known failure, 0 skipped 508s [inst/dist_obj/BinomialDistribution.m] 508s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_obj/BinomialDistribution.m 508s ***** shared pd, t, t_inf 508s pd = BinomialDistribution (5, 0.5); 508s t = truncate (pd, 2, 4); 508s t_inf = truncate (pd, 2, Inf); 508s ***** assert (cdf (pd, [0:5]), [0.0312, 0.1875, 0.5, 0.8125, 0.9688, 1], 1e-4); 508s ***** assert (cdf (t, [0:5]), [0, 0, 0.4, 0.8, 1, 1], 1e-4); 508s ***** assert (cdf (t_inf, [0:5]), [0, 0, 0.3846, 0.7692, 0.9615, 1], 1e-4); 508s ***** assert (cdf (pd, [1.5, 2, 3, 4, NaN]), [0.1875, 0.5, 0.8125, 0.9688, NaN], 1e-4); 508s ***** assert (cdf (t, [1.5, 2, 3, 4, NaN]), [0, 0.4, 0.8, 1, NaN], 1e-4); 508s ***** assert (icdf (pd, [0:0.2:1]), [0, 2, 2, 3, 3, 5], 1e-4); 508s ***** assert (icdf (t, [0:0.2:1]), [2, 2, 2, 3, 3, 4], 1e-4); 508s ***** assert (icdf (t_inf, [0:0.2:1]), [2, 2, 3, 3, 4, 5], 1e-4); 508s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 2, 3, 3, 5, NaN], 1e-4); 508s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2, 3, 3, 4, NaN], 1e-4); 508s ***** assert (iqr (pd), 1); 508s ***** assert (iqr (t), 1); 508s ***** assert (mean (pd), 2.5, 1e-10); 508s ***** assert (mean (t), 2.8, 1e-10); 509s ***** assert (mean (t_inf), 2.8846, 1e-4); 509s ***** assert (median (pd), 2.5); 509s ***** assert (median (t), 3); 509s ***** assert (pdf (pd, [0:5]), [0.0312, 0.1562, 0.3125, 0.3125, 0.1562, 0.0312], 1e-4); 509s ***** assert (pdf (t, [0:5]), [0, 0, 0.4, 0.4, 0.2, 0], 1e-4); 509s ***** assert (pdf (t_inf, [0:5]), [0, 0, 0.3846, 0.3846, 0.1923, 0.0385], 1e-4); 509s ***** assert (pdf (pd, [-1, 1.5, NaN]), [0, 0, NaN], 1e-4); 509s ***** assert (pdf (t, [-1, 1.5, NaN]), [0, 0, NaN], 1e-4); 509s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 509s ***** assert (any (random (t, 1000, 1) < 2), false); 509s ***** assert (any (random (t, 1000, 1) > 4), false); 509s ***** assert (std (pd), 1.1180, 1e-4); 509s ***** assert (std (t), 0.7483, 1e-4); 509s ***** assert (std (t_inf), 0.8470, 1e-4); 509s ***** assert (var (pd), 1.2500, 1e-4); 509s ***** assert (var (t), 0.5600, 1e-4); 509s ***** assert (var (t_inf), 0.7175, 1e-4); 509s ***** error ... 509s BinomialDistribution(Inf, 0.5) 509s ***** error ... 509s BinomialDistribution(i, 0.5) 509s ***** error ... 509s BinomialDistribution("a", 0.5) 509s ***** error ... 509s BinomialDistribution([1, 2], 0.5) 509s ***** error ... 509s BinomialDistribution(NaN, 0.5) 509s ***** error ... 509s BinomialDistribution(1, 1.01) 509s ***** error ... 509s BinomialDistribution(1, -0.01) 509s ***** error ... 509s BinomialDistribution(1, Inf) 509s ***** error ... 509s BinomialDistribution(1, i) 509s ***** error ... 509s BinomialDistribution(1, "a") 509s ***** error ... 509s BinomialDistribution(1, [1, 2]) 509s ***** error ... 509s BinomialDistribution(1, NaN) 509s ***** error ... 509s cdf (BinomialDistribution, 2, "uper") 509s ***** error ... 509s cdf (BinomialDistribution, 2, 3) 509s ***** shared x 509s rand ("seed", 2); 509s x = binornd (5, 0.5, [1, 100]); 509s ***** error ... 509s paramci (BinomialDistribution.fit (x, 6), "alpha") 509s ***** error ... 509s paramci (BinomialDistribution.fit (x, 6), "alpha", 0) 509s ***** error ... 509s paramci (BinomialDistribution.fit (x, 6), "alpha", 1) 509s ***** error ... 509s paramci (BinomialDistribution.fit (x, 6), "alpha", [0.5 2]) 509s ***** error ... 509s paramci (BinomialDistribution.fit (x, 6), "alpha", "") 509s ***** error ... 509s paramci (BinomialDistribution.fit (x, 6), "alpha", {0.05}) 509s ***** error ... 509s paramci (BinomialDistribution.fit (x, 6), "parameter", "p", ... 509s "alpha", {0.05}) 509s ***** error ... 509s paramci (BinomialDistribution.fit (x, 6), ... 509s "parameter", {"N", "p", "param"}) 509s ***** error ... 509s paramci (BinomialDistribution.fit (x, 6), "alpha", 0.01, ... 509s "parameter", {"N", "p", "param"}) 509s ***** error ... 509s paramci (BinomialDistribution.fit (x, 6), "parameter", "param") 509s ***** error ... 509s paramci (BinomialDistribution.fit (x, 6), "parameter", "N") 509s ***** error ... 509s paramci (BinomialDistribution.fit (x, 6), "alpha", 0.01, ... 509s "parameter", "param") 509s ***** error ... 509s paramci (BinomialDistribution.fit (x, 6), "NAME", "value") 509s ***** error ... 509s paramci (BinomialDistribution.fit (x, 6), "alpha", 0.01, ... 509s "NAME", "value") 509s ***** error ... 509s paramci (BinomialDistribution.fit (x, 6), "alpha", 0.01, ... 509s "parameter", "p", "NAME", "value") 509s ***** error ... 509s plot (BinomialDistribution, "Parent") 509s ***** error ... 509s plot (BinomialDistribution, "PlotType", 12) 509s ***** error ... 509s plot (BinomialDistribution, "PlotType", {"pdf", "cdf"}) 509s ***** error ... 509s plot (BinomialDistribution, "PlotType", "pdfcdf") 509s ***** error ... 509s plot (BinomialDistribution, "Discrete", "pdfcdf") 509s ***** error ... 509s plot (BinomialDistribution, "Discrete", [1, 0]) 509s ***** error ... 509s plot (BinomialDistribution, "Discrete", {true}) 509s ***** error ... 509s plot (BinomialDistribution, "Parent", 12) 509s ***** error ... 509s plot (BinomialDistribution, "Parent", "hax") 509s ***** error ... 509s plot (BinomialDistribution, "invalidNAME", "pdf") 509s ***** error ... 509s plot (BinomialDistribution, "PlotType", "probability") 509s ***** error ... 509s proflik (BinomialDistribution, 2) 509s ***** error ... 509s proflik (BinomialDistribution.fit (x, 6), 3) 509s ***** error ... 509s proflik (BinomialDistribution.fit (x, 6), [1, 2]) 509s ***** error ... 509s proflik (BinomialDistribution.fit (x, 6), {1}) 509s ***** error ... 509s proflik (BinomialDistribution.fit (x, 6), 2, ones (2)) 509s ***** error ... 509s proflik (BinomialDistribution.fit (x, 6), 2, "Display") 509s ***** error ... 509s proflik (BinomialDistribution.fit (x, 6), 2, "Display", 1) 509s ***** error ... 509s proflik (BinomialDistribution.fit (x, 6), 2, "Display", {1}) 509s ***** error ... 509s proflik (BinomialDistribution.fit (x, 6), 2, "Display", {"on"}) 509s ***** error ... 509s proflik (BinomialDistribution.fit (x, 6), 2, "Display", ["on"; "on"]) 509s ***** error ... 509s proflik (BinomialDistribution.fit (x, 6), 2, "Display", "onnn") 509s ***** error ... 509s proflik (BinomialDistribution.fit (x, 6), 2, "NAME", "on") 509s ***** error ... 509s proflik (BinomialDistribution.fit (x, 6), 2, {"NAME"}, "on") 509s ***** error ... 509s proflik (BinomialDistribution.fit (x, 6), 2, {[1 2 3]}, "Display", "on") 509s ***** error ... 509s truncate (BinomialDistribution) 509s ***** error ... 509s truncate (BinomialDistribution, 2) 509s ***** error ... 509s truncate (BinomialDistribution, 4, 2) 509s ***** shared pd 509s pd = BinomialDistribution(1, 0.5); 509s pd(2) = BinomialDistribution(1, 0.6); 509s ***** error cdf (pd, 1) 509s ***** error icdf (pd, 0.5) 509s ***** error iqr (pd) 509s ***** error mean (pd) 509s ***** error median (pd) 509s ***** error negloglik (pd) 509s ***** error paramci (pd) 509s ***** error pdf (pd, 1) 509s ***** error plot (pd) 509s ***** error proflik (pd, 2) 509s ***** error random (pd) 509s ***** error std (pd) 509s ***** error ... 509s truncate (pd, 2, 4) 509s ***** error var (pd) 509s 102 tests, 102 passed, 0 known failure, 0 skipped 509s [inst/dist_obj/BirnbaumSaundersDistribution.m] 510s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_obj/BirnbaumSaundersDistribution.m 510s ***** demo 510s ## Generate a data set of 5000 random samples from a Birnbaum-Saunders 510s ## distribution with parameters β = 1 and γ = 0.5. Fit a Birnbaum-Saunders 510s ## distribution to this data and plot a PDF of the fitted distribution 510s ## superimposed on a histogram of the data. 510s 510s pd_fixed = makedist ("BirnbaumSaunders", "beta", 1, "gamma", 0.5) 510s randg ("seed", 21); 510s data = random (pd_fixed, 5000, 1); 510s pd_fitted = fitdist (data, "BirnbaumSaunders") 510s plot (pd_fitted) 510s msg = "Fitted Birnbaum-Saunders distribution with beta = %0.2f and gamma = %0.2f"; 510s title (sprintf (msg, pd_fitted.beta, pd_fitted.gamma)) 510s ***** shared pd, t 510s pd = BirnbaumSaundersDistribution; 510s t = truncate (pd, 2, 4); 510s ***** assert (cdf (pd, [0:5]), [0, 0.5, 0.7602, 0.8759, 0.9332, 0.9632], 1e-4); 510s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.6687, 1, 1], 1e-4); 510s ***** assert (cdf (pd, [1.5, 2, 3, 4, NaN]), [0.6585, 0.7602, 0.8759, 0.9332, NaN], 1e-4); 510s ***** assert (cdf (t, [1.5, 2, 3, 4, NaN]), [0, 0, 0.6687, 1, NaN], 1e-4); 510s ***** assert (icdf (pd, [0:0.2:1]), [0, 0.4411, 0.7767, 1.2875, 2.2673, Inf], 1e-4); 510s ***** assert (icdf (t, [0:0.2:1]), [2, 2.2293, 2.5073, 2.8567, 3.3210, 4], 1e-4); 510s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 0.7767, 1.2875, 2.2673, Inf, NaN], 1e-4); 510s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.5073, 2.8567, 3.3210, 4, NaN], 1e-4); 510s ***** assert (iqr (pd), 1.4236, 1e-4); 510s ***** assert (iqr (t), 0.8968, 1e-4); 510s ***** assert (mean (pd), 1.5, eps); 510s ***** assert (mean (t), 2.7723, 1e-4); 510s ***** assert (median (pd), 1, 1e-4); 510s ***** assert (median (t), 2.6711, 1e-4); 510s ***** assert (pdf (pd, [0:5]), [0, 0.3989, 0.1648, 0.0788, 0.0405, 0.0216], 1e-4); 510s ***** assert (pdf (t, [0:5]), [0, 0, 0.9528, 0.4559, 0.2340, 0], 1e-4); 510s ***** assert (pdf (pd, [-1, 1.5, NaN]), [0, 0.2497, NaN], 1e-4); 510s ***** assert (pdf (t, [-1, 1.5, NaN]), [0, 0, NaN], 1e-4); 510s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 510s ***** assert (any (random (t, 1000, 1) < 2), false); 510s ***** assert (any (random (t, 1000, 1) > 4), false); 510s ***** assert (std (pd), 1.5, eps); 510s ***** assert (std (t), 0.5528, 1e-4); 510s ***** assert (var (pd), 2.25, eps); 510s ***** assert (var (t), 0.3056, 1e-4); 510s ***** error ... 510s BirnbaumSaundersDistribution(0, 1) 510s ***** error ... 510s BirnbaumSaundersDistribution(Inf, 1) 510s ***** error ... 510s BirnbaumSaundersDistribution(i, 1) 510s ***** error ... 510s BirnbaumSaundersDistribution("beta", 1) 510s ***** error ... 510s BirnbaumSaundersDistribution([1, 2], 1) 510s ***** error ... 510s BirnbaumSaundersDistribution(NaN, 1) 510s ***** error ... 510s BirnbaumSaundersDistribution(1, 0) 510s ***** error ... 510s BirnbaumSaundersDistribution(1, -1) 510s ***** error ... 510s BirnbaumSaundersDistribution(1, Inf) 510s ***** error ... 510s BirnbaumSaundersDistribution(1, i) 510s ***** error ... 510s BirnbaumSaundersDistribution(1, "beta") 510s ***** error ... 510s BirnbaumSaundersDistribution(1, [1, 2]) 510s ***** error ... 510s BirnbaumSaundersDistribution(1, NaN) 510s ***** error ... 510s cdf (BirnbaumSaundersDistribution, 2, "uper") 510s ***** error ... 510s cdf (BirnbaumSaundersDistribution, 2, 3) 510s ***** shared x 510s rand ("seed", 5); 510s x = bisarnd (1, 1, [100, 1]); 510s ***** error ... 510s paramci (BirnbaumSaundersDistribution.fit (x), "alpha") 510s ***** error ... 510s paramci (BirnbaumSaundersDistribution.fit (x), "alpha", 0) 510s ***** error ... 510s paramci (BirnbaumSaundersDistribution.fit (x), "alpha", 1) 510s ***** error ... 510s paramci (BirnbaumSaundersDistribution.fit (x), "alpha", [0.5 2]) 510s ***** error ... 510s paramci (BirnbaumSaundersDistribution.fit (x), "alpha", "") 510s ***** error ... 510s paramci (BirnbaumSaundersDistribution.fit (x), "alpha", {0.05}) 510s ***** error ... 510s paramci (BirnbaumSaundersDistribution.fit (x), "parameter", ... 510s "beta", "alpha", {0.05}) 510s ***** error ... 510s paramci (BirnbaumSaundersDistribution.fit (x), ... 510s "parameter", {"beta", "gamma", "param"}) 510s ***** error ... 510s paramci (BirnbaumSaundersDistribution.fit (x), "alpha", 0.01, ... 510s "parameter", {"beta", "gamma", "param"}) 510s ***** error ... 510s paramci (BirnbaumSaundersDistribution.fit (x), "parameter", "param") 510s ***** error ... 510s paramci (BirnbaumSaundersDistribution.fit (x), "alpha", 0.01, ... 510s "parameter", "param") 510s ***** error ... 510s paramci (BirnbaumSaundersDistribution.fit (x), "NAME", "value") 510s ***** error ... 510s paramci (BirnbaumSaundersDistribution.fit (x), "alpha", 0.01, ... 510s "NAME", "value") 511s ***** error ... 511s paramci (BirnbaumSaundersDistribution.fit (x), "alpha", 0.01, ... 511s "parameter", "beta", "NAME", "value") 511s ***** error ... 511s plot (BirnbaumSaundersDistribution, "Parent") 511s ***** error ... 511s plot (BirnbaumSaundersDistribution, "PlotType", 12) 511s ***** error ... 511s plot (BirnbaumSaundersDistribution, "PlotType", {"pdf", "cdf"}) 511s ***** error ... 511s plot (BirnbaumSaundersDistribution, "PlotType", "pdfcdf") 511s ***** error ... 511s plot (BirnbaumSaundersDistribution, "Discrete", "pdfcdf") 511s ***** error ... 511s plot (BirnbaumSaundersDistribution, "Discrete", [1, 0]) 511s ***** error ... 511s plot (BirnbaumSaundersDistribution, "Discrete", {true}) 511s ***** error ... 511s plot (BirnbaumSaundersDistribution, "Parent", 12) 511s ***** error ... 511s plot (BirnbaumSaundersDistribution, "Parent", "hax") 511s ***** error ... 511s plot (BirnbaumSaundersDistribution, "invalidNAME", "pdf") 511s ***** error ... 511s plot (BirnbaumSaundersDistribution, "PlotType", "probability") 511s ***** error ... 511s proflik (BirnbaumSaundersDistribution, 2) 511s ***** error ... 511s proflik (BirnbaumSaundersDistribution.fit (x), 3) 511s ***** error ... 511s proflik (BirnbaumSaundersDistribution.fit (x), [1, 2]) 511s ***** error ... 511s proflik (BirnbaumSaundersDistribution.fit (x), {1}) 511s ***** error ... 511s proflik (BirnbaumSaundersDistribution.fit (x), 1, ones (2)) 511s ***** error ... 511s proflik (BirnbaumSaundersDistribution.fit (x), 1, "Display") 511s ***** error ... 511s proflik (BirnbaumSaundersDistribution.fit (x), 1, "Display", 1) 511s ***** error ... 511s proflik (BirnbaumSaundersDistribution.fit (x), 1, "Display", {1}) 511s ***** error ... 511s proflik (BirnbaumSaundersDistribution.fit (x), 1, "Display", {"on"}) 511s ***** error ... 511s proflik (BirnbaumSaundersDistribution.fit (x), 1, "Display", ["on"; "on"]) 511s ***** error ... 511s proflik (BirnbaumSaundersDistribution.fit (x), 1, "Display", "onnn") 511s ***** error ... 511s proflik (BirnbaumSaundersDistribution.fit (x), 1, "NAME", "on") 511s ***** error ... 511s proflik (BirnbaumSaundersDistribution.fit (x), 1, {"NAME"}, "on") 511s ***** error ... 511s proflik (BirnbaumSaundersDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 511s ***** error ... 511s truncate (BirnbaumSaundersDistribution) 511s ***** error ... 511s truncate (BirnbaumSaundersDistribution, 2) 511s ***** error ... 511s truncate (BirnbaumSaundersDistribution, 4, 2) 511s ***** shared pd 511s pd = BirnbaumSaundersDistribution(1, 1); 511s pd(2) = BirnbaumSaundersDistribution(1, 3); 511s ***** error cdf (pd, 1) 511s ***** error icdf (pd, 0.5) 511s ***** error iqr (pd) 511s ***** error mean (pd) 511s ***** error median (pd) 511s ***** error negloglik (pd) 511s ***** error paramci (pd) 511s ***** error pdf (pd, 1) 511s ***** error plot (pd) 511s ***** error proflik (pd, 2) 511s ***** error random (pd) 511s ***** error std (pd) 511s ***** error ... 511s truncate (pd, 2, 4) 511s ***** error var (pd) 511s 96 tests, 96 passed, 0 known failure, 0 skipped 511s [inst/dist_obj/BurrDistribution.m] 511s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_obj/BurrDistribution.m 511s ***** demo 511s ## Generate a data set of 5000 random samples from a Burr type XII 511s ## distribution with parameters alpha = 1, c = 2, and k = 1. Fit a Burr type 511s ## XII distribution to this data and plot a PDF of the fitted distribution 511s ## superimposed on a histogram of the data 511s 511s pd = makedist ("Burr", "alpha", 1, "c", 2, "k", 1) 511s rand ("seed", 21); 511s data = random (pd, 5000, 1); 511s pd = fitdist (data, "Burr") 511s plot (pd) 511s msg = strcat (["Fitted Burr type XII distribution with"], ... 511s [" alpha = %0.2f, c = %0.2f, and k = %0.2f"]); 511s title (sprintf (msg, pd.alpha, pd.c, pd.k)) 511s ***** shared pd, t 511s pd = BurrDistribution; 511s t = truncate (pd, 2, 4); 511s ***** assert (cdf (pd, [0:5]), [0, 0.5, 0.6667, 0.75, 0.8, 0.8333], 1e-4); 511s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.625, 1, 1], 1e-4); 512s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.6, 0.6667, 0.75, 0.8], 1e-4); 512s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0, 0.625, 1], 1e-4); 512s ***** assert (icdf (pd, [0:0.2:1]), [0, 0.25, 0.6667, 1.5, 4, Inf], 1e-4); 512s ***** assert (icdf (t, [0:0.2:1]), [2, 2.2609, 2.5714, 2.9474, 3.4118, 4], 1e-4); 512s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 0.6667, 1.5, 4, Inf, NaN], 1e-4); 512s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.5714, 2.9474, 3.4118, 4, NaN], 1e-4); 512s ***** assert (iqr (pd), 2.6667, 1e-4); 512s ***** assert (iqr (t), 0.9524, 1e-4); 512s ***** assert (mean (pd), Inf); 512s ***** assert (mean (t), 2.8312, 1e-4); 512s ***** assert (median (pd), 1, 1e-4); 512s ***** assert (median (t), 2.75, 1e-4); 512s ***** assert (pdf (pd, [0:5]), [1, 0.25, 0.1111, 0.0625, 0.04, 0.0278], 1e-4); 512s ***** assert (pdf (t, [0:5]), [0, 0, 0.8333, 0.4687, 0.3, 0], 1e-4); 512s ***** assert (pdf (pd, [-1, 1:4, NaN]), [0, 0.25, 0.1111, 0.0625, 0.04, NaN], 1e-4); 512s ***** assert (pdf (t, [-1, 1:4, NaN]), [0, 0, 0.8333, 0.4687, 0.3, NaN], 1e-4); 512s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 512s ***** assert (any (random (t, 1000, 1) < 2), false); 512s ***** assert (any (random (t, 1000, 1) > 4), false); 512s ***** assert (std (pd), Inf); 512s ***** assert (std (t), 0.5674, 1e-4); 512s ***** assert (var (pd), Inf); 512s ***** assert (var (t), 0.3220, 1e-4); 512s ***** error ... 512s BurrDistribution(0, 1, 1) 512s ***** error ... 512s BurrDistribution(-1, 1, 1) 512s ***** error ... 512s BurrDistribution(Inf, 1, 1) 512s ***** error ... 512s BurrDistribution(i, 1, 1) 512s ***** error ... 512s BurrDistribution("a", 1, 1) 512s ***** error ... 512s BurrDistribution([1, 2], 1, 1) 512s ***** error ... 512s BurrDistribution(NaN, 1, 1) 512s ***** error ... 512s BurrDistribution(1, 0, 1) 512s ***** error ... 512s BurrDistribution(1, -1, 1) 512s ***** error ... 512s BurrDistribution(1, Inf, 1) 512s ***** error ... 512s BurrDistribution(1, i, 1) 512s ***** error ... 512s BurrDistribution(1, "a", 1) 512s ***** error ... 512s BurrDistribution(1, [1, 2], 1) 512s ***** error ... 512s BurrDistribution(1, NaN, 1) 512s ***** error ... 512s BurrDistribution(1, 1, 0) 512s ***** error ... 512s BurrDistribution(1, 1, -1) 512s ***** error ... 512s BurrDistribution(1, 1, Inf) 512s ***** error ... 512s BurrDistribution(1, 1, i) 512s ***** error ... 512s BurrDistribution(1, 1, "a") 512s ***** error ... 512s BurrDistribution(1, 1, [1, 2]) 512s ***** error ... 512s BurrDistribution(1, 1, NaN) 512s ***** error ... 512s cdf (BurrDistribution, 2, "uper") 512s ***** error ... 512s cdf (BurrDistribution, 2, 3) 512s ***** shared x 512s rand ("seed", 4); 512s x = burrrnd (1, 1, 1, [1, 100]); 512s ***** error ... 512s paramci (BurrDistribution.fit (x), "alpha") 512s ***** error ... 512s paramci (BurrDistribution.fit (x), "alpha", 0) 512s ***** error ... 512s paramci (BurrDistribution.fit (x), "alpha", 1) 512s ***** error ... 512s paramci (BurrDistribution.fit (x), "alpha", [0.5 2]) 512s ***** error ... 512s paramci (BurrDistribution.fit (x), "alpha", "") 512s ***** error ... 512s paramci (BurrDistribution.fit (x), "alpha", {0.05}) 512s ***** error ... 512s paramci (BurrDistribution.fit (x), "parameter", "c", "alpha", {0.05}) 513s ***** error ... 513s paramci (BurrDistribution.fit (x), "parameter", {"alpha", "c", "k", "param"}) 513s ***** error ... 513s paramci (BurrDistribution.fit (x), "alpha", 0.01, ... 513s "parameter", {"alpha", "c", "k", "param"}) 513s ***** error ... 513s paramci (BurrDistribution.fit (x), "parameter", "param") 513s ***** error ... 513s paramci (BurrDistribution.fit (x), "alpha", 0.01, "parameter", "param") 513s ***** error ... 513s paramci (BurrDistribution.fit (x), "NAME", "value") 513s ***** error ... 513s paramci (BurrDistribution.fit (x), "alpha", 0.01, "NAME", "value") 513s ***** error ... 513s paramci (BurrDistribution.fit (x), "alpha", 0.01, "parameter", "c", ... 513s "NAME", "value") 513s ***** error ... 513s plot (BurrDistribution, "Parent") 513s ***** error ... 513s plot (BurrDistribution, "PlotType", 12) 514s ***** error ... 514s plot (BurrDistribution, "PlotType", {"pdf", "cdf"}) 514s ***** error ... 514s plot (BurrDistribution, "PlotType", "pdfcdf") 514s ***** error ... 514s plot (BurrDistribution, "Discrete", "pdfcdf") 514s ***** error ... 514s plot (BurrDistribution, "Discrete", [1, 0]) 514s ***** error ... 514s plot (BurrDistribution, "Discrete", {true}) 514s ***** error ... 514s plot (BurrDistribution, "Parent", 12) 514s ***** error ... 514s plot (BurrDistribution, "Parent", "hax") 514s ***** error ... 514s plot (BurrDistribution, "invalidNAME", "pdf") 514s ***** error ... 514s plot (BurrDistribution, "PlotType", "probability") 514s ***** error ... 514s proflik (BurrDistribution, 2) 514s ***** error ... 514s proflik (BurrDistribution.fit (x), 4) 514s ***** error ... 514s proflik (BurrDistribution.fit (x), [1, 2]) 514s ***** error ... 514s proflik (BurrDistribution.fit (x), {1}) 514s ***** error ... 514s proflik (BurrDistribution.fit (x), 1, ones (2)) 514s ***** error ... 514s proflik (BurrDistribution.fit (x), 1, "Display") 514s ***** error ... 514s proflik (BurrDistribution.fit (x), 1, "Display", 1) 514s ***** error ... 514s proflik (BurrDistribution.fit (x), 1, "Display", {1}) 514s ***** error ... 514s proflik (BurrDistribution.fit (x), 1, "Display", {"on"}) 515s ***** error ... 515s proflik (BurrDistribution.fit (x), 1, "Display", ["on"; "on"]) 515s ***** error ... 515s proflik (BurrDistribution.fit (x), 1, "Display", "onnn") 515s ***** error ... 515s proflik (BurrDistribution.fit (x), 1, "NAME", "on") 515s ***** error ... 515s proflik (BurrDistribution.fit (x), 1, {"NAME"}, "on") 515s ***** error ... 515s proflik (BurrDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 515s ***** error ... 515s truncate (BurrDistribution) 515s ***** error ... 515s truncate (BurrDistribution, 2) 515s ***** error ... 515s truncate (BurrDistribution, 4, 2) 515s ***** shared pd 515s pd = BurrDistribution(1, 1, 1); 515s pd(2) = BurrDistribution(1, 3, 1); 515s ***** error cdf (pd, 1) 515s ***** error icdf (pd, 0.5) 515s ***** error iqr (pd) 515s ***** error mean (pd) 515s ***** error median (pd) 515s ***** error negloglik (pd) 515s ***** error paramci (pd) 515s ***** error pdf (pd, 1) 515s ***** error plot (pd) 515s ***** error proflik (pd, 2) 515s ***** error random (pd) 515s ***** error std (pd) 515s ***** error ... 515s truncate (pd, 2, 4) 515s ***** error var (pd) 515s 104 tests, 104 passed, 0 known failure, 0 skipped 515s [inst/dist_obj/ExponentialDistribution.m] 515s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_obj/ExponentialDistribution.m 515s ***** shared pd, t 515s pd = ExponentialDistribution (1); 515s t = truncate (pd, 2, 4); 515s ***** assert (cdf (pd, [0:5]), [0, 0.6321, 0.8647, 0.9502, 0.9817, 0.9933], 1e-4); 515s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.7311, 1, 1], 1e-4); 515s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.7769, 0.8647, 0.9502, 0.9817], 1e-4); 515s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0, 0.7311, 1], 1e-4); 515s ***** assert (icdf (pd, [0:0.2:1]), [0, 0.2231, 0.5108, 0.9163, 1.6094, Inf], 1e-4); 515s ***** assert (icdf (t, [0:0.2:1]), [2, 2.1899, 2.4244, 2.7315, 3.1768, 4], 1e-4); 515s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 0.5108, 0.9163, 1.6094, Inf, NaN], 1e-4); 515s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.4244, 2.7315, 3.1768, 4, NaN], 1e-4); 515s ***** assert (iqr (pd), 1.0986, 1e-4); 515s ***** assert (iqr (t), 0.8020, 1e-4); 515s ***** assert (mean (pd), 1); 515s ***** assert (mean (t), 2.6870, 1e-4); 515s ***** assert (median (pd), 0.6931, 1e-4); 515s ***** assert (median (t), 2.5662, 1e-4); 515s ***** assert (pdf (pd, [0:5]), [1, 0.3679, 0.1353, 0.0498, 0.0183, 0.0067], 1e-4); 515s ***** assert (pdf (t, [0:5]), [0, 0, 1.1565, 0.4255, 0.1565, 0], 1e-4); 515s ***** assert (pdf (pd, [-1, 1:4, NaN]), [0, 0.3679, 0.1353, 0.0498, 0.0183, NaN], 1e-4); 515s ***** assert (pdf (t, [-1, 1:4, NaN]), [0, 0, 1.1565, 0.4255, 0.1565, NaN], 1e-4); 515s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 515s ***** assert (any (random (t, 1000, 1) < 2), false); 515s ***** assert (any (random (t, 1000, 1) > 4), false); 515s ***** assert (std (pd), 1); 515s ***** assert (std (t), 0.5253, 1e-4); 515s ***** assert (var (pd), 1); 515s ***** assert (var (t), 0.2759, 1e-4); 515s ***** error ... 515s ExponentialDistribution(0) 515s ***** error ... 515s ExponentialDistribution(-1) 515s ***** error ... 515s ExponentialDistribution(Inf) 515s ***** error ... 515s ExponentialDistribution(i) 515s ***** error ... 515s ExponentialDistribution("a") 515s ***** error ... 515s ExponentialDistribution([1, 2]) 515s ***** error ... 515s ExponentialDistribution(NaN) 515s ***** error ... 515s cdf (ExponentialDistribution, 2, "uper") 515s ***** error ... 515s cdf (ExponentialDistribution, 2, 3) 515s ***** shared x 515s x = exprnd (1, [100, 1]); 515s ***** error ... 515s paramci (ExponentialDistribution.fit (x), "alpha") 516s ***** error ... 516s paramci (ExponentialDistribution.fit (x), "alpha", 0) 516s ***** error ... 516s paramci (ExponentialDistribution.fit (x), "alpha", 1) 516s ***** error ... 516s paramci (ExponentialDistribution.fit (x), "alpha", [0.5 2]) 516s ***** error ... 516s paramci (ExponentialDistribution.fit (x), "alpha", "") 517s ***** error ... 517s paramci (ExponentialDistribution.fit (x), "alpha", {0.05}) 517s ***** error ... 517s paramci (ExponentialDistribution.fit (x), "parameter", "mu", ... 517s "alpha", {0.05}) 517s ***** error ... 517s paramci (ExponentialDistribution.fit (x), "parameter", {"mu", "param"}) 517s ***** error ... 517s paramci (ExponentialDistribution.fit (x), "alpha", 0.01, ... 517s "parameter", {"mu", "param"}) 517s ***** error ... 517s paramci (ExponentialDistribution.fit (x), "parameter", "param") 517s ***** error ... 517s paramci (ExponentialDistribution.fit (x), "alpha", 0.01, "parameter", "parm") 517s ***** error ... 517s paramci (ExponentialDistribution.fit (x), "NAME", "value") 517s ***** error ... 517s paramci (ExponentialDistribution.fit (x), "alpha", 0.01, "NAME", "value") 517s ***** error ... 517s paramci (ExponentialDistribution.fit (x), "alpha", 0.01, ... 517s "parameter", "mu", "NAME", "value") 517s ***** error ... 517s plot (ExponentialDistribution, "Parent") 517s ***** error ... 517s plot (ExponentialDistribution, "PlotType", 12) 517s ***** error ... 517s plot (ExponentialDistribution, "PlotType", {"pdf", "cdf"}) 517s ***** error ... 517s plot (ExponentialDistribution, "PlotType", "pdfcdf") 517s ***** error ... 517s plot (ExponentialDistribution, "Discrete", "pdfcdf") 517s ***** error ... 517s plot (ExponentialDistribution, "Discrete", [1, 0]) 517s ***** error ... 517s plot (ExponentialDistribution, "Discrete", {true}) 517s ***** error ... 517s plot (ExponentialDistribution, "Parent", 12) 517s ***** error ... 517s plot (ExponentialDistribution, "Parent", "hax") 517s ***** error ... 517s plot (ExponentialDistribution, "invalidNAME", "pdf") 517s ***** error ... 517s plot (ExponentialDistribution, "PlotType", "probability") 517s ***** error ... 517s proflik (ExponentialDistribution, 2) 517s ***** error ... 517s proflik (ExponentialDistribution.fit (x), 3) 517s ***** error ... 517s proflik (ExponentialDistribution.fit (x), [1, 2]) 517s ***** error ... 517s proflik (ExponentialDistribution.fit (x), {1}) 517s ***** error ... 517s proflik (ExponentialDistribution.fit (x), 1, ones (2)) 517s ***** error ... 517s proflik (ExponentialDistribution.fit (x), 1, "Display") 517s ***** error ... 517s proflik (ExponentialDistribution.fit (x), 1, "Display", 1) 517s ***** error ... 517s proflik (ExponentialDistribution.fit (x), 1, "Display", {1}) 517s ***** error ... 517s proflik (ExponentialDistribution.fit (x), 1, "Display", {"on"}) 517s ***** error ... 517s proflik (ExponentialDistribution.fit (x), 1, "Display", ["on"; "on"]) 517s ***** error ... 517s proflik (ExponentialDistribution.fit (x), 1, "Display", "onnn") 517s ***** error ... 517s proflik (ExponentialDistribution.fit (x), 1, "NAME", "on") 517s ***** error ... 517s proflik (ExponentialDistribution.fit (x), 1, {"NAME"}, "on") 517s ***** error ... 517s proflik (ExponentialDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 517s ***** error ... 517s truncate (ExponentialDistribution) 517s ***** error ... 517s truncate (ExponentialDistribution, 2) 517s ***** error ... 517s truncate (ExponentialDistribution, 4, 2) 517s ***** shared pd 517s pd = ExponentialDistribution(1); 517s pd(2) = ExponentialDistribution(3); 517s ***** error cdf (pd, 1) 517s ***** error icdf (pd, 0.5) 517s ***** error iqr (pd) 517s ***** error mean (pd) 517s ***** error median (pd) 517s ***** error negloglik (pd) 517s ***** error paramci (pd) 517s ***** error pdf (pd, 1) 517s ***** error plot (pd) 517s ***** error proflik (pd, 2) 517s ***** error random (pd) 517s ***** error std (pd) 517s ***** error ... 517s truncate (pd, 2, 4) 517s ***** error var (pd) 517s 90 tests, 90 passed, 0 known failure, 0 skipped 517s [inst/dist_obj/ExtremeValueDistribution.m] 517s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_obj/ExtremeValueDistribution.m 517s ***** shared pd, t 517s pd = ExtremeValueDistribution (0, 1); 517s t = truncate (pd, 2, 4); 517s ***** assert (cdf (pd, [0:5]), [0.6321, 0.9340, 0.9994, 1, 1, 1], 1e-4); 517s ***** assert (cdf (t, [0:5]), [0, 0, 0, 1, 1, 1], 1e-4); 517s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.9887, 0.9994, 1, 1], 1e-4); 517s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0, 1, 1], 1e-4); 517s ***** assert (icdf (pd, [0:0.2:1]), [-Inf, -1.4999, -0.6717, -0.0874, 0.4759, Inf], 1e-4); 517s ***** assert (icdf (t, [0:0.2:1]), [2, 2.0298, 2.0668, 2.1169, 2.1971, 4], 1e-4); 517s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, -0.6717, -0.0874, 0.4759, Inf, NaN], 1e-4); 517s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.0668, 2.1169, 2.1971, 4, NaN], 1e-4); 517s ***** assert (iqr (pd), 1.5725, 1e-4); 517s ***** assert (iqr (t), 0.1338, 1e-4); 517s ***** assert (mean (pd), -0.5772, 1e-4); 517s ***** assert (mean (t), 2.1206, 1e-4); 517s ***** assert (median (pd), -0.3665, 1e-4); 517s ***** assert (median (t), 2.0897, 1e-4); 517s ***** assert (pdf (pd, [0:5]), [0.3679, 0.1794, 0.0046, 0, 0, 0], 1e-4); 517s ***** assert (pdf (t, [0:5]), [0, 0, 7.3891, 0.0001, 0, 0], 1e-4); 517s ***** assert (pdf (pd, [-1, 1:4, NaN]), [0.2546, 0.1794, 0.0046, 0, 0, NaN], 1e-4); 517s ***** assert (pdf (t, [-1, 1:4, NaN]), [0, 0, 7.3891, 0.0001, 0, NaN], 1e-4); 517s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 517s ***** assert (any (random (t, 1000, 1) < 2), false); 517s ***** assert (any (random (t, 1000, 1) > 4), false); 517s ***** assert (std (pd), 1.2825, 1e-4); 517s ***** assert (std (t), 0.1091, 1e-4); 517s ***** assert (var (pd), 1.6449, 1e-4); 517s ***** assert (var (t), 0.0119, 1e-4); 517s ***** error ... 517s ExtremeValueDistribution(Inf, 1) 517s ***** error ... 517s ExtremeValueDistribution(i, 1) 517s ***** error ... 517s ExtremeValueDistribution("a", 1) 517s ***** error ... 517s ExtremeValueDistribution([1, 2], 1) 517s ***** error ... 517s ExtremeValueDistribution(NaN, 1) 517s ***** error ... 517s ExtremeValueDistribution(1, 0) 517s ***** error ... 517s ExtremeValueDistribution(1, -1) 517s ***** error ... 517s ExtremeValueDistribution(1, Inf) 517s ***** error ... 517s ExtremeValueDistribution(1, i) 518s ***** error ... 518s ExtremeValueDistribution(1, "a") 518s ***** error ... 518s ExtremeValueDistribution(1, [1, 2]) 518s ***** error ... 518s ExtremeValueDistribution(1, NaN) 518s ***** error ... 518s cdf (ExtremeValueDistribution, 2, "uper") 518s ***** error ... 518s cdf (ExtremeValueDistribution, 2, 3) 518s ***** shared x 518s rand ("seed", 1); 518s x = evrnd (1, 1, [1000, 1]); 518s ***** error ... 518s paramci (ExtremeValueDistribution.fit (x), "alpha") 518s ***** error ... 518s paramci (ExtremeValueDistribution.fit (x), "alpha", 0) 518s ***** error ... 518s paramci (ExtremeValueDistribution.fit (x), "alpha", 1) 518s ***** error ... 518s paramci (ExtremeValueDistribution.fit (x), "alpha", [0.5 2]) 518s ***** error ... 518s paramci (ExtremeValueDistribution.fit (x), "alpha", "") 518s ***** error ... 518s paramci (ExtremeValueDistribution.fit (x), "alpha", {0.05}) 518s ***** error ... 518s paramci (ExtremeValueDistribution.fit (x), ... 518s "parameter", "mu", "alpha", {0.05}) 518s ***** error ... 518s paramci (ExtremeValueDistribution.fit (x), ... 518s "parameter", {"mu", "sigma", "param"}) 518s ***** error ... 518s paramci (ExtremeValueDistribution.fit (x), "alpha", 0.01, ... 518s "parameter", {"mu", "sigma", "param"}) 518s ***** error ... 518s paramci (ExtremeValueDistribution.fit (x), "parameter", "param") 518s ***** error ... 518s paramci (ExtremeValueDistribution.fit (x), "alpha", 0.01, ... 518s "parameter", "param") 518s ***** error ... 518s paramci (ExtremeValueDistribution.fit (x), "NAME", "value") 518s ***** error ... 518s paramci (ExtremeValueDistribution.fit (x), "alpha", 0.01, "NAME", "value") 518s ***** error ... 518s paramci (ExtremeValueDistribution.fit (x), "alpha", 0.01, ... 518s "parameter", "mu", "NAME", "value") 518s ***** error ... 518s plot (ExtremeValueDistribution, "Parent") 518s ***** error ... 518s plot (ExtremeValueDistribution, "PlotType", 12) 518s ***** error ... 518s plot (ExtremeValueDistribution, "PlotType", {"pdf", "cdf"}) 518s ***** error ... 518s plot (ExtremeValueDistribution, "PlotType", "pdfcdf") 518s ***** error ... 518s plot (ExtremeValueDistribution, "Discrete", "pdfcdf") 518s ***** error ... 518s plot (ExtremeValueDistribution, "Discrete", [1, 0]) 518s ***** error ... 518s plot (ExtremeValueDistribution, "Discrete", {true}) 518s ***** error ... 518s plot (ExtremeValueDistribution, "Parent", 12) 518s ***** error ... 518s plot (ExtremeValueDistribution, "Parent", "hax") 518s ***** error ... 518s plot (ExtremeValueDistribution, "invalidNAME", "pdf") 518s ***** error ... 518s plot (ExtremeValueDistribution, "PlotType", "probability") 518s ***** error ... 518s proflik (ExtremeValueDistribution, 2) 518s ***** error ... 518s proflik (ExtremeValueDistribution.fit (x), 3) 518s ***** error ... 518s proflik (ExtremeValueDistribution.fit (x), [1, 2]) 518s ***** error ... 518s proflik (ExtremeValueDistribution.fit (x), {1}) 518s ***** error ... 518s proflik (ExtremeValueDistribution.fit (x), 1, ones (2)) 518s ***** error ... 518s proflik (ExtremeValueDistribution.fit (x), 1, "Display") 518s ***** error ... 518s proflik (ExtremeValueDistribution.fit (x), 1, "Display", 1) 518s ***** error ... 518s proflik (ExtremeValueDistribution.fit (x), 1, "Display", {1}) 518s ***** error ... 518s proflik (ExtremeValueDistribution.fit (x), 1, "Display", {"on"}) 518s ***** error ... 518s proflik (ExtremeValueDistribution.fit (x), 1, "Display", ["on"; "on"]) 518s ***** error ... 518s proflik (ExtremeValueDistribution.fit (x), 1, "Display", "onnn") 518s ***** error ... 518s proflik (ExtremeValueDistribution.fit (x), 1, "NAME", "on") 518s ***** error ... 518s proflik (ExtremeValueDistribution.fit (x), 1, {"NAME"}, "on") 518s ***** error ... 518s proflik (ExtremeValueDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 518s ***** error ... 518s truncate (ExtremeValueDistribution) 518s ***** error ... 518s truncate (ExtremeValueDistribution, 2) 518s ***** error ... 518s truncate (ExtremeValueDistribution, 4, 2) 518s ***** shared pd 518s pd = ExtremeValueDistribution(1, 1); 518s pd(2) = ExtremeValueDistribution(1, 3); 518s ***** error cdf (pd, 1) 518s ***** error icdf (pd, 0.5) 518s ***** error iqr (pd) 518s ***** error mean (pd) 518s ***** error median (pd) 518s ***** error negloglik (pd) 518s ***** error paramci (pd) 518s ***** error pdf (pd, 1) 518s ***** error plot (pd) 518s ***** error proflik (pd, 2) 518s ***** error random (pd) 518s ***** error std (pd) 518s ***** error ... 518s truncate (pd, 2, 4) 518s ***** error var (pd) 518s 95 tests, 95 passed, 0 known failure, 0 skipped 518s [inst/dist_obj/GammaDistribution.m] 518s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_obj/GammaDistribution.m 518s ***** shared pd, t 518s pd = GammaDistribution (1, 1); 518s t = truncate (pd, 2, 4); 518s ***** assert (cdf (pd, [0:5]), [0, 0.6321, 0.8647, 0.9502, 0.9817, 0.9933], 1e-4); 518s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.7311, 1, 1], 1e-4); 518s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.7769, 0.8647, 0.9502, 0.9817], 1e-4); 518s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0, 0.7311, 1], 1e-4); 518s ***** assert (icdf (pd, [0:0.2:1]), [0, 0.2231, 0.5108, 0.9163, 1.6094, Inf], 1e-4); 518s ***** assert (icdf (t, [0:0.2:1]), [2, 2.1899, 2.4244, 2.7315, 3.1768, 4], 1e-4); 518s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 0.5108, 0.9163, 1.6094, Inf, NaN], 1e-4); 518s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.4244, 2.7315, 3.1768, 4, NaN], 1e-4); 518s ***** assert (iqr (pd), 1.0986, 1e-4); 518s ***** assert (iqr (t), 0.8020, 1e-4); 518s ***** assert (mean (pd), 1); 518s ***** assert (mean (t), 2.6870, 1e-4); 518s ***** assert (median (pd), 0.6931, 1e-4); 518s ***** assert (median (t), 2.5662, 1e-4); 518s ***** assert (pdf (pd, [0:5]), [1, 0.3679, 0.1353, 0.0498, 0.0183, 0.0067], 1e-4); 518s ***** assert (pdf (t, [0:5]), [0, 0, 1.1565, 0.4255, 0.1565, 0], 1e-4); 518s ***** assert (pdf (pd, [-1, 1:4, NaN]), [0, 0.3679, 0.1353, 0.0498, 0.0183, NaN], 1e-4); 518s ***** assert (pdf (t, [-1, 1:4, NaN]), [0, 0, 1.1565, 0.4255, 0.1565, NaN], 1e-4); 518s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 518s ***** assert (any (random (t, 1000, 1) < 2), false); 518s ***** assert (any (random (t, 1000, 1) > 4), false); 518s ***** assert (std (pd), 1); 518s ***** assert (std (t), 0.5253, 1e-4); 518s ***** assert (var (pd), 1); 518s ***** assert (var (t), 0.2759, 1e-4); 518s ***** error ... 518s GammaDistribution(0, 1) 518s ***** error ... 518s GammaDistribution(Inf, 1) 518s ***** error ... 518s GammaDistribution(i, 1) 518s ***** error ... 518s GammaDistribution("a", 1) 518s ***** error ... 518s GammaDistribution([1, 2], 1) 518s ***** error ... 518s GammaDistribution(NaN, 1) 518s ***** error ... 518s GammaDistribution(1, 0) 518s ***** error ... 518s GammaDistribution(1, -1) 518s ***** error ... 518s GammaDistribution(1, Inf) 518s ***** error ... 518s GammaDistribution(1, i) 518s ***** error ... 518s GammaDistribution(1, "a") 518s ***** error ... 518s GammaDistribution(1, [1, 2]) 518s ***** error ... 518s GammaDistribution(1, NaN) 518s ***** error ... 518s cdf (GammaDistribution, 2, "uper") 518s ***** error ... 518s cdf (GammaDistribution, 2, 3) 518s ***** shared x 518s x = gamrnd (1, 1, [100, 1]); 518s ***** error ... 518s paramci (GammaDistribution.fit (x), "alpha") 518s ***** error ... 518s paramci (GammaDistribution.fit (x), "alpha", 0) 518s ***** error ... 518s paramci (GammaDistribution.fit (x), "alpha", 1) 518s ***** error ... 518s paramci (GammaDistribution.fit (x), "alpha", [0.5 2]) 518s ***** error ... 518s paramci (GammaDistribution.fit (x), "alpha", "") 518s ***** error ... 518s paramci (GammaDistribution.fit (x), "alpha", {0.05}) 518s ***** error ... 518s paramci (GammaDistribution.fit (x), "parameter", "a", "alpha", {0.05}) 518s ***** error ... 518s paramci (GammaDistribution.fit (x), "parameter", {"a", "b", "param"}) 518s ***** error ... 518s paramci (GammaDistribution.fit (x), "alpha", 0.01, ... 518s "parameter", {"a", "b", "param"}) 518s ***** error ... 518s paramci (GammaDistribution.fit (x), "parameter", "param") 518s ***** error ... 518s paramci (GammaDistribution.fit (x), "alpha", 0.01, "parameter", "param") 518s ***** error ... 518s paramci (GammaDistribution.fit (x), "NAME", "value") 519s ***** error ... 519s paramci (GammaDistribution.fit (x), "alpha", 0.01, "NAME", "value") 519s ***** error ... 519s paramci (GammaDistribution.fit (x), "alpha", 0.01, "parameter", "a", ... 519s "NAME", "value") 519s ***** error ... 519s plot (GammaDistribution, "Parent") 519s ***** error ... 519s plot (GammaDistribution, "PlotType", 12) 519s ***** error ... 519s plot (GammaDistribution, "PlotType", {"pdf", "cdf"}) 519s ***** error ... 519s plot (GammaDistribution, "PlotType", "pdfcdf") 519s ***** error ... 519s plot (GammaDistribution, "Discrete", "pdfcdf") 519s ***** error ... 519s plot (GammaDistribution, "Discrete", [1, 0]) 519s ***** error ... 519s plot (GammaDistribution, "Discrete", {true}) 519s ***** error ... 519s plot (GammaDistribution, "Parent", 12) 519s ***** error ... 519s plot (GammaDistribution, "Parent", "hax") 519s ***** error ... 519s plot (GammaDistribution, "invalidNAME", "pdf") 519s ***** error ... 519s plot (GammaDistribution, "PlotType", "probability") 519s ***** error ... 519s proflik (GammaDistribution, 2) 519s ***** error ... 519s proflik (GammaDistribution.fit (x), 3) 519s ***** error ... 519s proflik (GammaDistribution.fit (x), [1, 2]) 519s ***** error ... 519s proflik (GammaDistribution.fit (x), {1}) 519s ***** error ... 519s proflik (GammaDistribution.fit (x), 1, ones (2)) 519s ***** error ... 519s proflik (GammaDistribution.fit (x), 1, "Display") 519s ***** error ... 519s proflik (GammaDistribution.fit (x), 1, "Display", 1) 519s ***** error ... 519s proflik (GammaDistribution.fit (x), 1, "Display", {1}) 519s ***** error ... 519s proflik (GammaDistribution.fit (x), 1, "Display", {"on"}) 519s ***** error ... 519s proflik (GammaDistribution.fit (x), 1, "Display", ["on"; "on"]) 519s ***** error ... 519s proflik (GammaDistribution.fit (x), 1, "Display", "onnn") 519s ***** error ... 519s proflik (GammaDistribution.fit (x), 1, "NAME", "on") 519s ***** error ... 519s proflik (GammaDistribution.fit (x), 1, {"NAME"}, "on") 519s ***** error ... 519s proflik (GammaDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 519s ***** error ... 519s truncate (GammaDistribution) 519s ***** error ... 519s truncate (GammaDistribution, 2) 519s ***** error ... 519s truncate (GammaDistribution, 4, 2) 519s ***** shared pd 519s pd = GammaDistribution(1, 1); 519s pd(2) = GammaDistribution(1, 3); 519s ***** error cdf (pd, 1) 519s ***** error icdf (pd, 0.5) 519s ***** error iqr (pd) 519s ***** error mean (pd) 519s ***** error median (pd) 519s ***** error negloglik (pd) 519s ***** error paramci (pd) 519s ***** error pdf (pd, 1) 519s ***** error plot (pd) 519s ***** error proflik (pd, 2) 519s ***** error random (pd) 519s ***** error std (pd) 519s ***** error ... 519s truncate (pd, 2, 4) 519s ***** error var (pd) 519s 96 tests, 96 passed, 0 known failure, 0 skipped 519s [inst/dist_obj/GeneralizedExtremeValueDistribution.m] 519s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_obj/GeneralizedExtremeValueDistribution.m 519s ***** shared pd, t 519s pd = GeneralizedExtremeValueDistribution; 519s t = truncate (pd, 2, 4); 519s ***** assert (cdf (pd, [0:5]), [0.3679, 0.6922, 0.8734, 0.9514, 0.9819, 0.9933], 1e-4); 519s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.7195, 1, 1], 1e-4); 519s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.8, 0.8734, 0.9514, 0.9819], 1e-4); 519s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0, 0.7195, 1], 1e-4); 519s ***** assert (icdf (pd, [0:0.2:1]), [-Inf, -0.4759, 0.0874, 0.6717, 1.4999, Inf], 1e-4); 519s ***** assert (icdf (t, [0:0.2:1]), [2, 2.1999, 2.4433, 2.7568, 3.2028, 4], 1e-4); 519s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 0.0874, 0.6717, 1.4999, Inf, NaN], 1e-4); 519s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.4433, 2.7568, 3.2028, 4, NaN], 1e-4); 519s ***** assert (iqr (pd), 1.5725, 1e-4); 519s ***** assert (iqr (t), 0.8164, 1e-4); 519s ***** assert (mean (pd), 0.5772, 1e-4); 519s ***** assert (mean (t), 2.7043, 1e-4); 519s ***** assert (median (pd), 0.3665, 1e-4); 519s ***** assert (median (t), 2.5887, 1e-4); 519s ***** assert (pdf (pd, [0:5]), [0.3679, 0.2546, 0.1182, 0.0474, 0.0180, 0.0067], 1e-4); 519s ***** assert (pdf (t, [0:5]), [0, 0, 1.0902, 0.4369, 0.1659, 0], 1e-4); 519s ***** assert (pdf (pd, [-1, 1:4, NaN]), [0.1794, 0.2546, 0.1182, 0.0474, 0.0180, NaN], 1e-4); 519s ***** assert (pdf (t, [-1, 1:4, NaN]), [0, 0, 1.0902, 0.4369, 0.1659, NaN], 1e-4); 519s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 519s ***** assert (any (random (t, 1000, 1) < 2), false); 519s ***** assert (any (random (t, 1000, 1) > 4), false); 519s ***** assert (std (pd), 1.2825, 1e-4); 519s ***** assert (std (t), 0.5289, 1e-4); 519s ***** assert (var (pd), 1.6449, 1e-4); 519s ***** assert (var (t), 0.2798, 1e-4); 519s ***** error ... 519s GeneralizedExtremeValueDistribution(Inf, 1, 1) 519s ***** error ... 519s GeneralizedExtremeValueDistribution(i, 1, 1) 519s ***** error ... 519s GeneralizedExtremeValueDistribution("a", 1, 1) 519s ***** error ... 519s GeneralizedExtremeValueDistribution([1, 2], 1, 1) 519s ***** error ... 519s GeneralizedExtremeValueDistribution(NaN, 1, 1) 519s ***** error ... 519s GeneralizedExtremeValueDistribution(1, 0, 1) 519s ***** error ... 519s GeneralizedExtremeValueDistribution(1, -1, 1) 519s ***** error ... 519s GeneralizedExtremeValueDistribution(1, Inf, 1) 519s ***** error ... 519s GeneralizedExtremeValueDistribution(1, i, 1) 519s ***** error ... 519s GeneralizedExtremeValueDistribution(1, "a", 1) 519s ***** error ... 519s GeneralizedExtremeValueDistribution(1, [1, 2], 1) 519s ***** error ... 519s GeneralizedExtremeValueDistribution(1, NaN, 1) 519s ***** error ... 519s GeneralizedExtremeValueDistribution(1, 1, Inf) 519s ***** error ... 519s GeneralizedExtremeValueDistribution(1, 1, i) 519s ***** error ... 519s GeneralizedExtremeValueDistribution(1, 1, "a") 519s ***** error ... 519s GeneralizedExtremeValueDistribution(1, 1, [1, 2]) 519s ***** error ... 519s GeneralizedExtremeValueDistribution(1, 1, NaN) 519s ***** error ... 519s cdf (GeneralizedExtremeValueDistribution, 2, "uper") 519s ***** error ... 519s cdf (GeneralizedExtremeValueDistribution, 2, 3) 519s ***** shared x 519s x = gevrnd (1, 1, 1, [1, 100]); 519s ***** error ... 519s paramci (GeneralizedExtremeValueDistribution.fit (x), "alpha") 519s ***** error ... 519s paramci (GeneralizedExtremeValueDistribution.fit (x), "alpha", 0) 520s ***** error ... 520s paramci (GeneralizedExtremeValueDistribution.fit (x), "alpha", 1) 520s ***** error ... 520s paramci (GeneralizedExtremeValueDistribution.fit (x), "alpha", [0.5 2]) 520s ***** error ... 520s paramci (GeneralizedExtremeValueDistribution.fit (x), "alpha", "") 520s ***** error ... 520s paramci (GeneralizedExtremeValueDistribution.fit (x), "alpha", {0.05}) 520s ***** error ... 520s paramci (GeneralizedExtremeValueDistribution.fit (x), ... 520s "parameter", "sigma", "alpha", {0.05}) 521s ***** error ... 521s paramci (GeneralizedExtremeValueDistribution.fit (x), ... 521s "parameter", {"k", "sigma", "mu", "param"}) 521s ***** error ... 521s paramci (GeneralizedExtremeValueDistribution.fit (x), "alpha", 0.01, ... 521s "parameter", {"k", "sigma", "mu", "param"}) 521s ***** error ... 521s paramci (GeneralizedExtremeValueDistribution.fit (x), "parameter", "param") 521s ***** error ... 521s paramci (GeneralizedExtremeValueDistribution.fit (x), "alpha", 0.01, ... 521s "parameter", "param") 521s ***** error ... 521s paramci (GeneralizedExtremeValueDistribution.fit (x), "NAME", "value") 521s ***** error ... 521s paramci (GeneralizedExtremeValueDistribution.fit (x), "alpha", 0.01, ... 521s "NAME", "value") 522s ***** error ... 522s paramci (GeneralizedExtremeValueDistribution.fit (x), "alpha", 0.01, ... 522s "parameter", "sigma", "NAME", "value") 522s ***** error ... 522s plot (GeneralizedExtremeValueDistribution, "Parent") 522s ***** error ... 522s plot (GeneralizedExtremeValueDistribution, "PlotType", 12) 522s ***** error ... 522s plot (GeneralizedExtremeValueDistribution, "PlotType", {"pdf", "cdf"}) 522s ***** error ... 522s plot (GeneralizedExtremeValueDistribution, "PlotType", "pdfcdf") 522s ***** error ... 522s plot (GeneralizedExtremeValueDistribution, "Discrete", "pdfcdf") 522s ***** error ... 522s plot (GeneralizedExtremeValueDistribution, "Discrete", [1, 0]) 522s ***** error ... 522s plot (GeneralizedExtremeValueDistribution, "Discrete", {true}) 522s ***** error ... 522s plot (GeneralizedExtremeValueDistribution, "Parent", 12) 522s ***** error ... 522s plot (GeneralizedExtremeValueDistribution, "Parent", "hax") 522s ***** error ... 522s plot (GeneralizedExtremeValueDistribution, "invalidNAME", "pdf") 522s ***** error ... 522s plot (GeneralizedExtremeValueDistribution, "PlotType", "probability") 522s ***** error ... 522s proflik (GeneralizedExtremeValueDistribution, 2) 522s ***** error ... 522s proflik (GeneralizedExtremeValueDistribution.fit (x), 4) 522s ***** error ... 522s proflik (GeneralizedExtremeValueDistribution.fit (x), [1, 2]) 522s ***** error ... 522s proflik (GeneralizedExtremeValueDistribution.fit (x), {1}) 522s ***** error ... 522s proflik (GeneralizedExtremeValueDistribution.fit (x), 1, ones (2)) 522s ***** error ... 522s proflik (GeneralizedExtremeValueDistribution.fit (x), 1, "Display") 523s ***** error ... 523s proflik (GeneralizedExtremeValueDistribution.fit (x), 1, "Display", 1) 523s ***** error ... 523s proflik (GeneralizedExtremeValueDistribution.fit (x), 1, "Display", {1}) 523s ***** error ... 523s proflik (GeneralizedExtremeValueDistribution.fit (x), 1, "Display", {"on"}) 523s ***** error ... 523s proflik (GeneralizedExtremeValueDistribution.fit (x), 1, ... 523s "Display", ["on"; "on"]) 523s ***** error ... 523s proflik (GeneralizedExtremeValueDistribution.fit (x), 1, "Display", "onnn") 524s ***** error ... 524s proflik (GeneralizedExtremeValueDistribution.fit (x), 1, "NAME", "on") 524s ***** error ... 524s proflik (GeneralizedExtremeValueDistribution.fit (x), 1, {"NAME"}, "on") 524s ***** error ... 524s proflik (GeneralizedExtremeValueDistribution.fit (x), 1, {[1 2 3 4]}, ... 524s "Display", "on") 524s ***** error ... 524s truncate (GeneralizedExtremeValueDistribution) 524s ***** error ... 524s truncate (GeneralizedExtremeValueDistribution, 2) 524s ***** error ... 524s truncate (GeneralizedExtremeValueDistribution, 4, 2) 524s ***** shared pd 524s pd = GeneralizedExtremeValueDistribution(1, 1, 1); 524s pd(2) = GeneralizedExtremeValueDistribution(1, 3, 1); 524s ***** error cdf (pd, 1) 524s ***** error icdf (pd, 0.5) 524s ***** error iqr (pd) 524s ***** error mean (pd) 524s ***** error median (pd) 524s ***** error negloglik (pd) 524s ***** error paramci (pd) 524s ***** error pdf (pd, 1) 524s ***** error plot (pd) 524s ***** error proflik (pd, 2) 524s ***** error random (pd) 524s ***** error std (pd) 524s ***** error ... 524s truncate (pd, 2, 4) 524s ***** error var (pd) 524s 100 tests, 100 passed, 0 known failure, 0 skipped 524s [inst/dist_obj/GeneralizedParetoDistribution.m] 524s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_obj/GeneralizedParetoDistribution.m 524s ***** shared pd, t 524s pd = GeneralizedParetoDistribution (1, 1, 1); 524s t = truncate (pd, 2, 4); 524s ***** assert (cdf (pd, [0:5]), [0, 0, 0.5, 0.6667, 0.75, 0.8], 1e-4); 524s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.6667, 1, 1], 1e-4); 524s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.3333, 0.5, 0.6667, 0.75], 1e-4); 524s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0, 0.6667, 1], 1e-4); 524s ***** assert (icdf (pd, [0:0.2:1]), [1, 1.25, 1.6667, 2.5, 5, Inf], 1e-4); 524s ***** assert (icdf (t, [0:0.2:1]), [2, 2.2222, 2.5, 2.8571, 3.3333, 4], 1e-4); 524s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 1.6667, 2.5, 5, Inf, NaN], 1e-4); 524s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.5, 2.8571, 3.3333, 4, NaN], 1e-4); 524s ***** assert (iqr (pd), 2.6667, 1e-4); 524s ***** assert (iqr (t), 0.9143, 1e-4); 524s ***** assert (mean (pd), Inf); 524s ***** assert (mean (t), 2.7726, 1e-4); 524s ***** assert (median (pd), 2); 524s ***** assert (median (t), 2.6667, 1e-4); 524s ***** assert (pdf (pd, [0:5]), [0, 1, 0.25, 0.1111, 0.0625, 0.04], 1e-4); 524s ***** assert (pdf (t, [0:5]), [0, 0, 1, 0.4444, 0.25, 0], 1e-4); 524s ***** assert (pdf (pd, [-1, 1:4, NaN]), [0, 1, 0.25, 0.1111, 0.0625, NaN], 1e-4); 524s ***** assert (pdf (t, [-1, 1:4, NaN]), [0, 0, 1, 0.4444, 0.25, NaN], 1e-4); 524s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 524s ***** assert (any (random (t, 1000, 1) < 2), false); 524s ***** assert (any (random (t, 1000, 1) > 4), false); 524s ***** assert (std (pd), Inf); 524s ***** assert (std (t), 0.5592, 1e-4); 524s ***** assert (var (pd), Inf); 524s ***** assert (var (t), 0.3128, 1e-4); 524s ***** error ... 524s GeneralizedParetoDistribution(Inf, 1, 1) 524s ***** error ... 524s GeneralizedParetoDistribution(i, 1, 1) 524s ***** error ... 524s GeneralizedParetoDistribution("a", 1, 1) 524s ***** error ... 524s GeneralizedParetoDistribution([1, 2], 1, 1) 524s ***** error ... 524s GeneralizedParetoDistribution(NaN, 1, 1) 524s ***** error ... 524s GeneralizedParetoDistribution(1, 0, 1) 524s ***** error ... 524s GeneralizedParetoDistribution(1, -1, 1) 524s ***** error ... 524s GeneralizedParetoDistribution(1, Inf, 1) 524s ***** error ... 524s GeneralizedParetoDistribution(1, i, 1) 524s ***** error ... 524s GeneralizedParetoDistribution(1, "a", 1) 524s ***** error ... 524s GeneralizedParetoDistribution(1, [1, 2], 1) 524s ***** error ... 524s GeneralizedParetoDistribution(1, NaN, 1) 524s ***** error ... 524s GeneralizedParetoDistribution(1, 1, Inf) 524s ***** error ... 524s GeneralizedParetoDistribution(1, 1, i) 524s ***** error ... 524s GeneralizedParetoDistribution(1, 1, "a") 524s ***** error ... 524s GeneralizedParetoDistribution(1, 1, [1, 2]) 524s ***** error ... 524s GeneralizedParetoDistribution(1, 1, NaN) 524s ***** error ... 524s cdf (GeneralizedParetoDistribution, 2, "uper") 524s ***** error ... 524s cdf (GeneralizedParetoDistribution, 2, 3) 524s ***** shared x 524s x = gprnd (1, 1, 1, [1, 100]); 524s ***** error ... 524s paramci (GeneralizedParetoDistribution.fit (x, 1), "alpha") 524s ***** error ... 524s paramci (GeneralizedParetoDistribution.fit (x, 1), "alpha", 0) 524s ***** error ... 524s paramci (GeneralizedParetoDistribution.fit (x, 1), "alpha", 1) 524s ***** error ... 524s paramci (GeneralizedParetoDistribution.fit (x, 1), "alpha", [0.5 2]) 524s ***** error ... 524s paramci (GeneralizedParetoDistribution.fit (x, 1), "alpha", "") 525s ***** error ... 525s paramci (GeneralizedParetoDistribution.fit (x, 1), "alpha", {0.05}) 525s ***** error ... 525s paramci (GeneralizedParetoDistribution.fit (x, 1), ... 525s "parameter", "sigma", "alpha", {0.05}) 525s ***** error ... 525s paramci (GeneralizedParetoDistribution.fit (x, 1), ... 525s "parameter", {"k", "sigma", "param"}) 525s ***** error ... 525s paramci (GeneralizedParetoDistribution.fit (x, 1), "alpha", 0.01, ... 525s "parameter", {"k", "sigma", "param"}) 525s ***** error ... 525s paramci (GeneralizedParetoDistribution.fit (x, 1), "parameter", "param") 525s ***** error ... 525s paramci (GeneralizedParetoDistribution.fit (x, 1), "alpha", 0.01, ... 525s "parameter", "param") 525s ***** error ... 525s paramci (GeneralizedParetoDistribution.fit (x, 1), "NAME", "value") 525s ***** error ... 525s paramci (GeneralizedParetoDistribution.fit (x, 1), "alpha", 0.01, ... 525s "NAME", "value") 525s ***** error ... 525s paramci (GeneralizedParetoDistribution.fit (x, 1), "alpha", 0.01, ... 525s "parameter", "sigma", "NAME", "value") 525s ***** error ... 525s plot (GeneralizedParetoDistribution, "Parent") 525s ***** error ... 525s plot (GeneralizedParetoDistribution, "PlotType", 12) 525s ***** error ... 525s plot (GeneralizedParetoDistribution, "PlotType", {"pdf", "cdf"}) 525s ***** error ... 525s plot (GeneralizedParetoDistribution, "PlotType", "pdfcdf") 525s ***** error ... 525s plot (GeneralizedParetoDistribution, "Discrete", "pdfcdf") 525s ***** error ... 525s plot (GeneralizedParetoDistribution, "Discrete", [1, 0]) 525s ***** error ... 525s plot (GeneralizedParetoDistribution, "Discrete", {true}) 525s ***** error ... 525s plot (GeneralizedParetoDistribution, "Parent", 12) 525s ***** error ... 525s plot (GeneralizedParetoDistribution, "Parent", "hax") 525s ***** error ... 525s plot (GeneralizedParetoDistribution, "invalidNAME", "pdf") 525s ***** error ... 525s plot (GeneralizedParetoDistribution, "PlotType", "probability") 525s ***** error ... 525s proflik (GeneralizedParetoDistribution, 2) 525s ***** error ... 525s proflik (GeneralizedParetoDistribution.fit (x, 1), 3) 525s ***** error ... 525s proflik (GeneralizedParetoDistribution.fit (x, 1), [1, 2]) 525s ***** error ... 525s proflik (GeneralizedParetoDistribution.fit (x, 1), {1}) 525s ***** error ... 525s proflik (GeneralizedParetoDistribution.fit (x, 1), 1, ones (2)) 525s ***** error ... 525s proflik (GeneralizedParetoDistribution.fit (x, 1), 1, "Display") 525s ***** error ... 525s proflik (GeneralizedParetoDistribution.fit (x, 1), 1, "Display", 1) 525s ***** error ... 525s proflik (GeneralizedParetoDistribution.fit (x, 1), 1, "Display", {1}) 525s ***** error ... 525s proflik (GeneralizedParetoDistribution.fit (x, 1), 1, "Display", {"on"}) 525s ***** error ... 525s proflik (GeneralizedParetoDistribution.fit (x, 1), 1, ... 525s "Display", ["on"; "on"]) 525s ***** error ... 525s proflik (GeneralizedParetoDistribution.fit (x, 1), 1, "Display", "onnn") 525s ***** error ... 525s proflik (GeneralizedParetoDistribution.fit (x, 1), 1, "NAME", "on") 525s ***** error ... 525s proflik (GeneralizedParetoDistribution.fit (x, 1), 1, {"NAME"}, "on") 525s ***** error ... 525s proflik (GeneralizedParetoDistribution.fit (x, 1), 1, {[1 2 3 4]}, ... 525s "Display", "on") 525s ***** error ... 525s truncate (GeneralizedParetoDistribution) 525s ***** error ... 525s truncate (GeneralizedParetoDistribution, 2) 525s ***** error ... 525s truncate (GeneralizedParetoDistribution, 4, 2) 525s ***** shared pd 525s pd = GeneralizedParetoDistribution(1, 1, 1); 525s pd(2) = GeneralizedParetoDistribution(1, 3, 1); 525s ***** error cdf (pd, 1) 525s ***** error icdf (pd, 0.5) 525s ***** error iqr (pd) 525s ***** error mean (pd) 525s ***** error median (pd) 525s ***** error negloglik (pd) 525s ***** error paramci (pd) 525s ***** error pdf (pd, 1) 525s ***** error plot (pd) 525s ***** error proflik (pd, 2) 525s ***** error random (pd) 525s ***** error std (pd) 525s ***** error ... 525s truncate (pd, 2, 4) 525s ***** error var (pd) 525s 100 tests, 100 passed, 0 known failure, 0 skipped 525s [inst/dist_obj/HalfNormalDistribution.m] 525s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_obj/HalfNormalDistribution.m 525s ***** shared pd, t 525s pd = HalfNormalDistribution (0, 1); 525s t = truncate (pd, 2, 4); 525s ***** assert (cdf (pd, [0:5]), [0, 0.6827, 0.9545, 0.9973, 0.9999, 1], 1e-4); 525s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.9420, 1, 1], 1e-4); 525s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.8664, 0.9545, 0.9973, 0.9999], 1e-4); 525s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0, 0.9420, 1], 1e-4); 525s ***** assert (icdf (pd, [0:0.2:1]), [0, 0.2533, 0.5244, 0.8416, 1.2816, Inf], 1e-4); 525s ***** assert (icdf (t, [0:0.2:1]), [2, 2.0923, 2.2068, 2.3607, 2.6064, 4], 1e-4); 525s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 0.5244, 0.8416, 1.2816, Inf, NaN], 1e-4); 525s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.2068, 2.3607, 2.6064, 4, NaN], 1e-4); 525s ***** assert (iqr (pd), 0.8317, 1e-4); 525s ***** assert (iqr (t), 0.4111, 1e-4); 525s ***** assert (mean (pd), 0.7979, 1e-4); 525s ***** assert (mean (t), 2.3706, 1e-4); 525s ***** assert (median (pd), 0.6745, 1e-4); 525s ***** assert (median (t), 2.2771, 1e-4); 525s ***** assert (pdf (pd, [0:5]), [0.7979, 0.4839, 0.1080, 0.0089, 0.0003, 0], 1e-4); 525s ***** assert (pdf (t, [0:5]), [0, 0, 2.3765, 0.1951, 0.0059, 0], 1e-4); 525s ***** assert (pdf (pd, [-1, 1:4, NaN]), [0, 0.4839, 0.1080, 0.0089, 0.0003, NaN], 1e-4); 525s ***** assert (pdf (t, [-1, 1:4, NaN]), [0, 0, 2.3765, 0.1951, 0.0059, NaN], 1e-4); 525s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 525s ***** assert (any (random (t, 1000, 1) < 2), false); 525s ***** assert (any (random (t, 1000, 1) > 4), false); 525s ***** assert (std (pd), 0.6028, 1e-4); 525s ***** assert (std (t), 0.3310, 1e-4); 525s ***** assert (var (pd), 0.3634, 1e-4); 525s ***** assert (var (t), 0.1096, 1e-4); 525s ***** error ... 525s HalfNormalDistribution(Inf, 1) 525s ***** error ... 525s HalfNormalDistribution(i, 1) 525s ***** error ... 525s HalfNormalDistribution("a", 1) 525s ***** error ... 525s HalfNormalDistribution([1, 2], 1) 525s ***** error ... 525s HalfNormalDistribution(NaN, 1) 525s ***** error ... 525s HalfNormalDistribution(1, 0) 525s ***** error ... 525s HalfNormalDistribution(1, -1) 525s ***** error ... 525s HalfNormalDistribution(1, Inf) 525s ***** error ... 525s HalfNormalDistribution(1, i) 525s ***** error ... 525s HalfNormalDistribution(1, "a") 525s ***** error ... 525s HalfNormalDistribution(1, [1, 2]) 525s ***** error ... 525s HalfNormalDistribution(1, NaN) 525s ***** error ... 525s cdf (HalfNormalDistribution, 2, "uper") 525s ***** error ... 525s cdf (HalfNormalDistribution, 2, 3) 525s ***** shared x 525s x = hnrnd (1, 1, [1, 100]); 525s ***** error ... 525s paramci (HalfNormalDistribution.fit (x, 1), "alpha") 525s ***** error ... 525s paramci (HalfNormalDistribution.fit (x, 1), "alpha", 0) 526s ***** error ... 526s paramci (HalfNormalDistribution.fit (x, 1), "alpha", 1) 526s ***** error ... 526s paramci (HalfNormalDistribution.fit (x, 1), "alpha", [0.5 2]) 526s ***** error ... 526s paramci (HalfNormalDistribution.fit (x, 1), "alpha", "") 526s ***** error ... 526s paramci (HalfNormalDistribution.fit (x, 1), "alpha", {0.05}) 526s ***** error ... 526s paramci (HalfNormalDistribution.fit (x, 1), "parameter", "sigma", ... 526s "alpha", {0.05}) 526s ***** error ... 526s paramci (HalfNormalDistribution.fit (x, 1), ... 526s "parameter", {"mu", "sigma", "param"}) 526s ***** error ... 526s paramci (HalfNormalDistribution.fit (x, 1), "alpha", 0.01, ... 526s "parameter", {"mu", "sigma", "param"}) 526s ***** error ... 526s paramci (HalfNormalDistribution.fit (x, 1), "parameter", "param") 526s ***** error ... 526s paramci (HalfNormalDistribution.fit (x, 1), "alpha", 0.01, ... 526s "parameter", "param") 526s ***** error ... 526s paramci (HalfNormalDistribution.fit (x, 1),"NAME", "value") 526s ***** error ... 526s paramci (HalfNormalDistribution.fit (x, 1), "alpha", 0.01, ... 526s "NAME", "value") 526s ***** error ... 526s paramci (HalfNormalDistribution.fit (x, 1), "alpha", 0.01, ... 526s "parameter", "sigma", "NAME", "value") 526s ***** error ... 526s plot (HalfNormalDistribution, "Parent") 526s ***** error ... 526s plot (HalfNormalDistribution, "PlotType", 12) 526s ***** error ... 526s plot (HalfNormalDistribution, "PlotType", {"pdf", "cdf"}) 526s ***** error ... 526s plot (HalfNormalDistribution, "PlotType", "pdfcdf") 526s ***** error ... 526s plot (HalfNormalDistribution, "Discrete", "pdfcdf") 526s ***** error ... 526s plot (HalfNormalDistribution, "Discrete", [1, 0]) 526s ***** error ... 526s plot (HalfNormalDistribution, "Discrete", {true}) 526s ***** error ... 526s plot (HalfNormalDistribution, "Parent", 12) 526s ***** error ... 526s plot (HalfNormalDistribution, "Parent", "hax") 526s ***** error ... 526s plot (HalfNormalDistribution, "invalidNAME", "pdf") 526s ***** error ... 526s plot (HalfNormalDistribution, "PlotType", "probability") 526s ***** error ... 526s proflik (HalfNormalDistribution, 2) 526s ***** error ... 526s proflik (HalfNormalDistribution.fit (x, 1), 3) 526s ***** error ... 526s proflik (HalfNormalDistribution.fit (x, 1), [1, 2]) 526s ***** error ... 526s proflik (HalfNormalDistribution.fit (x, 1), {1}) 526s ***** error ... 526s proflik (HalfNormalDistribution.fit (x, 1), 1) 526s ***** error ... 526s proflik (HalfNormalDistribution.fit (x, 1), 2, ones (2)) 526s ***** error ... 526s proflik (HalfNormalDistribution.fit (x, 1), 2, "Display") 527s ***** error ... 527s proflik (HalfNormalDistribution.fit (x, 1), 2, "Display", 1) 527s ***** error ... 527s proflik (HalfNormalDistribution.fit (x, 1), 2, "Display", {1}) 527s ***** error ... 527s proflik (HalfNormalDistribution.fit (x, 1), 2, "Display", {"on"}) 527s ***** error ... 527s proflik (HalfNormalDistribution.fit (x, 1), 2, "Display", ["on"; "on"]) 527s ***** error ... 527s proflik (HalfNormalDistribution.fit (x, 1), 2, "Display", "onnn") 527s ***** error ... 527s proflik (HalfNormalDistribution.fit (x, 1), 2, "NAME", "on") 527s ***** error ... 527s proflik (HalfNormalDistribution.fit (x, 1), 2, {"NAME"}, "on") 527s ***** error ... 527s proflik (HalfNormalDistribution.fit (x, 1), 2, {[1 2 3 4]}, ... 527s "Display", "on") 527s ***** error ... 527s truncate (HalfNormalDistribution) 527s ***** error ... 527s truncate (HalfNormalDistribution, 2) 527s ***** error ... 527s truncate (HalfNormalDistribution, 4, 2) 527s ***** shared pd 527s pd = HalfNormalDistribution(1, 1); 527s pd(2) = HalfNormalDistribution(1, 3); 527s ***** error cdf (pd, 1) 527s ***** error icdf (pd, 0.5) 527s ***** error iqr (pd) 527s ***** error mean (pd) 527s ***** error median (pd) 527s ***** error negloglik (pd) 527s ***** error paramci (pd) 527s ***** error pdf (pd, 1) 527s ***** error plot (pd) 527s ***** error proflik (pd, 2) 527s ***** error random (pd) 527s ***** error std (pd) 527s ***** error ... 527s truncate (pd, 2, 4) 527s ***** error var (pd) 527s 96 tests, 96 passed, 0 known failure, 0 skipped 527s [inst/dist_obj/InverseGaussianDistribution.m] 527s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_obj/InverseGaussianDistribution.m 527s ***** shared pd, t 527s pd = InverseGaussianDistribution (1, 1); 527s t = truncate (pd, 2, 4); 527s ***** assert (cdf (pd, [0:5]), [0, 0.6681, 0.8855, 0.9532, 0.9791, 0.9901], 1e-4); 527s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.7234, 1, 1], 1e-4); 527s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.8108, 0.8855, 0.9532, 0.9791], 1e-4); 527s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0, 0.7234, 1], 1e-4); 527s ***** assert (icdf (pd, [0:0.2:1]), [0, 0.3320, 0.5411, 0.8483, 1.4479, Inf], 1e-4); 527s ***** assert (icdf (t, [0:0.2:1]), [2, 2.1889, 2.4264, 2.7417, 3.1993, 4], 1e-4); 527s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 0.5411, 0.8483, 1.4479, Inf, NaN], 1e-4); 527s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.4264, 2.7417, 3.1993, 4, NaN], 1e-4); 527s ***** assert (iqr (pd), 0.8643, 1e-4); 527s ***** assert (iqr (t), 0.8222, 1e-4); 527s ***** assert (mean (pd), 1); 527s ***** assert (mean (t), 2.6953, 1e-4); 527s ***** assert (median (pd), 0.6758, 1e-4); 527s ***** assert (median (t), 2.5716, 1e-4); 527s ***** assert (pdf (pd, [0:5]), [0, 0.3989, 0.1098, 0.0394, 0.0162, 0.0072], 1e-4); 527s ***** assert (pdf (t, [0:5]), [0, 0, 1.1736, 0.4211, 0.1730, 0], 1e-4); 527s ***** assert (pdf (pd, [-1, 1:4, NaN]), [0, 0.3989, 0.1098, 0.0394, 0.0162, NaN], 1e-4); 527s ***** assert (pdf (t, [-1, 1:4, NaN]), [0, 0, 1.1736, 0.4211, 0.1730, NaN], 1e-4); 527s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 527s ***** assert (any (random (t, 1000, 1) < 2), false); 527s ***** assert (any (random (t, 1000, 1) > 4), false); 527s ***** assert (std (pd), 1); 527s ***** assert (std (t), 0.5332, 1e-4); 527s ***** assert (var (pd), 1); 527s ***** assert (var (t), 0.2843, 1e-4); 527s ***** error ... 527s InverseGaussianDistribution(0, 1) 527s ***** error ... 527s InverseGaussianDistribution(Inf, 1) 527s ***** error ... 527s InverseGaussianDistribution(i, 1) 527s ***** error ... 527s InverseGaussianDistribution("a", 1) 527s ***** error ... 527s InverseGaussianDistribution([1, 2], 1) 527s ***** error ... 527s InverseGaussianDistribution(NaN, 1) 527s ***** error ... 527s InverseGaussianDistribution(1, 0) 527s ***** error ... 527s InverseGaussianDistribution(1, -1) 527s ***** error ... 527s InverseGaussianDistribution(1, Inf) 527s ***** error ... 527s InverseGaussianDistribution(1, i) 527s ***** error ... 527s InverseGaussianDistribution(1, "a") 527s ***** error ... 527s InverseGaussianDistribution(1, [1, 2]) 527s ***** error ... 527s InverseGaussianDistribution(1, NaN) 527s ***** error ... 527s cdf (InverseGaussianDistribution, 2, "uper") 527s ***** error ... 527s cdf (InverseGaussianDistribution, 2, 3) 527s ***** shared x 527s x = invgrnd (1, 1, [1, 100]); 527s ***** error ... 527s paramci (InverseGaussianDistribution.fit (x), "alpha") 527s ***** error ... 527s paramci (InverseGaussianDistribution.fit (x), "alpha", 0) 527s ***** error ... 527s paramci (InverseGaussianDistribution.fit (x), "alpha", 1) 527s ***** error ... 527s paramci (InverseGaussianDistribution.fit (x), "alpha", [0.5 2]) 527s ***** error ... 527s paramci (InverseGaussianDistribution.fit (x), "alpha", "") 527s ***** error ... 527s paramci (InverseGaussianDistribution.fit (x), "alpha", {0.05}) 527s ***** error ... 527s paramci (InverseGaussianDistribution.fit (x), "parameter", "mu", ... 527s "alpha", {0.05}) 527s ***** error ... 527s paramci (InverseGaussianDistribution.fit (x), ... 527s "parameter", {"mu", "lambda", "param"}) 527s ***** error ... 527s paramci (InverseGaussianDistribution.fit (x), "alpha", 0.01, ... 527s "parameter", {"mu", "lambda", "param"}) 527s ***** error ... 527s paramci (InverseGaussianDistribution.fit (x), "parameter", "param") 528s ***** error ... 528s paramci (InverseGaussianDistribution.fit (x), "alpha", 0.01, ... 528s "parameter", "param") 528s ***** error ... 528s paramci (InverseGaussianDistribution.fit (x), "NAME", "value") 528s ***** error ... 528s paramci (InverseGaussianDistribution.fit (x), "alpha", 0.01, "NAME", "value") 528s ***** error ... 528s paramci (InverseGaussianDistribution.fit (x), "alpha", 0.01, ... 528s "parameter", "mu", "NAME", "value") 528s ***** error ... 528s plot (InverseGaussianDistribution, "Parent") 528s ***** error ... 528s plot (InverseGaussianDistribution, "PlotType", 12) 528s ***** error ... 528s plot (InverseGaussianDistribution, "PlotType", {"pdf", "cdf"}) 528s ***** error ... 528s plot (InverseGaussianDistribution, "PlotType", "pdfcdf") 528s ***** error ... 528s plot (InverseGaussianDistribution, "Discrete", "pdfcdf") 528s ***** error ... 528s plot (InverseGaussianDistribution, "Discrete", [1, 0]) 528s ***** error ... 528s plot (InverseGaussianDistribution, "Discrete", {true}) 528s ***** error ... 528s plot (InverseGaussianDistribution, "Parent", 12) 528s ***** error ... 528s plot (InverseGaussianDistribution, "Parent", "hax") 528s ***** error ... 528s plot (InverseGaussianDistribution, "invalidNAME", "pdf") 528s ***** error ... 528s plot (InverseGaussianDistribution, "PlotType", "probability") 528s ***** error ... 528s proflik (InverseGaussianDistribution, 2) 528s ***** error ... 528s proflik (InverseGaussianDistribution.fit (x), 3) 528s ***** error ... 528s proflik (InverseGaussianDistribution.fit (x), [1, 2]) 528s ***** error ... 528s proflik (InverseGaussianDistribution.fit (x), {1}) 528s ***** error ... 528s proflik (InverseGaussianDistribution.fit (x), 1, ones (2)) 528s ***** error ... 528s proflik (InverseGaussianDistribution.fit (x), 1, "Display") 528s ***** error ... 528s proflik (InverseGaussianDistribution.fit (x), 1, "Display", 1) 528s ***** error ... 528s proflik (InverseGaussianDistribution.fit (x), 1, "Display", {1}) 528s ***** error ... 528s proflik (InverseGaussianDistribution.fit (x), 1, "Display", {"on"}) 528s ***** error ... 528s proflik (InverseGaussianDistribution.fit (x), 1, "Display", ["on"; "on"]) 528s ***** error ... 528s proflik (InverseGaussianDistribution.fit (x), 1, "Display", "onnn") 528s ***** error ... 528s proflik (InverseGaussianDistribution.fit (x), 1, "NAME", "on") 528s ***** error ... 528s proflik (InverseGaussianDistribution.fit (x), 1, {"NAME"}, "on") 528s ***** error ... 528s proflik (InverseGaussianDistribution.fit (x), 1, {[1 2 3]}, "Display", "on") 528s ***** error ... 528s truncate (InverseGaussianDistribution) 528s ***** error ... 528s truncate (InverseGaussianDistribution, 2) 528s ***** error ... 528s truncate (InverseGaussianDistribution, 4, 2) 528s ***** shared pd 528s pd = InverseGaussianDistribution(1, 1); 528s pd(2) = InverseGaussianDistribution(1, 3); 528s ***** error cdf (pd, 1) 528s ***** error icdf (pd, 0.5) 528s ***** error iqr (pd) 528s ***** error mean (pd) 528s ***** error median (pd) 528s ***** error negloglik (pd) 528s ***** error paramci (pd) 528s ***** error pdf (pd, 1) 528s ***** error plot (pd) 528s ***** error proflik (pd, 2) 528s ***** error random (pd) 528s ***** error std (pd) 528s ***** error ... 528s truncate (pd, 2, 4) 528s ***** error var (pd) 528s 96 tests, 96 passed, 0 known failure, 0 skipped 528s [inst/dist_obj/LogisticDistribution.m] 528s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_obj/LogisticDistribution.m 528s ***** shared pd, t 528s pd = LogisticDistribution (0, 1); 528s t = truncate (pd, 2, 4); 528s ***** assert (cdf (pd, [0:5]), [0.5, 0.7311, 0.8808, 0.9526, 0.9820, 0.9933], 1e-4); 528s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.7091, 1, 1], 1e-4); 528s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.8176, 0.8808, 0.9526, 0.9820], 1e-4); 528s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0, 0.7091, 1], 1e-4); 528s ***** assert (icdf (pd, [0:0.2:1]), [-Inf, -1.3863, -0.4055, 0.4055, 1.3863, Inf], 1e-4); 528s ***** assert (icdf (t, [0:0.2:1]), [2, 2.2088, 2.4599, 2.7789, 3.2252, 4], 1e-4); 528s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, -0.4055, 0.4055, 1.3863, Inf, NaN], 1e-4); 528s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.4599, 2.7789, 3.2252, 4, NaN], 1e-4); 528s ***** assert (iqr (pd), 2.1972, 1e-4); 528s ***** assert (iqr (t), 0.8286, 1e-4); 528s ***** assert (mean (pd), 0, 1e-4); 528s ***** assert (mean (t), 2.7193, 1e-4); 528s ***** assert (median (pd), 0); 528s ***** assert (median (t), 2.6085, 1e-4); 528s ***** assert (pdf (pd, [0:5]), [0.25, 0.1966, 0.1050, 0.0452, 0.0177, 0.0066], 1e-4); 528s ***** assert (pdf (t, [0:5]), [0, 0, 1.0373, 0.4463, 0.1745, 0], 1e-4); 528s ***** assert (pdf (pd, [-1, 1:4, NaN]), [0.1966, 0.1966, 0.1050, 0.0452, 0.0177, NaN], 1e-4); 528s ***** assert (pdf (t, [-1, 1:4, NaN]), [0, 0, 1.0373, 0.4463, 0.1745, NaN], 1e-4); 528s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 528s ***** assert (any (random (t, 1000, 1) < 2), false); 528s ***** assert (any (random (t, 1000, 1) > 4), false); 528s ***** assert (std (pd), 1.8138, 1e-4); 528s ***** assert (std (t), 0.5320, 1e-4); 528s ***** assert (var (pd), 3.2899, 1e-4); 528s ***** assert (var (t), 0.2830, 1e-4); 528s ***** error ... 528s LogisticDistribution(Inf, 1) 528s ***** error ... 528s LogisticDistribution(i, 1) 528s ***** error ... 528s LogisticDistribution("a", 1) 528s ***** error ... 528s LogisticDistribution([1, 2], 1) 528s ***** error ... 528s LogisticDistribution(NaN, 1) 528s ***** error ... 528s LogisticDistribution(1, 0) 528s ***** error ... 528s LogisticDistribution(1, -1) 528s ***** error ... 528s LogisticDistribution(1, Inf) 528s ***** error ... 528s LogisticDistribution(1, i) 528s ***** error ... 528s LogisticDistribution(1, "a") 528s ***** error ... 528s LogisticDistribution(1, [1, 2]) 528s ***** error ... 528s LogisticDistribution(1, NaN) 528s ***** error ... 528s cdf (LogisticDistribution, 2, "uper") 528s ***** error ... 528s cdf (LogisticDistribution, 2, 3) 528s ***** shared x 528s x = logirnd (1, 1, [1, 100]); 528s ***** error ... 528s paramci (LogisticDistribution.fit (x), "alpha") 528s ***** error ... 528s paramci (LogisticDistribution.fit (x), "alpha", 0) 528s ***** error ... 528s paramci (LogisticDistribution.fit (x), "alpha", 1) 528s ***** error ... 528s paramci (LogisticDistribution.fit (x), "alpha", [0.5 2]) 528s ***** error ... 528s paramci (LogisticDistribution.fit (x), "alpha", "") 528s ***** error ... 528s paramci (LogisticDistribution.fit (x), "alpha", {0.05}) 529s ***** error ... 529s paramci (LogisticDistribution.fit (x), "parameter", "mu", "alpha", {0.05}) 529s ***** error ... 529s paramci (LogisticDistribution.fit (x), "parameter", {"mu", "sigma", "param"}) 529s ***** error ... 529s paramci (LogisticDistribution.fit (x), "alpha", 0.01, ... 529s "parameter", {"mu", "sigma", "param"}) 529s ***** error ... 529s paramci (LogisticDistribution.fit (x), "parameter", "param") 529s ***** error ... 529s paramci (LogisticDistribution.fit (x), "alpha", 0.01, "parameter", "param") 529s ***** error ... 529s paramci (LogisticDistribution.fit (x), "NAME", "value") 529s ***** error ... 529s paramci (LogisticDistribution.fit (x), "alpha", 0.01, "NAME", "value") 529s ***** error ... 529s paramci (LogisticDistribution.fit (x), "alpha", 0.01, "parameter", "mu", ... 529s "NAME", "value") 529s ***** error ... 529s plot (LogisticDistribution, "Parent") 529s ***** error ... 529s plot (LogisticDistribution, "PlotType", 12) 529s ***** error ... 529s plot (LogisticDistribution, "PlotType", {"pdf", "cdf"}) 529s ***** error ... 529s plot (LogisticDistribution, "PlotType", "pdfcdf") 529s ***** error ... 529s plot (LogisticDistribution, "Discrete", "pdfcdf") 529s ***** error ... 529s plot (LogisticDistribution, "Discrete", [1, 0]) 529s ***** error ... 529s plot (LogisticDistribution, "Discrete", {true}) 529s ***** error ... 529s plot (LogisticDistribution, "Parent", 12) 529s ***** error ... 529s plot (LogisticDistribution, "Parent", "hax") 529s ***** error ... 529s plot (LogisticDistribution, "invalidNAME", "pdf") 529s ***** error ... 529s plot (LogisticDistribution, "PlotType", "probability") 529s ***** error ... 529s proflik (LogisticDistribution, 2) 529s ***** error ... 529s proflik (LogisticDistribution.fit (x), 3) 529s ***** error ... 529s proflik (LogisticDistribution.fit (x), [1, 2]) 529s ***** error ... 529s proflik (LogisticDistribution.fit (x), {1}) 529s ***** error ... 529s proflik (LogisticDistribution.fit (x), 1, ones (2)) 529s ***** error ... 529s proflik (LogisticDistribution.fit (x), 1, "Display") 529s ***** error ... 529s proflik (LogisticDistribution.fit (x), 1, "Display", 1) 529s ***** error ... 529s proflik (LogisticDistribution.fit (x), 1, "Display", {1}) 529s ***** error ... 529s proflik (LogisticDistribution.fit (x), 1, "Display", {"on"}) 530s ***** error ... 530s proflik (LogisticDistribution.fit (x), 1, "Display", ["on"; "on"]) 530s ***** error ... 530s proflik (LogisticDistribution.fit (x), 1, "Display", "onnn") 530s ***** error ... 530s proflik (LogisticDistribution.fit (x), 1, "NAME", "on") 530s ***** error ... 530s proflik (LogisticDistribution.fit (x), 1, {"NAME"}, "on") 530s ***** error ... 530s proflik (LogisticDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 530s ***** error ... 530s truncate (LogisticDistribution) 530s ***** error ... 530s truncate (LogisticDistribution, 2) 530s ***** error ... 530s truncate (LogisticDistribution, 4, 2) 530s ***** shared pd 530s pd = LogisticDistribution(1, 1); 530s pd(2) = LogisticDistribution(1, 3); 530s ***** error cdf (pd, 1) 530s ***** error icdf (pd, 0.5) 530s ***** error iqr (pd) 530s ***** error mean (pd) 530s ***** error median (pd) 530s ***** error negloglik (pd) 530s ***** error paramci (pd) 530s ***** error pdf (pd, 1) 530s ***** error plot (pd) 530s ***** error proflik (pd, 2) 530s ***** error random (pd) 530s ***** error std (pd) 530s ***** error ... 530s truncate (pd, 2, 4) 530s ***** error var (pd) 530s 95 tests, 95 passed, 0 known failure, 0 skipped 530s [inst/dist_obj/LoglogisticDistribution.m] 530s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_obj/LoglogisticDistribution.m 530s ***** demo 530s ## Generate a data set of 5000 random samples from a Log-logistic 530s ## distribution with parameters mu = 0 and sigma = 1. Fit a Log-logistic 530s ## distribution to this data and plot a PDF of the fitted distribution 530s ## superimposed on a histogram of the data. 530s 530s pd_fixed = makedist ("Loglogistic", "mu", 0, "sigma", 1) 530s rand ("seed", 2); 530s data = random (pd_fixed, 5000, 1); 530s pd_fitted = fitdist (data, "Loglogistic") 530s plot (pd_fitted) 530s msg = "Fitted Log-logistic distribution with mu = %0.2f and sigma = %0.2f"; 530s title (sprintf (msg, pd_fitted.mu, pd_fitted.sigma)) 530s ***** shared pd, t 530s pd = LoglogisticDistribution; 530s t = truncate (pd, 2, 4); 530s ***** assert (cdf (pd, [0:5]), [0, 0.5, 0.6667, 0.75, 0.8, 0.8333], 1e-4); 530s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.625, 1, 1], 1e-4); 530s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.6, 0.6667, 0.75, 0.8], 1e-4); 530s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0, 0.625, 1], 1e-4); 530s ***** assert (icdf (pd, [0:0.2:1]), [0, 0.25, 0.6667, 1.5, 4, Inf], 1e-4); 530s ***** assert (icdf (t, [0:0.2:1]), [2, 2.2609, 2.5714, 2.9474, 3.4118, 4], 1e-4); 530s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 0.6667, 1.5, 4, Inf, NaN], 1e-4); 530s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.5714, 2.9474, 3.4118, 4, NaN], 1e-4); 530s ***** assert (iqr (pd), 2.6667, 1e-4); 530s ***** assert (iqr (t), 0.9524, 1e-4); 530s ***** assert (mean (pd), Inf); 530s ***** assert (mean (t), 2.8312, 1e-4); 530s ***** assert (median (pd), 1, 1e-4); 530s ***** assert (median (t), 2.75, 1e-4); 530s ***** assert (pdf (pd, [0:5]), [0, 0.25, 0.1111, 0.0625, 0.04, 0.0278], 1e-4); 530s ***** assert (pdf (t, [0:5]), [0, 0, 0.8333, 0.4687, 0.3, 0], 1e-4); 530s ***** assert (pdf (pd, [-1, 1:4, NaN]), [0, 0.25, 0.1111, 0.0625, 0.04, NaN], 1e-4); 530s ***** assert (pdf (t, [-1, 1:4, NaN]), [0, 0, 0.8333, 0.4687, 0.3, NaN], 1e-4); 530s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 530s ***** assert (any (random (t, 1000, 1) < 2), false); 530s ***** assert (any (random (t, 1000, 1) > 4), false); 530s ***** assert (std (pd), Inf); 530s ***** assert (std (t), 0.5674, 1e-4); 530s ***** assert (var (pd), Inf); 530s ***** assert (var (t), 0.3220, 1e-4); 530s ***** error ... 530s LoglogisticDistribution(Inf, 1) 530s ***** error ... 530s LoglogisticDistribution(i, 1) 530s ***** error ... 530s LoglogisticDistribution("a", 1) 530s ***** error ... 530s LoglogisticDistribution([1, 2], 1) 530s ***** error ... 530s LoglogisticDistribution(NaN, 1) 530s ***** error ... 530s LoglogisticDistribution(1, 0) 530s ***** error ... 530s LoglogisticDistribution(1, -1) 530s ***** error ... 530s LoglogisticDistribution(1, Inf) 530s ***** error ... 530s LoglogisticDistribution(1, i) 530s ***** error ... 530s LoglogisticDistribution(1, "a") 530s ***** error ... 530s LoglogisticDistribution(1, [1, 2]) 530s ***** error ... 530s LoglogisticDistribution(1, NaN) 530s ***** error ... 530s cdf (LoglogisticDistribution, 2, "uper") 530s ***** error ... 530s cdf (LoglogisticDistribution, 2, 3) 530s ***** shared x 530s x = loglrnd (1, 1, [1, 100]); 530s ***** error ... 530s paramci (LoglogisticDistribution.fit (x), "alpha") 530s ***** error ... 530s paramci (LoglogisticDistribution.fit (x), "alpha", 0) 530s ***** error ... 530s paramci (LoglogisticDistribution.fit (x), "alpha", 1) 530s ***** error ... 530s paramci (LoglogisticDistribution.fit (x), "alpha", [0.5 2]) 530s ***** error ... 530s paramci (LoglogisticDistribution.fit (x), "alpha", "") 530s ***** error ... 530s paramci (LoglogisticDistribution.fit (x), "alpha", {0.05}) 530s ***** error ... 530s paramci (LoglogisticDistribution.fit (x), "parameter", "mu", "alpha", {0.05}) 531s ***** error ... 531s paramci (LoglogisticDistribution.fit (x), "parameter", {"mu", "sigma", "pa"}) 531s ***** error ... 531s paramci (LoglogisticDistribution.fit (x), "alpha", 0.01, ... 531s "parameter", {"mu", "sigma", "param"}) 531s ***** error ... 531s paramci (LoglogisticDistribution.fit (x), "parameter", "param") 531s ***** error ... 531s paramci (LoglogisticDistribution.fit (x), "alpha", 0.01, "parameter", "parm") 531s ***** error ... 531s paramci (LoglogisticDistribution.fit (x), "NAME", "value") 531s ***** error ... 531s paramci (LoglogisticDistribution.fit (x), "alpha", 0.01, "NAME", "value") 531s ***** error ... 531s paramci (LoglogisticDistribution.fit (x), "alpha", 0.01, ... 531s "parameter", "mu", "NAME", "value") 531s ***** error ... 531s plot (LoglogisticDistribution, "Parent") 531s ***** error ... 531s plot (LoglogisticDistribution, "PlotType", 12) 531s ***** error ... 531s plot (LoglogisticDistribution, "PlotType", {"pdf", "cdf"}) 531s ***** error ... 531s plot (LoglogisticDistribution, "PlotType", "pdfcdf") 531s ***** error ... 531s plot (LoglogisticDistribution, "Discrete", "pdfcdf") 531s ***** error ... 531s plot (LoglogisticDistribution, "Discrete", [1, 0]) 531s ***** error ... 531s plot (LoglogisticDistribution, "Discrete", {true}) 531s ***** error ... 531s plot (LoglogisticDistribution, "Parent", 12) 531s ***** error ... 531s plot (LoglogisticDistribution, "Parent", "hax") 531s ***** error ... 531s plot (LoglogisticDistribution, "invalidNAME", "pdf") 531s ***** error ... 531s plot (LoglogisticDistribution, "PlotType", "probability") 531s ***** error ... 531s proflik (LoglogisticDistribution, 2) 531s ***** error ... 531s proflik (LoglogisticDistribution.fit (x), 3) 531s ***** error ... 531s proflik (LoglogisticDistribution.fit (x), [1, 2]) 531s ***** error ... 531s proflik (LoglogisticDistribution.fit (x), {1}) 531s ***** error ... 531s proflik (LoglogisticDistribution.fit (x), 1, ones (2)) 531s ***** error ... 531s proflik (LoglogisticDistribution.fit (x), 1, "Display") 531s ***** error ... 531s proflik (LoglogisticDistribution.fit (x), 1, "Display", 1) 531s ***** error ... 531s proflik (LoglogisticDistribution.fit (x), 1, "Display", {1}) 531s ***** error ... 531s proflik (LoglogisticDistribution.fit (x), 1, "Display", {"on"}) 532s ***** error ... 532s proflik (LoglogisticDistribution.fit (x), 1, "Display", ["on"; "on"]) 532s ***** error ... 532s proflik (LoglogisticDistribution.fit (x), 1, "Display", "onnn") 532s ***** error ... 532s proflik (LoglogisticDistribution.fit (x), 1, "NAME", "on") 532s ***** error ... 532s proflik (LoglogisticDistribution.fit (x), 1, {"NAME"}, "on") 532s ***** error ... 532s proflik (LoglogisticDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 532s ***** error ... 532s truncate (LoglogisticDistribution) 532s ***** error ... 532s truncate (LoglogisticDistribution, 2) 532s ***** error ... 532s truncate (LoglogisticDistribution, 4, 2) 532s ***** shared pd 532s pd = LoglogisticDistribution(1, 1); 532s pd(2) = LoglogisticDistribution(1, 3); 532s ***** error cdf (pd, 1) 532s ***** error icdf (pd, 0.5) 532s ***** error iqr (pd) 532s ***** error mean (pd) 532s ***** error median (pd) 532s ***** error negloglik (pd) 532s ***** error paramci (pd) 532s ***** error pdf (pd, 1) 532s ***** error plot (pd) 532s ***** error proflik (pd, 2) 532s ***** error random (pd) 532s ***** error std (pd) 532s ***** error ... 532s truncate (pd, 2, 4) 532s ***** error var (pd) 532s 95 tests, 95 passed, 0 known failure, 0 skipped 532s [inst/dist_obj/LognormalDistribution.m] 532s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_obj/LognormalDistribution.m 532s ***** demo 532s ## Generate a data set of 5000 random samples from a Lognormal distribution with 532s ## parameters mu = 0 and sigma = 1. Fit a Lognormal distribution to this data and plot 532s ## a PDF of the fitted distribution superimposed on a histogram of the data. 532s 532s pd_fixed = makedist ("Lognormal", "mu", 0, "sigma", 1) 532s randn ("seed", 2); 532s data = random (pd_fixed, 5000, 1); 532s pd_fitted = fitdist (data, "Lognormal") 532s plot (pd_fitted) 532s msg = "Fitted Lognormal distribution with mu = %0.2f and sigma = %0.2f"; 532s title (sprintf (msg, pd_fitted.mu, pd_fitted.sigma)) 532s ***** shared pd, t 532s pd = LognormalDistribution; 532s t = truncate (pd, 2, 4); 532s ***** assert (cdf (pd, [0:5]), [0, 0.5, 0.7559, 0.8640, 0.9172, 0.9462], 1e-4); 532s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.6705, 1, 1], 1e-4); 532s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.6574, 0.7559, 0.8640, 0.9172], 1e-4); 532s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0, 0.6705, 1], 1e-4); 532s ***** assert (icdf (pd, [0:0.2:1]), [0, 0.4310, 0.7762, 1.2883, 2.3201, Inf], 1e-4); 532s ***** assert (icdf (t, [0:0.2:1]), [2, 2.2256, 2.5015, 2.8517, 3.3199, 4], 1e-4); 532s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 0.7762, 1.2883, 2.3201, Inf, NaN], 1e-4); 532s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.5015, 2.8517, 3.3199, 4, NaN], 1e-4); 532s ***** assert (iqr (pd), 1.4536, 1e-4); 532s ***** assert (iqr (t), 0.8989, 1e-4); 532s ***** assert (mean (pd), 1.6487, 1e-4); 532s ***** assert (mean (t), 2.7692, 1e-4); 532s ***** assert (median (pd), 1, 1e-4); 532s ***** assert (median (t), 2.6653, 1e-4); 532s ***** assert (pdf (pd, [0:5]), [0, 0.3989, 0.1569, 0.0727, 0.0382, 0.0219], 1e-4); 532s ***** assert (pdf (t, [0:5]), [0, 0, 0.9727, 0.4509, 0.2366, 0], 1e-4); 532s ***** assert (pdf (pd, [-1, 1:4, NaN]), [0, 0.3989, 0.1569, 0.0727, 0.0382, NaN], 1e-4); 532s ***** assert (pdf (t, [-1, 1:4, NaN]), [0, 0, 0.9727, 0.4509, 0.2366, NaN], 1e-4); 532s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 532s ***** assert (any (random (t, 1000, 1) < 2), false); 532s ***** assert (any (random (t, 1000, 1) > 4), false); 532s ***** assert (std (pd), 2.1612, 1e-4); 532s ***** assert (std (t), 0.5540, 1e-4); 532s ***** assert (var (pd), 4.6708, 1e-4); 532s ***** assert (var (t), 0.3069, 1e-4); 532s ***** error ... 532s LognormalDistribution(Inf, 1) 532s ***** error ... 532s LognormalDistribution(i, 1) 532s ***** error ... 532s LognormalDistribution("a", 1) 532s ***** error ... 532s LognormalDistribution([1, 2], 1) 532s ***** error ... 532s LognormalDistribution(NaN, 1) 532s ***** error ... 532s LognormalDistribution(1, 0) 532s ***** error ... 532s LognormalDistribution(1, -1) 532s ***** error ... 532s LognormalDistribution(1, Inf) 532s ***** error ... 532s LognormalDistribution(1, i) 532s ***** error ... 532s LognormalDistribution(1, "a") 532s ***** error ... 532s LognormalDistribution(1, [1, 2]) 532s ***** error ... 532s LognormalDistribution(1, NaN) 532s ***** error ... 532s cdf (LognormalDistribution, 2, "uper") 532s ***** error ... 532s cdf (LognormalDistribution, 2, 3) 532s ***** shared x 532s randn ("seed", 1); 532s x = lognrnd (1, 1, [1, 100]); 532s ***** error ... 532s paramci (LognormalDistribution.fit (x), "alpha") 532s ***** error ... 532s paramci (LognormalDistribution.fit (x), "alpha", 0) 532s ***** error ... 532s paramci (LognormalDistribution.fit (x), "alpha", 1) 532s ***** error ... 532s paramci (LognormalDistribution.fit (x), "alpha", [0.5 2]) 533s ***** error ... 533s paramci (LognormalDistribution.fit (x), "alpha", "") 533s ***** error ... 533s paramci (LognormalDistribution.fit (x), "alpha", {0.05}) 533s ***** error ... 533s paramci (LognormalDistribution.fit (x), "parameter", "mu", "alpha", {0.05}) 533s ***** error ... 533s paramci (LognormalDistribution.fit (x), "parameter", {"mu", "sigma", "parm"}) 533s ***** error ... 533s paramci (LognormalDistribution.fit (x), "alpha", 0.01, ... 533s "parameter", {"mu", "sigma", "param"}) 533s ***** error ... 533s paramci (LognormalDistribution.fit (x), "parameter", "param") 533s ***** error ... 533s paramci (LognormalDistribution.fit (x), "alpha", 0.01, "parameter", "param") 533s ***** error ... 533s paramci (LognormalDistribution.fit (x), "NAME", "value") 533s ***** error ... 533s paramci (LognormalDistribution.fit (x), "alpha", 0.01, "NAME", "value") 533s ***** error ... 533s paramci (LognormalDistribution.fit (x), "alpha", 0.01, "parameter", "mu", ... 533s "NAME", "value") 534s ***** error ... 534s plot (LognormalDistribution, "Parent") 534s ***** error ... 534s plot (LognormalDistribution, "PlotType", 12) 534s ***** error ... 534s plot (LognormalDistribution, "PlotType", {"pdf", "cdf"}) 534s ***** error ... 534s plot (LognormalDistribution, "PlotType", "pdfcdf") 534s ***** error ... 534s plot (LognormalDistribution, "Discrete", "pdfcdf") 534s ***** error ... 534s plot (LognormalDistribution, "Discrete", [1, 0]) 534s ***** error ... 534s plot (LognormalDistribution, "Discrete", {true}) 534s ***** error ... 534s plot (LognormalDistribution, "Parent", 12) 534s ***** error ... 534s plot (LognormalDistribution, "Parent", "hax") 534s ***** error ... 534s plot (LognormalDistribution, "invalidNAME", "pdf") 534s ***** error ... 534s plot (LognormalDistribution, "PlotType", "probability") 534s ***** error ... 534s proflik (LognormalDistribution, 2) 534s ***** error ... 534s proflik (LognormalDistribution.fit (x), 3) 534s ***** error ... 534s proflik (LognormalDistribution.fit (x), [1, 2]) 534s ***** error ... 534s proflik (LognormalDistribution.fit (x), {1}) 534s ***** error ... 534s proflik (LognormalDistribution.fit (x), 1, ones (2)) 534s ***** error ... 534s proflik (LognormalDistribution.fit (x), 1, "Display") 534s ***** error ... 534s proflik (LognormalDistribution.fit (x), 1, "Display", 1) 534s ***** error ... 534s proflik (LognormalDistribution.fit (x), 1, "Display", {1}) 534s ***** error ... 534s proflik (LognormalDistribution.fit (x), 1, "Display", {"on"}) 534s ***** error ... 534s proflik (LognormalDistribution.fit (x), 1, "Display", ["on"; "on"]) 535s ***** error ... 535s proflik (LognormalDistribution.fit (x), 1, "Display", "onnn") 535s ***** error ... 535s proflik (LognormalDistribution.fit (x), 1, "NAME", "on") 535s ***** error ... 535s proflik (LognormalDistribution.fit (x), 1, {"NAME"}, "on") 535s ***** error ... 535s proflik (LognormalDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 535s ***** error ... 535s truncate (LognormalDistribution) 535s ***** error ... 535s truncate (LognormalDistribution, 2) 535s ***** error ... 535s truncate (LognormalDistribution, 4, 2) 535s ***** shared pd 535s pd = LognormalDistribution(1, 1); 535s pd(2) = LognormalDistribution(1, 3); 535s ***** error cdf (pd, 1) 535s ***** error icdf (pd, 0.5) 535s ***** error iqr (pd) 535s ***** error mean (pd) 535s ***** error median (pd) 535s ***** error negloglik (pd) 535s ***** error paramci (pd) 535s ***** error pdf (pd, 1) 535s ***** error plot (pd) 535s ***** error proflik (pd, 2) 535s ***** error random (pd) 535s ***** error std (pd) 535s ***** error ... 535s truncate (pd, 2, 4) 535s ***** error var (pd) 535s 95 tests, 95 passed, 0 known failure, 0 skipped 535s [inst/dist_obj/LoguniformDistribution.m] 535s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_obj/LoguniformDistribution.m 535s ***** demo 535s ## Generate a data set of 5000 random samples from a Log-uniform distribution with 535s ## parameters Lower = 1 and Upper = 10. Plot a PDF of the distribution superimposed 535s ## on a histogram of the data. 535s 535s pd_fixed = makedist ("Loguniform", "Lower", 1, "Upper", 10); 535s rand ("seed", 2); 535s data = random (pd_fixed, 5000, 1); 535s plot (pd_fixed) 535s hold on 535s hist (data, 50) 535s hold off 535s msg = "Log-uniform distribution with Lower = %0.2f and Upper = %0.2f"; 535s title (sprintf (msg, pd_fixed.Lower, pd_fixed.Upper)) 535s ***** shared pd, t 535s pd = LoguniformDistribution (1, 4); 535s t = truncate (pd, 2, 4); 535s ***** assert (cdf (pd, [0, 1, 2, 3, 4, 5]), [0, 0, 0.5, 0.7925, 1, 1], 1e-4); 535s ***** assert (cdf (t, [0, 1, 2, 3, 4, 5]), [0, 0, 0, 0.5850, 1, 1], 1e-4); 535s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.2925, 0.5, 0.7925, 1], 1e-4); 535s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0, 0.5850, 1], 1e-4); 535s ***** assert (icdf (pd, [0:0.2:1]), [1, 1.3195, 1.7411, 2.2974, 3.0314, 4], 1e-4); 535s ***** assert (icdf (t, [0:0.2:1]), [2, 2.2974, 2.6390, 3.0314, 3.4822, 4], 1e-4); 535s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 1.7411, 2.2974, 3.0314, 4, NaN], 1e-4); 535s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.6390, 3.0314, 3.4822, 4, NaN], 1e-4); 535s ***** assert (iqr (pd), 1.4142, 1e-4); 535s ***** assert (iqr (t), 0.9852, 1e-4); 535s ***** assert (mean (pd), 2.1640, 1e-4); 535s ***** assert (mean (t), 2.8854, 1e-4); 535s ***** assert (median (pd), 2); 535s ***** assert (median (t), 2.8284, 1e-4); 535s ***** assert (pdf (pd, [0, 1, 2, 3, 4, 5]), [0, 0.7213, 0.3607, 0.2404, 0.1803, 0], 1e-4); 535s ***** assert (pdf (t, [0, 1, 2, 3, 4, 5]), [0, 0, 0.7213, 0.4809, 0.3607, 0], 1e-4); 535s ***** assert (pdf (pd, [-1, 1, 2, 3, 4, NaN]), [0, 0.7213, 0.3607, 0.2404, 0.1803, NaN], 1e-4); 535s ***** assert (pdf (t, [-1, 1, 2, 3, 4, NaN]), [0, 0, 0.7213, 0.4809, 0.3607, NaN], 1e-4); 535s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 535s ***** assert (any (random (pd, 1000, 1) < 1), false); 535s ***** assert (any (random (pd, 1000, 1) > 4), false); 535s ***** assert (any (random (t, 1000, 1) < 2), false); 535s ***** assert (any (random (t, 1000, 1) > 4), false); 535s ***** assert (std (pd), 0.8527, 1e-4); 535s ***** assert (std (t), 0.5751, 1e-4); 535s ***** assert (var (pd), 0.7270, 1e-4); 535s ***** assert (var (t), 0.3307, 1e-4); 535s ***** error ... 535s LoguniformDistribution (i, 1) 535s ***** error ... 535s LoguniformDistribution (Inf, 1) 535s ***** error ... 535s LoguniformDistribution ([1, 2], 1) 535s ***** error ... 535s LoguniformDistribution ("a", 1) 535s ***** error ... 535s LoguniformDistribution (NaN, 1) 535s ***** error ... 535s LoguniformDistribution (1, i) 535s ***** error ... 535s LoguniformDistribution (1, Inf) 535s ***** error ... 535s LoguniformDistribution (1, [1, 2]) 535s ***** error ... 535s LoguniformDistribution (1, "a") 535s ***** error ... 535s LoguniformDistribution (1, NaN) 535s ***** error ... 535s LoguniformDistribution (2, 1) 535s ***** error ... 535s cdf (LoguniformDistribution, 2, "uper") 535s ***** error ... 535s cdf (LoguniformDistribution, 2, 3) 535s ***** error ... 535s plot (LoguniformDistribution, "Parent") 535s ***** error ... 535s plot (LoguniformDistribution, "PlotType", 12) 535s ***** error ... 535s plot (LoguniformDistribution, "PlotType", {"pdf", "cdf"}) 535s ***** error ... 535s plot (LoguniformDistribution, "PlotType", "pdfcdf") 535s ***** error ... 535s plot (LoguniformDistribution, "Discrete", "pdfcdf") 535s ***** error ... 535s plot (LoguniformDistribution, "Discrete", [1, 0]) 535s ***** error ... 535s plot (LoguniformDistribution, "Discrete", {true}) 535s ***** error ... 535s plot (LoguniformDistribution, "Parent", 12) 535s ***** error ... 535s plot (LoguniformDistribution, "Parent", "hax") 535s ***** error ... 535s plot (LoguniformDistribution, "invalidNAME", "pdf") 535s ***** error ... 535s plot (LoguniformDistribution, "PlotType", "probability") 535s ***** error ... 535s truncate (LoguniformDistribution) 535s ***** error ... 535s truncate (LoguniformDistribution, 2) 535s ***** error ... 535s truncate (LoguniformDistribution, 4, 2) 535s ***** shared pd 535s pd = LoguniformDistribution(1, 4); 535s pd(2) = LoguniformDistribution(2, 5); 535s ***** error cdf (pd, 1) 535s ***** error icdf (pd, 0.5) 535s ***** error iqr (pd) 535s ***** error mean (pd) 535s ***** error median (pd) 535s ***** error pdf (pd, 1) 535s ***** error plot (pd) 535s ***** error random (pd) 535s ***** error std (pd) 535s ***** error ... 535s truncate (pd, 2, 4) 535s ***** error var (pd) 535s 65 tests, 65 passed, 0 known failure, 0 skipped 535s [inst/dist_obj/MultinomialDistribution.m] 535s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_obj/MultinomialDistribution.m 535s ***** demo 535s ## Generate a data set of 5000 random samples from a Multinomial distribution 535s ## with parameters Probabilities = [0.1, 0.2, 0.3, 0.2, 0.1, 0.1]. Create 535s ## the distribution and plot the PDF superimposed on a histogram of the data. 535s 535s probs = [0.1, 0.2, 0.3, 0.2, 0.1, 0.1]; 535s pd = makedist ("Multinomial", "Probabilities", probs); 535s rand ("seed", 2); 535s data = random (pd, 5000, 1); 535s hist (data, length (probs)); 535s hold on 535s x = 1:length (probs); 535s y = pdf (pd, x) * 5000; 535s stem (x, y, "r", "LineWidth", 2); 535s hold off 535s msg = "Multinomial distribution with Probabilities = [%s]"; 535s probs_str = num2str (probs, "%0.1f "); 535s title (sprintf (msg, probs_str)) 535s ***** shared pd, t 535s pd = MultinomialDistribution ([0.1, 0.2, 0.3, 0.2, 0.1, 0.1]); 535s t = truncate (pd, 2, 4); 535s ***** assert (cdf (pd, [2, 3, 4]), [0.3, 0.6, 0.8], eps); 535s ***** assert (cdf (t, [2, 3, 4]), [0.2857, 0.7143, 1], 1e-4); 535s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.1, 0.3, 0.6, 0.8], eps); 535s ***** assert (cdf (pd, [1.5, 2-eps, 3, 4]), [0.1, 0.1, 0.6, 0.8], eps); 535s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0.2857, 0.7143, 1], 1e-4); 535s ***** assert (cdf (t, [1.5, 2-eps, 3, 4]), [0, 0, 0.7143, 1], 1e-4); 535s ***** assert (cdf (pd, [1, 2.5, 4, 6]), [0.1, 0.3, 0.8, 1], eps); 535s ***** assert (icdf (pd, [0, 0.2857, 0.7143, 1]), [1, 2, 4, 6]); 535s ***** assert (icdf (t, [0, 0.2857, 0.7143, 1]), [2, 2, 4, 4]); 535s ***** assert (icdf (t, [0, 0.35, 0.7143, 1]), [2, 3, 4, 4]); 535s ***** assert (icdf (t, [0, 0.35, 0.7143, 1, NaN]), [2, 3, 4, 4, NaN]); 535s ***** assert (icdf (t, [-0.5, 0, 0.35, 0.7143, 1, NaN]), [NaN, 2, 3, 4, 4, NaN]); 535s ***** assert (icdf (pd, [-0.5, 0, 0.35, 0.7143, 1, NaN]), [NaN, 1, 3, 4, 6, NaN]); 535s ***** assert (iqr (pd), 2); 535s ***** assert (iqr (t), 2); 535s ***** assert (mean (pd), 3.3, 1e-14); 535s ***** assert (mean (t), 3, eps); 535s ***** assert (median (pd), 3); 535s ***** assert (median (t), 3); 535s ***** assert (pdf (pd, [-5, 1, 2.5, 4, 6, NaN, 9]), [0, 0.1, 0, 0.2, 0.1, NaN, 0]); 535s ***** assert (pdf (pd, [-5, 1, 2, 3, 4, 6, NaN, 9]), ... 535s [0, 0.1, 0.2, 0.3, 0.2, 0.1, NaN, 0]); 536s ***** assert (pdf (t, [-5, 1, 2, 3, 4, 6, NaN, 0]), ... 536s [0, 0, 0.2857, 0.4286, 0.2857, 0, NaN, 0], 1e-4); 536s ***** assert (pdf (t, [-5, 1, 2, 4, 6, NaN, 0]), ... 536s [0, 0, 0.2857, 0.2857, 0, NaN, 0], 1e-4); 536s ***** assert (unique (random (pd, 1000, 5)), [1, 2, 3, 4, 5, 6]'); 536s ***** assert (unique (random (t, 1000, 5)), [2, 3, 4]'); 536s ***** assert (std (pd), 1.4177, 1e-4); 536s ***** assert (std (t), 0.7559, 1e-4); 536s ***** assert (var (pd), 2.0100, 1e-4); 536s ***** assert (var (t), 0.5714, 1e-4); 536s ***** error ... 536s MultinomialDistribution(0) 536s ***** error ... 536s MultinomialDistribution(-1) 536s ***** error ... 536s MultinomialDistribution(Inf) 536s ***** error ... 536s MultinomialDistribution(i) 536s ***** error ... 536s MultinomialDistribution("a") 536s ***** error ... 536s MultinomialDistribution([1, 2]) 536s ***** error ... 536s MultinomialDistribution(NaN) 536s ***** error ... 536s cdf (MultinomialDistribution, 2, "uper") 536s ***** error ... 536s cdf (MultinomialDistribution, 2, 3) 536s ***** error ... 536s cdf (MultinomialDistribution, i) 536s ***** error ... 536s plot (MultinomialDistribution, "Parent") 536s ***** error ... 536s plot (MultinomialDistribution, "PlotType", 12) 536s ***** error ... 536s plot (MultinomialDistribution, "PlotType", {"pdf", "cdf"}) 536s ***** error ... 536s plot (MultinomialDistribution, "PlotType", "pdfcdf") 536s ***** error ... 536s plot (MultinomialDistribution, "Discrete", "pdfcdf") 536s ***** error ... 536s plot (MultinomialDistribution, "Discrete", [1, 0]) 536s ***** error ... 536s plot (MultinomialDistribution, "Discrete", {true}) 536s ***** error ... 536s plot (MultinomialDistribution, "Parent", 12) 536s ***** error ... 536s plot (MultinomialDistribution, "Parent", "hax") 536s ***** error ... 536s plot (MultinomialDistribution, "invalidNAME", "pdf") 536s ***** error ... 536s plot (MultinomialDistribution, "PlotType", "probability") 536s ***** error ... 536s truncate (MultinomialDistribution) 536s ***** error ... 536s truncate (MultinomialDistribution, 2) 536s ***** error ... 536s truncate (MultinomialDistribution, 4, 2) 536s ***** shared pd 536s pd = MultinomialDistribution([0.1, 0.2, 0.3, 0.4]); 536s pd(2) = MultinomialDistribution([0.1, 0.2, 0.3, 0.4]); 536s ***** error cdf (pd, 1) 536s ***** error icdf (pd, 0.5) 536s ***** error iqr (pd) 536s ***** error mean (pd) 536s ***** error median (pd) 536s ***** error pdf (pd, 1) 536s ***** error plot (pd) 536s ***** error random (pd) 536s ***** error std (pd) 536s ***** error ... 536s truncate (pd, 2, 4) 536s ***** error var (pd) 536s 64 tests, 64 passed, 0 known failure, 0 skipped 536s [inst/dist_obj/NakagamiDistribution.m] 536s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_obj/NakagamiDistribution.m 536s ***** demo 536s ## Generate a data set of 5000 random samples from a Nakagami distribution with 536s ## parameters mu = 1 and omega = 1. Fit a Nakagami distribution to this data and plot 536s ## a PDF of the fitted distribution superimposed on a histogram of the data. 536s 536s pd_fixed = makedist ("Nakagami", "mu", 1, "omega", 1) 536s rand ("seed", 2); 536s data = random (pd_fixed, 5000, 1); 536s pd_fitted = fitdist (data, "Nakagami") 536s plot (pd_fitted) 536s msg = "Fitted Nakagami distribution with mu = %0.2f and omega = %0.2f"; 536s title (sprintf (msg, pd_fitted.mu, pd_fitted.omega)) 536s ***** shared pd, t 536s pd = NakagamiDistribution; 536s t = truncate (pd, 2, 4); 536s ***** assert (cdf (pd, [0:5]), [0, 0.6321, 0.9817, 0.9999, 1, 1], 1e-4); 536s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.9933, 1, 1], 1e-4); 536s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.8946, 0.9817, 0.9999, 1], 1e-4); 536s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0, 0.9933, 1], 1e-4); 536s ***** assert (icdf (pd, [0:0.2:1]), [0, 0.4724, 0.7147, 0.9572, 1.2686, Inf], 1e-4); 536s ***** assert (icdf (t, [0:0.2:1]), [2, 2.0550, 2.1239, 2.2173, 2.3684, 4], 1e-4); 536s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 0.7147, 0.9572, 1.2686, Inf, NaN], 1e-4); 536s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.1239, 2.2173, 2.3684, 4, NaN], 1e-4); 536s ***** assert (iqr (pd), 0.6411, 1e-4); 536s ***** assert (iqr (t), 0.2502, 1e-4); 536s ***** assert (mean (pd), 0.8862, 1e-4); 536s ***** assert (mean (t), 2.2263, 1e-4); 536s ***** assert (median (pd), 0.8326, 1e-4); 536s ***** assert (median (t), 2.1664, 1e-4); 536s ***** assert (pdf (pd, [0:5]), [0, 0.7358, 0.0733, 0.0007, 0, 0], 1e-4); 536s ***** assert (pdf (t, [0:5]), [0, 0, 4, 0.0404, 0, 0], 1e-4); 536s ***** assert (pdf (pd, [-1, 1:4, NaN]), [0, 0.7358, 0.0733, 0.0007, 0, NaN], 1e-4); 536s ***** assert (pdf (t, [-1, 1:4, NaN]), [0, 0, 4, 0.0404, 0, NaN], 1e-4); 536s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 536s ***** assert (any (random (t, 1000, 1) < 2), false); 536s ***** assert (any (random (t, 1000, 1) > 4), false); 536s ***** assert (std (pd), 0.4633, 1e-4); 536s ***** assert (std (t), 0.2083, 1e-4); 536s ***** assert (var (pd), 0.2146, 1e-4); 536s ***** assert (var (t), 0.0434, 1e-4); 536s ***** error ... 536s NakagamiDistribution(Inf, 1) 536s ***** error ... 536s NakagamiDistribution(i, 1) 536s ***** error ... 536s NakagamiDistribution("a", 1) 536s ***** error ... 536s NakagamiDistribution([1, 2], 1) 536s ***** error ... 536s NakagamiDistribution(NaN, 1) 536s ***** error ... 536s NakagamiDistribution(1, 0) 536s ***** error ... 536s NakagamiDistribution(1, -1) 536s ***** error ... 536s NakagamiDistribution(1, Inf) 536s ***** error ... 536s NakagamiDistribution(1, i) 536s ***** error ... 536s NakagamiDistribution(1, "a") 536s ***** error ... 536s NakagamiDistribution(1, [1, 2]) 536s ***** error ... 536s NakagamiDistribution(1, NaN) 536s ***** error ... 536s cdf (NakagamiDistribution, 2, "uper") 536s ***** error ... 536s cdf (NakagamiDistribution, 2, 3) 536s ***** shared x 536s x = nakarnd (1, 0.5, [1, 100]); 536s ***** error ... 536s paramci (NakagamiDistribution.fit (x), "alpha") 536s ***** error ... 536s paramci (NakagamiDistribution.fit (x), "alpha", 0) 536s ***** error ... 536s paramci (NakagamiDistribution.fit (x), "alpha", 1) 536s ***** error ... 536s paramci (NakagamiDistribution.fit (x), "alpha", [0.5 2]) 536s ***** error ... 536s paramci (NakagamiDistribution.fit (x), "alpha", "") 536s ***** error ... 536s paramci (NakagamiDistribution.fit (x), "alpha", {0.05}) 536s ***** error ... 536s paramci (NakagamiDistribution.fit (x), "parameter", "mu", "alpha", {0.05}) 536s ***** error ... 536s paramci (NakagamiDistribution.fit (x), "parameter", {"mu", "omega", "param"}) 536s ***** error ... 536s paramci (NakagamiDistribution.fit (x), "alpha", 0.01, ... 536s "parameter", {"mu", "omega", "param"}) 536s ***** error ... 536s paramci (NakagamiDistribution.fit (x), "parameter", "param") 536s ***** error ... 536s paramci (NakagamiDistribution.fit (x), "alpha", 0.01, "parameter", "param") 536s ***** error ... 536s paramci (NakagamiDistribution.fit (x), "NAME", "value") 536s ***** error ... 536s paramci (NakagamiDistribution.fit (x), "alpha", 0.01, "NAME", "value") 536s ***** error ... 536s paramci (NakagamiDistribution.fit (x), "alpha", 0.01, "parameter", "mu", ... 536s "NAME", "value") 536s ***** error ... 536s plot (NakagamiDistribution, "Parent") 536s ***** error ... 536s plot (NakagamiDistribution, "PlotType", 12) 536s ***** error ... 536s plot (NakagamiDistribution, "PlotType", {"pdf", "cdf"}) 536s ***** error ... 536s plot (NakagamiDistribution, "PlotType", "pdfcdf") 536s ***** error ... 536s plot (NakagamiDistribution, "Discrete", "pdfcdf") 536s ***** error ... 536s plot (NakagamiDistribution, "Discrete", [1, 0]) 536s ***** error ... 536s plot (NakagamiDistribution, "Discrete", {true}) 536s ***** error ... 536s plot (NakagamiDistribution, "Parent", 12) 536s ***** error ... 536s plot (NakagamiDistribution, "Parent", "hax") 536s ***** error ... 536s plot (NakagamiDistribution, "invalidNAME", "pdf") 536s ***** error ... 536s plot (NakagamiDistribution, "PlotType", "probability") 536s ***** error ... 536s proflik (NakagamiDistribution, 2) 536s ***** error ... 536s proflik (NakagamiDistribution.fit (x), 3) 536s ***** error ... 536s proflik (NakagamiDistribution.fit (x), [1, 2]) 536s ***** error ... 536s proflik (NakagamiDistribution.fit (x), {1}) 537s ***** error ... 537s proflik (NakagamiDistribution.fit (x), 1, ones (2)) 537s ***** error ... 537s proflik (NakagamiDistribution.fit (x), 1, "Display") 537s ***** error ... 537s proflik (NakagamiDistribution.fit (x), 1, "Display", 1) 537s ***** error ... 537s proflik (NakagamiDistribution.fit (x), 1, "Display", {1}) 537s ***** error ... 537s proflik (NakagamiDistribution.fit (x), 1, "Display", {"on"}) 537s ***** error ... 537s proflik (NakagamiDistribution.fit (x), 1, "Display", ["on"; "on"]) 537s ***** error ... 537s proflik (NakagamiDistribution.fit (x), 1, "Display", "onnn") 537s ***** error ... 537s proflik (NakagamiDistribution.fit (x), 1, "NAME", "on") 537s ***** error ... 537s proflik (NakagamiDistribution.fit (x), 1, {"NAME"}, "on") 537s ***** error ... 537s proflik (NakagamiDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 537s ***** error ... 537s truncate (NakagamiDistribution) 537s ***** error ... 537s truncate (NakagamiDistribution, 2) 537s ***** error ... 537s truncate (NakagamiDistribution, 4, 2) 537s ***** shared pd 537s pd = NakagamiDistribution(1, 0.5); 537s pd(2) = NakagamiDistribution(1, 0.6); 537s ***** error cdf (pd, 1) 537s ***** error icdf (pd, 0.5) 537s ***** error iqr (pd) 537s ***** error mean (pd) 537s ***** error median (pd) 537s ***** error negloglik (pd) 537s ***** error paramci (pd) 537s ***** error pdf (pd, 1) 537s ***** error plot (pd) 537s ***** error proflik (pd, 2) 537s ***** error random (pd) 537s ***** error std (pd) 537s ***** error ... 537s truncate (pd, 2, 4) 537s ***** error var (pd) 537s 95 tests, 95 passed, 0 known failure, 0 skipped 537s [inst/dist_obj/NegativeBinomialDistribution.m] 537s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_obj/NegativeBinomialDistribution.m 537s ***** demo 537s ## Generate a data set of 5000 random samples from a Negative Binomial 537s ## distribution with parameters R = 5 and P = 0.5. Fit a Negative Binomial 537s ## distribution to this data and plot a PDF of the fitted distribution 537s ## superimposed on a histogram of the data. 537s 537s pd_fixed = makedist ("NegativeBinomial", "R", 5, "P", 0.5) 537s rand ("seed", 2); 537s data = random (pd_fixed, 5000, 1); 537s pd_fitted = fitdist (data, "NegativeBinomial") 537s plot (pd_fitted) 537s msg = "Fitted Negative Binomial distribution with R = %0.2f and P = %0.2f"; 537s title (sprintf (msg, pd_fitted.R, pd_fitted.P)) 537s ***** shared pd, t, t_inf 537s pd = NegativeBinomialDistribution (5, 0.5); 537s t = truncate (pd, 2, 4); 537s t_inf = truncate (pd, 2, Inf); 537s ***** assert (cdf (pd, [0:5]), [0.0312, 0.1094, 0.2266, 0.3633, 0.5, 0.6230], 1e-4); 537s ***** assert (cdf (t, [0:5]), [0, 0, 0.3, 0.65, 1, 1], 1e-4); 537s ***** assert (cdf (t_inf, [0:5]), [0, 0, 0.1316, 0.2851, 0.4386, 0.5768], 1e-4); 537s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.1094, 0.2266, 0.3633, 0.5000], 1e-4); 537s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0.3, 0.65, 1], 1e-4); 537s ***** assert (icdf (pd, [0:0.2:1]), [0, 2, 4, 5, 7, Inf], 1e-4); 537s ***** assert (icdf (t, [0:0.2:1]), [2, 2, 3, 3, 4, 4], 1e-4); 537s ***** assert (icdf (t_inf, [0:0.2:1]), [2, 3, 4, 6, 8, Inf], 1e-4); 537s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 4, 5, 7, Inf, NaN], 1e-4); 537s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 3, 3, 4, 4, NaN], 1e-4); 537s ***** assert (iqr (pd), 4); 537s ***** assert (iqr (t), 2); 537s ***** assert (mean (pd), 5); 537s ***** assert (mean (t), 3.0500, 1e-4); 537s ***** assert (mean (t_inf), 5.5263, 1e-4); 537s ***** assert (median (pd), 4); 537s ***** assert (median (t), 3); 537s ***** assert (pdf (pd, [0:5]), [0.0312, 0.0781, 0.1172, 0.1367, 0.1367, 0.1230], 1e-4); 537s ***** assert (pdf (t, [0:5]), [0, 0, 0.3, 0.35, 0.35, 0], 1e-4); 537s ***** assert (pdf (t_inf, [0:5]), [0, 0, 0.1316, 0.1535, 0.1535, 0.1382], 1e-4); 537s ***** assert (pdf (pd, [-1, 1:4, NaN]), [0, 0.0781, 0.1172, 0.1367, 0.1367, NaN], 1e-4); 537s ***** assert (pdf (t, [-1, 1:4, NaN]), [0, 0, 0.3, 0.35, 0.35, NaN], 1e-4); 537s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 537s ***** assert (any (random (t, 1000, 1) < 2), false); 537s ***** assert (any (random (t, 1000, 1) > 4), false); 537s ***** assert (std (pd), 3.1623, 1e-4); 537s ***** assert (std (t), 0.8047, 1e-4); 537s ***** assert (std (t_inf), 2.9445, 1e-4); 537s ***** assert (var (pd), 10); 537s ***** assert (var (t), 0.6475, 1e-4); 537s ***** assert (var (t_inf), 8.6704, 1e-4); 537s ***** error ... 537s NegativeBinomialDistribution(Inf, 1) 537s ***** error ... 537s NegativeBinomialDistribution(i, 1) 537s ***** error ... 537s NegativeBinomialDistribution("a", 1) 537s ***** error ... 537s NegativeBinomialDistribution([1, 2], 1) 537s ***** error ... 537s NegativeBinomialDistribution(NaN, 1) 537s ***** error ... 537s NegativeBinomialDistribution(1, 0) 537s ***** error ... 537s NegativeBinomialDistribution(1, -1) 537s ***** error ... 537s NegativeBinomialDistribution(1, Inf) 537s ***** error ... 537s NegativeBinomialDistribution(1, i) 537s ***** error ... 537s NegativeBinomialDistribution(1, "a") 537s ***** error ... 537s NegativeBinomialDistribution(1, [1, 2]) 537s ***** error ... 537s NegativeBinomialDistribution(1, NaN) 537s ***** error ... 537s NegativeBinomialDistribution(1, 1.2) 537s ***** error ... 537s cdf (NegativeBinomialDistribution, 2, "uper") 537s ***** error ... 537s cdf (NegativeBinomialDistribution, 2, 3) 537s ***** shared x 537s x = nbinrnd (1, 0.5, [1, 100]); 537s ***** error ... 537s paramci (NegativeBinomialDistribution.fit (x), "alpha") 537s ***** error ... 537s paramci (NegativeBinomialDistribution.fit (x), "alpha", 0) 537s ***** error ... 537s paramci (NegativeBinomialDistribution.fit (x), "alpha", 1) 537s ***** error ... 537s paramci (NegativeBinomialDistribution.fit (x), "alpha", [0.5 2]) 537s ***** error ... 537s paramci (NegativeBinomialDistribution.fit (x), "alpha", "") 537s ***** error ... 537s paramci (NegativeBinomialDistribution.fit (x), "alpha", {0.05}) 537s ***** error ... 537s paramci (NegativeBinomialDistribution.fit (x), "parameter", "R", ... 537s "alpha", {0.05}) 537s ***** error ... 537s paramci (NegativeBinomialDistribution.fit (x), ... 537s "parameter", {"R", "P", "param"}) 537s ***** error ... 537s paramci (NegativeBinomialDistribution.fit (x), "alpha", 0.01, ... 537s "parameter", {"R", "P", "param"}) 537s ***** error ... 537s paramci (NegativeBinomialDistribution.fit (x), "parameter", "param") 537s ***** error ... 537s paramci (NegativeBinomialDistribution.fit (x), "alpha", 0.01, ... 537s "parameter", "param") 537s ***** error ... 537s paramci (NegativeBinomialDistribution.fit (x), "NAME", "value") 537s ***** error ... 537s paramci (NegativeBinomialDistribution.fit (x), "alpha", 0.01, ... 537s "NAME", "value") 537s ***** error ... 537s paramci (NegativeBinomialDistribution.fit (x), "alpha", 0.01, ... 537s "parameter", "R", "NAME", "value") 537s ***** error ... 537s plot (NegativeBinomialDistribution, "Parent") 537s ***** error ... 537s plot (NegativeBinomialDistribution, "PlotType", 12) 537s ***** error ... 537s plot (NegativeBinomialDistribution, "PlotType", {"pdf", "cdf"}) 537s ***** error ... 537s plot (NegativeBinomialDistribution, "PlotType", "pdfcdf") 537s ***** error ... 537s plot (NegativeBinomialDistribution, "Discrete", "pdfcdf") 537s ***** error ... 537s plot (NegativeBinomialDistribution, "Discrete", [1, 0]) 537s ***** error ... 537s plot (NegativeBinomialDistribution, "Discrete", {true}) 538s ***** error ... 538s plot (NegativeBinomialDistribution, "Parent", 12) 538s ***** error ... 538s plot (NegativeBinomialDistribution, "Parent", "hax") 538s ***** error ... 538s plot (NegativeBinomialDistribution, "invalidNAME", "pdf") 538s ***** error ... 538s plot (NegativeBinomialDistribution, "PlotType", "probability") 538s ***** error ... 538s proflik (NegativeBinomialDistribution, 2) 538s ***** error ... 538s proflik (NegativeBinomialDistribution.fit (x), 3) 538s ***** error ... 538s proflik (NegativeBinomialDistribution.fit (x), [1, 2]) 538s ***** error ... 538s proflik (NegativeBinomialDistribution.fit (x), {1}) 538s ***** error ... 538s proflik (NegativeBinomialDistribution.fit (x), 1, ones (2)) 538s ***** error ... 538s proflik (NegativeBinomialDistribution.fit (x), 1, "Display") 538s ***** error ... 538s proflik (NegativeBinomialDistribution.fit (x), 1, "Display", 1) 538s ***** error ... 538s proflik (NegativeBinomialDistribution.fit (x), 1, "Display", {1}) 538s ***** error ... 538s proflik (NegativeBinomialDistribution.fit (x), 1, "Display", {"on"}) 538s ***** error ... 538s proflik (NegativeBinomialDistribution.fit (x), 1, "Display", ["on"; "on"]) 538s ***** error ... 538s proflik (NegativeBinomialDistribution.fit (x), 1, "Display", "onnn") 538s ***** error ... 538s proflik (NegativeBinomialDistribution.fit (x), 1, "NAME", "on") 538s ***** error ... 538s proflik (NegativeBinomialDistribution.fit (x), 1, {"NAME"}, "on") 538s ***** error ... 538s proflik (NegativeBinomialDistribution.fit (x), 1, {[1 2 3]}, "Display", "on") 538s ***** error ... 538s truncate (NegativeBinomialDistribution) 538s ***** error ... 538s truncate (NegativeBinomialDistribution, 2) 538s ***** error ... 538s truncate (NegativeBinomialDistribution, 4, 2) 538s ***** shared pd 538s pd = NegativeBinomialDistribution(1, 0.5); 538s pd(2) = NegativeBinomialDistribution(1, 0.6); 538s ***** error cdf (pd, 1) 538s ***** error icdf (pd, 0.5) 538s ***** error iqr (pd) 538s ***** error mean (pd) 538s ***** error median (pd) 538s ***** error negloglik (pd) 538s ***** error paramci (pd) 538s ***** error pdf (pd, 1) 538s ***** error plot (pd) 538s ***** error proflik (pd, 2) 538s ***** error random (pd) 538s ***** error std (pd) 538s ***** error ... 538s truncate (pd, 2, 4) 538s ***** error var (pd) 538s 102 tests, 102 passed, 0 known failure, 0 skipped 538s [inst/dist_obj/NormalDistribution.m] 538s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_obj/NormalDistribution.m 538s ***** demo 538s ## Generate a data set of 5000 random samples from a Normal distribution with 538s ## parameters mu = 0 and sigma = 1. Fit a Normal distribution to this data and plot 538s ## a PDF of the fitted distribution superimposed on a histogram of the data. 538s 538s pd_fixed = makedist ("Normal", "mu", 0, "sigma", 1) 538s randn ("seed", 2); 538s data = random (pd_fixed, 5000, 1); 538s pd_fitted = fitdist (data, "Normal") 538s plot (pd_fitted) 538s msg = "Fitted Normal distribution with mu = %0.2f and sigma = %0.2f"; 538s title (sprintf (msg, pd_fitted.mu, pd_fitted.sigma)) 538s ***** shared pd, t 538s pd = NormalDistribution; 538s t = truncate (pd, -2, 2); 538s ***** assert (cdf (pd, [0:5]), [0.5, 0.8413, 0.9772, 0.9987, 1, 1], 1e-4); 538s ***** assert (cdf (t, [0:5]), [0.5, 0.8576, 1, 1, 1, 1], 1e-4); 538s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.9332, 0.9772, 0.9987, 1], 1e-4); 538s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0.9538, 1, 1, 1], 1e-4); 538s ***** assert (icdf (pd, [0:0.2:1]), [-Inf, -0.8416, -0.2533, 0.2533, 0.8416, Inf], 1e-4); 538s ***** assert (icdf (t, [0:0.2:1]), [-2, -0.7938, -0.2416, 0.2416, 0.7938, 2], 1e-4); 538s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, -0.2533, 0.2533, 0.8416, Inf, NaN], 1e-4); 538s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, -0.2416, 0.2416, 0.7938, 2, NaN], 1e-4); 538s ***** assert (iqr (pd), 1.3490, 1e-4); 538s ***** assert (iqr (t), 1.2782, 1e-4); 538s ***** assert (mean (pd), 0); 538s ***** assert (mean (t), 0, 3e-16); 538s ***** assert (median (pd), 0); 538s ***** assert (median (t), 0, 3e-16); 538s ***** assert (pdf (pd, [0:5]), [0.3989, 0.2420, 0.0540, 0.0044, 0.0001, 0], 1e-4); 538s ***** assert (pdf (t, [0:5]), [0.4180, 0.2535, 0.0566, 0, 0, 0], 1e-4); 538s ***** assert (pdf (pd, [-1, 1:4, NaN]), [0.2420, 0.2420, 0.0540, 0.0044, 0.0001, NaN], 1e-4); 538s ***** assert (pdf (t, [-1, 1:4, NaN]), [0.2535, 0.2535, 0.0566, 0, 0, NaN], 1e-4); 538s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 538s ***** assert (any (random (t, 1000, 1) < -2), false); 538s ***** assert (any (random (t, 1000, 1) > 2), false); 538s ***** assert (std (pd), 1); 538s ***** assert (std (t), 0.8796, 1e-4); 538s ***** assert (var (pd), 1); 538s ***** assert (var (t), 0.7737, 1e-4); 538s ***** error ... 538s NormalDistribution(Inf, 1) 538s ***** error ... 538s NormalDistribution(i, 1) 538s ***** error ... 538s NormalDistribution("a", 1) 538s ***** error ... 538s NormalDistribution([1, 2], 1) 538s ***** error ... 538s NormalDistribution(NaN, 1) 538s ***** error ... 538s NormalDistribution(1, 0) 538s ***** error ... 538s NormalDistribution(1, -1) 538s ***** error ... 538s NormalDistribution(1, Inf) 538s ***** error ... 538s NormalDistribution(1, i) 538s ***** error ... 538s NormalDistribution(1, "a") 538s ***** error ... 538s NormalDistribution(1, [1, 2]) 538s ***** error ... 538s NormalDistribution(1, NaN) 538s ***** error ... 538s cdf (NormalDistribution, 2, "uper") 538s ***** error ... 538s cdf (NormalDistribution, 2, 3) 538s ***** shared x 538s x = normrnd (1, 1, [1, 100]); 538s ***** error ... 538s paramci (NormalDistribution.fit (x), "alpha") 538s ***** error ... 538s paramci (NormalDistribution.fit (x), "alpha", 0) 538s ***** error ... 538s paramci (NormalDistribution.fit (x), "alpha", 1) 538s ***** error ... 538s paramci (NormalDistribution.fit (x), "alpha", [0.5 2]) 538s ***** error ... 538s paramci (NormalDistribution.fit (x), "alpha", "") 539s ***** error ... 539s paramci (NormalDistribution.fit (x), "alpha", {0.05}) 539s ***** error ... 539s paramci (NormalDistribution.fit (x), "parameter", "mu", "alpha", {0.05}) 539s ***** error ... 539s paramci (NormalDistribution.fit (x), "parameter", {"mu", "sigma", "param"}) 539s ***** error ... 539s paramci (NormalDistribution.fit (x), "alpha", 0.01, ... 539s "parameter", {"mu", "sigma", "param"}) 539s ***** error ... 539s paramci (NormalDistribution.fit (x), "parameter", "param") 539s ***** error ... 539s paramci (NormalDistribution.fit (x), "alpha", 0.01, "parameter", "param") 539s ***** error ... 539s paramci (NormalDistribution.fit (x), "NAME", "value") 539s ***** error ... 539s paramci (NormalDistribution.fit (x), "alpha", 0.01, "NAME", "value") 539s ***** error ... 539s paramci (NormalDistribution.fit (x), "alpha", 0.01, "parameter", "mu", ... 539s "NAME", "value") 539s ***** error ... 539s plot (NormalDistribution, "Parent") 539s ***** error ... 539s plot (NormalDistribution, "PlotType", 12) 539s ***** error ... 539s plot (NormalDistribution, "PlotType", {"pdf", "cdf"}) 539s ***** error ... 539s plot (NormalDistribution, "PlotType", "pdfcdf") 539s ***** error ... 539s plot (NormalDistribution, "Discrete", "pdfcdf") 539s ***** error ... 539s plot (NormalDistribution, "Discrete", [1, 0]) 539s ***** error ... 539s plot (NormalDistribution, "Discrete", {true}) 539s ***** error ... 539s plot (NormalDistribution, "Parent", 12) 539s ***** error ... 539s plot (NormalDistribution, "Parent", "hax") 539s ***** error ... 539s plot (NormalDistribution, "invalidNAME", "pdf") 540s ***** error ... 540s plot (NormalDistribution, "PlotType", "probability") 540s ***** error ... 540s proflik (NormalDistribution, 2) 540s ***** error ... 540s proflik (NormalDistribution.fit (x), 3) 540s ***** error ... 540s proflik (NormalDistribution.fit (x), [1, 2]) 540s ***** error ... 540s proflik (NormalDistribution.fit (x), {1}) 540s ***** error ... 540s proflik (NormalDistribution.fit (x), 1, ones (2)) 540s ***** error ... 540s proflik (NormalDistribution.fit (x), 1, "Display") 540s ***** error ... 540s proflik (NormalDistribution.fit (x), 1, "Display", 1) 540s ***** error ... 540s proflik (NormalDistribution.fit (x), 1, "Display", {1}) 540s ***** error ... 540s proflik (NormalDistribution.fit (x), 1, "Display", {"on"}) 540s ***** error ... 540s proflik (NormalDistribution.fit (x), 1, "Display", ["on"; "on"]) 540s ***** error ... 540s proflik (NormalDistribution.fit (x), 1, "Display", "onnn") 541s ***** error ... 541s proflik (NormalDistribution.fit (x), 1, "NAME", "on") 541s ***** error ... 541s proflik (NormalDistribution.fit (x), 1, {"NAME"}, "on") 541s ***** error ... 541s proflik (NormalDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 541s ***** error ... 541s truncate (NormalDistribution) 541s ***** error ... 541s truncate (NormalDistribution, 2) 541s ***** error ... 541s truncate (NormalDistribution, 4, 2) 541s ***** shared pd 541s pd = NormalDistribution(1, 1); 541s pd(2) = NormalDistribution(1, 3); 541s ***** error cdf (pd, 1) 541s ***** error icdf (pd, 0.5) 541s ***** error iqr (pd) 541s ***** error mean (pd) 541s ***** error median (pd) 541s ***** error negloglik (pd) 541s ***** error paramci (pd) 541s ***** error pdf (pd, 1) 541s ***** error plot (pd) 541s ***** error proflik (pd, 2) 541s ***** error random (pd) 541s ***** error std (pd) 541s ***** error ... 541s truncate (pd, 2, 4) 541s ***** error var (pd) 541s 95 tests, 95 passed, 0 known failure, 0 skipped 541s [inst/dist_obj/PiecewiseLinearDistribution.m] 541s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_obj/PiecewiseLinearDistribution.m 541s ***** demo 541s ## Generate a data set of 5000 random samples from a Beta distribution with 541s ## parameters a = 2 and b = 5 scaled to [0,10]. 541s ## Compute empirical CDF, subsample, create PiecewiseLinearDistribution, 541s ## and plot the PDF superimposed on a histogram of the data. 541s 541s randg ("seed", 2); 541s data = betarnd (2, 5, 5000, 1) * 10; 541s [f, x] = ecdf (data); 541s f = f(1:5:end); 541s x = x(1:5:end); 541s pd = PiecewiseLinearDistribution (x, f); 541s [counts, centers] = hist (data, 50); 541s bin_width = centers(2) - centers(1); 541s bar (centers, counts / (sum (counts) * bin_width), 1); 541s hold on 541s vals = min (data):0.1:max (data); 541s y = pdf (pd, vals); 541s plot (vals, y, "-r", "LineWidth", 2) 541s hold off 541s title ("Piecewise Linear approximation to scaled Beta(2,5) data") 541s legend ("Histogram", "Piecewise PDF") 541s ***** shared pd, t 541s load patients 541s [f, x] = ecdf (Weight); 541s f = f(1:5:end); 541s x = x(1:5:end); 541s pd = PiecewiseLinearDistribution (x, f); 541s t = truncate (pd, 130, 180); 541s ***** assert (cdf (pd, [120, 130, 140, 150, 200]), [0.0767, 0.25, 0.4629, 0.5190, 0.9908], 1e-4); 541s ***** assert (cdf (t, [120, 130, 140, 150, 200]), [0, 0, 0.4274, 0.5403, 1], 1e-4); 541s ***** assert (cdf (pd, [100, 250, NaN]), [0, 1, NaN], 1e-4); 541s ***** assert (cdf (t, [115, 290, NaN]), [0, 1, NaN], 1e-4); 541s ***** assert (icdf (pd, [0:0.2:1]), [111, 127.5, 136.62, 169.67, 182.17, 202], 1e-2); 541s ***** assert (icdf (t, [0:0.2:1]), [130, 134.15, 139.26, 162.5, 173.99, 180], 1e-2); 541s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NA, 136.62, 169.67, 182.17, 202, NA], 1e-2); 541s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NA, 139.26, 162.5, 173.99, 180, NA], 1e-2); 541s ***** assert (iqr (pd), 50.0833, 1e-4); 541s ***** assert (iqr (t), 36.8077, 1e-4); 541s ***** assert (mean (pd), 153.61, 1e-10); 541s ***** assert (mean (t), 152.311, 1e-3); 549s ***** assert (median (pd), 142, 1e-10); 549s ***** assert (median (t), 141.9462, 1e-4); 549s ***** assert (pdf (pd, [120, 130, 140, 150, 200]), [0.0133, 0.0240, 0.0186, 0.0024, 0.0004], 6e-3); 549s ***** assert (pdf (t, [120, 130, 140, 150, 200]), [0, 0.0482, 0.0373, 0.0048, 0], 1e-4); 549s ***** assert (pdf (pd, [100, 250, NaN]), [0, 0, NaN], 1e-4); 549s ***** assert (pdf (t, [100, 250, NaN]), [0, 0, NaN], 1e-4); 549s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 549s ***** assert (any (random (t, 1000, 1) < 130), false); 549s ***** assert (any (random (t, 1000, 1) > 180), false); 549s ***** assert (std (pd), 26.5196, 1e-4); 549s ***** assert (std (t), 18.2941, 1e-4); 564s ***** assert (var (pd), 703.2879, 1e-4); 564s ***** assert (var (t), 334.6757, 1e-4); 579s ***** error ... 579s PiecewiseLinearDistribution ([0, i], [0, 1]) 579s ***** error ... 579s PiecewiseLinearDistribution ([0, Inf], [0, 1]) 579s ***** error ... 579s PiecewiseLinearDistribution (["a", "c"], [0, 1]) 579s ***** error ... 579s PiecewiseLinearDistribution ([NaN, 1], [0, 1]) 579s ***** error ... 579s PiecewiseLinearDistribution ([0, 1], [0, i]) 579s ***** error ... 579s PiecewiseLinearDistribution ([0, 1], [0, Inf]) 579s ***** error ... 579s PiecewiseLinearDistribution ([0, 1], ["a", "c"]) 579s ***** error ... 579s PiecewiseLinearDistribution ([0, 1], [NaN, 1]) 579s ***** error ... 579s PiecewiseLinearDistribution ([0, 1], [0, 0.5, 1]) 579s ***** error ... 579s PiecewiseLinearDistribution ([0], [1]) 579s ***** error ... 579s PiecewiseLinearDistribution ([0, 0.5, 1], [0, 1, 1.5]) 579s ***** error ... 579s cdf (PiecewiseLinearDistribution, 2, "uper") 579s ***** error ... 579s cdf (PiecewiseLinearDistribution, 2, 3) 579s ***** error ... 579s plot (PiecewiseLinearDistribution, "Parent") 579s ***** error ... 579s plot (PiecewiseLinearDistribution, "PlotType", 12) 579s ***** error ... 579s plot (PiecewiseLinearDistribution, "PlotType", {"pdf", "cdf"}) 579s ***** error ... 579s plot (PiecewiseLinearDistribution, "PlotType", "pdfcdf") 579s ***** error ... 579s plot (PiecewiseLinearDistribution, "Discrete", "pdfcdf") 579s ***** error ... 579s plot (PiecewiseLinearDistribution, "Discrete", [1, 0]) 579s ***** error ... 579s plot (PiecewiseLinearDistribution, "Discrete", {true}) 579s ***** error ... 579s plot (PiecewiseLinearDistribution, "Parent", 12) 579s ***** error ... 579s plot (PiecewiseLinearDistribution, "Parent", "hax") 579s ***** error ... 579s plot (PiecewiseLinearDistribution, "invalidNAME", "pdf") 579s ***** error ... 579s plot (PiecewiseLinearDistribution, "PlotType", "probability") 579s ***** error ... 579s truncate (PiecewiseLinearDistribution) 579s ***** error ... 579s truncate (PiecewiseLinearDistribution, 2) 579s ***** error ... 579s truncate (PiecewiseLinearDistribution, 4, 2) 579s ***** shared pd 579s pd = PiecewiseLinearDistribution (); 579s pd(2) = PiecewiseLinearDistribution (); 579s ***** error cdf (pd, 1) 579s ***** error icdf (pd, 0.5) 579s ***** error iqr (pd) 579s ***** error mean (pd) 579s ***** error median (pd) 579s ***** error pdf (pd, 1) 579s ***** error plot (pd) 579s ***** error random (pd) 579s ***** error std (pd) 579s ***** error ... 579s truncate (pd, 2, 4) 579s ***** error var (pd) 579s 63 tests, 63 passed, 0 known failure, 0 skipped 579s [inst/dist_obj/PoissonDistribution.m] 579s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_obj/PoissonDistribution.m 579s ***** demo 579s ## Generate a data set of 5000 random samples from a Poisson distribution with 579s ## parameter lambda = 5. Fit a Poisson distribution to this data and plot 579s ## a PDF of the fitted distribution superimposed on a histogram of the data. 579s 579s pd_fixed = makedist ("Poisson", "lambda", 5) 579s rand ("seed", 2); 579s data = random (pd_fixed, 5000, 1); 579s pd_fitted = fitdist (data, "Poisson") 579s plot (pd_fitted) 579s msg = "Fitted Poisson distribution with lambda = %0.2f"; 579s title (sprintf (msg, pd_fitted.lambda)) 579s ***** shared pd, t, t_inf 579s pd = PoissonDistribution; 579s t = truncate (pd, 2, 4); 579s t_inf = truncate (pd, 2, Inf); 579s ***** assert (cdf (pd, [0:5]), [0.3679, 0.7358, 0.9197, 0.9810, 0.9963, 0.9994], 1e-4); 579s ***** assert (cdf (t, [0:5]), [0, 0, 0.7059, 0.9412, 1, 1], 1e-4); 579s ***** assert (cdf (t_inf, [0:5]), [0, 0, 0.6961, 0.9281, 0.9861, 0.9978], 1e-4); 579s ***** assert (cdf (pd, [1.5, 2, 3, 4]), [0.7358, 0.9197, 0.9810, 0.9963], 1e-4); 579s ***** assert (cdf (t, [1.5, 2, 3, 4]), [0, 0.7059, 0.9412, 1], 1e-4); 579s ***** assert (icdf (pd, [0:0.2:1]), [0, 0, 1, 1, 2, Inf], 1e-4); 579s ***** assert (icdf (t, [0:0.2:1]), [2, 2, 2, 2, 3, 4], 1e-4); 579s ***** assert (icdf (t_inf, [0:0.2:1]), [2, 2, 2, 2, 3, Inf], 1e-4); 579s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 1, 1, 2, Inf, NaN], 1e-4); 579s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2, 2, 3, 4, NaN], 1e-4); 579s ***** assert (iqr (pd), 2); 579s ***** assert (iqr (t), 1); 579s ***** assert (mean (pd), 1); 579s ***** assert (mean (t), 2.3529, 1e-4); 579s ***** assert (mean (t_inf), 2.3922, 1e-4); 579s ***** assert (median (pd), 1); 579s ***** assert (median (t), 2); 579s ***** assert (median (t_inf), 2); 579s ***** assert (pdf (pd, [0:5]), [0.3679, 0.3679, 0.1839, 0.0613, 0.0153, 0.0031], 1e-4); 579s ***** assert (pdf (t, [0:5]), [0, 0, 0.7059, 0.2353, 0.0588, 0], 1e-4); 579s ***** assert (pdf (t_inf, [0:5]), [0, 0, 0.6961, 0.2320, 0.0580, 0.0116], 1e-4); 579s ***** assert (pdf (pd, [-1, 1:4, NaN]), [0, 0.3679, 0.1839, 0.0613, 0.0153, NaN], 1e-4); 579s ***** assert (pdf (t, [-1, 1:4, NaN]), [0, 0, 0.7059, 0.2353, 0.0588, NaN], 1e-4); 579s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 579s ***** assert (any (random (t, 1000, 1) < 2), false); 579s ***** assert (any (random (t, 1000, 1) > 4), false); 579s ***** assert (std (pd), 1); 579s ***** assert (std (t), 0.5882, 1e-4); 579s ***** assert (std (t_inf), 0.6738, 1e-4); 579s ***** assert (var (pd), 1); 579s ***** assert (var (t), 0.3460, 1e-4); 579s ***** assert (var (t_inf), 0.4540, 1e-4); 579s ***** error ... 579s PoissonDistribution(0) 579s ***** error ... 579s PoissonDistribution(-1) 579s ***** error ... 579s PoissonDistribution(Inf) 579s ***** error ... 579s PoissonDistribution(i) 579s ***** error ... 579s PoissonDistribution("a") 579s ***** error ... 579s PoissonDistribution([1, 2]) 579s ***** error ... 579s PoissonDistribution(NaN) 579s ***** error ... 579s cdf (PoissonDistribution, 2, "uper") 579s ***** error ... 579s cdf (PoissonDistribution, 2, 3) 579s ***** shared x 579s x = poissrnd (1, [1, 100]); 579s ***** error ... 579s paramci (PoissonDistribution.fit (x), "alpha") 579s ***** error ... 579s paramci (PoissonDistribution.fit (x), "alpha", 0) 579s ***** error ... 579s paramci (PoissonDistribution.fit (x), "alpha", 1) 579s ***** error ... 579s paramci (PoissonDistribution.fit (x), "alpha", [0.5 2]) 579s ***** error ... 579s paramci (PoissonDistribution.fit (x), "alpha", "") 579s ***** error ... 579s paramci (PoissonDistribution.fit (x), "alpha", {0.05}) 579s ***** error ... 579s paramci (PoissonDistribution.fit (x), "parameter", "lambda", "alpha", {0.05}) 579s ***** error ... 579s paramci (PoissonDistribution.fit (x), "parameter", {"lambda", "param"}) 579s ***** error ... 579s paramci (PoissonDistribution.fit (x), "alpha", 0.01, ... 579s "parameter", {"lambda", "param"}) 579s ***** error ... 579s paramci (PoissonDistribution.fit (x), "parameter", "param") 579s ***** error ... 579s paramci (PoissonDistribution.fit (x), "alpha", 0.01, "parameter", "param") 579s ***** error ... 579s paramci (PoissonDistribution.fit (x), "NAME", "value") 579s ***** error ... 579s paramci (PoissonDistribution.fit (x), "alpha", 0.01, "NAME", "value") 579s ***** error ... 579s paramci (PoissonDistribution.fit (x), "alpha", 0.01, ... 579s "parameter", "lambda", "NAME", "value") 579s ***** error ... 579s plot (PoissonDistribution, "Parent") 579s ***** error ... 579s plot (PoissonDistribution, "PlotType", 12) 579s ***** error ... 579s plot (PoissonDistribution, "PlotType", {"pdf", "cdf"}) 579s ***** error ... 579s plot (PoissonDistribution, "PlotType", "pdfcdf") 579s ***** error ... 579s plot (PoissonDistribution, "Discrete", "pdfcdf") 579s ***** error ... 579s plot (PoissonDistribution, "Discrete", [1, 0]) 579s ***** error ... 579s plot (PoissonDistribution, "Discrete", {true}) 579s ***** error ... 579s plot (PoissonDistribution, "Parent", 12) 579s ***** error ... 579s plot (PoissonDistribution, "Parent", "hax") 579s ***** error ... 579s plot (PoissonDistribution, "invalidNAME", "pdf") 579s ***** error ... 579s plot (PoissonDistribution, "PlotType", "probability") 579s ***** error ... 579s proflik (PoissonDistribution, 2) 579s ***** error ... 579s proflik (PoissonDistribution.fit (x), 3) 579s ***** error ... 579s proflik (PoissonDistribution.fit (x), [1, 2]) 579s ***** error ... 579s proflik (PoissonDistribution.fit (x), {1}) 580s ***** error ... 580s proflik (PoissonDistribution.fit (x), 1, ones (2)) 580s ***** error ... 580s proflik (PoissonDistribution.fit (x), 1, "Display") 580s ***** error ... 580s proflik (PoissonDistribution.fit (x), 1, "Display", 1) 580s ***** error ... 580s proflik (PoissonDistribution.fit (x), 1, "Display", {1}) 580s ***** error ... 580s proflik (PoissonDistribution.fit (x), 1, "Display", {"on"}) 580s ***** error ... 580s proflik (PoissonDistribution.fit (x), 1, "Display", ["on"; "on"]) 580s ***** error ... 580s proflik (PoissonDistribution.fit (x), 1, "Display", "onnn") 580s ***** error ... 580s proflik (PoissonDistribution.fit (x), 1, "NAME", "on") 580s ***** error ... 580s proflik (PoissonDistribution.fit (x), 1, {"NAME"}, "on") 580s ***** error ... 580s proflik (PoissonDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 580s ***** error ... 580s truncate (PoissonDistribution) 580s ***** error ... 580s truncate (PoissonDistribution, 2) 580s ***** error ... 580s truncate (PoissonDistribution, 4, 2) 580s ***** shared pd 580s pd = PoissonDistribution(1); 580s pd(2) = PoissonDistribution(3); 580s ***** error cdf (pd, 1) 580s ***** error icdf (pd, 0.5) 580s ***** error iqr (pd) 580s ***** error mean (pd) 580s ***** error median (pd) 580s ***** error negloglik (pd) 580s ***** error paramci (pd) 580s ***** error pdf (pd, 1) 580s ***** error plot (pd) 580s ***** error proflik (pd, 2) 580s ***** error random (pd) 580s ***** error std (pd) 580s ***** error ... 580s truncate (pd, 2, 4) 580s ***** error var (pd) 580s 97 tests, 97 passed, 0 known failure, 0 skipped 580s [inst/dist_obj/RayleighDistribution.m] 580s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_obj/RayleighDistribution.m 580s ***** demo 580s ## Generate a data set of 5000 random samples from a Rayleigh distribution with 580s ## parameter sigma = 2. Fit a Rayleigh distribution to this data and plot 580s ## a PDF of the fitted distribution superimposed on a histogram of the data. 580s 580s pd_fixed = makedist ("Rayleigh", "sigma", 2) 580s rand ("seed", 2); 580s data = random (pd_fixed, 5000, 1); 580s pd_fitted = fitdist (data, "Rayleigh") 580s plot (pd_fitted) 580s msg = "Fitted Rayleigh distribution with sigma = %0.2f"; 580s title (sprintf (msg, pd_fitted.sigma)) 580s ***** shared pd, t 580s pd = RayleighDistribution; 580s t = truncate (pd, 2, 4); 580s ***** assert (cdf (pd, [0:5]), [0, 0.3935, 0.8647, 0.9889, 0.9997, 1], 1e-4); 580s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.9202, 1, 1], 1e-4); 580s ***** assert (cdf (pd, [1.5, 2, 3, 4, NaN]), [0.6753, 0.8647, 0.9889, 0.9997, NaN], 1e-4); 580s ***** assert (cdf (t, [1.5, 2, 3, 4, NaN]), [0, 0, 0.9202, 1, NaN], 1e-4); 580s ***** assert (icdf (pd, [0:0.2:1]), [0, 0.6680, 1.0108, 1.3537, 1.7941, Inf], 1e-4); 580s ***** assert (icdf (t, [0:0.2:1]), [2, 2.1083, 2.2402, 2.4135, 2.6831, 4], 1e-4); 580s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 1.0108, 1.3537, 1.7941, Inf, NaN], 1e-4); 580s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.2402, 2.4135, 2.6831, 4, NaN], 1e-4); 580s ***** assert (iqr (pd), 0.9066, 1e-4); 580s ***** assert (iqr (t), 0.4609, 1e-4); 580s ***** assert (mean (pd), 1.2533, 1e-4); 580s ***** assert (mean (t), 2.4169, 1e-4); 580s ***** assert (median (pd), 1.1774, 1e-4); 580s ***** assert (median (t), 2.3198, 1e-4); 580s ***** assert (pdf (pd, [0:5]), [0, 0.6065, 0.2707, 0.0333, 0.0013, 0], 1e-4); 580s ***** assert (pdf (t, [0:5]), [0, 0, 2.0050, 0.2469, 0.0099, 0], 1e-4); 580s ***** assert (pdf (pd, [-1, 1.5, NaN]), [0, 0.4870, NaN], 1e-4); 580s ***** assert (pdf (t, [-1, 1.5, NaN]), [0, 0, NaN], 1e-4); 580s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 580s ***** assert (any (random (t, 1000, 1) < 2), false); 580s ***** assert (any (random (t, 1000, 1) > 4), false); 580s ***** assert (std (pd), 0.6551, 1e-4); 580s ***** assert (std (t), 0.3591, 1e-4); 580s ***** assert (var (pd), 0.4292, 1e-4); 580s ***** assert (var (t), 0.1290, 1e-4); 580s ***** error ... 580s RayleighDistribution(0) 580s ***** error ... 580s RayleighDistribution(-1) 580s ***** error ... 580s RayleighDistribution(Inf) 580s ***** error ... 580s RayleighDistribution(i) 580s ***** error ... 580s RayleighDistribution("a") 580s ***** error ... 580s RayleighDistribution([1, 2]) 580s ***** error ... 580s RayleighDistribution(NaN) 580s ***** error ... 580s cdf (RayleighDistribution, 2, "uper") 580s ***** error ... 580s cdf (RayleighDistribution, 2, 3) 580s ***** shared x 580s x = raylrnd (1, [1, 100]); 580s ***** error ... 580s paramci (RayleighDistribution.fit (x), "alpha") 580s ***** error ... 580s paramci (RayleighDistribution.fit (x), "alpha", 0) 580s ***** error ... 580s paramci (RayleighDistribution.fit (x), "alpha", 1) 580s ***** error ... 580s paramci (RayleighDistribution.fit (x), "alpha", [0.5 2]) 580s ***** error ... 580s paramci (RayleighDistribution.fit (x), "alpha", "") 580s ***** error ... 580s paramci (RayleighDistribution.fit (x), "alpha", {0.05}) 580s ***** error ... 580s paramci (RayleighDistribution.fit (x), "parameter", "sigma", "alpha", {0.05}) 580s ***** error ... 580s paramci (RayleighDistribution.fit (x), "parameter", {"sigma", "param"}) 580s ***** error ... 580s paramci (RayleighDistribution.fit (x), "alpha", 0.01, ... 580s "parameter", {"sigma", "param"}) 580s ***** error ... 580s paramci (RayleighDistribution.fit (x), "parameter", "param") 580s ***** error ... 580s paramci (RayleighDistribution.fit (x), "alpha", 0.01, "parameter", "param") 580s ***** error ... 580s paramci (RayleighDistribution.fit (x), "NAME", "value") 580s ***** error ... 580s paramci (RayleighDistribution.fit (x), "alpha", 0.01, "NAME", "value") 580s ***** error ... 580s paramci (RayleighDistribution.fit (x), "alpha", 0.01, ... 580s "parameter", "sigma", "NAME", "value") 580s ***** error ... 580s plot (RayleighDistribution, "Parent") 580s ***** error ... 580s plot (RayleighDistribution, "PlotType", 12) 580s ***** error ... 580s plot (RayleighDistribution, "PlotType", {"pdf", "cdf"}) 580s ***** error ... 580s plot (RayleighDistribution, "PlotType", "pdfcdf") 580s ***** error ... 580s plot (RayleighDistribution, "Discrete", "pdfcdf") 580s ***** error ... 580s plot (RayleighDistribution, "Discrete", [1, 0]) 580s ***** error ... 580s plot (RayleighDistribution, "Discrete", {true}) 580s ***** error ... 580s plot (RayleighDistribution, "Parent", 12) 580s ***** error ... 580s plot (RayleighDistribution, "Parent", "hax") 580s ***** error ... 580s plot (RayleighDistribution, "invalidNAME", "pdf") 580s ***** error ... 580s plot (RayleighDistribution, "PlotType", "probability") 580s ***** error ... 580s proflik (RayleighDistribution, 2) 580s ***** error ... 580s proflik (RayleighDistribution.fit (x), 3) 580s ***** error ... 580s proflik (RayleighDistribution.fit (x), [1, 2]) 580s ***** error ... 580s proflik (RayleighDistribution.fit (x), {1}) 580s ***** error ... 580s proflik (RayleighDistribution.fit (x), 1, ones (2)) 580s ***** error ... 580s proflik (RayleighDistribution.fit (x), 1, "Display") 580s ***** error ... 580s proflik (RayleighDistribution.fit (x), 1, "Display", 1) 580s ***** error ... 580s proflik (RayleighDistribution.fit (x), 1, "Display", {1}) 580s ***** error ... 580s proflik (RayleighDistribution.fit (x), 1, "Display", {"on"}) 581s ***** error ... 581s proflik (RayleighDistribution.fit (x), 1, "Display", ["on"; "on"]) 581s ***** error ... 581s proflik (RayleighDistribution.fit (x), 1, "Display", "onnn") 581s ***** error ... 581s proflik (RayleighDistribution.fit (x), 1, "NAME", "on") 581s ***** error ... 581s proflik (RayleighDistribution.fit (x), 1, {"NAME"}, "on") 581s ***** error ... 581s proflik (RayleighDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 581s ***** error ... 581s truncate (RayleighDistribution) 581s ***** error ... 581s truncate (RayleighDistribution, 2) 581s ***** error ... 581s truncate (RayleighDistribution, 4, 2) 581s ***** shared pd 581s pd = RayleighDistribution(1); 581s pd(2) = RayleighDistribution(3); 581s ***** error cdf (pd, 1) 581s ***** error icdf (pd, 0.5) 581s ***** error iqr (pd) 581s ***** error mean (pd) 581s ***** error median (pd) 581s ***** error negloglik (pd) 581s ***** error paramci (pd) 581s ***** error pdf (pd, 1) 581s ***** error plot (pd) 581s ***** error proflik (pd, 2) 581s ***** error random (pd) 581s ***** error std (pd) 581s ***** error ... 581s truncate (pd, 2, 4) 581s ***** error var (pd) 581s 90 tests, 90 passed, 0 known failure, 0 skipped 581s [inst/dist_obj/RicianDistribution.m] 581s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_obj/RicianDistribution.m 581s ***** demo 581s ## Generate a data set of 5000 random samples from a Rician distribution with 581s ## parameters s = 2 and sigma = 1. Fit a Rician distribution to this data and 581s ## plot a PDF of the fitted distribution superimposed on a histogram of the data. 581s 581s pd_fixed = makedist ("Rician", "s", 2, "sigma", 1) 581s rand ("seed", 2); 581s data = random (pd_fixed, 5000, 1); 581s pd_fitted = fitdist (data, "Rician") 581s plot (pd_fitted) 581s msg = "Fitted Rician distribution with s = %0.2f and sigma = %0.2f"; 581s title (sprintf (msg, pd_fitted.s, pd_fitted.sigma)) 581s ***** shared pd, t 581s pd = RicianDistribution; 581s t = truncate (pd, 2, 4); 581s ***** assert (cdf (pd, [0:5]), [0, 0.2671, 0.7310, 0.9563, 0.9971, 0.9999], 1e-4); 581s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.8466, 1, 1], 1e-4); 581s ***** assert (cdf (pd, [1.5, 2, 3, 4, NaN]), [0.5120, 0.7310, 0.9563, 0.9971, NaN], 1e-4); 581s ***** assert (cdf (t, [1.5, 2, 3, 4, NaN]), [0, 0, 0.8466, 1, NaN], 1e-4); 581s ***** assert (icdf (pd, [0:0.2:1]), [0, 0.8501, 1.2736, 1.6863, 2.2011, Inf], 1e-4); 581s ***** assert (icdf (t, [0:0.2:1]), [2, 2.1517, 2.3296, 2.5545, 2.8868, 4], 1e-4); 581s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 1.2736, 1.6863, 2.2011, Inf, NaN], 1e-4); 581s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.3296, 2.5545, 2.8868, 4, NaN], 1e-4); 581s ***** assert (iqr (pd), 1.0890, 1e-4); 581s ***** assert (iqr (t), 0.5928, 1e-4); 581s ***** assert (mean (pd), 1.5486, 1e-4); 581s ***** assert (mean (t), 2.5380, 1e-4); 581s ***** assert (median (pd), 1.4755, 1e-4); 582s ***** assert (median (t), 2.4341, 1e-4); 582s ***** assert (pdf (pd, [0:5]), [0, 0.4658, 0.3742, 0.0987, 0.0092, 0.0003], 1e-4); 582s ***** assert (pdf (t, [0:5]), [0, 0, 1.4063, 0.3707, 0.0346, 0], 1e-4); 582s ***** assert (pdf (pd, [-1, 1.5, NaN]), [0, 0.4864, NaN], 1e-4); 582s ***** assert (pdf (t, [-1, 1.5, NaN]), [0, 0, NaN], 1e-4); 582s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 582s ***** assert (any (random (t, 1000, 1) < 2), false); 582s ***** assert (any (random (t, 1000, 1) > 4), false); 582s ***** assert (std (pd), 0.7758, 1e-4); 582s ***** assert (std (t), 0.4294, 1e-4); 582s ***** assert (var (pd), 0.6019, 1e-4); 582s ***** assert (var (t), 0.1844, 1e-4); 582s ***** error ... 582s RicianDistribution(-eps, 1) 582s ***** error ... 582s RicianDistribution(-1, 1) 582s ***** error ... 582s RicianDistribution(Inf, 1) 582s ***** error ... 582s RicianDistribution(i, 1) 582s ***** error ... 582s RicianDistribution("a", 1) 582s ***** error ... 582s RicianDistribution([1, 2], 1) 582s ***** error ... 582s RicianDistribution(NaN, 1) 582s ***** error ... 582s RicianDistribution(1, 0) 582s ***** error ... 582s RicianDistribution(1, -1) 582s ***** error ... 582s RicianDistribution(1, Inf) 582s ***** error ... 582s RicianDistribution(1, i) 582s ***** error ... 582s RicianDistribution(1, "a") 582s ***** error ... 582s RicianDistribution(1, [1, 2]) 582s ***** error ... 582s RicianDistribution(1, NaN) 582s ***** error ... 582s cdf (RicianDistribution, 2, "uper") 582s ***** error ... 582s cdf (RicianDistribution, 2, 3) 582s ***** shared x 582s x = gevrnd (1, 1, 1, [1, 100]); 582s ***** error ... 582s paramci (RicianDistribution.fit (x), "alpha") 582s ***** error ... 582s paramci (RicianDistribution.fit (x), "alpha", 0) 582s ***** error ... 582s paramci (RicianDistribution.fit (x), "alpha", 1) 582s ***** error ... 582s paramci (RicianDistribution.fit (x), "alpha", [0.5 2]) 582s ***** error ... 582s paramci (RicianDistribution.fit (x), "alpha", "") 582s ***** error ... 582s paramci (RicianDistribution.fit (x), "alpha", {0.05}) 582s ***** error ... 582s paramci (RicianDistribution.fit (x), "parameter", "s", "alpha", {0.05}) 582s ***** error ... 582s paramci (RicianDistribution.fit (x), "parameter", {"s", "sigma", "param"}) 582s ***** error ... 582s paramci (RicianDistribution.fit (x), "alpha", 0.01, ... 582s "parameter", {"s", "sigma", "param"}) 583s ***** error ... 583s paramci (RicianDistribution.fit (x), "parameter", "param") 583s ***** error ... 583s paramci (RicianDistribution.fit (x), "alpha", 0.01, "parameter", "param") 583s ***** error ... 583s paramci (RicianDistribution.fit (x), "NAME", "value") 583s ***** error ... 583s paramci (RicianDistribution.fit (x), "alpha", 0.01, "NAME", "value") 583s ***** error ... 583s paramci (RicianDistribution.fit (x), "alpha", 0.01, "parameter", "s", ... 583s "NAME", "value") 583s ***** error ... 583s plot (RicianDistribution, "Parent") 583s ***** error ... 583s plot (RicianDistribution, "PlotType", 12) 583s ***** error ... 583s plot (RicianDistribution, "PlotType", {"pdf", "cdf"}) 583s ***** error ... 583s plot (RicianDistribution, "PlotType", "pdfcdf") 583s ***** error ... 583s plot (RicianDistribution, "Discrete", "pdfcdf") 583s ***** error ... 583s plot (RicianDistribution, "Discrete", [1, 0]) 583s ***** error ... 583s plot (RicianDistribution, "Discrete", {true}) 583s ***** error ... 583s plot (RicianDistribution, "Parent", 12) 583s ***** error ... 583s plot (RicianDistribution, "Parent", "hax") 583s ***** error ... 583s plot (RicianDistribution, "invalidNAME", "pdf") 583s ***** error ... 583s plot (RicianDistribution, "PlotType", "probability") 583s ***** error ... 583s proflik (RicianDistribution, 2) 583s ***** error ... 583s proflik (RicianDistribution.fit (x), 3) 583s ***** error ... 583s proflik (RicianDistribution.fit (x), [1, 2]) 583s ***** error ... 583s proflik (RicianDistribution.fit (x), {1}) 583s ***** error ... 583s proflik (RicianDistribution.fit (x), 1, ones (2)) 583s ***** error ... 583s proflik (RicianDistribution.fit (x), 1, "Display") 583s ***** error ... 583s proflik (RicianDistribution.fit (x), 1, "Display", 1) 584s ***** error ... 584s proflik (RicianDistribution.fit (x), 1, "Display", {1}) 584s ***** error ... 584s proflik (RicianDistribution.fit (x), 1, "Display", {"on"}) 584s ***** error ... 584s proflik (RicianDistribution.fit (x), 1, "Display", ["on"; "on"]) 584s ***** error ... 584s proflik (RicianDistribution.fit (x), 1, "Display", "onnn") 584s ***** error ... 584s proflik (RicianDistribution.fit (x), 1, "NAME", "on") 584s ***** error ... 584s proflik (RicianDistribution.fit (x), 1, {"NAME"}, "on") 584s ***** error ... 584s proflik (RicianDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 584s ***** error ... 584s truncate (RicianDistribution) 584s ***** error ... 584s truncate (RicianDistribution, 2) 584s ***** error ... 584s truncate (RicianDistribution, 4, 2) 584s ***** shared pd 584s pd = RicianDistribution(1, 1); 584s pd(2) = RicianDistribution(1, 3); 584s ***** error cdf (pd, 1) 584s ***** error icdf (pd, 0.5) 584s ***** error iqr (pd) 584s ***** error mean (pd) 584s ***** error median (pd) 584s ***** error negloglik (pd) 584s ***** error paramci (pd) 584s ***** error pdf (pd, 1) 584s ***** error plot (pd) 584s ***** error proflik (pd, 2) 584s ***** error random (pd) 584s ***** error std (pd) 584s ***** error ... 584s truncate (pd, 2, 4) 584s ***** error var (pd) 584s 97 tests, 97 passed, 0 known failure, 0 skipped 584s [inst/dist_obj/TriangularDistribution.m] 584s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_obj/TriangularDistribution.m 584s ***** demo 584s ## Generate a data set of 5000 random samples from a Triangular distribution 584s ## with parameters A = 0, B = 1, C = 2. Fit a Triangular distribution to 584s ## this data and plot a PDF of the fitted distribution superimposed on a 584s ## histogram of the data. 584s 584s pd_fixed = makedist ("Triangular", "A", 0, "B", 1, "C", 2); 584s rand ("seed", 2); 584s data = random (pd_fixed, 5000, 1); 584s A = min (data); 584s C = mean (data); 584s B = max (data); 584s 584s [counts, centers] = hist (data, 50); 584s bin_width = centers(2) - centers(1); 584s normalized_counts = counts / (sum (counts) * bin_width); 584s bar (centers, normalized_counts, 1); 584s hold on; 584s 584s x = linspace (A, B, 100); 584s y = (2 * (x - A) / (C - A) .* (x <= C)) + (2 * (B - x) / (B - C) .* (x > C)); 584s 584s plot (x, y, 'r-', 'LineWidth', 2); 584s 584s msg = sprintf ("Fitted Triangular distribution with A = %0.2f, C = %0.2f, B = %0.2f", A, C, B); 584s title (msg); 584s 584s hold off; 584s ***** shared pd, t 584s pd = TriangularDistribution (0, 3, 5); 584s t = truncate (pd, 2, 4); 584s ***** assert (cdf (pd, [0:5]), [0, 0.0667, 0.2667, 0.6000, 0.9000, 1], 1e-4); 584s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.5263, 1, 1], 1e-4); 584s ***** assert (cdf (pd, [1.5, 2, 3, 4, NaN]), [0.1500, 0.2667, 0.6, 0.9, NaN], 1e-4); 584s ***** assert (cdf (t, [1.5, 2, 3, 4, NaN]), [0, 0, 0.5263, 1, NaN], 1e-4); 584s ***** assert (icdf (pd, [0:0.2:1]), [0, 1.7321, 2.4495, 3, 3.5858, 5], 1e-4); 584s ***** assert (icdf (t, [0:0.2:1]), [2, 2.4290, 2.7928, 3.1203, 3.4945, 4], 1e-4); 584s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 2.4495, 3, 3.5858, 5, NaN], 1e-4); 584s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.7928, 3.1203, 3.4945, 4, NaN], 1e-4); 584s ***** assert (iqr (pd), 1.4824, 1e-4); 584s ***** assert (iqr (t), 0.8678, 1e-4); 584s ***** assert (mean (pd), 2.6667, 1e-4); 584s ***** assert (mean (t), 2.9649, 1e-4); 584s ***** assert (median (pd), 2.7386, 1e-4); 584s ***** assert (median (t), 2.9580, 1e-4); 584s ***** assert (pdf (pd, [0:5]), [0, 0.1333, 0.2667, 0.4, 0.2, 0], 1e-4); 584s ***** assert (pdf (t, [0:5]), [0, 0, 0.4211, 0.6316, 0.3158, 0], 1e-4); 584s ***** assert (pdf (pd, [-1, 1.5, NaN]), [0, 0.2, NaN], 1e-4); 584s ***** assert (pdf (t, [-1, 1.5, NaN]), [0, 0, NaN], 1e-4); 584s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 584s ***** assert (any (random (t, 1000, 1) < 2), false); 584s ***** assert (any (random (t, 1000, 1) > 4), false); 584s ***** assert (std (pd), 1.0274, 1e-4); 584s ***** assert (std (t), 0.5369, 1e-4); 584s ***** assert (var (pd), 1.0556, 1e-4); 584s ***** assert (var (t), 0.2882, 1e-4); 584s ***** error ... 584s TriangularDistribution (i, 1, 2) 585s ***** error ... 585s TriangularDistribution (Inf, 1, 2) 585s ***** error ... 585s TriangularDistribution ([1, 2], 1, 2) 585s ***** error ... 585s TriangularDistribution ("a", 1, 2) 585s ***** error ... 585s TriangularDistribution (NaN, 1, 2) 585s ***** error ... 585s TriangularDistribution (1, i, 2) 585s ***** error ... 585s TriangularDistribution (1, Inf, 2) 585s ***** error ... 585s TriangularDistribution (1, [1, 2], 2) 585s ***** error ... 585s TriangularDistribution (1, "a", 2) 585s ***** error ... 585s TriangularDistribution (1, NaN, 2) 585s ***** error ... 585s TriangularDistribution (1, 2, i) 585s ***** error ... 585s TriangularDistribution (1, 2, Inf) 585s ***** error ... 585s TriangularDistribution (1, 2, [1, 2]) 585s ***** error ... 585s TriangularDistribution (1, 2, "a") 585s ***** error ... 585s TriangularDistribution (1, 2, NaN) 585s ***** error ... 585s TriangularDistribution (1, 1, 1) 585s ***** error ... 585s TriangularDistribution (1, 0.5, 2) 585s ***** error ... 585s cdf (TriangularDistribution, 2, "uper") 585s ***** error ... 585s cdf (TriangularDistribution, 2, 3) 585s ***** error ... 585s plot (TriangularDistribution, "Parent") 585s ***** error ... 585s plot (TriangularDistribution, "PlotType", 12) 585s ***** error ... 585s plot (TriangularDistribution, "PlotType", {"pdf", "cdf"}) 585s ***** error ... 585s plot (TriangularDistribution, "PlotType", "pdfcdf") 585s ***** error ... 585s plot (TriangularDistribution, "Discrete", "pdfcdf") 585s ***** error ... 585s plot (TriangularDistribution, "Discrete", [1, 0]) 585s ***** error ... 585s plot (TriangularDistribution, "Discrete", {true}) 585s ***** error ... 585s plot (TriangularDistribution, "Parent", 12) 585s ***** error ... 585s plot (TriangularDistribution, "Parent", "hax") 585s ***** error ... 585s plot (TriangularDistribution, "invalidNAME", "pdf") 585s ***** error <'probability' PlotType is not supported for 'TriangularDistribution'.> ... 585s plot (TriangularDistribution, "PlotType", "probability") 585s ***** error ... 585s truncate (TriangularDistribution) 585s ***** error ... 585s truncate (TriangularDistribution, 2) 585s ***** error ... 585s truncate (TriangularDistribution, 4, 2) 585s ***** shared pd 585s pd = TriangularDistribution (0, 1, 2); 585s pd(2) = TriangularDistribution (0, 1, 2); 585s ***** error cdf (pd, 1) 585s ***** error icdf (pd, 0.5) 585s ***** error iqr (pd) 585s ***** error mean (pd) 585s ***** error median (pd) 585s ***** error pdf (pd, 1) 585s ***** error plot (pd) 585s ***** error random (pd) 585s ***** error std (pd) 585s ***** error ... 585s truncate (pd, 2, 4) 585s ***** error var (pd) 585s 69 tests, 69 passed, 0 known failure, 0 skipped 585s [inst/dist_obj/UniformDistribution.m] 585s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_obj/UniformDistribution.m 585s ***** demo 585s ## Generate a data set of 5000 random samples from a Uniform distribution with 585s ## parameters Lower = 0 and Upper = 10. Create a Uniform distribution with these 585s ## parameters and plot its PDF superimposed on a histogram of the data. 585s 585s pd = makedist ("Uniform", "Lower", 0, "Upper", 10); 585s rand ("seed", 21); 585s data = random (pd, 5000, 1); 585s 585s x = linspace (pd.Lower - 1, pd.Upper + 1, 500); 585s y = pdf (pd, x); 585s plot (x, y, 'r-', 'LineWidth', 2); 585s hold on; 585s 585s [counts, centers] = hist (data, 50); 585s bin_width = centers(2) - centers(1); 585s normalized_counts = counts / (sum (counts) * bin_width); 585s bar (centers, normalized_counts, 1); 585s 585s msg = "Uniform distribution with Lower = %0.2f and Upper = %0.2f"; 585s title (sprintf (msg, pd.Lower, pd.Upper)); 585s legend ("PDF", "Histogram", "location", "northeast"); 585s 585s hold off; 585s ***** shared pd, t 585s pd = UniformDistribution (0, 5); 585s t = truncate (pd, 2, 4); 585s ***** assert (cdf (pd, [0:5]), [0, 0.2, 0.4, 0.6, 0.8, 1], 1e-4); 585s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.5, 1, 1], 1e-4); 585s ***** assert (cdf (pd, [1.5, 2, 3, 4, NaN]), [0.3, 0.4, 0.6, 0.8, NaN], 1e-4); 585s ***** assert (cdf (t, [1.5, 2, 3, 4, NaN]), [0, 0, 0.5, 1, NaN], 1e-4); 585s ***** assert (icdf (pd, [0:0.2:1]), [0, 1, 2, 3, 4, 5], 1e-4); 585s ***** assert (icdf (t, [0:0.2:1]), [2, 2.4, 2.8, 3.2, 3.6, 4], 1e-4); 585s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 2, 3, 4, 5, NaN], 1e-4); 585s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.8, 3.2, 3.6, 4, NaN], 1e-4); 585s ***** assert (iqr (pd), 2.5, 1e-14); 585s ***** assert (iqr (t), 1, 1e-14); 585s ***** assert (mean (pd), 2.5, 1e-14); 585s ***** assert (mean (t), 3, 1e-14); 585s ***** assert (median (pd), 2.5, 1e-14); 585s ***** assert (median (t), 3, 1e-14); 585s ***** assert (pdf (pd, [0:5]), [0.2, 0.2, 0.2, 0.2, 0.2, 0.2], 1e-4); 585s ***** assert (pdf (t, [0:5]), [0, 0, 0.5, 0.5, 0.5, 0], 1e-4); 585s ***** assert (pdf (pd, [-1, 1.5, NaN]), [0, 0.2, NaN], 1e-4); 585s ***** assert (pdf (t, [-1, 1.5, NaN]), [0, 0, NaN], 1e-4); 585s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 585s ***** assert (any (random (t, 1000, 1) < 2), false); 585s ***** assert (any (random (t, 1000, 1) > 4), false); 585s ***** assert (std (pd), 1.4434, 1e-4); 585s ***** assert (std (t), 0.5774, 1e-4); 585s ***** assert (var (pd), 2.0833, 1e-4); 585s ***** assert (var (t), 0.3333, 1e-4); 585s ***** error ... 585s UniformDistribution (i, 1) 585s ***** error ... 585s UniformDistribution (Inf, 1) 585s ***** error ... 585s UniformDistribution ([1, 2], 1) 585s ***** error ... 585s UniformDistribution ("a", 1) 585s ***** error ... 585s UniformDistribution (NaN, 1) 585s ***** error ... 585s UniformDistribution (1, i) 585s ***** error ... 585s UniformDistribution (1, Inf) 585s ***** error ... 585s UniformDistribution (1, [1, 2]) 585s ***** error ... 585s UniformDistribution (1, "a") 585s ***** error ... 585s UniformDistribution (1, NaN) 585s ***** error ... 585s UniformDistribution (2, 1) 585s ***** error ... 585s cdf (UniformDistribution, 2, "uper") 585s ***** error ... 585s cdf (UniformDistribution, 2, 3) 585s ***** error ... 585s plot (UniformDistribution, "Parent") 585s ***** error ... 585s plot (UniformDistribution, "PlotType", 12) 585s ***** error ... 585s plot (UniformDistribution, "PlotType", {"pdf", "cdf"}) 585s ***** error ... 585s plot (UniformDistribution, "PlotType", "pdfcdf") 585s ***** error ... 585s plot (UniformDistribution, "Discrete", "pdfcdf") 585s ***** error ... 585s plot (UniformDistribution, "Discrete", [1, 0]) 585s ***** error ... 585s plot (UniformDistribution, "Discrete", {true}) 585s ***** error ... 585s plot (UniformDistribution, "Parent", 12) 585s ***** error ... 585s plot (UniformDistribution, "Parent", "hax") 585s ***** error ... 585s plot (UniformDistribution, "invalidNAME", "pdf") 585s ***** error ... 585s plot (UniformDistribution, "PlotType", "probability") 585s ***** error ... 585s truncate (UniformDistribution) 585s ***** error ... 585s truncate (UniformDistribution, 2) 585s ***** error ... 585s truncate (UniformDistribution, 4, 2) 585s ***** shared pd 585s pd = UniformDistribution (0, 1); 585s pd(2) = UniformDistribution (0, 2); 585s ***** error cdf (pd, 1) 585s ***** error icdf (pd, 0.5) 585s ***** error iqr (pd) 585s ***** error mean (pd) 585s ***** error median (pd) 585s ***** error pdf (pd, 1) 585s ***** error plot (pd) 585s ***** error random (pd) 585s ***** error std (pd) 585s ***** error ... 585s truncate (pd, 2, 4) 585s ***** error var (pd) 585s 63 tests, 63 passed, 0 known failure, 0 skipped 585s [inst/dist_obj/WeibullDistribution.m] 585s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_obj/WeibullDistribution.m 585s ***** demo 585s ## Generate a data set of 5000 random samples from a Weibull distribution with 585s ## parameters lambda = 1 and k = 2. Fit a Weibull distribution to this data and plot 585s ## a PDF of the fitted distribution superimposed on a histogram of a data. 585s 585s pd_fixed = makedist ("Weibull", "lambda", 1, "k", 2) 585s rand ("seed", 2); 585s data = random (pd_fixed, 5000, 1); 585s pd_fitted = fitdist (data, "Weibull") 585s plot (pd_fitted) 585s msg = "Fitted Weibull distribution with lambda = %0.2f and k = %0.2f"; 585s title (sprintf (msg, pd_fitted.lambda, pd_fitted.k)) 585s ***** shared pd, t 585s pd = WeibullDistribution; 585s t = truncate (pd, 2, 4); 585s ***** assert (cdf (pd, [0:5]), [0, 0.6321, 0.8647, 0.9502, 0.9817, 0.9933], 1e-4); 585s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.7311, 1, 1], 1e-4); 585s ***** assert (cdf (pd, [1.5, 2, 3, 4, NaN]), [0.7769, 0.8647, 0.9502, 0.9817, NaN], 1e-4); 585s ***** assert (cdf (t, [1.5, 2, 3, 4, NaN]), [0, 0, 0.7311, 1, NaN], 1e-4); 585s ***** assert (icdf (pd, [0:0.2:1]), [0, 0.2231, 0.5108, 0.9163, 1.6094, Inf], 1e-4); 585s ***** assert (icdf (t, [0:0.2:1]), [2, 2.1899, 2.4244, 2.7315, 3.1768, 4], 1e-4); 585s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, 0.5108, 0.9163, 1.6094, Inf, NaN], 1e-4); 585s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.4244, 2.7315, 3.1768, 4, NaN], 1e-4); 585s ***** assert (iqr (pd), 1.0986, 1e-4); 585s ***** assert (iqr (t), 0.8020, 1e-4); 585s ***** assert (mean (pd), 1, 1e-14); 585s ***** assert (mean (t), 2.6870, 1e-4); 585s ***** assert (median (pd), 0.6931, 1e-4); 585s ***** assert (median (t), 2.5662, 1e-4); 585s ***** assert (pdf (pd, [0:5]), [1, 0.3679, 0.1353, 0.0498, 0.0183, 0.0067], 1e-4); 585s ***** assert (pdf (t, [0:5]), [0, 0, 1.1565, 0.4255, 0.1565, 0], 1e-4); 585s ***** assert (pdf (pd, [-1, 1.5, NaN]), [0, 0.2231, NaN], 1e-4); 585s ***** assert (pdf (t, [-1, 1.5, NaN]), [0, 0, NaN], 1e-4); 585s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 585s ***** assert (any (random (t, 1000, 1) < 2), false); 585s ***** assert (any (random (t, 1000, 1) > 4), false); 585s ***** assert (std (pd), 1, 1e-14); 585s ***** assert (std (t), 0.5253, 1e-4); 585s ***** assert (var (pd), 1, 1e-14); 585s ***** assert (var (t), 0.2759, 1e-4); 585s ***** error ... 585s WeibullDistribution(0, 1) 585s ***** error ... 585s WeibullDistribution(-1, 1) 585s ***** error ... 585s WeibullDistribution(Inf, 1) 585s ***** error ... 585s WeibullDistribution(i, 1) 585s ***** error ... 585s WeibullDistribution("a", 1) 585s ***** error ... 585s WeibullDistribution([1, 2], 1) 585s ***** error ... 585s WeibullDistribution(NaN, 1) 585s ***** error ... 585s WeibullDistribution(1, 0) 585s ***** error ... 585s WeibullDistribution(1, -1) 585s ***** error ... 585s WeibullDistribution(1, Inf) 585s ***** error ... 585s WeibullDistribution(1, i) 585s ***** error ... 585s WeibullDistribution(1, "a") 585s ***** error ... 585s WeibullDistribution(1, [1, 2]) 585s ***** error ... 585s WeibullDistribution(1, NaN) 585s ***** error ... 585s cdf (WeibullDistribution, 2, "uper") 585s ***** error ... 585s cdf (WeibullDistribution, 2, 3) 585s ***** shared x 585s x = wblrnd (1, 1, [1, 100]); 585s ***** error ... 585s paramci (WeibullDistribution.fit (x), "alpha") 585s ***** error ... 585s paramci (WeibullDistribution.fit (x), "alpha", 0) 585s ***** error ... 585s paramci (WeibullDistribution.fit (x), "alpha", 1) 585s ***** error ... 585s paramci (WeibullDistribution.fit (x), "alpha", [0.5 2]) 585s ***** error ... 585s paramci (WeibullDistribution.fit (x), "alpha", "") 585s ***** error ... 585s paramci (WeibullDistribution.fit (x), "alpha", {0.05}) 585s ***** error ... 585s paramci (WeibullDistribution.fit (x), "parameter", "k", "alpha", {0.05}) 585s ***** error ... 585s paramci (WeibullDistribution.fit (x), "parameter", {"lambda", "k", "param"}) 585s ***** error ... 585s paramci (WeibullDistribution.fit (x), "alpha", 0.01, ... 585s "parameter", {"lambda", "k", "param"}) 585s ***** error ... 585s paramci (WeibullDistribution.fit (x), "parameter", "param") 585s ***** error ... 585s paramci (WeibullDistribution.fit (x), "alpha", 0.01, "parameter", "param") 585s ***** error ... 585s paramci (WeibullDistribution.fit (x), "NAME", "value") 585s ***** error ... 585s paramci (WeibullDistribution.fit (x), "alpha", 0.01, "NAME", "value") 585s ***** error ... 585s paramci (WeibullDistribution.fit (x), "alpha", 0.01, "parameter", "k", ... 585s "NAME", "value") 585s ***** error ... 585s plot (WeibullDistribution, "Parent") 585s ***** error ... 585s plot (WeibullDistribution, "PlotType", 12) 585s ***** error ... 585s plot (WeibullDistribution, "PlotType", {"pdf", "cdf"}) 585s ***** error ... 585s plot (WeibullDistribution, "PlotType", "pdfcdf") 585s ***** error ... 585s plot (WeibullDistribution, "Discrete", "pdfcdf") 585s ***** error ... 585s plot (WeibullDistribution, "Discrete", [1, 0]) 585s ***** error ... 585s plot (WeibullDistribution, "Discrete", {true}) 585s ***** error ... 585s plot (WeibullDistribution, "Parent", 12) 585s ***** error ... 585s plot (WeibullDistribution, "Parent", "hax") 585s ***** error ... 585s plot (WeibullDistribution, "invalidNAME", "pdf") 585s ***** error ... 585s plot (WeibullDistribution, "PlotType", "probability") 585s ***** error ... 585s proflik (WeibullDistribution, 2) 585s ***** error ... 585s proflik (WeibullDistribution.fit (x), 3) 585s ***** error ... 585s proflik (WeibullDistribution.fit (x), [1, 2]) 585s ***** error ... 585s proflik (WeibullDistribution.fit (x), {1}) 585s ***** error ... 585s proflik (WeibullDistribution.fit (x), 1, ones (2)) 585s ***** error ... 585s proflik (WeibullDistribution.fit (x), 1, "Display") 585s ***** error ... 585s proflik (WeibullDistribution.fit (x), 1, "Display", 1) 585s ***** error ... 585s proflik (WeibullDistribution.fit (x), 1, "Display", {1}) 585s ***** error ... 585s proflik (WeibullDistribution.fit (x), 1, "Display", {"on"}) 585s ***** error ... 585s proflik (WeibullDistribution.fit (x), 1, "Display", ["on"; "on"]) 586s ***** error ... 586s proflik (WeibullDistribution.fit (x), 1, "Display", "onnn") 586s ***** error ... 586s proflik (WeibullDistribution.fit (x), 1, "NAME", "on") 586s ***** error ... 586s proflik (WeibullDistribution.fit (x), 1, {"NAME"}, "on") 586s ***** error ... 586s proflik (WeibullDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 586s ***** error ... 586s truncate (WeibullDistribution) 586s ***** error ... 586s truncate (WeibullDistribution, 2) 586s ***** error ... 586s truncate (WeibullDistribution, 4, 2) 586s ***** shared pd 586s pd = WeibullDistribution(1, 1); 586s pd(2) = WeibullDistribution(1, 3); 586s ***** error cdf (pd, 1) 586s ***** error icdf (pd, 0.5) 586s ***** error iqr (pd) 586s ***** error mean (pd) 586s ***** error median (pd) 586s ***** error negloglik (pd) 586s ***** error paramci (pd) 586s ***** error pdf (pd, 1) 586s ***** error plot (pd) 586s ***** error proflik (pd, 2) 586s ***** error random (pd) 586s ***** error std (pd) 586s ***** error ... 586s truncate (pd, 2, 4) 586s ***** error var (pd) 586s 97 tests, 97 passed, 0 known failure, 0 skipped 586s [inst/dist_obj/tLocationScaleDistribution.m] 586s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_obj/tLocationScaleDistribution.m 586s ***** demo 586s ## Generate a data set of 5000 random samples from a t Location-Scale distribution 586s ## with parameters mu = 0, sigma = 1, and nu = 5. Fit a t Location-Scale 586s ## distribution to this data and plot a PDF of the fitted distribution 586s ## superimposed on a histogram of the data. 586s 586s pd_fixed = makedist ("tLocationScale", "mu", 0, "sigma", 1, "nu", 5); 586s rand ("seed", 2); 586s data = random (pd_fixed, 5000, 1); 586s pd_fitted = fitdist (data, "tLocationScale"); 586s plot (pd_fitted); 586s msg = "Fitted t Location-Scale distribution with mu = %0.2f, sigma = %0.2f, nu = %0.2f"; 586s title (sprintf (msg, pd_fitted.mu, pd_fitted.sigma, pd_fitted.nu)); 586s ***** shared pd, t 586s pd = tLocationScaleDistribution; 586s t = truncate (pd, 2, 4); 586s ***** assert (cdf (pd, [0:5]), [0.5, 0.8184, 0.9490, 0.9850, 0.9948, 0.9979], 1e-4); 586s ***** assert (cdf (t, [0:5]), [0, 0, 0, 0.7841, 1, 1], 1e-4); 586s ***** assert (cdf (pd, [1.5, 2, 3, 4, NaN]), [0.9030, 0.9490, 0.9850, 0.9948, NaN], 1e-4); 586s ***** assert (cdf (t, [1.5, 2, 3, 4, NaN]), [0, 0, 0.7841, 1, NaN], 1e-4); 586s ***** assert (icdf (pd, [0:0.2:1]), [-Inf, -0.9195, -0.2672, 0.2672, 0.9195, Inf], 1e-4); 586s ***** assert (icdf (t, [0:0.2:1]), [2, 2.1559, 2.3533, 2.6223, 3.0432, 4], 1e-4); 586s ***** assert (icdf (pd, [-1, 0.4:0.2:1, NaN]), [NaN, -0.2672, 0.2672, 0.9195, Inf, NaN], 1e-4); 586s ***** assert (icdf (t, [-1, 0.4:0.2:1, NaN]), [NaN, 2.3533, 2.6223, 3.0432, 4, NaN], 1e-4); 586s ***** assert (iqr (pd), 1.4534, 1e-4); 586s ***** assert (iqr (t), 0.7139, 1e-4); 586s ***** assert (mean (pd), 0, eps); 586s ***** assert (mean (t), 2.6099, 1e-4); 586s ***** assert (median (pd), 0, eps); 586s ***** assert (median (t), 2.4758, 1e-4); 586s ***** assert (pdf (pd, [0:5]), [0.3796, 0.2197, 0.0651, 0.0173, 0.0051, 0.0018], 1e-4); 586s ***** assert (pdf (t, [0:5]), [0, 0, 1.4209, 0.3775, 0.1119, 0], 1e-4); 586s ***** assert (pdf (pd, [-1, 1.5, NaN]), [0.2197, 0.1245, NaN], 1e-4); 586s ***** assert (pdf (t, [-1, 1.5, NaN]), [0, 0, NaN], 1e-4); 586s ***** assert (isequal (size (random (pd, 100, 50)), [100, 50])) 586s ***** assert (any (random (t, 1000, 1) < 2), false); 586s ***** assert (any (random (t, 1000, 1) > 4), false); 586s ***** assert (std (pd), 1.2910, 1e-4); 586s ***** assert (std (t), 0.4989, 1e-4); 586s ***** assert (var (pd), 1.6667, 1e-4); 586s ***** assert (var (t), 0.2489, 1e-4); 586s ***** error ... 586s tLocationScaleDistribution(i, 1, 1) 586s ***** error ... 586s tLocationScaleDistribution(Inf, 1, 1) 586s ***** error ... 586s tLocationScaleDistribution([1, 2], 1, 1) 586s ***** error ... 586s tLocationScaleDistribution("a", 1, 1) 586s ***** error ... 586s tLocationScaleDistribution(NaN, 1, 1) 586s ***** error ... 586s tLocationScaleDistribution(0, 0, 1) 586s ***** error ... 586s tLocationScaleDistribution(0, -1, 1) 586s ***** error ... 586s tLocationScaleDistribution(0, Inf, 1) 586s ***** error ... 586s tLocationScaleDistribution(0, i, 1) 586s ***** error ... 586s tLocationScaleDistribution(0, "a", 1) 586s ***** error ... 586s tLocationScaleDistribution(0, [1, 2], 1) 586s ***** error ... 586s tLocationScaleDistribution(0, NaN, 1) 586s ***** error ... 586s tLocationScaleDistribution(0, 1, 0) 586s ***** error ... 586s tLocationScaleDistribution(0, 1, -1) 586s ***** error ... 586s tLocationScaleDistribution(0, 1, Inf) 586s ***** error ... 586s tLocationScaleDistribution(0, 1, i) 586s ***** error ... 586s tLocationScaleDistribution(0, 1, "a") 586s ***** error ... 586s tLocationScaleDistribution(0, 1, [1, 2]) 586s ***** error ... 586s tLocationScaleDistribution(0, 1, NaN) 586s ***** error ... 586s cdf (tLocationScaleDistribution, 2, "uper") 586s ***** error ... 586s cdf (tLocationScaleDistribution, 2, 3) 586s ***** shared x 586s x = tlsrnd (0, 1, 1, [1, 100]); 586s ***** error ... 586s paramci (tLocationScaleDistribution.fit (x), "alpha") 586s ***** error ... 586s paramci (tLocationScaleDistribution.fit (x), "alpha", 0) 586s ***** error ... 586s paramci (tLocationScaleDistribution.fit (x), "alpha", 1) 586s ***** error ... 586s paramci (tLocationScaleDistribution.fit (x), "alpha", [0.5 2]) 586s ***** error ... 586s paramci (tLocationScaleDistribution.fit (x), "alpha", "") 587s ***** error ... 587s paramci (tLocationScaleDistribution.fit (x), "alpha", {0.05}) 587s ***** error ... 587s paramci (tLocationScaleDistribution.fit (x), "parameter", "mu", ... 587s "alpha", {0.05}) 587s ***** error ... 587s paramci (tLocationScaleDistribution.fit (x), ... 587s "parameter", {"mu", "sigma", "nu", "param"}) 587s ***** error ... 587s paramci (tLocationScaleDistribution.fit (x), "alpha", 0.01, ... 587s "parameter", {"mu", "sigma", "nu", "param"}) 587s ***** error ... 587s paramci (tLocationScaleDistribution.fit (x), "parameter", "param") 587s ***** error ... 587s paramci (tLocationScaleDistribution.fit (x), "alpha", 0.01, ... 587s "parameter", "param") 587s ***** error ... 587s paramci (tLocationScaleDistribution.fit (x), "NAME", "value") 588s ***** error ... 588s paramci (tLocationScaleDistribution.fit (x), "alpha", 0.01, "NAME", "value") 588s ***** error ... 588s paramci (tLocationScaleDistribution.fit (x), "alpha", 0.01, ... 588s "parameter", "mu", "NAME", "value") 588s ***** error ... 588s plot (tLocationScaleDistribution, "Parent") 588s ***** error ... 588s plot (tLocationScaleDistribution, "PlotType", 12) 588s ***** error ... 588s plot (tLocationScaleDistribution, "PlotType", {"pdf", "cdf"}) 588s ***** error ... 588s plot (tLocationScaleDistribution, "PlotType", "pdfcdf") 588s ***** error ... 588s plot (tLocationScaleDistribution, "Discrete", "pdfcdf") 588s ***** error ... 588s plot (tLocationScaleDistribution, "Discrete", [1, 0]) 588s ***** error ... 588s plot (tLocationScaleDistribution, "Discrete", {true}) 588s ***** error ... 588s plot (tLocationScaleDistribution, "Parent", 12) 588s ***** error ... 588s plot (tLocationScaleDistribution, "Parent", "hax") 588s ***** error ... 588s plot (tLocationScaleDistribution, "invalidNAME", "pdf") 588s ***** error ... 588s plot (tLocationScaleDistribution, "PlotType", "probability") 588s ***** error ... 588s proflik (tLocationScaleDistribution, 2) 588s ***** error ... 588s proflik (tLocationScaleDistribution.fit (x), 4) 588s ***** error ... 588s proflik (tLocationScaleDistribution.fit (x), [1, 2]) 588s ***** error ... 588s proflik (tLocationScaleDistribution.fit (x), {1}) 588s ***** error ... 588s proflik (tLocationScaleDistribution.fit (x), 1, ones (2)) 588s ***** error ... 588s proflik (tLocationScaleDistribution.fit (x), 1, "Display") 588s ***** error ... 588s proflik (tLocationScaleDistribution.fit (x), 1, "Display", 1) 589s ***** error ... 589s proflik (tLocationScaleDistribution.fit (x), 1, "Display", {1}) 589s ***** error ... 589s proflik (tLocationScaleDistribution.fit (x), 1, "Display", {"on"}) 589s ***** error ... 589s proflik (tLocationScaleDistribution.fit (x), 1, "Display", ["on"; "on"]) 589s ***** error ... 589s proflik (tLocationScaleDistribution.fit (x), 1, "Display", "onnn") 589s ***** error ... 589s proflik (tLocationScaleDistribution.fit (x), 1, "NAME", "on") 589s ***** error ... 589s proflik (tLocationScaleDistribution.fit (x), 1, {"NAME"}, "on") 589s ***** error ... 589s proflik (tLocationScaleDistribution.fit (x), 1, {[1 2 3 4]}, "Display", "on") 590s ***** error ... 590s truncate (tLocationScaleDistribution) 590s ***** error ... 590s truncate (tLocationScaleDistribution, 2) 590s ***** error ... 590s truncate (tLocationScaleDistribution, 4, 2) 590s ***** shared pd 590s pd = tLocationScaleDistribution (0, 1, 1); 590s pd(2) = tLocationScaleDistribution (0, 1, 3); 590s ***** error cdf (pd, 1) 590s ***** error icdf (pd, 0.5) 590s ***** error iqr (pd) 590s ***** error mean (pd) 590s ***** error median (pd) 590s ***** error negloglik (pd) 590s ***** error paramci (pd) 590s ***** error pdf (pd, 1) 590s ***** error plot (pd) 590s ***** error proflik (pd, 2) 590s ***** error random (pd) 590s ***** error std (pd) 590s ***** error ... 590s truncate (pd, 2, 4) 590s ***** error var (pd) 590s 102 tests, 102 passed, 0 known failure, 0 skipped 590s [inst/dist_stat/betastat.m] 590s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_stat/betastat.m 590s ***** error betastat () 590s ***** error betastat (1) 590s ***** error betastat ({}, 2) 590s ***** error betastat (1, "") 590s ***** error betastat (i, 2) 590s ***** error betastat (1, i) 590s ***** error ... 590s betastat (ones (3), ones (2)) 590s ***** error ... 590s betastat (ones (2), ones (3)) 590s ***** test 590s a = -2:6; 590s b = 0.4:0.2:2; 590s [m, v] = betastat (a, b); 590s expected_m = [NaN NaN NaN 1/2 2/3.2 3/4.4 4/5.6 5/6.8 6/8]; 590s expected_v = [NaN NaN NaN 0.0833, 0.0558, 0.0402, 0.0309, 0.0250, 0.0208]; 590s assert (m, expected_m, eps*100); 590s assert (v, expected_v, 0.001); 590s ***** test 590s a = -2:1:6; 590s [m, v] = betastat (a, 1.5); 590s expected_m = [NaN NaN NaN 1/2.5 2/3.5 3/4.5 4/5.5 5/6.5 6/7.5]; 590s expected_v = [NaN NaN NaN 0.0686, 0.0544, 0.0404, 0.0305, 0.0237, 0.0188]; 590s assert (m, expected_m); 590s assert (v, expected_v, 0.001); 590s ***** test 590s a = [14 Inf 10 NaN 10]; 590s b = [12 9 NaN Inf 12]; 590s [m, v] = betastat (a, b); 590s expected_m = [14/26 NaN NaN NaN 10/22]; 590s expected_v = [168/18252 NaN NaN NaN 120/11132]; 590s assert (m, expected_m); 590s assert (v, expected_v); 590s ***** assert (nthargout (1:2, @betastat, 5, []), {[], []}) 590s ***** assert (nthargout (1:2, @betastat, [], 5), {[], []}) 590s ***** assert (size (betastat (rand (10, 5, 4), rand (10, 5, 4))), [10 5 4]) 590s ***** assert (size (betastat (rand (10, 5, 4), 7)), [10 5 4]) 590s 15 tests, 15 passed, 0 known failure, 0 skipped 590s [inst/dist_stat/binostat.m] 590s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_stat/binostat.m 590s ***** error binostat () 590s ***** error binostat (1) 590s ***** error binostat ({}, 2) 590s ***** error binostat (1, "") 590s ***** error binostat (i, 2) 590s ***** error binostat (1, i) 590s ***** error ... 590s binostat (ones (3), ones (2)) 590s ***** error ... 590s binostat (ones (2), ones (3)) 590s ***** test 590s n = 1:6; 590s ps = 0:0.2:1; 590s [m, v] = binostat (n, ps); 590s expected_m = [0.00, 0.40, 1.20, 2.40, 4.00, 6.00]; 590s expected_v = [0.00, 0.32, 0.72, 0.96, 0.80, 0.00]; 590s assert (m, expected_m, 0.001); 590s assert (v, expected_v, 0.001); 590s ***** test 590s n = 1:6; 590s [m, v] = binostat (n, 0.5); 590s expected_m = [0.50, 1.00, 1.50, 2.00, 2.50, 3.00]; 590s expected_v = [0.25, 0.50, 0.75, 1.00, 1.25, 1.50]; 590s assert (m, expected_m, 0.001); 590s assert (v, expected_v, 0.001); 590s ***** test 590s n = [-Inf -3 5 0.5 3 NaN 100, Inf]; 590s [m, v] = binostat (n, 0.5); 590s assert (isnan (m), [true true false true false true false false]) 590s assert (isnan (v), [true true false true false true false false]) 590s assert (m(end), Inf); 590s assert (v(end), Inf); 590s ***** assert (nthargout (1:2, @binostat, 5, []), {[], []}) 590s ***** assert (nthargout (1:2, @binostat, [], 5), {[], []}) 590s ***** assert (size (binostat (randi (100, 10, 5, 4), rand (10, 5, 4))), [10 5 4]) 590s ***** assert (size (binostat (randi (100, 10, 5, 4), 7)), [10 5 4]) 590s 15 tests, 15 passed, 0 known failure, 0 skipped 590s [inst/dist_stat/bisastat.m] 590s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_stat/bisastat.m 590s ***** error bisastat () 590s ***** error bisastat (1) 590s ***** error bisastat ({}, 2) 590s ***** error bisastat (1, "") 590s ***** error bisastat (i, 2) 590s ***** error bisastat (1, i) 590s ***** error ... 590s bisastat (ones (3), ones (2)) 590s ***** error ... 590s bisastat (ones (2), ones (3)) 590s ***** test 590s beta = 1:6; 590s gamma = 1:0.2:2; 590s [m, v] = bisastat (beta, gamma); 590s expected_m = [1.50, 3.44, 5.94, 9.12, 13.10, 18]; 590s expected_v = [2.25, 16.128, 60.858, 172.032, 409.050, 864]; 590s assert (m, expected_m, 1e-2); 590s assert (v, expected_v, 1e-3); 590s ***** test 590s beta = 1:6; 590s [m, v] = bisastat (beta, 1.5); 590s expected_m = [2.125, 4.25, 6.375, 8.5, 10.625, 12.75]; 590s expected_v = [8.5781, 34.3125, 77.2031, 137.2500, 214.4531, 308.8125]; 590s assert (m, expected_m, 1e-3); 590s assert (v, expected_v, 1e-4); 590s 10 tests, 10 passed, 0 known failure, 0 skipped 590s [inst/dist_stat/burrstat.m] 590s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_stat/burrstat.m 590s ***** error burrstat () 590s ***** error burrstat (1) 590s ***** error burrstat (1, 2) 590s ***** error burrstat ({}, 2, 3) 590s ***** error burrstat (1, "", 3) 590s ***** error burrstat (1, 2, "") 590s ***** error burrstat (i, 2, 3) 590s ***** error burrstat (1, i, 3) 590s ***** error burrstat (1, 2, i) 590s ***** error ... 590s burrstat (ones (3), ones (2), 3) 590s ***** error ... 590s burrstat (ones (2), 2, ones (3)) 590s ***** error ... 590s burrstat (1, ones (2), ones (3)) 590s ***** test 590s [m, v] = burrstat (1, 2, 5); 590s assert (m, 0.4295, 1e-4); 590s assert (v, 0.0655, 1e-4); 590s ***** test 590s [m, v] = burrstat (1, 1, 1); 590s assert (m, Inf); 590s assert (v, Inf); 590s ***** test 590s [m, v] = burrstat (2, 4, 1); 590s assert (m, 2.2214, 1e-4); 590s assert (v, 1.3484, 1e-4); 590s 15 tests, 15 passed, 0 known failure, 0 skipped 590s [inst/dist_stat/chi2stat.m] 590s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_stat/chi2stat.m 590s ***** error chi2stat () 590s ***** error chi2stat ({}) 590s ***** error chi2stat ("") 590s ***** error chi2stat (i) 590s ***** test 590s df = 1:6; 590s [m, v] = chi2stat (df); 590s assert (m, df); 590s assert (v, [2, 4, 6, 8, 10, 12], 0.001); 590s 5 tests, 5 passed, 0 known failure, 0 skipped 590s [inst/dist_stat/evstat.m] 590s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_stat/evstat.m 590s ***** error evstat () 590s ***** error evstat (1) 590s ***** error evstat ({}, 2) 590s ***** error evstat (1, "") 590s ***** error evstat (i, 2) 590s ***** error evstat (1, i) 590s ***** error ... 590s evstat (ones (3), ones (2)) 590s ***** error ... 590s evstat (ones (2), ones (3)) 590s ***** shared x, y0, y1 590s x = [-5, 0, 1, 2, 3]; 590s y0 = [NaN, NaN, 0.4228, 0.8456, 1.2684]; 590s y1 = [-5.5772, -3.4633, -3.0405, -2.6177, -2.1949]; 590s ***** assert (evstat (x, x), y0, 1e-4) 590s ***** assert (evstat (x, x+6), y1, 1e-4) 590s ***** assert (evstat (x, x-6), NaN (1,5)) 590s 11 tests, 11 passed, 0 known failure, 0 skipped 590s [inst/dist_stat/expstat.m] 590s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_stat/expstat.m 590s ***** error expstat () 590s ***** error expstat ({}) 590s ***** error expstat ("") 590s ***** error expstat (i) 590s ***** test 590s mu = 1:6; 590s [m, v] = expstat (mu); 590s assert (m, [1, 2, 3, 4, 5, 6], 0.001); 590s assert (v, [1, 4, 9, 16, 25, 36], 0.001); 590s 5 tests, 5 passed, 0 known failure, 0 skipped 590s [inst/dist_stat/fstat.m] 590s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_stat/fstat.m 590s ***** error fstat () 590s ***** error fstat (1) 590s ***** error fstat ({}, 2) 590s ***** error fstat (1, "") 590s ***** error fstat (i, 2) 590s ***** error fstat (1, i) 590s ***** error ... 590s fstat (ones (3), ones (2)) 590s ***** error ... 590s fstat (ones (2), ones (3)) 590s ***** test 590s df1 = 1:6; 590s df2 = 5:10; 590s [m, v] = fstat (df1, df2); 590s expected_mn = [1.6667, 1.5000, 1.4000, 1.3333, 1.2857, 1.2500]; 590s expected_v = [22.2222, 6.7500, 3.4844, 2.2222, 1.5869, 1.2153]; 590s assert (m, expected_mn, 0.001); 590s assert (v, expected_v, 0.001); 590s ***** test 590s df1 = 1:6; 590s [m, v] = fstat (df1, 5); 590s expected_mn = [1.6667, 1.6667, 1.6667, 1.6667, 1.6667, 1.6667]; 590s expected_v = [22.2222, 13.8889, 11.1111, 9.7222, 8.8889, 8.3333]; 590s assert (m, expected_mn, 0.001); 590s assert (v, expected_v, 0.001); 590s 10 tests, 10 passed, 0 known failure, 0 skipped 590s [inst/dist_stat/gamstat.m] 590s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_stat/gamstat.m 590s ***** error gamstat () 590s ***** error gamstat (1) 590s ***** error gamstat ({}, 2) 590s ***** error gamstat (1, "") 590s ***** error gamstat (i, 2) 590s ***** error gamstat (1, i) 590s ***** error ... 590s gamstat (ones (3), ones (2)) 590s ***** error ... 590s gamstat (ones (2), ones (3)) 590s ***** test 590s a = 1:6; 590s b = 1:0.2:2; 590s [m, v] = gamstat (a, b); 590s expected_m = [1.00, 2.40, 4.20, 6.40, 9.00, 12.00]; 590s expected_v = [1.00, 2.88, 5.88, 10.24, 16.20, 24.00]; 590s assert (m, expected_m, 0.001); 590s assert (v, expected_v, 0.001); 590s ***** test 590s a = 1:6; 590s [m, v] = gamstat (a, 1.5); 590s expected_m = [1.50, 3.00, 4.50, 6.00, 7.50, 9.00]; 590s expected_v = [2.25, 4.50, 6.75, 9.00, 11.25, 13.50]; 590s assert (m, expected_m, 0.001); 590s assert (v, expected_v, 0.001); 590s 10 tests, 10 passed, 0 known failure, 0 skipped 590s [inst/dist_stat/geostat.m] 590s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_stat/geostat.m 590s ***** error geostat () 590s ***** error geostat ({}) 590s ***** error geostat ("") 590s ***** error geostat (i) 590s ***** test 590s ps = 1 ./ (1:6); 590s [m, v] = geostat (ps); 590s assert (m, [0, 1, 2, 3, 4, 5], 0.001); 590s assert (v, [0, 2, 6, 12, 20, 30], 0.001); 590s 5 tests, 5 passed, 0 known failure, 0 skipped 590s [inst/dist_stat/gevstat.m] 590s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_stat/gevstat.m 590s ***** error gevstat () 590s ***** error gevstat (1) 590s ***** error gevstat (1, 2) 590s ***** error gevstat ({}, 2, 3) 590s ***** error gevstat (1, "", 3) 590s ***** error gevstat (1, 2, "") 590s ***** error gevstat (i, 2, 3) 590s ***** error gevstat (1, i, 3) 590s ***** error gevstat (1, 2, i) 590s ***** error ... 590s gevstat (ones (3), ones (2), 3) 590s ***** error ... 590s gevstat (ones (2), 2, ones (3)) 590s ***** error ... 590s gevstat (1, ones (2), ones (3)) 590s ***** test 590s k = [-1, -0.5, 0, 0.2, 0.4, 0.5, 1]; 590s sigma = 2; 590s mu = 1; 590s [m, v] = gevstat (k, sigma, mu); 590s expected_m = [1, 1.4551, 2.1544, 2.6423, 3.4460, 4.0898, Inf]; 590s expected_v = [4, 3.4336, 6.5797, 13.3761, 59.3288, Inf, Inf]; 590s assert (m, expected_m, -0.001); 590s assert (v, expected_v, -0.001); 590s 13 tests, 13 passed, 0 known failure, 0 skipped 590s [inst/dist_stat/gpstat.m] 590s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_stat/gpstat.m 590s ***** error gpstat () 590s ***** error gpstat (1) 590s ***** error gpstat (1, 2) 590s ***** error gpstat ({}, 2, 3) 590s ***** error gpstat (1, "", 3) 590s ***** error gpstat (1, 2, "") 590s ***** error gpstat (i, 2, 3) 590s ***** error gpstat (1, i, 3) 590s ***** error gpstat (1, 2, i) 590s ***** error ... 590s gpstat (ones (3), ones (2), 3) 590s ***** error ... 590s gpstat (ones (2), 2, ones (3)) 590s ***** error ... 590s gpstat (1, ones (2), ones (3)) 590s ***** shared x, y 590s x = [-Inf, -1, 0, 1/2, 1, Inf]; 590s y = [0, 0.5, 1, 2, Inf, Inf]; 590s ***** assert (gpstat (x, ones (1,6), zeros (1,6)), y, eps) 590s ***** assert (gpstat (single (x), 1, 0), single (y), eps("single")) 590s ***** assert (gpstat (x, single (1), 0), single (y), eps("single")) 590s ***** assert (gpstat (x, 1, single (0)), single (y), eps("single")) 590s ***** assert (gpstat (single ([x, NaN]), 1, 0), single ([y, NaN]), eps("single")) 590s ***** assert (gpstat ([x, NaN], single (1), 0), single ([y, NaN]), eps("single")) 590s ***** assert (gpstat ([x, NaN], 1, single (0)), single ([y, NaN]), eps("single")) 590s 19 tests, 19 passed, 0 known failure, 0 skipped 590s [inst/dist_stat/hnstat.m] 590s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_stat/hnstat.m 590s ***** error hnstat () 590s ***** error hnstat (1) 590s ***** error hnstat ({}, 2) 590s ***** error hnstat (1, "") 590s ***** error hnstat (i, 2) 590s ***** error hnstat (1, i) 590s ***** error ... 590s hnstat (ones (3), ones (2)) 590s ***** error ... 590s hnstat (ones (2), ones (3)) 590s ***** test 590s [m, v] = hnstat (0, 1); 590s assert (m, 0.7979, 1e-4); 590s assert (v, 0.3634, 1e-4); 590s ***** test 590s [m, v] = hnstat (2, 1); 590s assert (m, 2.7979, 1e-4); 590s assert (v, 0.3634, 1e-4); 591s ***** test 591s [m, v] = hnstat (2, 2); 591s assert (m, 3.5958, 1e-4); 591s assert (v, 1.4535, 1e-4); 591s ***** test 591s [m, v] = hnstat (2, 2.5); 591s assert (m, 3.9947, 1e-4); 591s assert (v, 2.2711, 1e-4); 591s ***** test 591s [m, v] = hnstat (1.5, 0.5); 591s assert (m, 1.8989, 1e-4); 591s assert (v, 0.0908, 1e-4); 591s ***** test 591s [m, v] = hnstat (-1.5, 0.5); 591s assert (m, -1.1011, 1e-4); 591s assert (v, 0.0908, 1e-4); 591s 14 tests, 14 passed, 0 known failure, 0 skipped 591s [inst/dist_stat/hygestat.m] 591s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_stat/hygestat.m 591s ***** error hygestat () 591s ***** error hygestat (1) 591s ***** error hygestat (1, 2) 591s ***** error hygestat ({}, 2, 3) 591s ***** error hygestat (1, "", 3) 591s ***** error hygestat (1, 2, "") 591s ***** error hygestat (i, 2, 3) 591s ***** error hygestat (1, i, 3) 591s ***** error hygestat (1, 2, i) 591s ***** error ... 591s hygestat (ones (3), ones (2), 3) 591s ***** error ... 591s hygestat (ones (2), 2, ones (3)) 591s ***** error ... 591s hygestat (1, ones (2), ones (3)) 591s ***** test 591s m = 4:9; 591s k = 0:5; 591s n = 1:6; 591s [mn, v] = hygestat (m, k, n); 591s expected_mn = [0.0000, 0.4000, 1.0000, 1.7143, 2.5000, 3.3333]; 591s expected_v = [0.0000, 0.2400, 0.4000, 0.4898, 0.5357, 0.5556]; 591s assert (mn, expected_mn, 0.001); 591s assert (v, expected_v, 0.001); 591s ***** test 591s m = 4:9; 591s k = 0:5; 591s [mn, v] = hygestat (m, k, 2); 591s expected_mn = [0.0000, 0.4000, 0.6667, 0.8571, 1.0000, 1.1111]; 591s expected_v = [0.0000, 0.2400, 0.3556, 0.4082, 0.4286, 0.4321]; 591s assert (mn, expected_mn, 0.001); 591s assert (v, expected_v, 0.001); 591s 14 tests, 14 passed, 0 known failure, 0 skipped 591s [inst/dist_stat/invgstat.m] 591s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_stat/invgstat.m 591s ***** error invgstat () 591s ***** error invgstat (1) 591s ***** error invgstat ({}, 2) 591s ***** error invgstat (1, "") 591s ***** error invgstat (i, 2) 591s ***** error invgstat (1, i) 591s ***** error ... 591s invgstat (ones (3), ones (2)) 591s ***** error ... 591s invgstat (ones (2), ones (3)) 591s ***** test 591s [m, v] = invgstat (1, 1); 591s assert (m, 1); 591s assert (v, 1); 591s ***** test 591s [m, v] = invgstat (2, 1); 591s assert (m, 2); 591s assert (v, 8); 591s ***** test 591s [m, v] = invgstat (2, 2); 591s assert (m, 2); 591s assert (v, 4); 591s ***** test 591s [m, v] = invgstat (2, 2.5); 591s assert (m, 2); 591s assert (v, 3.2); 591s ***** test 591s [m, v] = invgstat (1.5, 0.5); 591s assert (m, 1.5); 591s assert (v, 6.75); 591s 13 tests, 13 passed, 0 known failure, 0 skipped 591s [inst/dist_stat/logistat.m] 591s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_stat/logistat.m 591s ***** error logistat () 591s ***** error logistat (1) 591s ***** error logistat ({}, 2) 591s ***** error logistat (1, "") 591s ***** error logistat (i, 2) 591s ***** error logistat (1, i) 591s ***** error ... 591s logistat (ones (3), ones (2)) 591s ***** error ... 591s logistat (ones (2), ones (3)) 591s ***** test 591s [m, v] = logistat (0, 1); 591s assert (m, 0); 591s assert (v, 3.2899, 0.001); 591s ***** test 591s [m, v] = logistat (0, 0.8); 591s assert (m, 0); 591s assert (v, 2.1055, 0.001); 591s ***** test 591s [m, v] = logistat (1, 0.6); 591s assert (m, 1); 591s assert (v, 1.1844, 0.001); 591s ***** test 591s [m, v] = logistat (0, 0.4); 591s assert (m, 0); 591s assert (v, 0.5264, 0.001); 591s ***** test 591s [m, v] = logistat (-1, 0.2); 591s assert (m, -1); 591s assert (v, 0.1316, 0.001); 591s 13 tests, 13 passed, 0 known failure, 0 skipped 591s [inst/dist_stat/loglstat.m] 591s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_stat/loglstat.m 591s ***** error loglstat () 591s ***** error loglstat (1) 591s ***** error loglstat ({}, 2) 591s ***** error loglstat (1, "") 591s ***** error loglstat (i, 2) 591s ***** error loglstat (1, i) 591s ***** error ... 591s loglstat (ones (3), ones (2)) 591s ***** error ... 591s loglstat (ones (2), ones (3)) 591s ***** test 591s [m, v] = loglstat (0, 1); 591s assert (m, Inf, 0.001); 591s assert (v, Inf, 0.001); 591s ***** test 591s [m, v] = loglstat (0, 0.8); 591s assert (m, 4.2758, 0.001); 591s assert (v, Inf, 0.001); 591s ***** test 591s [m, v] = loglstat (0, 0.6); 591s assert (m, 1.9820, 0.001); 591s assert (v, Inf, 0.001); 591s ***** test 591s [m, v] = loglstat (0, 0.4); 591s assert (m, 1.3213, 0.001); 591s assert (v, 2.5300, 0.001); 591s ***** test 591s [m, v] = loglstat (0, 0.2); 591s assert (m, 1.0690, 0.001); 591s assert (v, 0.1786, 0.001); 591s 13 tests, 13 passed, 0 known failure, 0 skipped 591s [inst/dist_stat/lognstat.m] 591s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_stat/lognstat.m 591s ***** error lognstat () 591s ***** error lognstat (1) 591s ***** error lognstat ({}, 2) 591s ***** error lognstat (1, "") 591s ***** error lognstat (i, 2) 591s ***** error lognstat (1, i) 591s ***** error ... 591s lognstat (ones (3), ones (2)) 591s ***** error ... 591s lognstat (ones (2), ones (3)) 591s ***** test 591s mu = 0:0.2:1; 591s sigma = 0.2:0.2:1.2; 591s [m, v] = lognstat (mu, sigma); 591s expected_m = [1.0202, 1.3231, 1.7860, 2.5093, 3.6693, 5.5845]; 591s expected_v = [0.0425, 0.3038, 1.3823, 5.6447, 23.1345, 100.4437]; 591s assert (m, expected_m, 0.001); 591s assert (v, expected_v, 0.001); 591s ***** test 591s sigma = 0.2:0.2:1.2; 591s [m, v] = lognstat (0, sigma); 591s expected_m = [1.0202, 1.0833, 1.1972, 1.3771, 1.6487, 2.0544]; 591s expected_v = [0.0425, 0.2036, 0.6211, 1.7002, 4.6708, 13.5936]; 591s assert (m, expected_m, 0.001); 591s assert (v, expected_v, 0.001); 591s 10 tests, 10 passed, 0 known failure, 0 skipped 591s [inst/dist_stat/nakastat.m] 591s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_stat/nakastat.m 591s ***** error nakastat () 591s ***** error nakastat (1) 591s ***** error nakastat ({}, 2) 591s ***** error nakastat (1, "") 591s ***** error nakastat (i, 2) 591s ***** error nakastat (1, i) 591s ***** error ... 591s nakastat (ones (3), ones (2)) 591s ***** error ... 591s nakastat (ones (2), ones (3)) 591s ***** test 591s [m, v] = nakastat (1, 1); 591s assert (m, 0.8862269254, 1e-10); 591s assert (v, 0.2146018366, 1e-10); 591s ***** test 591s [m, v] = nakastat (1, 2); 591s assert (m, 1.25331413731, 1e-10); 591s assert (v, 0.42920367321, 1e-10); 591s ***** test 591s [m, v] = nakastat (2, 1); 591s assert (m, 0.93998560299, 1e-10); 591s assert (v, 0.11642706618, 1e-10); 591s 11 tests, 11 passed, 0 known failure, 0 skipped 591s [inst/dist_stat/nbinstat.m] 591s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_stat/nbinstat.m 591s ***** error nbinstat () 591s ***** error nbinstat (1) 591s ***** error nbinstat ({}, 2) 591s ***** error nbinstat (1, "") 591s ***** error nbinstat (i, 2) 591s ***** error nbinstat (1, i) 591s ***** error ... 591s nbinstat (ones (3), ones (2)) 591s ***** error ... 591s nbinstat (ones (2), ones (3)) 591s ***** test 591s r = 1:4; 591s ps = 0.2:0.2:0.8; 591s [m, v] = nbinstat (r, ps); 591s expected_m = [ 4.0000, 3.0000, 2.0000, 1.0000]; 591s expected_v = [20.0000, 7.5000, 3.3333, 1.2500]; 591s assert (m, expected_m, 0.001); 591s assert (v, expected_v, 0.001); 591s ***** test 591s r = 1:4; 591s [m, v] = nbinstat (r, 0.5); 591s expected_m = [1, 2, 3, 4]; 591s expected_v = [2, 4, 6, 8]; 591s assert (m, expected_m, 0.001); 591s assert (v, expected_v, 0.001); 591s 10 tests, 10 passed, 0 known failure, 0 skipped 591s [inst/dist_stat/ncfstat.m] 591s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_stat/ncfstat.m 591s ***** error ncfstat () 591s ***** error ncfstat (1) 591s ***** error ncfstat (1, 2) 591s ***** error ncfstat ({}, 2, 3) 591s ***** error ncfstat (1, "", 3) 591s ***** error ncfstat (1, 2, "") 591s ***** error ncfstat (i, 2, 3) 591s ***** error ncfstat (1, i, 3) 591s ***** error ncfstat (1, 2, i) 591s ***** error ... 591s ncfstat (ones (3), ones (2), 3) 591s ***** error ... 591s ncfstat (ones (2), 2, ones (3)) 591s ***** error ... 591s ncfstat (1, ones (2), ones (3)) 591s ***** shared df1, df2, lambda 591s df1 = [2, 0, -1, 1, 4, 5]; 591s df2 = [2, 4, -1, 5, 6, 7]; 591s lambda = [1, NaN, 3, 0, 2, -1]; 591s ***** assert (ncfstat (df1, df2, lambda), [NaN, NaN, NaN, 1.6667, 2.25, 1.12], 1e-4); 591s ***** assert (ncfstat (df1(4:6), df2(4:6), 1), [3.3333, 1.8750, 1.6800], 1e-4); 591s ***** assert (ncfstat (df1(4:6), df2(4:6), 2), [5.0000, 2.2500, 1.9600], 1e-4); 591s ***** assert (ncfstat (df1(4:6), df2(4:6), 3), [6.6667, 2.6250, 2.2400], 1e-4); 591s ***** assert (ncfstat (2, [df2(1), df2(4:6)], 5), [NaN,5.8333,5.2500,4.9000], 1e-4); 591s ***** assert (ncfstat (0, [df2(1), df2(4:6)], 5), [NaN, Inf, Inf, Inf]); 591s ***** assert (ncfstat (1, [df2(1), df2(4:6)], 5), [NaN, 10, 9, 8.4], 1e-14); 591s ***** assert (ncfstat (4, [df2(1), df2(4:6)], 5), [NaN, 3.75, 3.375, 3.15], 1e-14); 591s 20 tests, 20 passed, 0 known failure, 0 skipped 591s [inst/dist_stat/nctstat.m] 591s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_stat/nctstat.m 591s ***** error nctstat () 591s ***** error nctstat (1) 591s ***** error nctstat ({}, 2) 591s ***** error nctstat (1, "") 591s ***** error nctstat (i, 2) 591s ***** error nctstat (1, i) 591s ***** error ... 591s nctstat (ones (3), ones (2)) 591s ***** error ... 591s nctstat (ones (2), ones (3)) 591s ***** shared df, mu 591s df = [2, 0, -1, 1, 4]; 591s mu = [1, NaN, 3, -1, 2]; 591s ***** assert (nctstat (df, mu), [1.7725, NaN, NaN, NaN, 2.5066], 1e-4); 591s ***** assert (nctstat ([df(1:2), df(4:5)], 1), [1.7725, NaN, NaN, 1.2533], 1e-4); 591s ***** assert (nctstat ([df(1:2), df(4:5)], 3), [5.3174, NaN, NaN, 3.7599], 1e-4); 591s ***** assert (nctstat ([df(1:2), df(4:5)], 2), [3.5449, NaN, NaN, 2.5066], 1e-4); 591s ***** assert (nctstat (2, [mu(1), mu(3:5)]), [1.7725,5.3174,-1.7725,3.5449], 1e-4); 591s ***** assert (nctstat (0, [mu(1), mu(3:5)]), [NaN, NaN, NaN, NaN]); 591s ***** assert (nctstat (1, [mu(1), mu(3:5)]), [NaN, NaN, NaN, NaN]); 591s ***** assert (nctstat (4, [mu(1), mu(3:5)]), [1.2533,3.7599,-1.2533,2.5066], 1e-4); 591s 16 tests, 16 passed, 0 known failure, 0 skipped 591s [inst/dist_stat/ncx2stat.m] 591s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_stat/ncx2stat.m 591s ***** error ncx2stat () 591s ***** error ncx2stat (1) 591s ***** error ncx2stat ({}, 2) 591s ***** error ncx2stat (1, "") 591s ***** error ncx2stat (i, 2) 591s ***** error ncx2stat (1, i) 591s ***** error ... 591s ncx2stat (ones (3), ones (2)) 591s ***** error ... 591s ncx2stat (ones (2), ones (3)) 591s ***** shared df, d1 591s df = [2, 0, -1, 1, 4]; 591s d1 = [1, NaN, 3, -1, 2]; 591s ***** assert (ncx2stat (df, d1), [3, NaN, NaN, NaN, 6]); 591s ***** assert (ncx2stat ([df(1:2), df(4:5)], 1), [3, NaN, 2, 5]); 591s ***** assert (ncx2stat ([df(1:2), df(4:5)], 3), [5, NaN, 4, 7]); 591s ***** assert (ncx2stat ([df(1:2), df(4:5)], 2), [4, NaN, 3, 6]); 591s ***** assert (ncx2stat (2, [d1(1), d1(3:5)]), [3, 5, NaN, 4]); 591s ***** assert (ncx2stat (0, [d1(1), d1(3:5)]), [NaN, NaN, NaN, NaN]); 591s ***** assert (ncx2stat (1, [d1(1), d1(3:5)]), [2, 4, NaN, 3]); 591s ***** assert (ncx2stat (4, [d1(1), d1(3:5)]), [5, 7, NaN, 6]); 591s 16 tests, 16 passed, 0 known failure, 0 skipped 591s [inst/dist_stat/normstat.m] 591s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_stat/normstat.m 591s ***** error normstat () 591s ***** error normstat (1) 591s ***** error normstat ({}, 2) 591s ***** error normstat (1, "") 591s ***** error normstat (i, 2) 591s ***** error normstat (1, i) 591s ***** error ... 591s normstat (ones (3), ones (2)) 591s ***** error ... 591s normstat (ones (2), ones (3)) 591s ***** test 591s mu = 1:6; 591s sigma = 0.2:0.2:1.2; 591s [m, v] = normstat (mu, sigma); 591s expected_v = [0.0400, 0.1600, 0.3600, 0.6400, 1.0000, 1.4400]; 591s assert (m, mu); 591s assert (v, expected_v, 0.001); 591s ***** test 591s sigma = 0.2:0.2:1.2; 591s [m, v] = normstat (0, sigma); 591s expected_mn = [0, 0, 0, 0, 0, 0]; 591s expected_v = [0.0400, 0.1600, 0.3600, 0.6400, 1.0000, 1.4400]; 591s assert (m, expected_mn, 0.001); 591s assert (v, expected_v, 0.001); 591s 10 tests, 10 passed, 0 known failure, 0 skipped 591s [inst/dist_stat/plstat.m] 591s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_stat/plstat.m 591s ***** shared x, Fx 591s x = [0, 1, 3, 4, 7, 10]; 591s Fx = [0, 0.2, 0.5, 0.6, 0.7, 1]; 591s ***** assert (plstat (x, Fx), 4.15) 591s ***** test 591s [m, v] = plstat (x, Fx); 591s assert (v, 10.3775, 1e-14) 591s ***** error plstat () 591s ***** error plstat (1) 591s ***** error ... 591s plstat ([0, 1, 2], [0, 1]) 591s ***** error ... 591s plstat ([0], [1]) 591s ***** error ... 591s plstat ([0, 1, 2], [0, 1, 1.5]) 591s ***** error ... 591s plstat ([0, 1, 2], [0, i, 1]) 591s ***** error ... 591s plstat ([0, i, 2], [0, 0.5, 1]) 591s ***** error ... 591s plstat ([0, i, 2], [0, 0.5i, 1]) 591s 10 tests, 10 passed, 0 known failure, 0 skipped 591s [inst/dist_stat/poisstat.m] 591s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_stat/poisstat.m 591s ***** error poisstat () 591s ***** error poisstat ({}) 591s ***** error poisstat ("") 591s ***** error poisstat (i) 591s ***** test 591s lambda = 1 ./ (1:6); 591s [m, v] = poisstat (lambda); 591s assert (m, lambda); 591s assert (v, lambda); 591s 5 tests, 5 passed, 0 known failure, 0 skipped 591s [inst/dist_stat/raylstat.m] 591s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_stat/raylstat.m 591s ***** error raylstat () 591s ***** error raylstat ({}) 591s ***** error raylstat ("") 591s ***** error raylstat (i) 591s ***** test 591s sigma = 1:6; 591s [m, v] = raylstat (sigma); 591s expected_m = [1.2533, 2.5066, 3.7599, 5.0133, 6.2666, 7.5199]; 591s expected_v = [0.4292, 1.7168, 3.8628, 6.8673, 10.7301, 15.4513]; 591s assert (m, expected_m, 0.001); 591s assert (v, expected_v, 0.001); 591s 5 tests, 5 passed, 0 known failure, 0 skipped 591s [inst/dist_stat/ricestat.m] 591s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_stat/ricestat.m 591s ***** error ricestat () 591s ***** error ricestat (1) 591s ***** error ricestat ({}, 2) 591s ***** error ricestat (1, "") 591s ***** error ricestat (i, 2) 591s ***** error ricestat (1, i) 591s ***** error ... 591s ricestat (ones (3), ones (2)) 591s ***** error ... 591s ricestat (ones (2), ones (3)) 591s ***** shared s, sigma 591s s = [2, 0, -1, 1, 4]; 591s sigma = [1, NaN, 3, -1, 2]; 591s ***** assert (ricestat (s, sigma), [2.2724, NaN, NaN, NaN, 4.5448], 1e-4); 591s ***** assert (ricestat ([s(1:2), s(4:5)], 1), [2.2724, 1.2533, 1.5486, 4.1272], 1e-4); 591s ***** assert (ricestat ([s(1:2), s(4:5)], 3), [4.1665, 3.7599, 3.8637, 5.2695], 1e-4); 591s ***** assert (ricestat ([s(1:2), s(4:5)], 2), [3.0971, 2.5066, 2.6609, 4.5448], 1e-4); 591s ***** assert (ricestat (2, [sigma(1), sigma(3:5)]), [2.2724, 4.1665, NaN, 3.0971], 1e-4); 591s ***** assert (ricestat (0, [sigma(1), sigma(3:5)]), [1.2533, 3.7599, NaN, 2.5066], 1e-4); 591s ***** assert (ricestat (1, [sigma(1), sigma(3:5)]), [1.5486, 3.8637, NaN, 2.6609], 1e-4); 591s ***** assert (ricestat (4, [sigma(1), sigma(3:5)]), [4.1272, 5.2695, NaN, 4.5448], 1e-4); 591s 16 tests, 16 passed, 0 known failure, 0 skipped 591s [inst/dist_stat/tlsstat.m] 591s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_stat/tlsstat.m 591s ***** error tlsstat () 591s ***** error tlsstat (1) 591s ***** error tlsstat (1, 2) 591s ***** error tlsstat ({}, 2, 3) 591s ***** error tlsstat (1, "", 3) 591s ***** error tlsstat (1, 2, ["d"]) 591s ***** error tlsstat (i, 2, 3) 591s ***** error tlsstat (1, i, 3) 591s ***** error tlsstat (1, 2, i) 591s ***** error ... 591s tlsstat (ones (3), ones (2), 1) 592s ***** error ... 592s tlsstat (ones (2), 1, ones (3)) 592s ***** error ... 592s tlsstat (1, ones (2), ones (3)) 592s ***** test 592s [m, v] = tlsstat (0, 1, 0); 592s assert (m, NaN); 592s assert (v, NaN); 592s ***** test 592s [m, v] = tlsstat (0, 1, 1); 592s assert (m, NaN); 592s assert (v, NaN); 592s ***** test 592s [m, v] = tlsstat (2, 1, 1); 592s assert (m, NaN); 592s assert (v, NaN); 592s ***** test 592s [m, v] = tlsstat (-2, 1, 1); 592s assert (m, NaN); 592s assert (v, NaN); 592s ***** test 592s [m, v] = tlsstat (0, 1, 2); 592s assert (m, 0); 592s assert (v, NaN); 592s ***** test 592s [m, v] = tlsstat (2, 1, 2); 592s assert (m, 2); 592s assert (v, NaN); 592s ***** test 592s [m, v] = tlsstat (-2, 1, 2); 592s assert (m, -2); 592s assert (v, NaN); 592s ***** test 592s [m, v] = tlsstat (0, 2, 2); 592s assert (m, 0); 592s assert (v, NaN); 592s ***** test 592s [m, v] = tlsstat (2, 2, 2); 592s assert (m, 2); 592s assert (v, NaN); 592s ***** test 592s [m, v] = tlsstat (-2, 2, 2); 592s assert (m, -2); 592s assert (v, NaN); 592s ***** test 592s [m, v] = tlsstat (0, 1, 3); 592s assert (m, 0); 592s assert (v, 3); 592s ***** test 592s [m, v] = tlsstat (0, 2, 3); 592s assert (m, 0); 592s assert (v, 6); 592s ***** test 592s [m, v] = tlsstat (2, 1, 3); 592s assert (m, 2); 592s assert (v, 3); 592s ***** test 592s [m, v] = tlsstat (2, 2, 3); 592s assert (m, 2); 592s assert (v, 6); 592s ***** test 592s [m, v] = tlsstat (-2, 1, 3); 592s assert (m, -2); 592s assert (v, 3); 592s ***** test 592s [m, v] = tlsstat (-2, 2, 3); 592s assert (m, -2); 592s assert (v, 6); 592s 28 tests, 28 passed, 0 known failure, 0 skipped 592s [inst/dist_stat/tristat.m] 592s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_stat/tristat.m 592s ***** error tristat () 592s ***** error tristat (1) 592s ***** error tristat (1, 2) 592s ***** error tristat ("i", 2, 1) 592s ***** error tristat (0, "d", 1) 592s ***** error tristat (0, 3, {}) 592s ***** error tristat (i, 2, 1) 592s ***** error tristat (0, i, 1) 592s ***** error tristat (0, 3, i) 592s ***** test 592s a = 1:5; 592s b = 3:7; 592s c = 5:9; 592s [m, v] = tristat (a, b, c); 592s expected_m = [3, 4, 5, 6, 7]; 592s assert (m, expected_m); 592s assert (v, ones (1, 5) * (2/3)); 592s 10 tests, 10 passed, 0 known failure, 0 skipped 592s [inst/dist_stat/tstat.m] 592s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_stat/tstat.m 592s ***** error tstat () 592s ***** error tstat ({}) 592s ***** error tstat ("") 592s ***** error tstat (i) 592s ***** test 592s df = 3:8; 592s [m, v] = tstat (df); 592s expected_m = [0, 0, 0, 0, 0, 0]; 592s expected_v = [3.0000, 2.0000, 1.6667, 1.5000, 1.4000, 1.3333]; 592s assert (m, expected_m); 592s assert (v, expected_v, 0.001); 592s 5 tests, 5 passed, 0 known failure, 0 skipped 592s [inst/dist_stat/unidstat.m] 592s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_stat/unidstat.m 592s ***** error unidstat () 592s ***** error unidstat ({}) 592s ***** error unidstat ("") 592s ***** error unidstat (i) 592s ***** test 592s N = 1:6; 592s [m, v] = unidstat (N); 592s expected_m = [1.0000, 1.5000, 2.0000, 2.5000, 3.0000, 3.5000]; 592s expected_v = [0.0000, 0.2500, 0.6667, 1.2500, 2.0000, 2.9167]; 592s assert (m, expected_m, 0.001); 592s assert (v, expected_v, 0.001); 592s 5 tests, 5 passed, 0 known failure, 0 skipped 592s [inst/dist_stat/unifstat.m] 592s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_stat/unifstat.m 592s ***** error unifstat () 592s ***** error unifstat (1) 592s ***** error unifstat ({}, 2) 592s ***** error unifstat (1, "") 592s ***** error unifstat (i, 2) 592s ***** error unifstat (1, i) 592s ***** error ... 592s unifstat (ones (3), ones (2)) 592s ***** error ... 592s unifstat (ones (2), ones (3)) 592s ***** test 592s a = 1:6; 592s b = 2:2:12; 592s [m, v] = unifstat (a, b); 592s expected_m = [1.5000, 3.0000, 4.5000, 6.0000, 7.5000, 9.0000]; 592s expected_v = [0.0833, 0.3333, 0.7500, 1.3333, 2.0833, 3.0000]; 592s assert (m, expected_m, 0.001); 592s assert (v, expected_v, 0.001); 592s ***** test 592s a = 1:6; 592s [m, v] = unifstat (a, 10); 592s expected_m = [5.5000, 6.0000, 6.5000, 7.0000, 7.5000, 8.0000]; 592s expected_v = [6.7500, 5.3333, 4.0833, 3.0000, 2.0833, 1.3333]; 592s assert (m, expected_m, 0.001); 592s assert (v, expected_v, 0.001); 592s 10 tests, 10 passed, 0 known failure, 0 skipped 592s [inst/dist_stat/wblstat.m] 592s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_stat/wblstat.m 592s ***** error wblstat () 592s ***** error wblstat (1) 592s ***** error wblstat ({}, 2) 592s ***** error wblstat (1, "") 592s ***** error wblstat (i, 2) 592s ***** error wblstat (1, i) 592s ***** error ... 592s wblstat (ones (3), ones (2)) 592s ***** error ... 592s wblstat (ones (2), ones (3)) 592s ***** test 592s lambda = 3:8; 592s k = 1:6; 592s [m, v] = wblstat (lambda, k); 592s expected_m = [3.0000, 3.5449, 4.4649, 5.4384, 6.4272, 7.4218]; 592s expected_v = [9.0000, 3.4336, 2.6333, 2.3278, 2.1673, 2.0682]; 592s assert (m, expected_m, 0.001); 592s assert (v, expected_v, 0.001); 592s ***** test 592s k = 1:6; 592s [m, v] = wblstat (6, k); 592s expected_m = [ 6.0000, 5.3174, 5.3579, 5.4384, 5.5090, 5.5663]; 592s expected_v = [36.0000, 7.7257, 3.7920, 2.3278, 1.5923, 1.1634]; 592s assert (m, expected_m, 0.001); 592s assert (v, expected_v, 0.001); 592s 10 tests, 10 passed, 0 known failure, 0 skipped 592s [inst/dist_wrap/cdf.m] 592s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_wrap/cdf.m 592s ***** shared x 592s x = [1:5]; 592s ***** assert (cdf ("Beta", x, 5, 2), betacdf (x, 5, 2)) 592s ***** assert (cdf ("beta", x, 5, 2, "upper"), betacdf (x, 5, 2, "upper")) 592s ***** assert (cdf ("Binomial", x, 5, 2), binocdf (x, 5, 2)) 592s ***** assert (cdf ("bino", x, 5, 2, "upper"), binocdf (x, 5, 2, "upper")) 592s ***** assert (cdf ("Birnbaum-Saunders", x, 5, 2), bisacdf (x, 5, 2)) 592s ***** assert (cdf ("bisa", x, 5, 2, "upper"), bisacdf (x, 5, 2, "upper")) 592s ***** assert (cdf ("Burr", x, 5, 2, 2), burrcdf (x, 5, 2, 2)) 592s ***** assert (cdf ("burr", x, 5, 2, 2, "upper"), burrcdf (x, 5, 2, 2, "upper")) 592s ***** assert (cdf ("Cauchy", x, 5, 2), cauchycdf (x, 5, 2)) 592s ***** assert (cdf ("cauchy", x, 5, 2, "upper"), cauchycdf (x, 5, 2, "upper")) 592s ***** assert (cdf ("Chi-squared", x, 5), chi2cdf (x, 5)) 592s ***** assert (cdf ("chi2", x, 5, "upper"), chi2cdf (x, 5, "upper")) 592s ***** assert (cdf ("Extreme Value", x, 5, 2), evcdf (x, 5, 2)) 592s ***** assert (cdf ("ev", x, 5, 2, "upper"), evcdf (x, 5, 2, "upper")) 592s ***** assert (cdf ("Exponential", x, 5), expcdf (x, 5)) 592s ***** assert (cdf ("exp", x, 5, "upper"), expcdf (x, 5, "upper")) 592s ***** assert (cdf ("F-Distribution", x, 5, 2), fcdf (x, 5, 2)) 592s ***** assert (cdf ("f", x, 5, 2, "upper"), fcdf (x, 5, 2, "upper")) 592s ***** assert (cdf ("Gamma", x, 5, 2), gamcdf (x, 5, 2)) 592s ***** assert (cdf ("gam", x, 5, 2, "upper"), gamcdf (x, 5, 2, "upper")) 592s ***** assert (cdf ("Geometric", x, 5), geocdf (x, 5)) 592s ***** assert (cdf ("geo", x, 5, "upper"), geocdf (x, 5, "upper")) 592s ***** assert (cdf ("Generalized Extreme Value", x, 5, 2, 2), gevcdf (x, 5, 2, 2)) 592s ***** assert (cdf ("gev", x, 5, 2, 2, "upper"), gevcdf (x, 5, 2, 2, "upper")) 592s ***** assert (cdf ("Generalized Pareto", x, 5, 2, 2), gpcdf (x, 5, 2, 2)) 592s ***** assert (cdf ("gp", x, 5, 2, 2, "upper"), gpcdf (x, 5, 2, 2, "upper")) 592s ***** assert (cdf ("Gumbel", x, 5, 2), gumbelcdf (x, 5, 2)) 592s ***** assert (cdf ("gumbel", x, 5, 2, "upper"), gumbelcdf (x, 5, 2, "upper")) 592s ***** assert (cdf ("Half-normal", x, 5, 2), hncdf (x, 5, 2)) 592s ***** assert (cdf ("hn", x, 5, 2, "upper"), hncdf (x, 5, 2, "upper")) 592s ***** assert (cdf ("Hypergeometric", x, 5, 2, 2), hygecdf (x, 5, 2, 2)) 592s ***** assert (cdf ("hyge", x, 5, 2, 2, "upper"), hygecdf (x, 5, 2, 2, "upper")) 592s ***** assert (cdf ("Inverse Gaussian", x, 5, 2), invgcdf (x, 5, 2)) 592s ***** assert (cdf ("invg", x, 5, 2, "upper"), invgcdf (x, 5, 2, "upper")) 592s ***** assert (cdf ("Laplace", x, 5, 2), laplacecdf (x, 5, 2)) 592s ***** assert (cdf ("laplace", x, 5, 2, "upper"), laplacecdf (x, 5, 2, "upper")) 592s ***** assert (cdf ("Logistic", x, 5, 2), logicdf (x, 5, 2)) 592s ***** assert (cdf ("logi", x, 5, 2, "upper"), logicdf (x, 5, 2, "upper")) 592s ***** assert (cdf ("Log-Logistic", x, 5, 2), loglcdf (x, 5, 2)) 592s ***** assert (cdf ("logl", x, 5, 2, "upper"), loglcdf (x, 5, 2, "upper")) 592s ***** assert (cdf ("Lognormal", x, 5, 2), logncdf (x, 5, 2)) 592s ***** assert (cdf ("logn", x, 5, 2, "upper"), logncdf (x, 5, 2, "upper")) 592s ***** assert (cdf ("Nakagami", x, 5, 2), nakacdf (x, 5, 2)) 592s ***** assert (cdf ("naka", x, 5, 2, "upper"), nakacdf (x, 5, 2, "upper")) 592s ***** assert (cdf ("Negative Binomial", x, 5, 2), nbincdf (x, 5, 2)) 592s ***** assert (cdf ("nbin", x, 5, 2, "upper"), nbincdf (x, 5, 2, "upper")) 592s ***** assert (cdf ("Noncentral F-Distribution", x, 5, 2, 2), ncfcdf (x, 5, 2, 2)) 592s ***** assert (cdf ("ncf", x, 5, 2, 2, "upper"), ncfcdf (x, 5, 2, 2, "upper")) 592s ***** assert (cdf ("Noncentral Student T", x, 5, 2), nctcdf (x, 5, 2)) 592s ***** assert (cdf ("nct", x, 5, 2, "upper"), nctcdf (x, 5, 2, "upper")) 592s ***** assert (cdf ("Noncentral Chi-Squared", x, 5, 2), ncx2cdf (x, 5, 2)) 592s ***** assert (cdf ("ncx2", x, 5, 2, "upper"), ncx2cdf (x, 5, 2, "upper")) 593s ***** assert (cdf ("Normal", x, 5, 2), normcdf (x, 5, 2)) 593s ***** assert (cdf ("norm", x, 5, 2, "upper"), normcdf (x, 5, 2, "upper")) 593s ***** assert (cdf ("Poisson", x, 5), poisscdf (x, 5)) 593s ***** assert (cdf ("poiss", x, 5, "upper"), poisscdf (x, 5, "upper")) 593s ***** assert (cdf ("Rayleigh", x, 5), raylcdf (x, 5)) 593s ***** assert (cdf ("rayl", x, 5, "upper"), raylcdf (x, 5, "upper")) 593s ***** assert (cdf ("Rician", x, 5, 1), ricecdf (x, 5, 1)) 593s ***** assert (cdf ("rice", x, 5, 1, "upper"), ricecdf (x, 5, 1, "upper")) 593s ***** assert (cdf ("Student T", x, 5), tcdf (x, 5)) 593s ***** assert (cdf ("t", x, 5, "upper"), tcdf (x, 5, "upper")) 593s ***** assert (cdf ("location-scale T", x, 5, 1, 2), tlscdf (x, 5, 1, 2)) 593s ***** assert (cdf ("tls", x, 5, 1, 2, "upper"), tlscdf (x, 5, 1, 2, "upper")) 593s ***** assert (cdf ("Triangular", x, 5, 2, 2), tricdf (x, 5, 2, 2)) 593s ***** assert (cdf ("tri", x, 5, 2, 2, "upper"), tricdf (x, 5, 2, 2, "upper")) 593s ***** assert (cdf ("Discrete Uniform", x, 5), unidcdf (x, 5)) 593s ***** assert (cdf ("unid", x, 5, "upper"), unidcdf (x, 5, "upper")) 593s ***** assert (cdf ("Uniform", x, 5, 2), unifcdf (x, 5, 2)) 593s ***** assert (cdf ("unif", x, 5, 2, "upper"), unifcdf (x, 5, 2, "upper")) 593s ***** assert (cdf ("Von Mises", x, 5, 2), vmcdf (x, 5, 2)) 593s ***** assert (cdf ("vm", x, 5, 2, "upper"), vmcdf (x, 5, 2, "upper")) 594s ***** assert (cdf ("Weibull", x, 5, 2), wblcdf (x, 5, 2)) 594s ***** assert (cdf ("wbl", x, 5, 2, "upper"), wblcdf (x, 5, 2, "upper")) 594s ***** error cdf (1) 594s ***** error cdf ({"beta"}) 594s ***** error cdf ("beta", {[1 2 3 4 5]}) 594s ***** error cdf ("beta", "text") 594s ***** error cdf ("beta", 1+i) 594s ***** error ... 594s cdf ("Beta", x, "a", 2) 594s ***** error ... 594s cdf ("Beta", x, 5, "") 594s ***** error ... 594s cdf ("Beta", x, 5, {2}) 594s ***** error cdf ("chi2", x) 594s ***** error cdf ("Beta", x, 5) 594s ***** error cdf ("Burr", x, 5) 594s ***** error cdf ("Burr", x, 5, 2) 594s 86 tests, 86 passed, 0 known failure, 0 skipped 594s [inst/dist_wrap/fitdist.m] 594s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_wrap/fitdist.m 594s ***** test 594s x = betarnd (1, 1, 100, 1); 594s pd = fitdist (x, "Beta"); 594s [phat, pci] = betafit (x); 594s assert ([pd.a, pd.b], phat); 594s assert (paramci (pd), pci); 594s ***** test 594s x1 = betarnd (1, 1, 100, 1); 594s x2 = betarnd (5, 2, 100, 1); 594s pd = fitdist ([x1; x2], "Beta", "By", [ones(100, 1); 2*ones(100, 1)]); 594s [phat, pci] = betafit (x1); 594s assert ([pd{1}.a, pd{1}.b], phat); 594s assert (paramci (pd{1}), pci); 594s [phat, pci] = betafit (x2); 594s assert ([pd{2}.a, pd{2}.b], phat); 594s assert (paramci (pd{2}), pci); 594s ***** warning ... 594s fitdist ([betarnd(1, 1, 100, 1); nan(100, 1)], "Beta", ... 594s "By", [ones(100, 1); 2*ones(100, 1)]); 594s ***** test 594s N = 1; 594s x = binornd (N, 0.5, 100, 1); 594s pd = fitdist (x, "binomial"); 594s [phat, pci] = binofit (sum (x), numel (x)); 594s assert ([pd.N, pd.p], [N, phat]); 594s assert (paramci (pd), pci); 594s ***** test 594s N = 3; 594s x = binornd (N, 0.4, 100, 1); 594s pd = fitdist (x, "binomial", "ntrials", N); 594s [phat, pci] = binofit (sum (x), numel (x) * N); 594s assert ([pd.N, pd.p], [N, phat]); 594s assert (paramci (pd), pci); 594s ***** test 594s N = 1; 594s x1 = binornd (N, 0.5, 100, 1); 594s x2 = binornd (N, 0.7, 100, 1); 594s pd = fitdist ([x1; x2], "binomial", "By", [ones(100, 1); 2*ones(100, 1)]); 594s [phat, pci] = binofit (sum (x1), numel (x1)); 594s assert ([pd{1}.N, pd{1}.p], [N, phat]); 594s assert (paramci (pd{1}), pci); 594s [phat, pci] = binofit (sum (x2), numel (x2)); 594s assert ([pd{2}.N, pd{2}.p], [N, phat]); 594s assert (paramci (pd{2}), pci); 594s ***** warning ... 594s fitdist ([binornd(1, 0.5, 100, 1); nan(100, 1)], "binomial", ... 594s "By", [ones(100, 1); 2*ones(100, 1)]); 594s ***** test 594s N = 5; 594s x1 = binornd (N, 0.5, 100, 1); 594s x2 = binornd (N, 0.8, 100, 1); 594s pd = fitdist ([x1; x2], "binomial", "ntrials", N, ... 594s "By", [ones(100, 1); 2*ones(100, 1)]); 594s [phat, pci] = binofit (sum (x1), numel (x1) * N); 594s assert ([pd{1}.N, pd{1}.p], [N, phat]); 594s assert (paramci (pd{1}), pci); 594s [phat, pci] = binofit (sum (x2), numel (x2) * N); 594s assert ([pd{2}.N, pd{2}.p], [N, phat]); 594s assert (paramci (pd{2}), pci); 595s ***** warning ... 595s fitdist ([binornd(5, 0.5, 100, 1); nan(100, 1)], "binomial", "ntrials", 5, ... 595s "By", [ones(100, 1); 2*ones(100, 1)]); 595s ***** test 595s x = bisarnd (1, 1, 100, 1); 595s pd = fitdist (x, "BirnbaumSaunders"); 595s [phat, pci] = bisafit (x); 595s assert ([pd.beta, pd.gamma], phat); 595s assert (paramci (pd), pci); 595s ***** test 595s x1 = bisarnd (1, 1, 100, 1); 595s x2 = bisarnd (5, 2, 100, 1); 595s pd = fitdist ([x1; x2], "bisa", "By", [ones(100,1); 2*ones(100,1)]); 595s [phat, pci] = bisafit (x1); 595s assert ([pd{1}.beta, pd{1}.gamma], phat); 595s assert (paramci (pd{1}), pci); 595s [phat, pci] = bisafit (x2); 595s assert ([pd{2}.beta, pd{2}.gamma], phat); 595s assert (paramci (pd{2}), pci); 595s ***** warning ... 595s fitdist ([bisarnd(1, 1, 100, 1); nan(100, 1)], "bisa", ... 595s "By", [ones(100, 1); 2*ones(100, 1)]); 595s ***** test 595s x = burrrnd (1, 2, 1, 100, 1); 595s pd = fitdist (x, "Burr"); 595s [phat, pci] = burrfit (x); 595s assert ([pd.alpha, pd.c, pd.k], phat); 595s assert (paramci (pd), pci); 596s ***** test 596s rand ("seed", 4); # for reproducibility 596s x1 = burrrnd (1, 2, 1, 100, 1); 596s rand ("seed", 3); # for reproducibility 596s x2 = burrrnd (1, 0.5, 2, 100, 1); 596s pd = fitdist ([x1; x2], "burr", "By", [ones(100,1); 2*ones(100,1)]); 596s [phat, pci] = burrfit (x1); 596s assert ([pd{1}.alpha, pd{1}.c, pd{1}.k], phat); 596s assert (paramci (pd{1}), pci); 596s [phat, pci] = burrfit (x2); 596s assert ([pd{2}.alpha, pd{2}.c, pd{2}.k], phat); 596s assert (paramci (pd{2}), pci); 596s ***** warning ... 596s fitdist ([burrrnd(1, 2, 1, 100, 1); nan(100, 1)], "burr", ... 596s "By", [ones(100, 1); 2*ones(100, 1)]); 596s ***** test 596s x = exprnd (1, 100, 1); 596s pd = fitdist (x, "exponential"); 596s [muhat, muci] = expfit (x); 596s assert ([pd.mu], muhat); 596s assert (paramci (pd), muci); 597s ***** test 597s x1 = exprnd (1, 100, 1); 597s x2 = exprnd (5, 100, 1); 597s pd = fitdist ([x1; x2], "exponential", "By", [ones(100,1); 2*ones(100,1)]); 597s [muhat, muci] = expfit (x1); 597s assert ([pd{1}.mu], muhat); 597s assert (paramci (pd{1}), muci); 597s [muhat, muci] = expfit (x2); 597s assert ([pd{2}.mu], muhat); 597s assert (paramci (pd{2}), muci); 597s ***** warning ... 597s fitdist ([exprnd(1, 100, 1); nan(100, 1)], "exponential", ... 597s "By", [ones(100, 1); 2*ones(100, 1)]); 597s ***** test 597s x = evrnd (1, 1, 100, 1); 597s pd = fitdist (x, "ev"); 597s [phat, pci] = evfit (x); 597s assert ([pd.mu, pd.sigma], phat); 597s assert (paramci (pd), pci); 597s ***** test 597s x1 = evrnd (1, 1, 100, 1); 597s x2 = evrnd (5, 2, 100, 1); 597s pd = fitdist ([x1; x2], "extremevalue", "By", [ones(100,1); 2*ones(100,1)]); 597s [phat, pci] = evfit (x1); 597s assert ([pd{1}.mu, pd{1}.sigma], phat); 597s assert (paramci (pd{1}), pci); 597s [phat, pci] = evfit (x2); 597s assert ([pd{2}.mu, pd{2}.sigma], phat); 597s assert (paramci (pd{2}), pci); 597s ***** warning ... 597s fitdist ([evrnd(1, 1, 100, 1); nan(100, 1)], "extremevalue", ... 597s "By", [ones(100, 1); 2*ones(100, 1)]); 597s ***** test 597s x = gamrnd (1, 1, 100, 1); 597s pd = fitdist (x, "Gamma"); 597s [phat, pci] = gamfit (x); 597s assert ([pd.a, pd.b], phat); 597s assert (paramci (pd), pci); 597s ***** test 597s x1 = gamrnd (1, 1, 100, 1); 597s x2 = gamrnd (5, 2, 100, 1); 597s pd = fitdist ([x1; x2], "Gamma", "By", [ones(100,1); 2*ones(100,1)]); 597s [phat, pci] = gamfit (x1); 597s assert ([pd{1}.a, pd{1}.b], phat); 597s assert (paramci (pd{1}), pci); 597s [phat, pci] = gamfit (x2); 597s assert ([pd{2}.a, pd{2}.b], phat); 597s assert (paramci (pd{2}), pci); 597s ***** warning ... 597s fitdist ([gamrnd(1, 1, 100, 1); nan(100, 1)], "Gamma", ... 597s "By", [ones(100, 1); 2*ones(100, 1)]); 597s ***** test 597s rand ("seed", 4); # for reproducibility 597s x = gevrnd (-0.5, 1, 2, 1000, 1); 597s pd = fitdist (x, "generalizedextremevalue"); 597s [phat, pci] = gevfit (x); 597s assert ([pd.k, pd.sigma, pd.mu], phat); 597s assert (paramci (pd), pci); 598s ***** test 598s rand ("seed", 5); # for reproducibility 598s x1 = gevrnd (-0.5, 1, 2, 1000, 1); 598s rand ("seed", 9); # for reproducibility 598s x2 = gevrnd (0, 1, -4, 1000, 1); 598s pd = fitdist ([x1; x2], "gev", "By", [ones(1000,1); 2*ones(1000,1)]); 598s [phat, pci] = gevfit (x1); 598s assert ([pd{1}.k, pd{1}.sigma, pd{1}.mu], phat); 598s assert (paramci (pd{1}), pci); 598s [phat, pci] = gevfit (x2); 598s assert ([pd{2}.k, pd{2}.sigma, pd{2}.mu], phat); 598s assert (paramci (pd{2}), pci); 598s ***** warning ... 598s fitdist ([gevrnd(-0.5, 1, 2, 1000, 1); nan(1000, 1)], "gev", ... 598s "By", [ones(1000, 1); 2*ones(1000, 1)]); 599s ***** test 599s x = gprnd (1, 1, 1, 100, 1); 599s pd = fitdist (x, "GeneralizedPareto"); 599s [phat, pci] = gpfit (x, 1); 599s assert ([pd.k, pd.sigma, pd.theta], phat); 599s assert (paramci (pd), pci); 599s ***** test 599s x = gprnd (1, 1, 2, 100, 1); 599s pd = fitdist (x, "GeneralizedPareto", "theta", 2); 599s [phat, pci] = gpfit (x, 2); 599s assert ([pd.k, pd.sigma, pd.theta], phat); 599s assert (paramci (pd), pci); 599s ***** test 599s x1 = gprnd (1, 1, 1, 100, 1); 599s x2 = gprnd (0, 2, 1, 100, 1); 599s pd = fitdist ([x1; x2], "gp", "By", [ones(100,1); 2*ones(100,1)]); 599s [phat, pci] = gpfit (x1, 1); 599s assert ([pd{1}.k, pd{1}.sigma, pd{1}.theta], phat); 599s assert (paramci (pd{1}), pci); 599s [phat, pci] = gpfit (x2, 1); 599s assert ([pd{2}.k, pd{2}.sigma, pd{2}.theta], phat); 599s assert (paramci (pd{2}), pci); 599s ***** warning ... 599s fitdist ([gprnd(1, 1, 1, 100, 1); nan(100, 1)], "gp", ... 599s "By", [ones(100, 1); 2*ones(100, 1)]); 599s ***** test 599s x1 = gprnd (3, 2, 2, 100, 1); 599s x2 = gprnd (2, 3, 2, 100, 1); 599s pd = fitdist ([x1; x2], "GeneralizedPareto", "theta", 2, ... 599s "By", [ones(100,1); 2*ones(100,1)]); 599s [phat, pci] = gpfit (x1, 2); 599s assert ([pd{1}.k, pd{1}.sigma, pd{1}.theta], phat); 599s assert (paramci (pd{1}), pci); 599s [phat, pci] = gpfit (x2, 2); 599s assert ([pd{2}.k, pd{2}.sigma, pd{2}.theta], phat); 599s assert (paramci (pd{2}), pci); 599s ***** warning ... 599s fitdist ([gprnd(3, 2, 2, 100, 1); nan(100, 1)], "gp", "theta", 2, ... 599s "By", [ones(100, 1); 2*ones(100, 1)]); 599s ***** test 599s x = hnrnd (0, 1, 100, 1); 599s pd = fitdist (x, "HalfNormal"); 599s [phat, pci] = hnfit (x, 0); 599s assert ([pd.mu, pd.sigma], phat); 599s assert (paramci (pd), pci); 599s ***** test 599s x = hnrnd (1, 1, 100, 1); 599s pd = fitdist (x, "HalfNormal", "mu", 1); 599s [phat, pci] = hnfit (x, 1); 599s assert ([pd.mu, pd.sigma], phat); 599s assert (paramci (pd), pci); 599s ***** test 599s x1 = hnrnd (0, 1, 100, 1); 599s x2 = hnrnd (0, 2, 100, 1); 599s pd = fitdist ([x1; x2], "HalfNormal", "By", [ones(100,1); 2*ones(100,1)]); 599s [phat, pci] = hnfit (x1, 0); 599s assert ([pd{1}.mu, pd{1}.sigma], phat); 599s assert (paramci (pd{1}), pci); 599s [phat, pci] = hnfit (x2, 0); 599s assert ([pd{2}.mu, pd{2}.sigma], phat); 599s assert (paramci (pd{2}), pci); 600s ***** warning ... 600s fitdist ([hnrnd(0, 1, 100, 1); nan(100, 1)], "HalfNormal", ... 600s "By", [ones(100, 1); 2*ones(100, 1)]); 600s ***** test 600s x1 = hnrnd (2, 1, 100, 1); 600s x2 = hnrnd (2, 2, 100, 1); 600s pd = fitdist ([x1; x2], "HalfNormal", "mu", 2, ... 600s "By", [ones(100,1); 2*ones(100,1)]); 600s [phat, pci] = hnfit (x1, 2); 600s assert ([pd{1}.mu, pd{1}.sigma], phat); 600s assert (paramci (pd{1}), pci); 600s [phat, pci] = hnfit (x2, 2); 600s assert ([pd{2}.mu, pd{2}.sigma], phat); 600s assert (paramci (pd{2}), pci); 600s ***** warning ... 600s fitdist ([hnrnd(2, 1, 100, 1); nan(100, 1)], "HalfNormal", "mu", 2, ... 600s "By", [ones(100, 1); 2*ones(100, 1)]); 600s ***** test 600s x = invgrnd (1, 1, 100, 1); 600s pd = fitdist (x, "InverseGaussian"); 600s [phat, pci] = invgfit (x); 600s assert ([pd.mu, pd.lambda], phat); 600s assert (paramci (pd), pci); 600s ***** test 600s x1 = invgrnd (1, 1, 100, 1); 600s x2 = invgrnd (5, 2, 100, 1); 600s pd = fitdist ([x1; x2], "InverseGaussian", "By", [ones(100,1); 2*ones(100,1)]); 600s [phat, pci] = invgfit (x1); 600s assert ([pd{1}.mu, pd{1}.lambda], phat); 600s assert (paramci (pd{1}), pci); 600s [phat, pci] = invgfit (x2); 600s assert ([pd{2}.mu, pd{2}.lambda], phat); 600s assert (paramci (pd{2}), pci); 600s ***** warning ... 600s fitdist ([invgrnd(1, 1, 100, 1); nan(100, 1)], "InverseGaussian", ... 600s "By", [ones(100, 1); 2*ones(100, 1)]); 600s ***** test 600s x = logirnd (1, 1, 100, 1); 600s pd = fitdist (x, "logistic"); 600s [phat, pci] = logifit (x); 600s assert ([pd.mu, pd.sigma], phat); 600s assert (paramci (pd), pci); 600s ***** test 600s x1 = logirnd (1, 1, 100, 1); 600s x2 = logirnd (5, 2, 100, 1); 600s pd = fitdist ([x1; x2], "logistic", "By", [ones(100,1); 2*ones(100,1)]); 600s [phat, pci] = logifit (x1); 600s assert ([pd{1}.mu, pd{1}.sigma], phat); 600s assert (paramci (pd{1}), pci); 600s [phat, pci] = logifit (x2); 600s assert ([pd{2}.mu, pd{2}.sigma], phat); 600s assert (paramci (pd{2}), pci); 601s ***** warning ... 601s fitdist ([logirnd(1, 1, 100, 1); nan(100, 1)], "logistic", ... 601s "By", [ones(100, 1); 2*ones(100, 1)]); 601s ***** test 601s x = loglrnd (1, 1, 100, 1); 601s pd = fitdist (x, "loglogistic"); 601s [phat, pci] = loglfit (x); 601s assert ([pd.mu, pd.sigma], phat); 601s assert (paramci (pd), pci); 601s ***** test 601s x1 = loglrnd (1, 1, 100, 1); 601s x2 = loglrnd (5, 2, 100, 1); 601s pd = fitdist ([x1; x2], "loglogistic", "By", [ones(100,1); 2*ones(100,1)]); 601s [phat, pci] = loglfit (x1); 601s assert ([pd{1}.mu, pd{1}.sigma], phat); 601s assert (paramci (pd{1}), pci); 601s [phat, pci] = loglfit (x2); 601s assert ([pd{2}.mu, pd{2}.sigma], phat); 601s assert (paramci (pd{2}), pci); 601s ***** warning ... 601s fitdist ([loglrnd(1, 1, 100, 1); nan(100, 1)], "loglogistic", ... 601s "By", [ones(100, 1); 2*ones(100, 1)]); 601s ***** test 601s x = lognrnd (1, 1, 100, 1); 601s pd = fitdist (x, "lognormal"); 601s [phat, pci] = lognfit (x); 601s assert ([pd.mu, pd.sigma], phat); 601s assert (paramci (pd), pci); 602s ***** test 602s x1 = lognrnd (1, 1, 100, 1); 602s x2 = lognrnd (5, 2, 100, 1); 602s pd = fitdist ([x1; x2], "lognormal", "By", [ones(100,1); 2*ones(100,1)]); 602s [phat, pci] = lognfit (x1); 602s assert ([pd{1}.mu, pd{1}.sigma], phat); 602s assert (paramci (pd{1}), pci); 602s [phat, pci] = lognfit (x2); 602s assert ([pd{2}.mu, pd{2}.sigma], phat); 602s assert (paramci (pd{2}), pci); 602s ***** warning ... 602s fitdist ([lognrnd(1, 1, 100, 1); nan(100, 1)], "lognormal", ... 602s "By", [ones(100, 1); 2*ones(100, 1)]); 602s ***** test 602s x = nakarnd (2, 0.5, 100, 1); 602s pd = fitdist (x, "Nakagami"); 602s [phat, pci] = nakafit (x); 602s assert ([pd.mu, pd.omega], phat); 602s assert (paramci (pd), pci); 603s ***** test 603s x1 = nakarnd (2, 0.5, 100, 1); 603s x2 = nakarnd (5, 0.8, 100, 1); 603s pd = fitdist ([x1; x2], "Nakagami", "By", [ones(100,1); 2*ones(100,1)]); 603s [phat, pci] = nakafit (x1); 603s assert ([pd{1}.mu, pd{1}.omega], phat); 603s assert (paramci (pd{1}), pci); 603s [phat, pci] = nakafit (x2); 603s assert ([pd{2}.mu, pd{2}.omega], phat); 603s assert (paramci (pd{2}), pci); 603s ***** warning ... 603s fitdist ([nakarnd(2, 0.5, 100, 1); nan(100, 1)], "Nakagami", ... 603s "By", [ones(100, 1); 2*ones(100, 1)]); 603s ***** test 603s randp ("seed", 123); 603s randg ("seed", 321); 603s x = nbinrnd (2, 0.5, 100, 1); 603s pd = fitdist (x, "negativebinomial"); 603s [phat, pci] = nbinfit (x); 603s assert ([pd.R, pd.P], phat); 603s assert (paramci (pd), pci); 603s ***** test 603s randp ("seed", 345); 603s randg ("seed", 543); 603s x1 = nbinrnd (2, 0.5, 100, 1); 603s randp ("seed", 432); 603s randg ("seed", 234); 603s x2 = nbinrnd (5, 0.8, 100, 1); 603s pd = fitdist ([x1; x2], "nbin", "By", [ones(100,1); 2*ones(100,1)]); 603s [phat, pci] = nbinfit (x1); 603s assert ([pd{1}.R, pd{1}.P], phat); 603s assert (paramci (pd{1}), pci); 603s [phat, pci] = nbinfit (x2); 603s assert ([pd{2}.R, pd{2}.P], phat); 603s assert (paramci (pd{2}), pci); 603s ***** warning ... 603s fitdist ([nbinrnd(2, 0.5, 100, 1); nan(100, 1)], "nbin", ... 603s "By", [ones(100, 1); 2*ones(100, 1)]); 603s ***** test 603s x = normrnd (1, 1, 100, 1); 603s pd = fitdist (x, "normal"); 603s [muhat, sigmahat, muci, sigmaci] = normfit (x); 603s assert ([pd.mu, pd.sigma], [muhat, sigmahat]); 603s assert (paramci (pd), [muci, sigmaci]); 603s ***** test 603s x1 = normrnd (1, 1, 100, 1); 603s x2 = normrnd (5, 2, 100, 1); 603s pd = fitdist ([x1; x2], "normal", "By", [ones(100,1); 2*ones(100,1)]); 603s [muhat, sigmahat, muci, sigmaci] = normfit (x1); 603s assert ([pd{1}.mu, pd{1}.sigma], [muhat, sigmahat]); 603s assert (paramci (pd{1}), [muci, sigmaci]); 603s [muhat, sigmahat, muci, sigmaci] = normfit (x2); 603s assert ([pd{2}.mu, pd{2}.sigma], [muhat, sigmahat]); 603s assert (paramci (pd{2}), [muci, sigmaci]); 604s ***** warning ... 604s fitdist ([normrnd(1, 1, 100, 1); nan(100, 1)], "normal", ... 604s "By", [ones(100, 1); 2*ones(100, 1)]); 604s ***** test 604s x = poissrnd (1, 100, 1); 604s pd = fitdist (x, "poisson"); 604s [phat, pci] = poissfit (x); 604s assert (pd.lambda, phat); 604s assert (paramci (pd), pci); 604s ***** test 604s x1 = poissrnd (1, 100, 1); 604s x2 = poissrnd (5, 100, 1); 604s pd = fitdist ([x1; x2], "poisson", "By", [ones(100,1); 2*ones(100,1)]); 604s [phat, pci] = poissfit (x1); 604s assert (pd{1}.lambda, phat); 604s assert (paramci (pd{1}), pci); 604s [phat, pci] = poissfit (x2); 604s assert (pd{2}.lambda, phat); 604s assert (paramci (pd{2}), pci); 604s ***** warning ... 604s fitdist ([poissrnd(1, 100, 1); nan(100, 1)], "poisson", ... 604s "By", [ones(100, 1); 2*ones(100, 1)]); 604s ***** test 604s x = raylrnd (1, 100, 1); 604s pd = fitdist (x, "rayleigh"); 604s [phat, pci] = raylfit (x); 604s assert (pd.sigma, phat); 604s assert (paramci (pd), pci); 604s ***** test 604s x1 = raylrnd (1, 100, 1); 604s x2 = raylrnd (5, 100, 1); 604s pd = fitdist ([x1; x2], "rayleigh", "By", [ones(100,1); 2*ones(100,1)]); 604s [phat, pci] = raylfit (x1); 604s assert (pd{1}.sigma, phat); 604s assert (paramci (pd{1}), pci); 604s [phat, pci] = raylfit (x2); 604s assert (pd{2}.sigma, phat); 604s assert (paramci (pd{2}), pci); 605s ***** warning ... 605s fitdist ([raylrnd(1, 100, 1); nan(100, 1)], "rayleigh", ... 605s "By", [ones(100, 1); 2*ones(100, 1)]); 605s ***** test 605s x = ricernd (1, 1, 100, 1); 605s pd = fitdist (x, "rician"); 605s [phat, pci] = ricefit (x); 605s assert ([pd.s, pd.sigma], phat); 605s assert (paramci (pd), pci); 605s ***** test 605s x1 = ricernd (1, 1, 100, 1); 605s x2 = ricernd (5, 2, 100, 1); 605s pd = fitdist ([x1; x2], "rician", "By", [ones(100,1); 2*ones(100,1)]); 605s [phat, pci] = ricefit (x1); 605s assert ([pd{1}.s, pd{1}.sigma], phat); 605s assert (paramci (pd{1}), pci); 605s [phat, pci] = ricefit (x2); 605s assert ([pd{2}.s, pd{2}.sigma], phat); 605s assert (paramci (pd{2}), pci); 605s ***** warning ... 605s fitdist ([ricernd(1, 1, 100, 1); nan(100, 1)], "rician", ... 605s "By", [ones(100, 1); 2*ones(100, 1)]); 605s ***** warning ... 605s fitdist ([1 2 3 4 5], "Stable"); 605s ***** test 605s x = tlsrnd (0, 1, 1, 100, 1); 605s pd = fitdist (x, "tlocationscale"); 605s [phat, pci] = tlsfit (x); 605s assert ([pd.mu, pd.sigma, pd.nu], phat); 605s assert (paramci (pd), pci); 606s ***** test 606s x1 = tlsrnd (0, 1, 1, 100, 1); 606s x2 = tlsrnd (5, 2, 1, 100, 1); 606s pd = fitdist ([x1; x2], "tlocationscale", "By", [ones(100,1); 2*ones(100,1)]); 606s [phat, pci] = tlsfit (x1); 606s assert ([pd{1}.mu, pd{1}.sigma, pd{1}.nu], phat); 606s assert (paramci (pd{1}), pci); 606s [phat, pci] = tlsfit (x2); 606s assert ([pd{2}.mu, pd{2}.sigma, pd{2}.nu], phat); 606s assert (paramci (pd{2}), pci); 606s ***** warning ... 606s fitdist ([tlsrnd(0, 1, 1, 100, 1); nan(100, 1)], "tlocationscale", ... 606s "By", [ones(100, 1); 2*ones(100, 1)]); 606s ***** test 606s x = [1 2 3 4 5]; 606s pd = fitdist (x, "weibull"); 606s [phat, pci] = wblfit (x); 606s assert ([pd.lambda, pd.k], phat); 606s assert (paramci (pd), pci); 606s ***** test 606s x = [1 2 3 4 5 6 7 8 9 10]; 606s pd = fitdist (x, "weibull", "By", [1 1 1 1 1 2 2 2 2 2]); 606s [phat, pci] = wblfit (x(1:5)); 606s assert ([pd{1}.lambda, pd{1}.k], phat); 606s assert (paramci (pd{1}), pci); 606s [phat, pci] = wblfit (x(6:10)); 606s assert ([pd{2}.lambda, pd{2}.k], phat); 606s assert (paramci (pd{2}), pci); 606s ***** warning ... 606s fitdist ([1 2 3 4 5 NaN NaN NaN NaN NaN], "weibull", "By", [1 1 1 1 1 2 2 2 2 2]); 607s ***** error fitdist (1) 607s ***** error fitdist (1, ["as";"sd"]) 607s ***** error fitdist (1, "some") 607s ***** error ... 607s fitdist (ones (2), "normal") 607s ***** error ... 607s fitdist ([i, 2, 3], "normal") 607s ***** error ... 607s fitdist (["a", "s", "d"], "normal") 607s ***** error ... 607s fitdist ([1, 2, 3], "normal", "By") 607s ***** error ... 607s fitdist ([1, 2, 3], "normal", "By", [1, 2]) 607s ***** error ... 607s fitdist ([1, 2, 3], "normal", "Censoring", [1, 2]) 607s ***** error ... 607s fitdist ([1, 2, 3], "normal", "frequency", [1, 2]) 607s ***** error ... 607s fitdist ([1, 2, 3], "negativebinomial", "frequency", [1, -2, 3]) 607s ***** error ... 607s fitdist ([1, 2, 3], "normal", "alpha", [1, 2]) 607s ***** error ... 607s fitdist ([1, 2, 3], "normal", "alpha", i) 607s ***** error ... 607s fitdist ([1, 2, 3], "normal", "alpha", -0.5) 607s ***** error ... 607s fitdist ([1, 2, 3], "normal", "alpha", 1.5) 607s ***** error ... 607s fitdist ([1, 2, 3], "normal", "ntrials", [1, 2]) 607s ***** error ... 607s fitdist ([1, 2, 3], "normal", "ntrials", 0) 607s ***** error ... 607s fitdist ([1, 2, 3], "normal", "options", 0) 607s ***** error ... 607s fitdist ([1, 2, 3], "normal", "options", struct ("options", 1)) 607s ***** warning fitdist ([1, 2, 3], "kernel", "kernel", "normal"); 607s ***** warning fitdist ([1, 2, 3], "kernel", "support", "positive"); 607s ***** warning fitdist ([1, 2, 3], "kernel", "width", 1); 607s ***** error ... 607s fitdist ([1, 2, 3], "normal", "param", struct ("options", 1)) 607s ***** error ... 607s fitdist (nan (100,1), "normal"); 607s ***** error ... 607s [pdca, gn, gl] = fitdist ([1, 2, 3], "normal"); 607s ***** error ... 607s fitdist ([1, 2, 3], "generalizedpareto", "theta", 2); 607s ***** error ... 607s fitdist ([1, 2, 3], "halfnormal", "mu", 2); 607s 103 tests, 103 passed, 0 known failure, 0 skipped 607s [inst/dist_wrap/icdf.m] 607s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_wrap/icdf.m 607s ***** shared p 607s p = [0.05:0.05:0.5]; 607s ***** assert (icdf ("Beta", p, 5, 2), betainv (p, 5, 2)) 607s ***** assert (icdf ("beta", p, 5, 2), betainv (p, 5, 2)) 607s ***** assert (icdf ("Binomial", p, 5, 2), binoinv (p, 5, 2)) 607s ***** assert (icdf ("bino", p, 5, 2), binoinv (p, 5, 2)) 607s ***** assert (icdf ("Birnbaum-Saunders", p, 5, 2), bisainv (p, 5, 2)) 607s ***** assert (icdf ("bisa", p, 5, 2), bisainv (p, 5, 2)) 607s ***** assert (icdf ("Burr", p, 5, 2, 2), burrinv (p, 5, 2, 2)) 607s ***** assert (icdf ("burr", p, 5, 2, 2), burrinv (p, 5, 2, 2)) 607s ***** assert (icdf ("Cauchy", p, 5, 2), cauchyinv (p, 5, 2)) 607s ***** assert (icdf ("cauchy", p, 5, 2), cauchyinv (p, 5, 2)) 607s ***** assert (icdf ("Chi-squared", p, 5), chi2inv (p, 5)) 607s ***** assert (icdf ("chi2", p, 5), chi2inv (p, 5)) 607s ***** assert (icdf ("Extreme Value", p, 5, 2), evinv (p, 5, 2)) 607s ***** assert (icdf ("ev", p, 5, 2), evinv (p, 5, 2)) 607s ***** assert (icdf ("Exponential", p, 5), expinv (p, 5)) 607s ***** assert (icdf ("exp", p, 5), expinv (p, 5)) 607s ***** assert (icdf ("F-Distribution", p, 5, 2), finv (p, 5, 2)) 607s ***** assert (icdf ("f", p, 5, 2), finv (p, 5, 2)) 607s ***** assert (icdf ("Gamma", p, 5, 2), gaminv (p, 5, 2)) 607s ***** assert (icdf ("gam", p, 5, 2), gaminv (p, 5, 2)) 607s ***** assert (icdf ("Geometric", p, 5), geoinv (p, 5)) 607s ***** assert (icdf ("geo", p, 5), geoinv (p, 5)) 607s ***** assert (icdf ("Generalized Extreme Value", p, 5, 2, 2), gevinv (p, 5, 2, 2)) 607s ***** assert (icdf ("gev", p, 5, 2, 2), gevinv (p, 5, 2, 2)) 607s ***** assert (icdf ("Generalized Pareto", p, 5, 2, 2), gpinv (p, 5, 2, 2)) 607s ***** assert (icdf ("gp", p, 5, 2, 2), gpinv (p, 5, 2, 2)) 607s ***** assert (icdf ("Gumbel", p, 5, 2), gumbelinv (p, 5, 2)) 607s ***** assert (icdf ("gumbel", p, 5, 2), gumbelinv (p, 5, 2)) 607s ***** assert (icdf ("Half-normal", p, 5, 2), hninv (p, 5, 2)) 607s ***** assert (icdf ("hn", p, 5, 2), hninv (p, 5, 2)) 607s ***** assert (icdf ("Hypergeometric", p, 5, 2, 2), hygeinv (p, 5, 2, 2)) 607s ***** assert (icdf ("hyge", p, 5, 2, 2), hygeinv (p, 5, 2, 2)) 607s ***** assert (icdf ("Inverse Gaussian", p, 5, 2), invginv (p, 5, 2)) 607s ***** assert (icdf ("invg", p, 5, 2), invginv (p, 5, 2)) 607s ***** assert (icdf ("Laplace", p, 5, 2), laplaceinv (p, 5, 2)) 607s ***** assert (icdf ("laplace", p, 5, 2), laplaceinv (p, 5, 2)) 607s ***** assert (icdf ("Logistic", p, 5, 2), logiinv (p, 5, 2)) 607s ***** assert (icdf ("logi", p, 5, 2), logiinv (p, 5, 2)) 607s ***** assert (icdf ("Log-Logistic", p, 5, 2), loglinv (p, 5, 2)) 607s ***** assert (icdf ("logl", p, 5, 2), loglinv (p, 5, 2)) 607s ***** assert (icdf ("Lognormal", p, 5, 2), logninv (p, 5, 2)) 607s ***** assert (icdf ("logn", p, 5, 2), logninv (p, 5, 2)) 607s ***** assert (icdf ("Nakagami", p, 5, 2), nakainv (p, 5, 2)) 607s ***** assert (icdf ("naka", p, 5, 2), nakainv (p, 5, 2)) 607s ***** assert (icdf ("Negative Binomial", p, 5, 2), nbininv (p, 5, 2)) 607s ***** assert (icdf ("nbin", p, 5, 2), nbininv (p, 5, 2)) 607s ***** assert (icdf ("Noncentral F-Distribution", p, 5, 2, 2), ncfinv (p, 5, 2, 2)) 607s ***** assert (icdf ("ncf", p, 5, 2, 2), ncfinv (p, 5, 2, 2)) 607s ***** assert (icdf ("Noncentral Student T", p, 5, 2), nctinv (p, 5, 2)) 608s ***** assert (icdf ("nct", p, 5, 2), nctinv (p, 5, 2)) 609s ***** assert (icdf ("Noncentral Chi-Squared", p, 5, 2), ncx2inv (p, 5, 2)) 609s ***** assert (icdf ("ncx2", p, 5, 2), ncx2inv (p, 5, 2)) 609s ***** assert (icdf ("Normal", p, 5, 2), norminv (p, 5, 2)) 609s ***** assert (icdf ("norm", p, 5, 2), norminv (p, 5, 2)) 609s ***** assert (icdf ("Poisson", p, 5), poissinv (p, 5)) 610s ***** assert (icdf ("poiss", p, 5), poissinv (p, 5)) 610s ***** assert (icdf ("Rayleigh", p, 5), raylinv (p, 5)) 610s ***** assert (icdf ("rayl", p, 5), raylinv (p, 5)) 610s ***** assert (icdf ("Rician", p, 5, 1), riceinv (p, 5, 1)) 610s ***** assert (icdf ("rice", p, 5, 1), riceinv (p, 5, 1)) 611s ***** assert (icdf ("Student T", p, 5), tinv (p, 5)) 611s ***** assert (icdf ("t", p, 5), tinv (p, 5)) 612s ***** assert (icdf ("location-scale T", p, 5, 1, 2), tlsinv (p, 5, 1, 2)) 612s ***** assert (icdf ("tls", p, 5, 1, 2), tlsinv (p, 5, 1, 2)) 612s ***** assert (icdf ("Triangular", p, 5, 2, 2), triinv (p, 5, 2, 2)) 612s ***** assert (icdf ("tri", p, 5, 2, 2), triinv (p, 5, 2, 2)) 612s ***** assert (icdf ("Discrete Uniform", p, 5), unidinv (p, 5)) 612s ***** assert (icdf ("unid", p, 5), unidinv (p, 5)) 612s ***** assert (icdf ("Uniform", p, 5, 2), unifinv (p, 5, 2)) 612s ***** assert (icdf ("unif", p, 5, 2), unifinv (p, 5, 2)) 612s ***** assert (icdf ("Von Mises", p, 5, 2), vminv (p, 5, 2)) 627s ***** assert (icdf ("vm", p, 5, 2), vminv (p, 5, 2)) 642s ***** assert (icdf ("Weibull", p, 5, 2), wblinv (p, 5, 2)) 642s ***** assert (icdf ("wbl", p, 5, 2), wblinv (p, 5, 2)) 642s ***** error icdf (1) 642s ***** error icdf ({"beta"}) 642s ***** error icdf ("beta", {[1 2 3 4 5]}) 642s ***** error icdf ("beta", "text") 642s ***** error icdf ("beta", 1+i) 642s ***** error ... 642s icdf ("Beta", p, "a", 2) 642s ***** error ... 642s icdf ("Beta", p, 5, "") 642s ***** error ... 642s icdf ("Beta", p, 5, {2}) 642s ***** error icdf ("chi2", p) 642s ***** error icdf ("Beta", p, 5) 642s ***** error icdf ("Burr", p, 5) 642s ***** error icdf ("Burr", p, 5, 2) 642s 86 tests, 86 passed, 0 known failure, 0 skipped 642s [inst/dist_wrap/makedist.m] 642s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_wrap/makedist.m 642s ***** test 642s pd = makedist ("beta"); 642s assert (class (pd), "BetaDistribution"); 642s assert (pd.a, 1); 642s assert (pd.b, 1); 642s ***** test 642s pd = makedist ("beta", "a", 5); 642s assert (pd.a, 5); 642s assert (pd.b, 1); 642s ***** test 642s pd = makedist ("beta", "b", 5); 642s assert (pd.a, 1); 642s assert (pd.b, 5); 642s ***** test 642s pd = makedist ("beta", "a", 3, "b", 5); 642s assert (pd.a, 3); 642s assert (pd.b, 5); 642s ***** test 642s pd = makedist ("binomial"); 642s assert (class (pd), "BinomialDistribution"); 642s assert (pd.N, 1); 642s assert (pd.p, 0.5); 642s ***** test 642s pd = makedist ("binomial", "N", 5); 642s assert (pd.N, 5); 642s assert (pd.p, 0.5); 642s ***** test 642s pd = makedist ("binomial", "p", 0.2); 642s assert (pd.N, 1); 642s assert (pd.p, 0.2); 642s ***** test 642s pd = makedist ("binomial", "N", 3, "p", 0.3); 642s assert (pd.N, 3); 642s assert (pd.p, 0.3); 642s ***** test 642s pd = makedist ("birnbaumsaunders"); 642s assert (class (pd), "BirnbaumSaundersDistribution"); 642s assert (pd.beta, 1); 642s assert (pd.gamma, 1); 642s ***** test 642s pd = makedist ("birnbaumsaunders", "beta", 5); 642s assert (pd.beta, 5); 642s assert (pd.gamma, 1); 642s ***** test 642s pd = makedist ("birnbaumsaunders", "gamma", 5); 642s assert (pd.beta, 1); 642s assert (pd.gamma, 5); 642s ***** test 642s pd = makedist ("birnbaumsaunders", "beta", 3, "gamma", 5); 642s assert (pd.beta, 3); 642s assert (pd.gamma, 5); 642s ***** test 642s pd = makedist ("burr"); 642s assert (class (pd), "BurrDistribution"); 642s assert (pd.alpha, 1); 642s assert (pd.c, 1); 642s assert (pd.k, 1); 642s ***** test 642s pd = makedist ("burr", "k", 5); 642s assert (pd.alpha, 1); 642s assert (pd.c, 1); 642s assert (pd.k, 5); 642s ***** test 642s pd = makedist ("burr", "c", 5); 642s assert (pd.alpha, 1); 642s assert (pd.c, 5); 642s assert (pd.k, 1); 642s ***** test 642s pd = makedist ("burr", "alpha", 3, "c", 5); 642s assert (pd.alpha, 3); 642s assert (pd.c, 5); 642s assert (pd.k, 1); 642s ***** test 642s pd = makedist ("burr", "k", 3, "c", 5); 642s assert (pd.alpha, 1); 642s assert (pd.c, 5); 642s assert (pd.k, 3); 642s ***** test 642s pd = makedist ("exponential"); 642s assert (class (pd), "ExponentialDistribution"); 642s assert (pd.mu, 1); 642s ***** test 642s pd = makedist ("exponential", "mu", 5); 642s assert (pd.mu, 5); 642s ***** test 642s pd = makedist ("extremevalue"); 642s assert (class (pd), "ExtremeValueDistribution"); 642s assert (pd.mu, 0); 642s assert (pd.sigma, 1); 642s ***** test 642s pd = makedist ("extremevalue", "mu", 5); 642s assert (class (pd), "ExtremeValueDistribution"); 642s assert (pd.mu, 5); 642s assert (pd.sigma, 1); 642s ***** test 642s pd = makedist ("ev", "sigma", 5); 642s assert (class (pd), "ExtremeValueDistribution"); 642s assert (pd.mu, 0); 642s assert (pd.sigma, 5); 642s ***** test 642s pd = makedist ("ev", "mu", -3, "sigma", 5); 642s assert (class (pd), "ExtremeValueDistribution"); 642s assert (pd.mu, -3); 642s assert (pd.sigma, 5); 642s ***** test 642s pd = makedist ("gamma"); 642s assert (class (pd), "GammaDistribution"); 642s assert (pd.a, 1); 642s assert (pd.b, 1); 642s ***** test 642s pd = makedist ("gamma", "a", 5); 642s assert (pd.a, 5); 642s assert (pd.b, 1); 642s ***** test 642s pd = makedist ("gamma", "b", 5); 642s assert (pd.a, 1); 642s assert (pd.b, 5); 642s ***** test 642s pd = makedist ("gamma", "a", 3, "b", 5); 642s assert (pd.a, 3); 642s assert (pd.b, 5); 642s ***** test 642s pd = makedist ("GeneralizedExtremeValue"); 642s assert (class (pd), "GeneralizedExtremeValueDistribution"); 642s assert (pd.k, 0); 642s assert (pd.sigma, 1); 642s assert (pd.mu, 0); 642s ***** test 642s pd = makedist ("GeneralizedExtremeValue", "k", 5); 642s assert (pd.k, 5); 642s assert (pd.sigma, 1); 642s assert (pd.mu, 0); 642s ***** test 642s pd = makedist ("GeneralizedExtremeValue", "sigma", 5); 642s assert (pd.k, 0); 642s assert (pd.sigma, 5); 642s assert (pd.mu, 0); 642s ***** test 642s pd = makedist ("GeneralizedExtremeValue", "k", 3, "sigma", 5); 642s assert (pd.k, 3); 642s assert (pd.sigma, 5); 642s assert (pd.mu, 0); 642s ***** test 642s pd = makedist ("GeneralizedExtremeValue", "mu", 3, "sigma", 5); 642s assert (pd.k, 0); 642s assert (pd.sigma, 5); 642s assert (pd.mu, 3); 642s ***** test 642s pd = makedist ("GeneralizedPareto"); 642s assert (class (pd), "GeneralizedParetoDistribution"); 642s assert (pd.k, 1); 642s assert (pd.sigma, 1); 642s assert (pd.theta, 1); 642s ***** test 642s pd = makedist ("GeneralizedPareto", "k", 5); 642s assert (pd.k, 5); 642s assert (pd.sigma, 1); 642s assert (pd.theta, 1); 642s ***** test 642s pd = makedist ("GeneralizedPareto", "sigma", 5); 642s assert (pd.k, 1); 642s assert (pd.sigma, 5); 642s assert (pd.theta, 1); 642s ***** test 642s pd = makedist ("GeneralizedPareto", "k", 3, "sigma", 5); 642s assert (pd.k, 3); 642s assert (pd.sigma, 5); 642s assert (pd.theta, 1); 642s ***** test 642s pd = makedist ("GeneralizedPareto", "theta", 3, "sigma", 5); 642s assert (pd.k, 1); 642s assert (pd.sigma, 5); 642s assert (pd.theta, 3); 642s ***** test 642s pd = makedist ("HalfNormal"); 642s assert (class (pd), "HalfNormalDistribution"); 642s assert (pd.mu, 0); 642s assert (pd.sigma, 1); 642s ***** test 642s pd = makedist ("HalfNormal", "mu", 5); 642s assert (pd.mu, 5); 642s assert (pd.sigma, 1); 642s ***** test 642s pd = makedist ("HalfNormal", "sigma", 5); 642s assert (pd.mu, 0); 642s assert (pd.sigma, 5); 642s ***** test 642s pd = makedist ("HalfNormal", "mu", 3, "sigma", 5); 642s assert (pd.mu, 3); 642s assert (pd.sigma, 5); 642s ***** test 642s pd = makedist ("InverseGaussian"); 642s assert (class (pd), "InverseGaussianDistribution"); 642s assert (pd.mu, 1); 642s assert (pd.lambda, 1); 642s ***** test 642s pd = makedist ("InverseGaussian", "mu", 5); 642s assert (pd.mu, 5); 642s assert (pd.lambda, 1); 642s ***** test 642s pd = makedist ("InverseGaussian", "lambda", 5); 642s assert (pd.mu, 1); 642s assert (pd.lambda, 5); 642s ***** test 642s pd = makedist ("InverseGaussian", "mu", 3, "lambda", 5); 642s assert (pd.mu, 3); 642s assert (pd.lambda, 5); 642s ***** test 642s pd = makedist ("logistic"); 642s assert (class (pd), "LogisticDistribution"); 642s assert (pd.mu, 0); 642s assert (pd.sigma, 1); 642s ***** test 642s pd = makedist ("logistic", "mu", 5); 642s assert (pd.mu, 5); 642s assert (pd.sigma, 1); 642s ***** test 642s pd = makedist ("logistic", "sigma", 5); 642s assert (pd.mu, 0); 642s assert (pd.sigma, 5); 642s ***** test 642s pd = makedist ("logistic", "mu", 3, "sigma", 5); 642s assert (pd.mu, 3); 642s assert (pd.sigma, 5); 642s ***** test 642s pd = makedist ("loglogistic"); 642s assert (class (pd), "LoglogisticDistribution"); 642s assert (pd.mu, 0); 642s assert (pd.sigma, 1); 642s ***** test 642s pd = makedist ("loglogistic", "mu", 5); 642s assert (pd.mu, 5); 642s assert (pd.sigma, 1); 642s ***** test 642s pd = makedist ("loglogistic", "sigma", 5); 642s assert (pd.mu, 0); 642s assert (pd.sigma, 5); 642s ***** test 642s pd = makedist ("loglogistic", "mu", 3, "sigma", 5); 642s assert (pd.mu, 3); 642s assert (pd.sigma, 5); 642s ***** test 642s pd = makedist ("Lognormal"); 642s assert (class (pd), "LognormalDistribution"); 642s assert (pd.mu, 0); 642s assert (pd.sigma, 1); 642s ***** test 642s pd = makedist ("Lognormal", "mu", 5); 642s assert (pd.mu, 5); 642s assert (pd.sigma, 1); 642s ***** test 642s pd = makedist ("Lognormal", "sigma", 5); 642s assert (pd.mu, 0); 642s assert (pd.sigma, 5); 642s ***** test 642s pd = makedist ("Lognormal", "mu", -3, "sigma", 5); 642s assert (pd.mu, -3); 642s assert (pd.sigma, 5); 642s ***** test 642s pd = makedist ("Loguniform"); 642s assert (class (pd), "LoguniformDistribution"); 642s assert (pd.Lower, 1); 642s assert (pd.Upper, 4); 642s ***** test 642s pd = makedist ("Loguniform", "Lower", 2); 642s assert (pd.Lower, 2); 642s assert (pd.Upper, 4); 642s ***** test 642s pd = makedist ("Loguniform", "Lower", 1, "Upper", 3); 642s assert (pd.Lower, 1); 642s assert (pd.Upper, 3); 642s ***** test 642s pd = makedist ("Multinomial"); 642s assert (class (pd), "MultinomialDistribution"); 642s assert (pd.Probabilities, [0.5, 0.5]); 642s ***** test 642s pd = makedist ("Multinomial", "Probabilities", [0.2, 0.3, 0.1, 0.4]); 642s assert (class (pd), "MultinomialDistribution"); 642s assert (pd.Probabilities, [0.2, 0.3, 0.1, 0.4]); 642s ***** test 642s pd = makedist ("Nakagami"); 642s assert (class (pd), "NakagamiDistribution"); 642s assert (pd.mu, 1); 642s assert (pd.omega, 1); 642s ***** test 642s pd = makedist ("Nakagami", "mu", 5); 642s assert (class (pd), "NakagamiDistribution"); 642s assert (pd.mu, 5); 642s assert (pd.omega, 1); 642s ***** test 642s pd = makedist ("Nakagami", "omega", 0.3); 642s assert (class (pd), "NakagamiDistribution"); 642s assert (pd.mu, 1); 642s assert (pd.omega, 0.3); 642s ***** test 642s pd = makedist ("NegativeBinomial"); 642s assert (class (pd), "NegativeBinomialDistribution"); 642s assert (pd.R, 1); 642s assert (pd.P, 0.5); 642s ***** test 642s pd = makedist ("NegativeBinomial", "R", 5); 642s assert (class (pd), "NegativeBinomialDistribution"); 642s assert (pd.R, 5); 642s assert (pd.P, 0.5); 642s ***** test 642s pd = makedist ("NegativeBinomial", "p", 0.3); 642s assert (class (pd), "NegativeBinomialDistribution"); 642s assert (pd.R, 1); 642s assert (pd.P, 0.3); 642s ***** test 642s pd = makedist ("Normal"); 642s assert (class (pd), "NormalDistribution"); 642s assert (pd.mu, 0); 642s assert (pd.sigma, 1); 642s ***** test 642s pd = makedist ("Normal", "mu", 5); 642s assert (class (pd), "NormalDistribution"); 642s assert (pd.mu, 5); 642s assert (pd.sigma, 1); 642s ***** test 642s pd = makedist ("Normal", "sigma", 5); 642s assert (class (pd), "NormalDistribution"); 642s assert (pd.mu, 0); 642s assert (pd.sigma, 5); 642s ***** test 642s pd = makedist ("Normal", "mu", -3, "sigma", 5); 642s assert (class (pd), "NormalDistribution"); 642s assert (pd.mu, -3); 642s assert (pd.sigma, 5); 642s ***** test 642s pd = makedist ("PiecewiseLinear"); 642s assert (class (pd), "PiecewiseLinearDistribution"); 642s assert (pd.x, [0; 1]); 642s assert (pd.Fx, [0; 1]); 642s ***** test 642s pd = makedist ("PiecewiseLinear", "x", [0, 1, 2], "Fx", [0, 0.5, 1]); 642s assert (pd.x, [0; 1; 2]); 642s assert (pd.Fx, [0; 0.5; 1]); 642s ***** test 642s pd = makedist ("Poisson"); 642s assert (class (pd), "PoissonDistribution"); 642s assert (pd.lambda, 1); 642s ***** test 642s pd = makedist ("Poisson", "lambda", 5); 642s assert (pd.lambda, 5); 642s ***** test 642s pd = makedist ("Rayleigh"); 642s assert (class (pd), "RayleighDistribution"); 642s assert (pd.sigma, 1); 642s ***** test 642s pd = makedist ("Rayleigh", "sigma", 5); 642s assert (pd.sigma, 5); 642s ***** test 642s pd = makedist ("Rician"); 642s assert (class (pd), "RicianDistribution"); 642s assert (pd.s, 1); 642s assert (pd.sigma, 1); 642s ***** test 642s pd = makedist ("Rician", "s", 3); 642s assert (pd.s, 3); 642s assert (pd.sigma, 1); 642s ***** test 642s pd = makedist ("Rician", "sigma", 3); 642s assert (pd.s, 1); 642s assert (pd.sigma, 3); 642s ***** test 642s pd = makedist ("Rician", "s", 2, "sigma", 3); 642s assert (pd.s, 2); 642s assert (pd.sigma, 3); 642s ***** warning 642s pd = makedist ("stable"); 642s assert (class (pd), "double"); 642s assert (isempty (pd), true); 642s ***** test 642s pd = makedist ("tlocationscale"); 642s assert (class (pd), "tLocationScaleDistribution"); 642s assert (pd.mu, 0); 642s assert (pd.sigma, 1); 642s assert (pd.nu, 5); 642s ***** test 642s pd = makedist ("tlocationscale", "mu", 5); 642s assert (pd.mu, 5); 642s assert (pd.sigma, 1); 642s assert (pd.nu, 5); 642s ***** test 642s pd = makedist ("tlocationscale", "sigma", 2); 642s assert (pd.mu, 0); 642s assert (pd.sigma, 2); 642s assert (pd.nu, 5); 642s ***** test 642s pd = makedist ("tlocationscale", "mu", 5, "sigma", 2); 642s assert (pd.mu, 5); 642s assert (pd.sigma, 2); 642s assert (pd.nu, 5); 643s ***** test 643s pd = makedist ("tlocationscale", "nu", 1, "sigma", 2); 643s assert (pd.mu, 0); 643s assert (pd.sigma, 2); 643s assert (pd.nu, 1); 643s ***** test 643s pd = makedist ("tlocationscale", "mu", -2, "sigma", 3, "nu", 1); 643s assert (pd.mu, -2); 643s assert (pd.sigma, 3); 643s assert (pd.nu, 1); 643s ***** test 643s pd = makedist ("Triangular"); 643s assert (class (pd), "TriangularDistribution"); 643s assert (pd.A, 0); 643s assert (pd.B, 0.5); 643s assert (pd.C, 1); 643s ***** test 643s pd = makedist ("Triangular", "A", -2); 643s assert (pd.A, -2); 643s assert (pd.B, 0.5); 643s assert (pd.C, 1); 643s ***** test 643s pd = makedist ("Triangular", "A", 0.5, "B", 0.9); 643s assert (pd.A, 0.5); 643s assert (pd.B, 0.9); 643s assert (pd.C, 1); 643s ***** test 643s pd = makedist ("Triangular", "A", 1, "B", 2, "C", 5); 643s assert (pd.A, 1); 643s assert (pd.B, 2); 643s assert (pd.C, 5); 643s ***** test 643s pd = makedist ("Uniform"); 643s assert (class (pd), "UniformDistribution"); 643s assert (pd.Lower, 0); 643s assert (pd.Upper, 1); 643s ***** test 643s pd = makedist ("Uniform", "Lower", -2); 643s assert (pd.Lower, -2); 643s assert (pd.Upper, 1); 643s ***** test 643s pd = makedist ("Uniform", "Lower", 1, "Upper", 3); 643s assert (pd.Lower, 1); 643s assert (pd.Upper, 3); 643s ***** test 643s pd = makedist ("Weibull"); 643s assert (class (pd), "WeibullDistribution"); 643s assert (pd.lambda, 1); 643s assert (pd.k, 1); 643s ***** test 643s pd = makedist ("Weibull", "lambda", 3); 643s assert (pd.lambda, 3); 643s assert (pd.k, 1); 643s ***** test 643s pd = makedist ("Weibull", "lambda", 3, "k", 2); 643s assert (pd.lambda, 3); 643s assert (pd.k, 2); 643s ***** error makedist (1) 643s ***** error makedist (["as";"sd"]) 643s ***** error makedist ("some") 643s ***** error ... 643s makedist ("Beta", "a") 643s ***** error ... 643s makedist ("Beta", "a", 1, "Q", 23) 643s ***** error ... 643s makedist ("Binomial", "N", 1, "Q", 23) 643s ***** error ... 643s makedist ("BirnbaumSaunders", "N", 1) 643s ***** error ... 643s makedist ("Burr", "lambda", 1, "sdfs", 34) 643s ***** error ... 643s makedist ("extremevalue", "mu", 1, "sdfs", 34) 643s ***** error ... 643s makedist ("exponential", "mu", 1, "sdfs", 34) 643s ***** error ... 643s makedist ("Gamma", "k", 1, "sdfs", 34) 643s ***** error ... 643s makedist ("GeneralizedExtremeValue", "k", 1, "sdfs", 34) 643s ***** error ... 643s makedist ("GeneralizedPareto", "k", 1, "sdfs", 34) 643s ***** error ... 643s makedist ("HalfNormal", "k", 1, "sdfs", 34) 643s ***** error ... 643s makedist ("InverseGaussian", "k", 1, "sdfs", 34) 643s ***** error ... 643s makedist ("Logistic", "k", 1, "sdfs", 34) 643s ***** error ... 643s makedist ("Loglogistic", "k", 1, "sdfs", 34) 643s ***** error ... 643s makedist ("Lognormal", "k", 1, "sdfs", 34) 643s ***** error ... 643s makedist ("Loguniform", "k", 1, "sdfs", 34) 643s ***** error ... 643s makedist ("Multinomial", "k", 1, "sdfs", 34) 643s ***** error ... 643s makedist ("Nakagami", "mu", 1, "sdfs", 34) 643s ***** error ... 643s makedist ("NegativeBinomial", "mu", 1, "sdfs", 34) 643s ***** error ... 643s makedist ("Normal", "mu", 1, "sdfs", 34) 643s ***** error ... 643s makedist ("PiecewiseLinear", "mu", 1, "sdfs", 34) 643s ***** error ... 643s makedist ("Poisson", "mu", 1, "sdfs", 34) 643s ***** error ... 643s makedist ("Rayleigh", "mu", 1, "sdfs", 34) 643s ***** error ... 643s makedist ("Rician", "mu", 1, "sdfs", 34) 643s ***** error ... 643s makedist ("Stable", "mu", 1, "sdfs", 34) 643s ***** error ... 643s makedist ("tLocationScale", "mu", 1, "sdfs", 34) 643s ***** error ... 643s makedist ("Triangular", "mu", 1, "sdfs", 34) 643s ***** error ... 643s makedist ("Uniform", "mu", 1, "sdfs", 34) 643s ***** error ... 643s makedist ("Weibull", "mu", 1, "sdfs", 34) 643s 131 tests, 131 passed, 0 known failure, 0 skipped 643s [inst/dist_wrap/mle.m] 643s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_wrap/mle.m 643s ***** error mle (ones (2)) 643s ***** error mle ("text") 643s ***** error mle ([1, 2, 3, i, 5]) 643s ***** error ... 643s mle ([1:50], "distribution") 643s ***** error ... 643s mle ([1:50], "censoring", logical ([1,0,1,0])) 643s ***** error ... 643s mle ([1:50], "frequency", [1,0,1,0]) 643s ***** error ... 643s mle ([1 0 1 0], "frequency", [-1 1 0 0]) 643s ***** error ... 643s mle ([1 0 1 0], "distribution", "nbin", "frequency", [-1 1 0 0]) 643s ***** error mle ([1:50], "alpha", [0.05, 0.01]) 643s ***** error mle ([1:50], "alpha", 1) 643s ***** error mle ([1:50], "alpha", -1) 643s ***** error mle ([1:50], "alpha", i) 643s ***** error ... 643s mle ([1:50], "ntrials", -1) 643s ***** error ... 643s mle ([1:50], "ntrials", [20, 50]) 643s ***** error ... 643s mle ([1:50], "ntrials", [20.3]) 643s ***** error ... 643s mle ([1:50], "ntrials", 3i) 643s ***** error ... 643s mle ([1:50], "options", 4) 643s ***** error ... 643s mle ([1:50], "options", struct ("x", 3)) 643s ***** error mle ([1:50], "NAME", "value") 643s ***** error ... 643s mle ([1 0 1 0], "distribution", "bernoulli", "censoring", [1 1 0 0]) 643s ***** error ... 643s mle ([1 2 1 0], "distribution", "bernoulli") 643s ***** error ... 643s mle ([1 0 1 0], "distribution", "beta", "censoring", [1 1 0 0]) 643s ***** error ... 643s mle ([1 0 1 0], "distribution", "bino", "censoring", [1 1 0 0]) 643s ***** error ... 643s mle ([1 0 1 0], "distribution", "bino") 643s ***** error ... 643s mle ([1 0 1 0], "distribution", "geo", "censoring", [1 1 0 0]) 643s ***** error ... 643s mle ([1 0 1 0], "distribution", "gev", "censoring", [1 1 0 0]) 643s ***** error ... 643s mle ([1 0 1 0], "distribution", "gp", "censoring", [1 1 0 0]) 643s ***** error ... 643s mle ([1 0 -1 0], "distribution", "gp") 643s ***** error ... 643s mle ([1 0 1 0], "distribution", "hn", "censoring", [1 1 0 0]) 643s ***** error ... 643s mle ([1 0 -1 0], "distribution", "hn") 643s ***** error ... 643s mle ([1 0 1 0], "distribution", "nbin", "censoring", [1 1 0 0]) 643s ***** error ... 643s mle ([1 0 1 0], "distribution", "poisson", "censoring", [1 1 0 0]) 643s ***** error ... 643s mle ([1 0 1 0], "distribution", "unid", "censoring", [1 1 0 0]) 643s ***** error ... 643s mle ([1 0 1 0], "distribution", "unif", "censoring", [1 1 0 0]) 643s ***** error mle ([1:50], "distribution", "value") 643s ***** error ... 643s mle ([1 0 1 0], "distribution", "unif", "censoring", [1 1 0 0]) 643s 36 tests, 36 passed, 0 known failure, 0 skipped 643s [inst/dist_wrap/pdf.m] 643s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_wrap/pdf.m 643s ***** shared x 643s x = [1:5]; 643s ***** assert (pdf ("Beta", x, 5, 2), betapdf (x, 5, 2)) 643s ***** assert (pdf ("beta", x, 5, 2), betapdf (x, 5, 2)) 643s ***** assert (pdf ("Binomial", x, 5, 2), binopdf (x, 5, 2)) 643s ***** assert (pdf ("bino", x, 5, 2), binopdf (x, 5, 2)) 643s ***** assert (pdf ("Birnbaum-Saunders", x, 5, 2), bisapdf (x, 5, 2)) 643s ***** assert (pdf ("bisa", x, 5, 2), bisapdf (x, 5, 2)) 643s ***** assert (pdf ("Burr", x, 5, 2, 2), burrpdf (x, 5, 2, 2)) 643s ***** assert (pdf ("burr", x, 5, 2, 2), burrpdf (x, 5, 2, 2)) 643s ***** assert (pdf ("Cauchy", x, 5, 2), cauchypdf (x, 5, 2)) 643s ***** assert (pdf ("cauchy", x, 5, 2), cauchypdf (x, 5, 2)) 643s ***** assert (pdf ("Chi-squared", x, 5), chi2pdf (x, 5)) 643s ***** assert (pdf ("chi2", x, 5), chi2pdf (x, 5)) 643s ***** assert (pdf ("Extreme Value", x, 5, 2), evpdf (x, 5, 2)) 643s ***** assert (pdf ("ev", x, 5, 2), evpdf (x, 5, 2)) 643s ***** assert (pdf ("Exponential", x, 5), exppdf (x, 5)) 643s ***** assert (pdf ("exp", x, 5), exppdf (x, 5)) 643s ***** assert (pdf ("F-Distribution", x, 5, 2), fpdf (x, 5, 2)) 643s ***** assert (pdf ("f", x, 5, 2), fpdf (x, 5, 2)) 643s ***** assert (pdf ("Gamma", x, 5, 2), gampdf (x, 5, 2)) 643s ***** assert (pdf ("gam", x, 5, 2), gampdf (x, 5, 2)) 643s ***** assert (pdf ("Geometric", x, 5), geopdf (x, 5)) 643s ***** assert (pdf ("geo", x, 5), geopdf (x, 5)) 643s ***** assert (pdf ("Generalized Extreme Value", x, 5, 2, 2), gevpdf (x, 5, 2, 2)) 643s ***** assert (pdf ("gev", x, 5, 2, 2), gevpdf (x, 5, 2, 2)) 643s ***** assert (pdf ("Generalized Pareto", x, 5, 2, 2), gppdf (x, 5, 2, 2)) 643s ***** assert (pdf ("gp", x, 5, 2, 2), gppdf (x, 5, 2, 2)) 643s ***** assert (pdf ("Gumbel", x, 5, 2), gumbelpdf (x, 5, 2)) 643s ***** assert (pdf ("gumbel", x, 5, 2), gumbelpdf (x, 5, 2)) 643s ***** assert (pdf ("Half-normal", x, 5, 2), hnpdf (x, 5, 2)) 643s ***** assert (pdf ("hn", x, 5, 2), hnpdf (x, 5, 2)) 643s ***** assert (pdf ("Hypergeometric", x, 5, 2, 2), hygepdf (x, 5, 2, 2)) 643s ***** assert (pdf ("hyge", x, 5, 2, 2), hygepdf (x, 5, 2, 2)) 643s ***** assert (pdf ("Inverse Gaussian", x, 5, 2), invgpdf (x, 5, 2)) 643s ***** assert (pdf ("invg", x, 5, 2), invgpdf (x, 5, 2)) 643s ***** assert (pdf ("Laplace", x, 5, 2), laplacepdf (x, 5, 2)) 643s ***** assert (pdf ("laplace", x, 5, 2), laplacepdf (x, 5, 2)) 643s ***** assert (pdf ("Logistic", x, 5, 2), logipdf (x, 5, 2)) 643s ***** assert (pdf ("logi", x, 5, 2), logipdf (x, 5, 2)) 643s ***** assert (pdf ("Log-Logistic", x, 5, 2), loglpdf (x, 5, 2)) 643s ***** assert (pdf ("logl", x, 5, 2), loglpdf (x, 5, 2)) 643s ***** assert (pdf ("Lognormal", x, 5, 2), lognpdf (x, 5, 2)) 643s ***** assert (pdf ("logn", x, 5, 2), lognpdf (x, 5, 2)) 643s ***** assert (pdf ("Nakagami", x, 5, 2), nakapdf (x, 5, 2)) 643s ***** assert (pdf ("naka", x, 5, 2), nakapdf (x, 5, 2)) 643s ***** assert (pdf ("Negative Binomial", x, 5, 2), nbinpdf (x, 5, 2)) 643s ***** assert (pdf ("nbin", x, 5, 2), nbinpdf (x, 5, 2)) 643s ***** assert (pdf ("Noncentral F-Distribution", x, 5, 2, 2), ncfpdf (x, 5, 2, 2)) 643s ***** assert (pdf ("ncf", x, 5, 2, 2), ncfpdf (x, 5, 2, 2)) 643s ***** assert (pdf ("Noncentral Student T", x, 5, 2), nctpdf (x, 5, 2)) 643s ***** assert (pdf ("nct", x, 5, 2), nctpdf (x, 5, 2)) 644s ***** assert (pdf ("Noncentral Chi-Squared", x, 5, 2), ncx2pdf (x, 5, 2)) 644s ***** assert (pdf ("ncx2", x, 5, 2), ncx2pdf (x, 5, 2)) 644s ***** assert (pdf ("Normal", x, 5, 2), normpdf (x, 5, 2)) 644s ***** assert (pdf ("norm", x, 5, 2), normpdf (x, 5, 2)) 644s ***** assert (pdf ("Poisson", x, 5), poisspdf (x, 5)) 644s ***** assert (pdf ("poiss", x, 5), poisspdf (x, 5)) 644s ***** assert (pdf ("Rayleigh", x, 5), raylpdf (x, 5)) 644s ***** assert (pdf ("rayl", x, 5), raylpdf (x, 5)) 644s ***** assert (pdf ("Rician", x, 5, 1), ricepdf (x, 5, 1)) 644s ***** assert (pdf ("rice", x, 5, 1), ricepdf (x, 5, 1)) 644s ***** assert (pdf ("Student T", x, 5), tpdf (x, 5)) 644s ***** assert (pdf ("t", x, 5), tpdf (x, 5)) 644s ***** assert (pdf ("location-scale T", x, 5, 1, 2), tlspdf (x, 5, 1, 2)) 644s ***** assert (pdf ("tls", x, 5, 1, 2), tlspdf (x, 5, 1, 2)) 644s ***** assert (pdf ("Triangular", x, 5, 2, 2), tripdf (x, 5, 2, 2)) 644s ***** assert (pdf ("tri", x, 5, 2, 2), tripdf (x, 5, 2, 2)) 644s ***** assert (pdf ("Discrete Uniform", x, 5), unidpdf (x, 5)) 644s ***** assert (pdf ("unid", x, 5), unidpdf (x, 5)) 644s ***** assert (pdf ("Uniform", x, 5, 2), unifpdf (x, 5, 2)) 644s ***** assert (pdf ("unif", x, 5, 2), unifpdf (x, 5, 2)) 644s ***** assert (pdf ("Von Mises", x, 5, 2), vmpdf (x, 5, 2)) 644s ***** assert (pdf ("vm", x, 5, 2), vmpdf (x, 5, 2)) 644s ***** assert (pdf ("Weibull", x, 5, 2), wblpdf (x, 5, 2)) 644s ***** assert (pdf ("wbl", x, 5, 2), wblpdf (x, 5, 2)) 644s ***** error pdf (1) 644s ***** error pdf ({"beta"}) 644s ***** error pdf ("beta", {[1 2 3 4 5]}) 644s ***** error pdf ("beta", "text") 644s ***** error pdf ("beta", 1+i) 644s ***** error ... 644s pdf ("Beta", x, "a", 2) 644s ***** error ... 644s pdf ("Beta", x, 5, "") 644s ***** error ... 644s pdf ("Beta", x, 5, {2}) 644s ***** error pdf ("chi2", x) 644s ***** error pdf ("Beta", x, 5) 644s ***** error pdf ("Burr", x, 5) 644s ***** error pdf ("Burr", x, 5, 2) 644s 86 tests, 86 passed, 0 known failure, 0 skipped 644s [inst/dist_wrap/random.m] 644s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/dist_wrap/random.m 644s ***** assert (size (random ("Beta", 5, 2, 2, 10)), size (betarnd (5, 2, 2, 10))) 644s ***** assert (size (random ("beta", 5, 2, 2, 10)), size (betarnd (5, 2, 2, 10))) 644s ***** assert (size (random ("Binomial", 5, 2, [10, 20])), size (binornd (5, 2, 10, 20))) 644s ***** assert (size (random ("bino", 5, 2, [10, 20])), size (binornd (5, 2, 10, 20))) 644s ***** assert (size (random ("Birnbaum-Saunders", 5, 2, [10, 20])), size (bisarnd (5, 2, 10, 20))) 644s ***** assert (size (random ("bisa", 5, 2, [10, 20])), size (bisarnd (5, 2, 10, 20))) 644s ***** assert (size (random ("Burr", 5, 2, 2, [10, 20])), size (burrrnd (5, 2, 2, 10, 20))) 644s ***** assert (size (random ("burr", 5, 2, 2, [10, 20])), size (burrrnd (5, 2, 2, 10, 20))) 644s ***** assert (size (random ("Cauchy", 5, 2, [10, 20])), size (cauchyrnd (5, 2, 10, 20))) 644s ***** assert (size (random ("cauchy", 5, 2, [10, 20])), size (cauchyrnd (5, 2, 10, 20))) 644s ***** assert (size (random ("Chi-squared", 5, [10, 20])), size (chi2rnd (5, 10, 20))) 644s ***** assert (size (random ("chi2", 5, [10, 20])), size (chi2rnd (5, 10, 20))) 644s ***** assert (size (random ("Extreme Value", 5, 2, [10, 20])), size (evrnd (5, 2, 10, 20))) 644s ***** assert (size (random ("ev", 5, 2, [10, 20])), size (evrnd (5, 2, 10, 20))) 644s ***** assert (size (random ("Exponential", 5, [10, 20])), size (exprnd (5, 10, 20))) 644s ***** assert (size (random ("exp", 5, [10, 20])), size (exprnd (5, 10, 20))) 644s ***** assert (size (random ("F-Distribution", 5, 2, [10, 20])), size (frnd (5, 2, 10, 20))) 644s ***** assert (size (random ("f", 5, 2, [10, 20])), size (frnd (5, 2, 10, 20))) 644s ***** assert (size (random ("Gamma", 5, 2, [10, 20])), size (gamrnd (5, 2, 10, 20))) 644s ***** assert (size (random ("gam", 5, 2, [10, 20])), size (gamrnd (5, 2, 10, 20))) 644s ***** assert (size (random ("Geometric", 5, [10, 20])), size (geornd (5, 10, 20))) 644s ***** assert (size (random ("geo", 5, [10, 20])), size (geornd (5, 10, 20))) 644s ***** assert (size (random ("Generalized Extreme Value", 5, 2, 2, [10, 20])), size (gevrnd (5, 2, 2, 10, 20))) 644s ***** assert (size (random ("gev", 5, 2, 2, [10, 20])), size (gevrnd (5, 2, 2, 10, 20))) 644s ***** assert (size (random ("Generalized Pareto", 5, 2, 2, [10, 20])), size (gprnd (5, 2, 2, 10, 20))) 644s ***** assert (size (random ("gp", 5, 2, 2, [10, 20])), size (gprnd (5, 2, 2, 10, 20))) 644s ***** assert (size (random ("Gumbel", 5, 2, [10, 20])), size (gumbelrnd (5, 2, 10, 20))) 644s ***** assert (size (random ("gumbel", 5, 2, [10, 20])), size (gumbelrnd (5, 2, 10, 20))) 644s ***** assert (size (random ("Half-normal", 5, 2, [10, 20])), size (hnrnd (5, 2, 10, 20))) 644s ***** assert (size (random ("hn", 5, 2, [10, 20])), size (hnrnd (5, 2, 10, 20))) 644s ***** assert (size (random ("Hypergeometric", 5, 2, 2, [10, 20])), size (hygernd (5, 2, 2, 10, 20))) 644s ***** assert (size (random ("hyge", 5, 2, 2, [10, 20])), size (hygernd (5, 2, 2, 10, 20))) 644s ***** assert (size (random ("Inverse Gaussian", 5, 2, [10, 20])), size (invgrnd (5, 2, 10, 20))) 644s ***** assert (size (random ("invg", 5, 2, [10, 20])), size (invgrnd (5, 2, 10, 20))) 644s ***** assert (size (random ("Laplace", 5, 2, [10, 20])), size (laplacernd (5, 2, 10, 20))) 644s ***** assert (size (random ("laplace", 5, 2, [10, 20])), size (laplacernd (5, 2, 10, 20))) 644s ***** assert (size (random ("Logistic", 5, 2, [10, 20])), size (logirnd (5, 2, 10, 20))) 644s ***** assert (size (random ("logi", 5, 2, [10, 20])), size (logirnd (5, 2, 10, 20))) 644s ***** assert (size (random ("Log-Logistic", 5, 2, [10, 20])), size (loglrnd (5, 2, 10, 20))) 644s ***** assert (size (random ("logl", 5, 2, [10, 20])), size (loglrnd (5, 2, 10, 20))) 644s ***** assert (size (random ("Lognormal", 5, 2, [10, 20])), size (lognrnd (5, 2, 10, 20))) 644s ***** assert (size (random ("logn", 5, 2, [10, 20])), size (lognrnd (5, 2, 10, 20))) 644s ***** assert (size (random ("Nakagami", 5, 2, [10, 20])), size (nakarnd (5, 2, 10, 20))) 644s ***** assert (size (random ("naka", 5, 2, [10, 20])), size (nakarnd (5, 2, 10, 20))) 644s ***** assert (size (random ("Negative Binomial", 5, 2, [10, 20])), size (nbinrnd (5, 2, 10, 20))) 644s ***** assert (size (random ("nbin", 5, 2, [10, 20])), size (nbinrnd (5, 2, 10, 20))) 644s ***** assert (size (random ("Noncentral F-Distribution", 5, 2, 2, [10, 20])), size (ncfrnd (5, 2, 2, 10, 20))) 644s ***** assert (size (random ("ncf", 5, 2, 2, [10, 20])), size (ncfrnd (5, 2, 2, 10, 20))) 644s ***** assert (size (random ("Noncentral Student T", 5, 2, [10, 20])), size (nctrnd (5, 2, 10, 20))) 644s ***** assert (size (random ("nct", 5, 2, [10, 20])), size (nctrnd (5, 2, 10, 20))) 644s ***** assert (size (random ("Noncentral Chi-Squared", 5, 2, [10, 20])), size (ncx2rnd (5, 2, 10, 20))) 644s ***** assert (size (random ("ncx2", 5, 2, [10, 20])), size (ncx2rnd (5, 2, 10, 20))) 644s ***** assert (size (random ("Normal", 5, 2, [10, 20])), size (normrnd (5, 2, 10, 20))) 644s ***** assert (size (random ("norm", 5, 2, [10, 20])), size (normrnd (5, 2, 10, 20))) 644s ***** assert (size (random ("Poisson", 5, [10, 20])), size (poissrnd (5, 10, 20))) 644s ***** assert (size (random ("poiss", 5, [10, 20])), size (poissrnd (5, 10, 20))) 644s ***** assert (size (random ("Rayleigh", 5, [10, 20])), size (raylrnd (5, 10, 20))) 644s ***** assert (size (random ("rayl", 5, [10, 20])), size (raylrnd (5, 10, 20))) 644s ***** assert (size (random ("Rician", 5, 1, [10, 20])), size (ricernd (5, 1, 10, 20))) 644s ***** assert (size (random ("rice", 5, 1, [10, 20])), size (ricernd (5, 1, 10, 20))) 644s ***** assert (size (random ("Student T", 5, [10, 20])), size (trnd (5, 10, 20))) 644s ***** assert (size (random ("t", 5, [10, 20])), size (trnd (5, 10, 20))) 644s ***** assert (size (random ("location-scale T", 5, 1, 2, [10, 20])), size (tlsrnd (5, 1, 2, 10, 20))) 644s ***** assert (size (random ("tls", 5, 1, 2, [10, 20])), size (tlsrnd (5, 1, 2, 10, 20))) 644s ***** assert (size (random ("Triangular", 5, 2, 2, [10, 20])), size (trirnd (5, 2, 2, 10, 20))) 644s ***** assert (size (random ("tri", 5, 2, 2, [10, 20])), size (trirnd (5, 2, 2, 10, 20))) 644s ***** assert (size (random ("Discrete Uniform", 5, [10, 20])), size (unidrnd (5, 10, 20))) 644s ***** assert (size (random ("unid", 5, [10, 20])), size (unidrnd (5, 10, 20))) 644s ***** assert (size (random ("Uniform", 5, 2, [10, 20])), size (unifrnd (5, 2, 10, 20))) 644s ***** assert (size (random ("unif", 5, 2, [10, 20])), size (unifrnd (5, 2, 10, 20))) 644s ***** assert (size (random ("Von Mises", 5, 2, [10, 20])), size (vmrnd (5, 2, 10, 20))) 644s ***** assert (size (random ("vm", 5, 2, [10, 20])), size (vmrnd (5, 2, 10, 20))) 644s ***** assert (size (random ("Weibull", 5, 2, [10, 20])), size (wblrnd (5, 2, 10, 20))) 644s ***** assert (size (random ("wbl", 5, 2, [10, 20])), size (wblrnd (5, 2, 10, 20))) 644s ***** error random (1) 644s ***** error random ({"beta"}) 644s ***** error ... 644s random ("Beta", "a", 2) 644s ***** error ... 644s random ("Beta", 5, "") 644s ***** error ... 644s random ("Beta", 5, {2}) 644s ***** error ... 644s random ("Beta", "a", 2, 2, 10) 644s ***** error ... 644s random ("Beta", 5, "", 2, 10) 644s ***** error ... 644s random ("Beta", 5, {2}, 2, 10) 644s ***** error ... 644s random ("Beta", 5, "", 2, 10) 644s ***** error random ("chi2") 644s ***** error random ("Beta", 5) 644s ***** error random ("Burr", 5) 644s ***** error random ("Burr", 5, 2) 644s 87 tests, 87 passed, 0 known failure, 0 skipped 644s [inst/ecdf.m] 644s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/ecdf.m 644s ***** demo 644s y = exprnd (10, 50, 1); ## random failure times are exponential(10) 644s d = exprnd (20, 50, 1); ## drop-out times are exponential(20) 644s t = min (y, d); ## we observe the minimum of these times 644s censored = (y > d); ## we also observe whether the subject failed 644s 644s ## Calculate and plot the empirical cdf and confidence bounds 644s [f, x, flo, fup] = ecdf (t, "censoring", censored); 644s stairs (x, f); 644s hold on; 644s stairs (x, flo, "r:"); stairs (x, fup, "r:"); 644s 644s ## Superimpose a plot of the known true cdf 644s xx = 0:.1:max (t); yy = 1 - exp (-xx / 10); plot (xx, yy, "g-"); 644s hold off; 644s ***** demo 644s R = wblrnd (100, 2, 100, 1); 644s ecdf (R, "Function", "survivor", "Alpha", 0.01, "Bounds", "on"); 644s hold on 644s x = 1:1:250; 644s wblsurv = 1 - cdf ("weibull", x, 100, 2); 644s plot (x, wblsurv, "g-", "LineWidth", 2) 644s legend ("Empirical survivor function", "Lower confidence bound", ... 644s "Upper confidence bound", "Weibull survivor function", ... 644s "Location", "northeast"); 644s hold off 644s ***** error ecdf (); 644s ***** error ecdf (randi (15,2)); 644s ***** error ecdf ([3,2,4,3+2i,5]); 644s ***** error kstest ([2,3,4,5,6],"tail"); 644s ***** error kstest ([2,3,4,5,6],"tail", "whatever"); 644s ***** error kstest ([2,3,4,5,6],"function", ""); 644s ***** error kstest ([2,3,4,5,6],"badoption", 0.51); 644s ***** error kstest ([2,3,4,5,6],"tail", 0); 644s ***** error kstest ([2,3,4,5,6],"alpha", 0); 644s ***** error kstest ([2,3,4,5,6],"alpha", NaN); 644s ***** error kstest ([NaN,NaN,NaN,NaN,NaN],"tail", "unequal"); 644s ***** error kstest ([2,3,4,5,6],"alpha", 0.05, "CDF", [2,3,4;1,3,4;1,2,1]); 644s ***** test 644s hf = figure ("visible", "off"); 644s unwind_protect 644s x = [2, 3, 4, 3, 5, 4, 6, 5, 8, 3, 7, 8, 9, 0]; 644s [F, x, Flo, Fup] = ecdf (x); 644s F_out = [0; 0.0714; 0.1429; 0.3571; 0.5; 0.6429; 0.7143; 0.7857; 0.9286; 1]; 644s assert (F, F_out, ones (10,1) * 1e-4); 644s x_out = [0 0 2 3 4 5 6 7 8 9]'; 644s assert (x, x_out); 644s Flo_out = [NaN, 0, 0, 0.1061, 0.2381, 0.3919, 0.4776, 0.5708, 0.7937, NaN]'; 644s assert (Flo, Flo_out, ones (10,1) * 1e-4); 644s Fup_out = [NaN, 0.2063, 0.3262, 0.6081, 0.7619, 0.8939, 0.9509, 1, 1, NaN]'; 644s assert (Fup, Fup_out, ones (10,1) * 1e-4); 644s unwind_protect_cleanup 644s close (hf); 644s end_unwind_protect 644s ***** test 644s hf = figure ("visible", "off"); 644s unwind_protect 644s x = [2, 3, 4, 3, 5, 4, 6, 5, 8, 3, 7, 8, 9, 0]; 644s ecdf (x); 644s unwind_protect_cleanup 644s close (hf); 644s end_unwind_protect 645s 14 tests, 14 passed, 0 known failure, 0 skipped 645s [inst/einstein.m] 645s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/einstein.m 645s ***** demo 645s einstein (0.4, 0.6) 645s ***** demo 645s einstein (0.2, 0.5) 645s ***** demo 645s einstein (0.6, 0.1) 645s ***** test 645s hf = figure ("visible", "off"); 645s unwind_protect 645s tiles = einstein (0.4, 0.6); 645s assert (isstruct (tiles), true); 645s unwind_protect_cleanup 645s close (hf); 645s end_unwind_protect 645s ***** error einstein 645s ***** error einstein (0.5) 645s ***** error einstein (0, 0.9) 645s ***** error einstein (0.4, 1) 645s ***** error einstein (-0.4, 1) 645s 6 tests, 6 passed, 0 known failure, 0 skipped 645s [inst/evalclusters.m] 645s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/evalclusters.m 645s ***** demo 645s load fisheriris; 645s eva = evalclusters (meas, "kmeans", "calinskiharabasz", "KList", [1:6]) 645s plot (eva) 645s ***** error evalclusters () 645s ***** error evalclusters ([1 1;0 1]) 645s ***** error evalclusters ([1 1;0 1], "kmeans") 645s ***** error <'x' must be a numeric*> evalclusters ("abc", "kmeans", "gap") 645s ***** error evalclusters ([1 1;0 1], "xxx", "gap") 645s ***** error evalclusters ([1 1;0 1], [1 2], "gap") 645s ***** error evalclusters ([1 1;0 1], 1.2, "gap") 645s ***** error evalclusters ([1 1;0 1], [1; 2], 123) 645s ***** error evalclusters ([1 1;0 1], [1; 2], "xxx") 645s ***** error <'KList' can be empty*> evalclusters ([1 1;0 1], "kmeans", "gap") 645s ***** error evalclusters ([1 1;0 1], [1; 2], "gap", 1) 645s ***** error evalclusters ([1 1;0 1], [1; 2], "gap", 1, 1) 645s ***** error evalclusters ([1 1;0 1], [1; 2], "gap", "xxx", 1) 645s ***** error <'KList'*> evalclusters ([1 1;0 1], [1; 2], "gap", "KList", [-1 0]) 645s ***** error <'KList'*> evalclusters ([1 1;0 1], [1; 2], "gap", "KList", [1 .5]) 645s ***** error <'KList'*> evalclusters ([1 1;0 1], [1; 2], "gap", "KList", [1 1; 1 1]) 645s ***** error evalclusters ([1 1;0 1], [1; 2], "gap", ... 645s "distance", "a") 645s ***** error evalclusters ([1 1;0 1], [1; 2], "daviesbouldin", ... 645s "distance", "a") 645s ***** error evalclusters ([1 1;0 1], [1; 2], "gap", ... 645s "clusterpriors", "equal") 645s ***** error evalclusters ([1 1;0 1], [1; 2], ... 645s "silhouette", "clusterpriors", "xxx") 645s ***** error <'clust' must be a clustering*> evalclusters ([1 1;0 1], [1; 2], "gap") 645s ***** test 645s load fisheriris; 645s eva = evalclusters (meas, "kmeans", "calinskiharabasz", "KList", [1:6]); 645s assert (isa (eva, "CalinskiHarabaszEvaluation")); 645s assert (eva.NumObservations, 150); 645s assert (eva.OptimalK, 3); 645s assert (eva.InspectedK, [1 2 3 4 5 6]); 645s 22 tests, 22 passed, 0 known failure, 0 skipped 645s [inst/factoran.m] 645s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/factoran.m 645s ***** demo 645s x = [ 7 26 6 60; 645s 1 29 15 52; 645s 11 56 8 20; 645s 11 31 8 47; 645s 7 52 6 33; 645s 11 55 9 22; 645s 3 71 17 6; 645s 1 31 22 44; 645s 2 54 18 22; 645s 21 47 4 26; 645s 1 40 23 34; 645s 11 66 9 12; 645s 10 68 8 12 645s ]; 645s [loadings, specvar, fscores] = factoran (x, 2); 645s ***** test 645s x = [1, 2; 2, 1; 3, 3]; 645s [loadings, specvar, fscores] = factoran (x, 1); 645s l_out = [0.7071; 0.7071]; 645s s_out = [0.5000; 0.5000]; 645s f_out = [-0.7071; -0.7071; 1.4142]; 645s assert (loadings, l_out, 1.3e-4); 645s assert (specvar, s_out, 1.3e-4); 645s assert (fscores, f_out, 1.3e-4); 645s ***** error factoran () 645s ***** error factoran (ones (5,3), 0) 645s ***** error factoran (ones (5,3), 3) 645s ***** error factoran ({1,2}, 1) 645s ***** error factoran (ones (2,2,2), 1) 645s ***** error x=ones (3,2); x(:,2)=0; factoran (x,1) 645s 7 tests, 7 passed, 0 known failure, 0 skipped 645s [inst/ff2n.m] 645s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/ff2n.m 645s ***** error ff2n (); 645s ***** error ff2n (2, 5); 645s ***** error ff2n (2.5); 645s ***** error ff2n (0); 645s ***** error ff2n (-3); 645s ***** error ff2n (3+2i); 645s ***** error ff2n (Inf); 645s ***** error ff2n (NaN); 645s ***** test 645s A = ff2n (3); 645s assert (A, [0, 0, 0; 0, 0, 1; 0, 1, 0; 0, 1, 1; ... 645s 1, 0, 0; 1, 0, 1; 1, 1, 0; 1, 1, 1]); 645s ***** test 645s A = ff2n (2); 645s assert (A, [0, 0; 0, 1; 1, 0; 1, 1]); 645s 10 tests, 10 passed, 0 known failure, 0 skipped 645s [inst/fillmissing.m] 645s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/fillmissing.m 645s ***** assert (fillmissing ([1, 2, 3], "constant", 99), [1, 2, 3]) 645s ***** assert (fillmissing ([1, 2, NaN], "constant", 99), [1, 2, 99]) 645s ***** assert (fillmissing ([NaN, 2, NaN], "constant", 99), [99, 2, 99]) 645s ***** assert (fillmissing ([1, 2, 3]', "constant", 99), [1, 2, 3]') 645s ***** assert (fillmissing ([1, 2, NaN]', "constant", 99), [1, 2, 99]') 645s ***** assert (fillmissing ([1, 2, 3; 4, 5, 6], "constant", 99), [1, 2, 3; 4, 5, 6]) 645s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "constant", 99), [1, 2, 99; 4, 99, 6]) 645s ***** assert (fillmissing ([NaN, 2, NaN; 4, NaN, 6], "constant", [97, 98, 99]), [97, 2, 99; 4, 98, 6]) 645s ***** test 645s x = cat (3, [1, 2, NaN; 4, NaN, 6], [NaN, 2, 3; 4, 5, NaN]); 645s y = cat (3, [1, 2, 99; 4, 99, 6], [99, 2, 3; 4, 5, 99]); 645s assert (fillmissing (x, "constant", 99), y); 645s y = cat (3, [1, 2, 96; 4, 95, 6], [97, 2, 3; 4, 5, 99]); 645s assert (fillmissing (x, "constant", [94:99]), y); 645s assert (fillmissing (x, "constant", [94:99]'), y); 645s assert (fillmissing (x, "constant", permute ([94:99], [1 3 2])), y); 645s assert (fillmissing (x, "constant", [94, 96, 98; 95, 97, 99]), y); 645s assert (fillmissing (x, "constant", [94:99], 1), y); 645s y = cat (3, [1, 2, 96; 4, 97, 6], [98, 2, 3; 4, 5, 99]); 645s assert (fillmissing (x, "constant", [96:99], 2), y); 645s y = cat (3, [1, 2, 98; 4, 97, 6], [94, 2, 3; 4, 5, 99]); 645s assert (fillmissing (x, "constant", [94:99], 3), y); 645s y = cat (3, [1, 2, 92; 4, 91, 6], [94, 2, 3; 4, 5, 99]); 645s assert (fillmissing (x, "constant", [88:99], 99), y); 645s ***** test 645s x = reshape ([1:24], 4, 3, 2); 645s x([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = NaN; 645s y = x; 645s y([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = [94, 95, 95, 96, 96, 97, 97, 98, 99, 99]; 645s assert (fillmissing (x, "constant", [94:99], 1), y); 645s y([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = [92, 93, 94, 92, 95, 97, 99, 98, 97, 98]; 645s assert (fillmissing (x, "constant", [92:99], 2), y); 645s y([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = [88, 93, 94, 96, 99, 89, 91, 94, 97, 98]; 645s assert (fillmissing (x, "constant", [88:99], 3), y); 645s y([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = [76, 81, 82, 84, 87, 89, 91, 94, 97, 98]; 645s assert (fillmissing (x, "constant", [76:99], 99), y); 645s ***** assert (fillmissing ([1, 2, 3], "constant", 99, "endvalues", 88), [1, 2, 3]) 645s ***** assert (fillmissing ([1, NaN, 3], "constant", 99, "endvalues", 88), [1, 99, 3]) 645s ***** assert (fillmissing ([1, 2, NaN], "constant", 99, "endvalues", 88), [1, 2, 88]) 645s ***** assert (fillmissing ([NaN, 2, 3], "constant", 99, "endvalues", 88), [88, 2, 3]) 645s ***** assert (fillmissing ([NaN, NaN, 3], "constant", 99, "endvalues", 88), [88, 88, 3]) 645s ***** assert (fillmissing ([1, NaN, NaN], "constant", 99, "endvalues", 88), [1, 88, 88]) 645s ***** assert (fillmissing ([NaN, 2, NaN], "constant", 99, "endvalues", 88), [88, 2, 88]) 645s ***** assert (fillmissing ([NaN, 2, NaN]', "constant", 99, "endvalues", 88), [88, 2, 88]') 645s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "constant", 99, "endvalues", 88), [1, 99, 3, 99, 5]) 645s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "constant", 99, "endvalues", 88), [1, 99, 99, 99, 5]) 645s ***** assert (fillmissing ([NaN, NaN, NaN, NaN, 5], "constant", 99, "endvalues", 88), [88, 88, 88, 88, 5]) 645s ***** assert (fillmissing ([1, NaN, 3, 4, NaN], "constant", 99, "endvalues", 88), [1, 99, 3, 4, 88]) 645s ***** assert (fillmissing ([1, NaN, 3, 4, NaN], "constant", 99, 1, "endvalues", 88), [1, 88, 3, 4, 88]) 645s ***** assert (fillmissing ([1, NaN, 3, 4, NaN], "constant", 99, 1, "endvalues", "extrap"), [1, 99, 3, 4, 99]) 645s ***** test 645s x = reshape ([1:24], 3, 4, 2); 645s y = x; 645s x([1, 2, 5, 6, 8, 10, 13, 16, 18, 19, 20, 21, 22]) = NaN; 645s y([1, 2, 5, 6, 10, 13, 16, 18, 19, 20, 21, 22]) = 88; 645s y([8]) = 99; 645s assert (fillmissing (x, "constant", 99, "endvalues", 88), y); 645s assert (fillmissing (x, "constant", 99, 1, "endvalues", 88), y); 645s y = x; 645s y([1, 2, 5, 8, 10, 13, 16, 19, 22]) = 88; 645s y([6, 18, 20, 21]) = 99; 645s assert (fillmissing (x, "constant", 99, 2, "endvalues", 88), y); 645s y(y == 99) = 88; 645s assert (fillmissing (x, "constant", 99, 3, "endvalues", 88), y); 645s assert (fillmissing (x, "constant", 99, 4, "endvalues", 88), y); 645s assert (fillmissing (x, "constant", 99, 99, "endvalues", 88), y); 645s y([8]) = 94; 645s assert (fillmissing (x, "constant", [92:99], 1, "endvalues", 88), y); 645s y([6, 8, 18, 20, 21]) = [96, 88, 99, 98, 99]; 645s assert (fillmissing (x, "constant", [94:99], 2, "endvalues", 88), y); 645s y = x; 645s y(isnan (y)) = 88; 645s assert (fillmissing (x, "constant", [88:99], 3, "endvalues", 88), y); 645s y = x; 645s y(isnan (y)) = [82, 82, 83, 83, 94, 85, 86, 87, 87, 88, 88, 88, 89]; 645s assert (fillmissing (x, "constant", [92:99], 1, "endvalues", [82:89]), y); 645s y = x; 645s y(isnan (y)) = [84, 85, 85, 96, 85, 84, 87, 87, 99, 87, 98, 99, 87]; 645s assert (fillmissing (x, "constant", [94:99], 2, "endvalues", [84:89]), y); 645s y = x; 645s y(isnan (y)) = [68, 69, 72, 73, 75, 77, 68, 71, 73, 74, 75, 76, 77]; 645s assert (fillmissing (x, "constant", [88:99], 3, "endvalues", [68:79]), y); 645s assert (fillmissing (x, "constant", [88:93; 94:99]', 3, "endvalues", [68:73; 74:79]'), y) 645s ***** test 645s x = reshape ([1:24],4,3,2); 645s x([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = NaN; 645s y = x; 645s y([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = [94, 95, 95, 96, 96, 97, 97, 98, 99, 99]; 645s assert (fillmissing (x, "constant", [94:99], 1), y); 645s y([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = [92, 93, 94, 92, 95, 97, 99, 98, 97, 98]; 645s assert (fillmissing (x, "constant", [92:99], 2), y); 645s y([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = [88, 93, 94, 96, 99, 89, 91, 94, 97, 98]; 645s assert (fillmissing (x, "constant", [88:99], 3), y); 645s y([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = [76, 81, 82, 84, 87, 89, 91, 94, 97, 98]; 645s assert (fillmissing (x, "constant", [76:99], 99), y); 645s ***** assert (fillmissing ([1, 2, 3], "previous"), [1, 2, 3]) 645s ***** assert (fillmissing ([1, 2, 3], "next"), [1, 2, 3]) 645s ***** assert (fillmissing ([1, 2, 3]', "previous"), [1, 2, 3]') 645s ***** assert (fillmissing ([1, 2, 3]', "next"), [1, 2, 3]') 645s ***** assert (fillmissing ([1, 2, NaN], "previous"), [1, 2, 2]) 645s ***** assert (fillmissing ([1, 2, NaN], "next"), [1, 2, NaN]) 645s ***** assert (fillmissing ([NaN, 2, NaN], "previous"), [NaN, 2, 2]) 646s ***** assert (fillmissing ([NaN, 2, NaN], "next"), [2, 2, NaN]) 646s ***** assert (fillmissing ([1, NaN, 3], "previous"), [1, 1, 3]) 646s ***** assert (fillmissing ([1, NaN, 3], "next"), [1, 3, 3]) 646s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "previous", 1), [1, 2, NaN; 4, 2, 6]) 646s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "previous", 2), [1, 2, 2; 4, 4, 6]) 646s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "previous", 3), [1, 2, NaN; 4, NaN, 6]) 646s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "next", 1), [1, 2, 6; 4, NaN, 6]) 646s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "next", 2), [1, 2, NaN; 4, 6, 6]) 646s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "next", 3), [1, 2, NaN; 4, NaN, 6]) 646s ***** test 646s x = reshape ([1:24], 4, 3, 2); 646s x([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = NaN; 646s y = x; 646s y([1, 6, 7, 9, 14, 19, 22, 23]) = [2, 8, 8, 10, 15, 20, 24, 24]; 646s assert (fillmissing (x, "next", 1), y); 646s y = x; 646s y([1, 6, 7, 14, 16]) = [5, 10, 11, 18, 20]; 646s assert (fillmissing (x, "next", 2), y); 646s y = x; 646s y([1, 6, 9, 12]) = [13, 18, 21, 24]; 646s assert (fillmissing (x, "next", 3), y); 646s assert (fillmissing (x, "next", 99), x); 646s y = x; 646s y([6, 7, 12, 14, 16, 19, 22, 23]) = [5, 5, 11, 13, 15, 18, 21, 21]; 646s assert (fillmissing (x, "previous", 1), y); 646s y = x; 646s y([6, 7, 9, 12, 19, 22, 23]) = [2, 3, 5, 8, 15, 18, 15]; 646s assert (fillmissing (x, "previous", 2), y); 646s y = x; 646s y([14, 16, 22, 23]) = [2, 4, 10, 11]; 646s assert (fillmissing (x, "previous", 3), y); 646s assert (fillmissing (x, "previous", 99), x); 646s ***** assert (fillmissing ([1, 2, 3], "constant", 0, "endvalues", "previous"), [1, 2, 3]) 646s ***** assert (fillmissing ([1, 2, 3], "constant", 0, "endvalues", "next"), [1, 2, 3]) 646s ***** assert (fillmissing ([1, NaN, 3], "constant", 0, "endvalues", "previous"), [1, 0, 3]) 646s ***** assert (fillmissing ([1, NaN, 3], "constant", 0, "endvalues", "next"), [1, 0, 3]) 646s ***** assert (fillmissing ([1, 2, NaN], "constant", 0, "endvalues", "previous"), [1, 2, 2]) 646s ***** assert (fillmissing ([1, 2, NaN], "constant", 0, "endvalues", "next"), [1, 2, NaN]) 646s ***** assert (fillmissing ([1, NaN, NaN], "constant", 0, "endvalues", "previous"), [1, 1, 1]) 646s ***** assert (fillmissing ([1, NaN, NaN], "constant", 0, "endvalues", "next"), [1, NaN, NaN]) 646s ***** assert (fillmissing ([NaN, 2, 3], "constant", 0, "endvalues", "previous"), [NaN, 2, 3]) 646s ***** assert (fillmissing ([NaN, 2, 3], "constant", 0, "endvalues", "next"), [2, 2, 3]) 646s ***** assert (fillmissing ([NaN, NaN, 3], "constant", 0, "endvalues", "previous"), [NaN, NaN, 3]) 646s ***** assert (fillmissing ([NaN, NaN, 3], "constant", 0, "endvalues", "next"), [3, 3, 3]) 646s ***** assert (fillmissing ([NaN, NaN, NaN], "constant", 0, "endvalues", "previous"), [NaN, NaN, NaN]) 646s ***** assert (fillmissing ([NaN, NaN, NaN], "constant", 0, "endvalues", "next"), [NaN, NaN, NaN]) 646s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 0, "endvalues", "previous"), [NaN, 2, 0, 4, 4]) 646s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 0, "endvalues", "next"), [2, 2, 0, 4, NaN]) 646s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 0, 1, "endvalues", "previous"), [NaN, 2, NaN, 4, NaN]) 646s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 0, 1, "endvalues", "next"), [NaN, 2, NaN, 4, NaN]) 646s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 0, 2, "endvalues", "previous"), [NaN, 2, 0, 4, 4]) 646s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 0, 2, "endvalues", "next"), [2, 2, 0, 4, NaN]) 646s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 0, 3, "endvalues", "previous"), [NaN, 2, NaN, 4, NaN]) 646s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 0, 3, "endvalues", "next"), [NaN, 2, NaN, 4, NaN]) 646s ***** test 646s x = reshape ([1:24], 3, 4, 2); 646s x([1, 2, 5, 6, 8, 10, 13, 16, 18, 19, 20, 21, 22]) = NaN; 646s y = x; 646s y([5, 6, 8, 18]) = [4, 4, 0, 17]; 646s assert (fillmissing (x, "constant", 0, "endvalues", "previous"), y); 646s assert (fillmissing (x, "constant", 0, 1, "endvalues", "previous"), y); 646s y = x; 646s y([6, 10, 18, 20, 21]) = [0, 7, 0, 0, 0]; 646s assert (fillmissing (x, "constant", 0, 2, "endvalues", "previous"), y); 646s y = x; 646s y([16, 19, 21]) = [4, 7, 9]; 646s assert (fillmissing (x, "constant", 0, 3, "endvalues", "previous"), y); 646s assert (fillmissing (x, "constant", 0, 4, "endvalues", "previous"), x); 646s assert (fillmissing (x, "constant", 0, 99, "endvalues", "previous"), x); 646s y = x; 646s y([1, 2, 8, 10, 13, 16, 22]) = [3, 3, 0, 11, 14, 17, 23]; 646s assert (fillmissing (x, "constant", 0, "endvalues", "next"), y); 646s assert (fillmissing (x, "constant", 0, 1, "endvalues", "next"), y); 646s y = x; 646s y([1, 2, 5, 6, 8, 18, 20, 21]) = [4, 11, 11, 0, 11, 0, 0, 0]; 646s assert (fillmissing (x, "constant", 0, 2, "endvalues", "next"), y); 646s y = x; 646s y([2, 5]) = [14, 17]; 646s assert (fillmissing (x, "constant", 0, 3, "endvalues", "next"), y); 646s assert (fillmissing (x, "constant", 0, 4, "endvalues", "next"), x); 646s assert (fillmissing (x, "constant", 0, 99, "endvalues", "next"), x); 646s ***** assert (fillmissing ([1, 2, 3], "nearest"), [1, 2, 3]) 646s ***** assert (fillmissing ([1, 2, 3]', "nearest"), [1, 2, 3]') 646s ***** assert (fillmissing ([1, 2, NaN], "nearest"), [1, 2, 2]) 646s ***** assert (fillmissing ([NaN, 2, NaN], "nearest"), [2, 2, 2]) 646s ***** assert (fillmissing ([1, NaN, 3], "nearest"), [1, 3, 3]) 646s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "nearest", 1), [1, 2, 6; 4, 2, 6]) 646s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "nearest", 2), [1, 2, 2; 4, 6, 6]) 646s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "nearest", 3), [1, 2, NaN; 4, NaN, 6]) 646s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "nearest"), [1, 3, 3, 5, 5]) 646s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "nearest", "samplepoints", [0, 1, 2, 3, 4]), [1, 3, 3, 5, 5]) 646s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "nearest", "samplepoints", [0.5, 1, 2, 3, 5]), [1, 1, 3, 3, 5]) 646s ***** test 646s x = reshape ([1:24], 4, 3, 2); 646s x([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = NaN; 646s y = x; 646s y([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = [2, 5, 8, 10, 11, 15, 15, 20, 21, 24]; 646s assert (fillmissing (x, "nearest", 1), y); 646s y = x; 646s y([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = [5, 10, 11, 5, 8, 18, 20, 15, 18, 15]; 646s assert (fillmissing (x, "nearest", 2), y); 646s y = x; 646s y([1, 6, 9, 12, 14, 16, 22, 23]) = [13, 18, 21, 24, 2, 4, 10, 11]; 646s assert (fillmissing (x, "nearest", 3), y); 646s assert (fillmissing (x, "nearest", 99), x); 646s ***** assert (fillmissing ([1, 2, 3], "constant", 0, "endvalues", "nearest"), [1, 2, 3]) 646s ***** assert (fillmissing ([1, NaN, 3], "constant", 0, "endvalues", "nearest"), [1 0 3]) 646s ***** assert (fillmissing ([1, 2, NaN], "constant", 0, "endvalues", "nearest"), [1, 2, 2]) 646s ***** assert (fillmissing ([1, NaN, NaN], "constant", 0, "endvalues", "nearest"), [1, 1, 1]) 646s ***** assert (fillmissing ([NaN, 2, 3], "constant", 0, "endvalues", "nearest"), [2, 2, 3]) 646s ***** assert (fillmissing ([NaN, NaN, 3], "constant", 0, "endvalues", "nearest"), [3, 3, 3]) 646s ***** assert (fillmissing ([NaN, NaN, NaN], "constant", 0, "endvalues", "nearest"), [NaN, NaN, NaN]) 646s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 0, "endvalues", "nearest"), [2, 2, 0, 4, 4]) 646s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 0, 1, "endvalues", "nearest"), [NaN, 2, NaN, 4, NaN]) 646s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 0, 2, "endvalues", "nearest"), [2, 2, 0, 4, 4]) 646s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 0, 3, "endvalues", "nearest"), [NaN, 2, NaN, 4, NaN]) 646s ***** test 646s x = reshape ([1:24], 3, 4, 2); 646s x([1, 2, 5, 6, 8, 10, 13, 16, 18, 19, 20, 21, 22]) = NaN; 646s y = x; 646s y([1, 2, 5, 6, 8, 10, 13, 16, 18, 22]) = [3, 3, 4, 4, 0, 11, 14, 17, 17, 23]; 646s assert (fillmissing (x, "constant", 0, "endvalues", "nearest"), y); 646s assert (fillmissing (x, "constant", 0, 1, "endvalues", "nearest"), y); 646s y = x; 646s y([1, 2, 5, 6, 8, 10, 18, 20, 21]) = [4, 11, 11, 0, 11, 7, 0, 0, 0]; 646s assert (fillmissing (x, "constant", 0, 2, "endvalues", "nearest"), y); 646s y = x; 646s y([2, 5, 16, 19, 21]) = [14, 17, 4, 7, 9]; 646s assert (fillmissing (x, "constant", 0, 3, "endvalues", "nearest"), y); 646s assert (fillmissing (x, "constant", 0, 99, "endvalues", "nearest"), x); 646s ***** assert (fillmissing ([1, 2, 3], "linear"), [1, 2, 3]) 646s ***** assert (fillmissing ([1, 2, 3]', "linear"), [1, 2, 3]') 646s ***** assert (fillmissing ([1, 2, NaN], "linear"), [1, 2, 3]) 646s ***** assert (fillmissing ([NaN, 2, NaN], "linear"), [NaN, 2, NaN]) 646s ***** assert (fillmissing ([1, NaN, 3], "linear"), [1, 2, 3]) 646s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "linear", 1), [1, 2, NaN; 4, NaN, 6]) 646s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "linear", 2), [1, 2, 3; 4, 5, 6]) 646s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "linear", 3), [1, 2, NaN; 4, NaN, 6]) 646s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "linear"), [1, 2, 3, 4, 5]) 646s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "linear", "samplepoints", [0, 1, 2, 3, 4]), [1, 2, 3, 4, 5]) 646s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "linear", "samplepoints", [0, 1.5, 2, 5, 14]), [1, 2.5, 3, 3.5, 5], eps) 646s ***** test 646s x = reshape ([1:24], 4, 3, 2); 646s x([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = NaN; 646s assert (fillmissing (x, "linear", 1), reshape ([1:24], 4, 3, 2)); 646s y = reshape ([1:24], 4, 3, 2); 646s y([1, 9, 14, 19, 22, 23]) = NaN; 646s assert (fillmissing (x, "linear", 2), y); 646s y = reshape ([1:24], 4, 3, 2); 646s y([1, 6, 7, 9, 12, 14, 16, 19, 22, 23]) = NaN; 646s assert (fillmissing (x, "linear", 3), y); 646s assert (fillmissing (x, "linear", 99), x); 646s ***** assert (fillmissing ([1, 2, 3], "linear", "endvalues", 0), [1, 2, 3]) 646s ***** assert (fillmissing ([1, NaN, 3], "linear", "endvalues", 0), [1, 2, 3]) 646s ***** assert (fillmissing ([1, 2, NaN], "linear", "endvalues", 0), [1, 2, 0]) 646s ***** assert (fillmissing ([1, NaN, NaN], "linear", "endvalues", 0), [1, 0, 0]) 646s ***** assert (fillmissing ([NaN, 2, 3], "linear", "endvalues", 0), [0, 2, 3]) 646s ***** assert (fillmissing ([NaN, NaN, 3], "linear", "endvalues", 0), [0, 0, 3]) 646s ***** assert (fillmissing ([NaN, NaN, NaN], "linear", "endvalues", 0), [0, 0, 0]) 646s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "linear", "endvalues", 0), [0, 2, 3, 4, 0]) 646s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "linear", 1, "endvalues", 0), [0, 2, 0, 4, 0]) 646s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "linear", 2, "endvalues", 0), [0, 2, 3, 4, 0]) 646s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "linear", 3, "endvalues", 0), [0, 2, 0, 4, 0]) 646s ***** test 646s x = reshape ([1:24], 3, 4, 2); 646s x([1, 2, 5, 6, 8, 10, 13, 16, 18, 19, 20, 21, 22]) = NaN; 646s y = x; 646s y([1, 2, 5, 6, 10, 13, 16, 18, 19, 20, 21, 22]) = 0; 646s y(8) = 8; 646s assert (fillmissing (x, "linear", "endvalues", 0), y); 646s assert (fillmissing (x, "linear", 1, "endvalues", 0), y); 646s y = x; 646s y([1, 2, 5, 8, 10, 13, 16, 19, 22]) = 0; 646s y([6, 18, 20, 21]) = [6, 18, 20, 21]; 646s assert (fillmissing (x, "linear", 2, "endvalues", 0), y); 646s y = x; 646s y(isnan(y)) = 0; 646s assert (fillmissing (x, "linear", 3, "endvalues", 0), y); 646s assert (fillmissing (x, "linear", 99, "endvalues", 0), y); 646s ***** assert (fillmissing ([1, 2, 3], "constant", 99, "endvalues", "linear"), [1, 2, 3]) 646s ***** assert (fillmissing ([1, NaN, 3], "constant", 99, "endvalues", "linear"), [1, 99, 3]) 646s ***** assert (fillmissing ([1, NaN, 3, NaN], "constant", 99, "endvalues", "linear"), [1, 99, 3, 4]) 646s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 99, "endvalues", "linear"), [1, 2, 99, 4, 5]) 646s ***** assert (fillmissing ([NaN, 2, NaN, NaN], "constant", 99, "endvalues", "linear"), [NaN, 2, NaN, NaN]) 646s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 99, "endvalues", "linear", "samplepoints", [1, 2, 3, 4, 5]), [1, 2, 99, 4, 5]) 646s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 99, "endvalues", "linear", "samplepoints", [0, 2, 3, 4, 10]), [0, 2, 99, 4, 10]) 646s ***** test 646s x = reshape ([1:24], 3, 4, 2); 646s x([1, 2, 5, 6, 8, 10, 13, 16, 18, 19, 20, 21, 22]) = NaN; 646s y = x; 646s y([1, 6, 10, 18, 20, 21]) = [2.5, 5, 8.5, 17.25, 21, 21.75]; 646s assert (fillmissing (x, "linear", 2, "samplepoints", [2 4 8 10]), y, eps); 646s y([1, 6, 10, 18, 20, 21]) = [2.5, 4.5, 8.5, 17.25, 21.5, 21.75]; 646s assert (fillmissing (x, "spline", 2, "samplepoints", [2, 4, 8, 10]), y, eps); 646s y([1, 6, 10, 18, 20, 21]) = [2.5, 4.559386973180077, 8.5, 17.25, 21.440613026819925, 21.75]; 646s assert (fillmissing (x, "pchip", 2, "samplepoints", [2, 4, 8, 10]), y, 10*eps); 646s ***** test <60965> 646s x = reshape ([1:24], 3, 4, 2); 646s x([1, 2, 5, 6, 8, 10, 13, 16, 18, 19, 20, 21, 22]) = NaN; 646s y = x; 646s y([1, 6, 10, 18, 20, 21]) = [2.5, 4.609523809523809, 8.5, 17.25, 21.390476190476186, 21.75]; 646s assert (fillmissing (x, "makima", 2, "samplepoints", [2, 4, 8, 10]), y, 10*eps); 646s !!!!! known bug: https://octave.org/testfailure/?60965 646s interp1: invalid METHOD 'makima' 646s ***** assert (fillmissing ([1, 2, 3], "constant", 99, "endvalues", "spline"), [1, 2, 3]) 646s ***** assert (fillmissing ([1, NaN, 3], "constant", 99, "endvalues", "spline"), [1, 99, 3]) 646s ***** assert (fillmissing ([1, NaN, 3, NaN], "constant", 99, "endvalues", "spline"), [1, 99, 3, 4]) 646s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 99, "endvalues", "spline"), [1, 2, 99, 4, 5]) 646s ***** assert (fillmissing ([NaN, 2, NaN, NaN], "constant", 99, "endvalues", "spline"), [NaN, 2, NaN, NaN]) 646s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 99, "endvalues", "spline", "samplepoints", [1, 2, 3, 4, 5]), [1, 2, 99, 4, 5]) 646s ***** assert (fillmissing ([NaN, 2, NaN, 4, NaN], "constant", 99, "endvalues", "spline", "samplepoints", [0, 2, 3, 4, 10]), [0, 2, 99, 4, 10]) 646s ***** assert (fillmissing ([1, 2, 3], "movmean", 1), [1, 2, 3]) 646s ***** assert (fillmissing ([1, 2, NaN], "movmean", 1), [1, 2, NaN]) 646s ***** assert (fillmissing ([1, 2, 3], "movmean", 2), [1, 2, 3]) 646s ***** assert (fillmissing ([1, 2, 3], "movmean", [1, 0]), [1, 2, 3]) 646s ***** assert (fillmissing ([1, 2, 3]', "movmean", 2), [1, 2, 3]') 646s ***** assert (fillmissing ([1, 2, NaN], "movmean", 2), [1, 2, 2]) 646s ***** assert (fillmissing ([1, 2, NaN], "movmean", [1, 0]), [1, 2, 2]) 646s ***** assert (fillmissing ([1, 2, NaN], "movmean", [1, 0]'), [1, 2, 2]) 646s ***** assert (fillmissing ([NaN, 2, NaN], "movmean", 2), [NaN, 2, 2]) 646s ***** assert (fillmissing ([NaN, 2, NaN], "movmean", [1, 0]), [NaN, 2, 2]) 646s ***** assert (fillmissing ([NaN, 2, NaN], "movmean", [0, 1]), [2, 2, NaN]) 646s ***** assert (fillmissing ([NaN, 2, NaN], "movmean", [0, 1.1]), [2, 2, NaN]) 646s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "movmean", [3, 0]), [1, 1, 3, 2, 5]) 646s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "movmean", 3, 1), [1, 2, 6; 4, 2, 6]) 646s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "movmean", 3, 2), [1, 2, 2; 4, 5, 6]) 646s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "movmean", 3, 3), [1, 2, NaN; 4, NaN, 6]) 646s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "movmean", 99), [1, 3, 3, 3, 5]) 646s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "movmean", 99, 1), [1, NaN, 3, NaN, 5]) 646s ***** assert (fillmissing ([1, NaN, 3, NaN, 5]', "movmean", 99, 1), [1, 3, 3, 3, 5]') 646s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "movmean", 99, 2), [1, 3, 3, 3, 5]) 646s ***** assert (fillmissing ([1, NaN, 3, NaN, 5]', "movmean", 99, 2), [1, NaN, 3, NaN, 5]') 646s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmean", 3, "samplepoints", [1, 2, 3, 4, 5]), [1, 1, NaN, 5, 5]) 646s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmean", [1, 1], "samplepoints", [1, 2, 3, 4, 5]), [1, 1, NaN, 5, 5]) 646s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmean", [1.5, 1.5], "samplepoints", [1, 2, 3, 4, 5]), [1, 1, NaN, 5, 5]) 646s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmean", 4, "samplepoints", [1, 2, 3, 4, 5]), [1, 1, 1, 5, 5]) 646s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmean", [2, 2], "samplepoints", [1, 2, 3, 4, 5]), [1, 1, 3, 5, 5]) 646s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmean", 4.0001, "samplepoints", [1, 2, 3, 4, 5]), [1, 1, 3, 5, 5]) 646s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmean", 3, "samplepoints", [1.5, 2, 3, 4, 5]), [1, 1, 1, 5, 5]) 646s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmean", 3, "samplepoints", [1 2, 3, 4, 4.5]), [1, 1, NaN, 5, 5]) 646s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmean", 3, "samplepoints", [1.5, 2, 3, 4, 4.5]), [1, 1, 1, 5, 5]) 646s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmean", [1.5, 1.5], "samplepoints", [1.5, 2, 3, 4, 5]), [1, 1, 1, 5, 5]) 646s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmean", [1.5, 1.5], "samplepoints", [1, 2, 3, 4, 4.5]), [1, 1, 5, 5, 5]) 646s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmean", [1.5, 1.5], "samplepoints", [1.5, 2 3, 4, 4.5]), [1, 1, 3, 5, 5]) 647s ***** test 647s x = reshape ([1:24], 3, 4, 2); 647s x([1, 2, 5, 6, 8, 10, 13, 16, 18, 19, 20, 21, 22]) = NaN; 647s y = x; 647s y([2, 5, 8, 10, 13, 16, 18, 22]) = [3, 4, 8, 11, 14, 17, 17, 23]; 647s assert (fillmissing (x, "movmean", 3), y); 647s assert (fillmissing (x, "movmean", [1, 1]), y); 647s assert (fillmissing (x, "movmean", 3, "endvalues", "extrap"), y); 647s assert (fillmissing (x, "movmean", 3, "samplepoints", [1, 2, 3]), y); 647s y = x; 647s y([1, 6, 8, 10, 18, 20, 21]) = [4, 6, 11, 7, 15, 20, 24]; 647s assert (fillmissing (x, "movmean", 3, 2), y); 647s assert (fillmissing (x, "movmean", [1, 1], 2), y); 647s assert (fillmissing (x, "movmean", 3, 2, "endvalues", "extrap"), y); 647s assert (fillmissing (x, "movmean", 3, 2, "samplepoints", [1, 2, 3, 4]), y); 647s y([1, 18]) = NaN; 647s y(6) = 9; 647s assert (fillmissing (x, "movmean", 3, 2, "samplepoints", [0, 2, 3, 4]), y); 647s y = x; 647s y([1, 2, 5, 6, 10, 13, 16, 18, 19, 20, 21, 22]) = 99; 647s y(8) = 8; 647s assert (fillmissing (x, "movmean", 3, "endvalues", 99), y); 647s y = x; 647s y([1, 2, 5, 8, 10, 13, 16, 19, 22]) = 99; 647s y([6, 18, 20, 21]) = [6, 15, 20, 24]; 647s assert (fillmissing (x, "movmean", 3, 2, "endvalues", 99), y); 647s ***** assert (fillmissing ([1, 2, 3], "movmedian", 1), [1, 2, 3]) 647s ***** assert (fillmissing ([1, 2, NaN], "movmedian", 1), [1, 2, NaN]) 647s ***** assert (fillmissing ([1, 2, 3], "movmedian", 2), [1, 2, 3]) 647s ***** assert (fillmissing ([1, 2, 3], "movmedian", [1, 0]), [1, 2, 3]) 647s ***** assert (fillmissing ([1, 2, 3]', "movmedian", 2), [1, 2, 3]') 647s ***** assert (fillmissing ([1, 2, NaN], "movmedian", 2), [1, 2, 2]) 647s ***** assert (fillmissing ([1, 2, NaN], "movmedian", [1, 0]), [1, 2, 2]) 647s ***** assert (fillmissing ([1, 2, NaN], "movmedian", [1, 0]'), [1, 2, 2]) 647s ***** assert (fillmissing ([NaN, 2, NaN], "movmedian", 2), [NaN, 2, 2]) 647s ***** assert (fillmissing ([NaN, 2, NaN], "movmedian", [1, 0]), [NaN, 2, 2]) 647s ***** assert (fillmissing ([NaN, 2, NaN], "movmedian", [0, 1]), [2, 2, NaN]) 647s ***** assert (fillmissing ([NaN, 2, NaN], "movmedian", [0, 1.1]), [2, 2, NaN]) 647s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "movmedian", [3, 0]), [1, 1, 3, 2, 5]) 647s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "movmedian", 3, 1), [1, 2, 6; 4, 2, 6]) 647s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "movmedian", 3, 2), [1, 2, 2; 4, 5, 6]) 647s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], "movmedian", 3, 3), [1, 2, NaN; 4, NaN, 6]) 647s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "movmedian", 99), [1, 3, 3, 3, 5]) 647s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "movmedian", 99, 1), [1, NaN, 3, NaN, 5]) 647s ***** assert (fillmissing ([1, NaN, 3, NaN, 5]', "movmedian", 99, 1), [1, 3, 3, 3, 5]') 647s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "movmedian", 99, 2), [1, 3, 3, 3, 5]) 647s ***** assert (fillmissing ([1, NaN, 3, NaN, 5]', "movmedian", 99, 2), [1, NaN, 3, NaN, 5]') 647s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmedian", 3, "samplepoints", [1, 2, 3, 4, 5]), [1, 1, NaN, 5, 5]) 647s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmedian", [1, 1], "samplepoints", [1, 2, 3, 4, 5]), [1, 1, NaN, 5, 5]) 647s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmedian", [1.5, 1.5], "samplepoints", [1, 2, 3, 4, 5]), [1, 1, NaN, 5, 5]) 647s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmedian", 4, "samplepoints", [1, 2, 3, 4, 5]), [1, 1, 1, 5, 5]) 647s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmedian", [2, 2], "samplepoints", [1, 2, 3, 4, 5]), [1, 1, 3, 5, 5]) 647s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmedian", 4.0001, "samplepoints", [1, 2, 3, 4, 5]), [1, 1, 3, 5, 5]) 647s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmedian", 3, "samplepoints", [1.5 2 3 4 5]), [1, 1, 1, 5, 5]) 647s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmedian", 3, "samplepoints", [1 2 3 4 4.5]), [1, 1, NaN, 5, 5]) 647s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmedian", 3, "samplepoints", [1.5 2 3 4 4.5]), [1, 1, 1, 5, 5]) 647s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmedian", [1.5, 1.5], "samplepoints", [1.5 2 3 4 5]), [1, 1, 1, 5, 5]) 647s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmedian", [1.5, 1.5], "samplepoints", [1 2 3 4 4.5]), [1, 1, 5, 5, 5]) 647s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], "movmedian", [1.5, 1.5], "samplepoints", [1.5 2 3 4 4.5]), [1, 1, 3, 5, 5]) 647s ***** test 647s x = reshape ([1:24], 3, 4, 2); 647s x([1, 2, 5, 6, 8, 10, 13, 16, 18, 19, 20, 21, 22]) = NaN; 647s y = x; 647s y([2, 5, 8, 10, 13, 16, 18, 22]) = [3, 4, 8, 11, 14, 17, 17, 23]; 647s assert (fillmissing (x, "movmedian", 3), y); 647s assert (fillmissing (x, "movmedian", [1, 1]), y); 647s assert (fillmissing (x, "movmedian", 3, "endvalues", "extrap"), y); 647s assert (fillmissing (x, "movmedian", 3, "samplepoints", [1, 2, 3]), y); 647s y = x; 647s y([1, 6, 8, 10, 18, 20, 21]) = [4, 6, 11, 7, 15, 20, 24]; 647s assert (fillmissing (x, "movmedian", 3, 2), y); 647s assert (fillmissing (x, "movmedian", [1, 1], 2), y); 647s assert (fillmissing (x, "movmedian", 3, 2, "endvalues", "extrap"), y); 647s assert (fillmissing (x, "movmedian", 3, 2, "samplepoints", [1, 2, 3, 4]), y); 647s y([1,18]) = NaN; 647s y(6) = 9; 647s assert (fillmissing (x, "movmedian", 3, 2, "samplepoints", [0, 2, 3, 4]), y); 647s y = x; 647s y([1, 2, 5, 6, 10, 13, 16, 18, 19, 20, 21, 22]) = 99; 647s y(8) = 8; 647s assert (fillmissing (x, "movmedian", 3, "endvalues", 99), y); 647s y = x; 647s y([1, 2, 5, 8, 10, 13, 16, 19, 22]) = 99; 647s y([6, 18, 20, 21]) = [6, 15, 20, 24]; 647s assert (fillmissing (x, "movmedian", 3, 2, "endvalues", 99), y); 647s ***** assert (fillmissing ([1, 2, 3], @(x,y,z) x+y+z, 2), [1, 2, 3]) 647s ***** assert (fillmissing ([1, 2, NaN], @(x,y,z) x+y+z, 1), [1, 2, NaN]) 647s ***** assert (fillmissing ([1, 2, 3], @(x,y,z) x+y+z, 2), [1, 2, 3]) 647s ***** assert (fillmissing ([1, 2, 3], @(x,y,z) x+y+z, [1, 0]), [1, 2, 3]) 647s ***** assert (fillmissing ([1, 2, 3]', @(x,y,z) x+y+z, 2), [1, 2, 3]') 647s ***** assert (fillmissing ([1, 2, NaN], @(x,y,z) x+y+z, 2), [1, 2, 7]) 647s ***** assert (fillmissing ([1, 2, NaN], @(x,y,z) x+y+z, [1, 0]), [1, 2, 7]) 647s ***** assert (fillmissing ([1, 2, NaN], @(x,y,z) x+y+z, [1, 0]'), [1, 2, 7]) 647s ***** assert (fillmissing ([NaN, 2, NaN], @(x,y,z) x+y+z, 2), [5, 2, 7]) 647s ***** assert (fillmissing ([NaN, 2, NaN], @(x,y,z) x+y+z, [1, 0]), [NaN, 2, 7]) 647s ***** assert (fillmissing ([NaN, 2, NaN], @(x,y,z) x+y+z, [0, 1]), [5, 2, NaN]) 647s ***** assert (fillmissing ([NaN, 2, NaN], @(x,y,z) x+y+z, [0, 1.1]), [5, 2, NaN]) 647s ***** assert (fillmissing ([1, 2, NaN, NaN, 3, 4], @(x,y,z) x+y+z, 2), [1, 2, 7, 12, 3, 4]) 647s ***** assert (fillmissing ([1, 2, NaN, NaN, 3, 4], @(x,y,z) x+y+z, 0.5), [1, 2, NaN, NaN, 3, 4]) 647s ***** function A = testfcn (x, y, z) 647s if (isempty (y)) 647s A = z; 647s elseif (numel (y) == 1) 647s A = repelem (x(1), numel(z)); 647s else 647s A = interp1 (y, x, z, "linear", "extrap"); 647s endif 647s ***** endfunction 647s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], @testfcn, [3, 0]), [1, 1, 3, NaN, 5]) 647s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], @testfcn, 3, 1), [1, 2, 6; 4, 2, 6]) 647s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], @testfcn, 3, 2), [1, 2, 2; 4, 5, 6]) 647s ***** assert (fillmissing ([1, 2, NaN; 4, NaN, 6], @testfcn, 3, 3), [1, 2, NaN; 4, NaN, 6]) 647s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], @testfcn, 99), [1, 2, 3, 4, 5]) 647s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], @testfcn, 99, 1), [1, NaN, 3, NaN, 5]) ##known not-compatible. matlab bug ML2022a: [1, 1, 3, 1, 5] 647s ***** assert (fillmissing ([1, NaN, 3, NaN, 5]', @testfcn, 99, 1), [1, 2, 3, 4, 5]') 647s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], @testfcn, 99, 2), [1, 2, 3, 4, 5]) 647s ***** assert (fillmissing ([1, NaN, 3, NaN, 5]', @testfcn, 99, 2), [1, NaN, 3, NaN, 5]') ##known not-compatible. matlab bug ML2022a: [1, 1, 3, 1, 5]' 647s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], @testfcn, 99, 3), [1, NaN, 3, NaN, 5]) 647s ***** assert (fillmissing ([1, NaN, 3, NaN, 5]', @testfcn, 99, 3), [1, NaN, 3, NaN, 5]') 647s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], @testfcn, 3, "samplepoints", [1, 2, 3, 4, 5]), [1, 2, 3, 4, 5]) 647s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], @testfcn, [1, 1], "samplepoints", [1, 2, 3, 4, 5]), [1, 2, 3, 4, 5]) 647s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], @testfcn, [1.5, 1.5], "samplepoints", [1, 2, 3, 4, 5]), [1, 2, 3, 4, 5]) 647s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], @testfcn, 4, "samplepoints", [1, 2, 3, 4, 5]), [1, 2, 3, 4, 5]) 647s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], @testfcn, [2, 2], "samplepoints", [1, 2, 3, 4, 5]), [1, 2, 3, 4, 5]) 647s ***** assert (fillmissing ([1, NaN, NaN, NaN, 5], @testfcn, 3, "samplepoints", [1, 2, 2.5, 3, 3.5]), [1, 2.6, 3.4, 4.2, 5], 10*eps) 647s ***** assert (fillmissing ([NaN, NaN, 3, NaN, 5], @testfcn, 99, 1), [NaN, NaN, 3, NaN, 5]) ##known not-compatible. matlab bug ML2022a: [1, 1, 3, 1, 5] 647s ***** test 647s ***** function A = testfcn (x, y, z) 647s if (isempty (y)) 647s A = z; 647s elseif (numel (y) == 1) 647s A = repelem (x(1), numel(z)); 647s else 647s A = interp1 (y, x, z, "linear", "extrap"); 647s endif 647s ***** endfunction 647s x = reshape ([1:24], 3, 4, 2); 647s x([1, 2, 5, 6, 8, 10, 13, 16, 18, 19, 20, 21, 22]) = NaN; 647s y = x; 647s y([1, 2, 5, 6, 8, 10, 13, 16, 18, 22]) = [3, 3, 4, 4, 8, 11, 14, 17, 17, 23]; 647s assert (fillmissing (x, @testfcn, 3), y); 647s assert (fillmissing (x, @testfcn, [1, 1]), y); 647s assert (fillmissing (x, @testfcn, 3, "endvalues", "extrap"), y); 647s assert (fillmissing (x, @testfcn, 3, "samplepoints", [1, 2, 3]), y); 647s y= x; 647s y(isnan (x)) = 99; 647s y(8) = 8; 647s assert (fillmissing (x, @testfcn, 3, "endvalues", 99), y) 647s y = x; 647s y([1, 2, 5, 6, 8, 10, 18, 20, 21]) = [4, 11, 11, 6, 11, 7, 18, 20, 21]; 647s assert (fillmissing (x, @testfcn, 3, 2), y); 647s assert (fillmissing (x, @testfcn, [1, 1], 2), y); 647s assert (fillmissing (x, @testfcn, 3, 2, "endvalues", "extrap"), y); 647s assert (fillmissing (x, @testfcn, 3, 2, "samplepoints", [1, 2, 3, 4]), y); 647s y(1) = NaN; 647s y([6, 18, 21]) = [9, 24, 24]; 647s assert (fillmissing (x, @testfcn, 3, 2, "samplepoints", [0, 2, 3, 4]), y); 647s y = x; 647s y([1, 2, 5, 6, 10, 13, 16, 18, 19, 20, 21, 22]) = 99; 647s y(8) = 8; 647s assert (fillmissing (x, @testfcn, 3, "endvalues", 99), y); 647s y([6, 18, 20, 21]) = [6, 18, 20, 21]; 647s y(8) = 99; 647s assert (fillmissing (x, @testfcn, 3, 2, "endvalues", 99), y); 647s y([6, 18, 20, 21]) = 99; 647s assert (fillmissing (x, @testfcn, 3, 3, "endvalues", 99), y); 647s ***** assert (fillmissing ([1, 2, 3], "constant", 0, "maxgap", 1), [1, 2, 3]) 647s ***** assert (fillmissing ([1, 2, 3], "constant", 0, "maxgap", 99), [1, 2, 3]) 647s ***** assert (fillmissing ([1, NaN, 3], "constant", 0, "maxgap", 1), [1, NaN, 3]) 647s ***** assert (fillmissing ([1, NaN, 3], "constant", 0, "maxgap", 1.999), [1, NaN, 3]) 647s ***** assert (fillmissing ([1, NaN, 3], "constant", 0, "maxgap", 2), [1, 0, 3]) 647s ***** assert (fillmissing ([1, NaN, NaN, 4], "constant", 0, "maxgap", 2), [1, NaN, NaN, 4]) 647s ***** assert (fillmissing ([1, NaN, NaN, 4], "constant", 0, "maxgap", 3), [1, 0, 0, 4]) 647s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "constant", 0, "maxgap", 2), [1, 0, 3, 0, 5]) 647s ***** assert (fillmissing ([NaN, 2, NaN], "constant", 0, "maxgap", 0.999), [NaN, 2, NaN]) 647s ***** assert (fillmissing ([NaN, 2, NaN], "constant", 0, "maxgap", 1), [0, 2, 0]) 647s ***** assert (fillmissing ([NaN, 2, NaN, NaN], "constant", 0, "maxgap", 1), [0, 2, NaN, NaN]) 647s ***** assert (fillmissing ([NaN, 2, NaN, NaN], "constant", 0, "maxgap", 2), [0, 2, 0, 0]) 647s ***** assert (fillmissing ([NaN, NaN, NaN], "constant", 0, "maxgap", 1), [NaN, NaN, NaN]) 647s ***** assert (fillmissing ([NaN, NaN, NaN], "constant", 0, "maxgap", 3), [NaN, NaN, NaN]) 647s ***** assert (fillmissing ([NaN, NaN, NaN], "constant", 0, "maxgap", 999), [NaN, NaN, NaN]) 647s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "constant", 0, "maxgap", 2, "samplepoints", [0, 1, 2, 3, 5]), [1, 0, 3, NaN, 5]) 647s ***** assert (fillmissing ([1, NaN, 3, NaN, 5]', "constant", 0, "maxgap", 2, "samplepoints", [0, 1, 2, 3, 5]), [1, 0, 3, NaN, 5]') 647s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "constant", 0, "maxgap", 2, "samplepoints", [0, 2, 3, 4, 5]), [1, NaN, 3, 0, 5]) 647s ***** assert (fillmissing ([1, NaN, 3, NaN, 5; 1, NaN, 3, NaN, 5], "constant", 0, 2, "maxgap", 2, "samplepoints", [0, 2, 3, 4, 5]), [1, NaN, 3, 0, 5; 1, NaN, 3, 0, 5]) 647s ***** test 647s x = cat (3, [1, 2, NaN; 4, NaN, NaN], [NaN, 2, 3; 4, 5, NaN]); 647s assert (fillmissing (x, "constant", 0, "maxgap", 0.1), x); 647s y = x; 647s y([4, 7, 12]) = 0; 647s assert (fillmissing (x, "constant", 0, "maxgap", 1), y); 647s assert (fillmissing (x, "constant", 0, 1, "maxgap", 1), y); 647s y = x; 647s y([5, 7, 12]) = 0; 647s assert (fillmissing (x, "constant", 0, 2, "maxgap", 1), y); 647s y = x; 647s y([4, 5, 7]) = 0; 647s assert (fillmissing (x, "constant", 0, 3, "maxgap", 1), y); 647s ***** test 647s x = cat (3, [1, 2, NaN; 4, NaN, NaN], [NaN, 2, 3; 4, 5, NaN]); 647s [~, idx] = fillmissing (x, "constant", 0, "maxgap", 1); 647s assert (idx, logical (cat (3, [0, 0, 0; 0, 1, 0], [1, 0, 0; 0, 0, 1]))); 647s [~, idx] = fillmissing (x, "constant", 0, 1, "maxgap", 1); 647s assert (idx, logical (cat (3, [0, 0, 0; 0, 1, 0], [1, 0, 0; 0, 0, 1]))); 647s [~, idx] = fillmissing (x, "constant", 0, 2, "maxgap", 1); 647s assert (idx, logical (cat (3, [0, 0, 1; 0, 0, 0], [1, 0, 0; 0, 0, 1]))); 647s [~, idx] = fillmissing (x, "constant", 0, 3, "maxgap", 1); 647s assert (idx, logical (cat (3, [0, 0, 1; 0, 1, 0], [1, 0, 0; 0, 0, 0]))); 647s ***** test 647s x = [NaN, 2, 3]; 647s [~, idx] = fillmissing (x, "previous"); 647s assert (idx, logical ([0, 0, 0])); 647s [~, idx] = fillmissing (x, "movmean", 1); 647s assert (idx, logical ([0, 0, 0])); 647s x = [1:3; 4:6; 7:9]; 647s x([2, 4, 7, 9]) = NaN; 647s [~, idx] = fillmissing (x, "linear"); 647s assert (idx, logical ([0, 1, 0; 1, 0, 0; 0, 0, 0])); 647s [~, idx] = fillmissing (x, "movmean", 2); 647s assert (idx, logical ([0, 0, 0; 1, 0, 0; 0, 0, 1])); 647s [A, idx] = fillmissing ([1, 2, 3, NaN, NaN], "movmean",2); 647s assert (A, [1, 2, 3, 3, NaN]); 647s assert (idx, logical ([0, 0, 0, 1, 0])); 647s [A, idx] = fillmissing ([1, 2, 3, NaN, NaN], "movmean",3); 647s assert (A, [1, 2, 3, 3, NaN]); 647s assert (idx, logical ([0, 0, 0, 1, 0])); 647s [A, idx] = fillmissing ([1, 2, NaN, NaN, NaN], "movmedian", 2); 647s assert (A, [1, 2, 2, NaN, NaN]); 647s assert (idx, logical ([0, 0, 1, 0, 0])); 647s [A, idx] = fillmissing ([1, 2, 3, NaN, NaN], "movmedian", 3); 647s assert (A, [1, 2, 3, 3, NaN]); 647s assert (idx, logical ([0, 0, 0, 1, 0])); 647s [A, idx] = fillmissing ([1, NaN, 1, NaN, 1], @(x,y,z) z, 3); 647s assert (A, [1, 2, 1, 4, 1]); 647s assert (idx, logical ([0, 1, 0, 1, 0])); 647s [A, idx] = fillmissing ([1, NaN, 1, NaN, 1], @(x,y,z) NaN (size (z)), 3); 647s assert (A, [1, NaN, 1, NaN, 1]); 647s assert (idx, logical ([0, 0, 0, 0, 0])); 647s ***** assert (fillmissing ([1, 2, 3], "constant", 99, "missinglocations", logical ([0, 0, 0])), [1, 2, 3]) 647s ***** assert (fillmissing ([1, 2, 3], "constant", 99, "missinglocations", logical ([1, 1, 1])), [99, 99, 99]) 647s ***** assert (fillmissing ([1, NaN, 2, 3, NaN], "constant", 99, "missinglocations", logical ([1, 0, 1, 0, 1])), [99, NaN, 99, 3, 99]) 647s ***** assert (fillmissing ([1, NaN, 3, NaN, 5], "constant", NaN, "missinglocations", logical ([0, 1, 1, 1, 0])), [1, NaN, NaN, NaN, 5]) 647s ***** assert (fillmissing (["foo "; " bar"], "constant", "X", "missinglocations", logical ([0, 0, 0, 0; 0, 0, 0, 0])), ["foo "; " bar"]) 647s ***** assert (fillmissing (["foo "; " bar"], "constant", "X", "missinglocations", logical ([1, 0, 1, 0; 0, 1, 1, 0])), ["XoX "; " XXr"]) 647s ***** assert (fillmissing ({"foo", "", "bar"}, "constant", "X", "missinglocations", logical ([0, 0, 0])), {"foo", "", "bar"}) 647s ***** assert (fillmissing ({"foo", "", "bar"}, "constant", "X", "missinglocations", logical ([1, 1, 0])), {"X", "X", "bar"}) 647s ***** test 647s [~, idx] = fillmissing ([1, NaN, 3, NaN, 5], "constant", NaN); 647s assert (idx, logical ([0, 0, 0, 0, 0])); 647s [~, idx] = fillmissing ([1 NaN 3 NaN 5], "constant", NaN, "missinglocations", logical ([0, 1, 1, 1, 0])); 647s assert (idx, logical ([0, 1, 1, 1, 0])); 647s [A, idx] = fillmissing ([1, 2, NaN, 1, NaN], "movmean", 3.1, "missinglocations", logical ([0, 0, 1, 1, 0])); 647s assert (A, [1, 2, 2, NaN, NaN]); 647s assert (idx, logical ([0, 0, 1, 0, 0])); 647s [A, idx] = fillmissing ([1, 2, NaN, NaN, NaN], "movmean", 2, "missinglocations", logical ([0, 0, 1, 1, 0])); 647s assert (A, [1, 2, 2, NaN, NaN]); 647s assert (idx, logical ([0, 0, 1, 0, 0])); 647s [A, idx] = fillmissing ([1, 2, NaN, 1, NaN], "movmean", 3, "missinglocations", logical ([0, 0, 1, 1, 0])); 647s assert (A, [1, 2, 2, NaN, NaN]); 647s assert (idx, logical ([0, 0, 1, 0, 0])); 647s [A, idx] = fillmissing ([1, 2, NaN, NaN, NaN], "movmean", 3, "missinglocations", logical ([0, 0, 1, 1, 0])); 647s assert (A, [1, 2, 2, NaN, NaN]); 647s assert (idx, logical ([0, 0, 1, 0, 0])); 647s [A, idx] = fillmissing ([1, 2, NaN, NaN, NaN], "movmedian", 2, "missinglocations", logical ([0, 0, 1, 1, 0])); 647s assert (A, [1, 2, 2, NaN, NaN]); 647s assert (idx, logical ([0, 0, 1, 0, 0])); 647s [A, idx] = fillmissing ([1, 2, NaN, NaN, NaN], "movmedian", 3, "missinglocations", logical ([0, 0, 1, 1, 0])); 647s assert (A, [1, 2, 2, NaN, NaN]); 647s assert (idx, logical ([0, 0, 1, 0, 0])); 647s [A, idx] = fillmissing ([1, 2, NaN, NaN, NaN], "movmedian", 3.1, "missinglocations", logical ([0, 0, 1, 1, 0])); 647s assert (A, [1, 2, 2, NaN, NaN]); 647s assert (idx, logical ([0, 0, 1, 0, 0])); 647s [A, idx] = fillmissing ([1, NaN, 1, NaN, 1], @(x,y,z) ones (size (z)), 3, "missinglocations", logical ([0, 1, 0, 1, 1])); 647s assert (A, [1, 1, 1, 1, 1]); 647s assert (idx, logical ([0, 1, 0, 1, 1])); 647s [A, idx] = fillmissing ([1, NaN, 1, NaN, 1], @(x,y,z) NaN (size (z)), 3, "missinglocations", logical ([0, 1, 0, 1, 1])); 647s assert (A, [1, NaN, 1, NaN, NaN]); 647s assert (idx, logical ([0, 0, 0, 0, 0])); 647s ***** test 647s [A, idx] = fillmissing ([1, 2, 5], "movmedian", 3, "missinglocations", logical ([0, 1, 0])); 647s assert (A, [1, 3, 5]); 647s assert (idx, logical ([0, 1, 0])); 647s ***** assert (fillmissing (" foo bar ", "constant", "X"), "XfooXbarX") 647s ***** assert (fillmissing ([" foo"; "bar "], "constant", "X"), ["Xfoo"; "barX"]) 647s ***** assert (fillmissing ([" foo"; "bar "], "next"), ["bfoo"; "bar "]) 647s ***** assert (fillmissing ([" foo"; "bar "], "next", 1), ["bfoo"; "bar "]) 647s ***** assert (fillmissing ([" foo"; "bar "], "previous"), [" foo"; "baro"]) 647s ***** assert (fillmissing ([" foo"; "bar "], "previous", 1), [" foo"; "baro"]) 647s ***** assert (fillmissing ([" foo"; "bar "], "nearest"), ["bfoo"; "baro"]) 647s ***** assert (fillmissing ([" foo"; "bar "], "nearest", 1), ["bfoo"; "baro"]) 647s ***** assert (fillmissing ([" foo"; "bar "], "next", 2), ["ffoo"; "bar "]) 647s ***** assert (fillmissing ([" foo"; "bar "], "previous", 2), [" foo"; "barr"]) 647s ***** assert (fillmissing ([" foo"; "bar "], "nearest", 2), ["ffoo"; "barr"]) 647s ***** assert (fillmissing ([" foo"; "bar "], "next", 3), [" foo"; "bar "]) 647s ***** assert (fillmissing ([" foo"; "bar "], "previous", 3), [" foo"; "bar "]) 647s ***** assert (fillmissing ([" foo"; "bar "], "nearest", 3), [" foo"; "bar "]) 647s ***** assert (fillmissing ({"foo", "bar"}, "constant", "a"), {"foo", "bar"}) 647s ***** assert (fillmissing ({"foo", "bar"}, "constant", {"a"}), {"foo", "bar"}) 647s ***** assert (fillmissing ({"foo", "", "bar"}, "constant", "a"), {"foo", "a", "bar"}) 647s ***** assert (fillmissing ({"foo", "", "bar"}, "constant", {"a"}), {"foo", "a", "bar"}) 647s ***** assert (fillmissing ({"foo", "", "bar"}, "previous"), {"foo", "foo", "bar"}) 647s ***** assert (fillmissing ({"foo", "", "bar"}, "next"), {"foo", "bar", "bar"}) 647s ***** assert (fillmissing ({"foo", "", "bar"}, "nearest"), {"foo", "bar", "bar"}) 647s ***** assert (fillmissing ({"foo", "", "bar"}, "previous", 2), {"foo", "foo", "bar"}) 647s ***** assert (fillmissing ({"foo", "", "bar"}, "next", 2), {"foo", "bar", "bar"}) 647s ***** assert (fillmissing ({"foo", "", "bar"}, "nearest", 2), {"foo", "bar", "bar"}) 647s ***** assert (fillmissing ({"foo", "", "bar"}, "previous", 1), {"foo", "", "bar"}) 647s ***** assert (fillmissing ({"foo", "", "bar"}, "previous", 1), {"foo", "", "bar"}) 647s ***** assert (fillmissing ({"foo", "", "bar"}, "next", 1), {"foo", "", "bar"}) 647s ***** assert (fillmissing ({"foo", "", "bar"}, "nearest", 1), {"foo", "", "bar"}) 647s ***** assert (fillmissing ("abc ", @(x,y,z) x+y+z, 2), "abcj") 647s ***** assert (fillmissing ({"foo", "", "bar"}, @(x,y,z) x(1), 3), {"foo", "foo", "bar"}) 647s ***** test 647s [A, idx] = fillmissing (" a b c", "constant", " "); 647s assert (A, " a b c"); 647s assert (idx, logical ([0, 0, 0, 0, 0, 0])); 647s [A, idx] = fillmissing ({"foo", "", "bar", ""}, "constant", ""); 647s assert (A, {"foo", "", "bar", ""}); 647s assert (idx, logical ([0, 0, 0, 0])); 647s [A, idx] = fillmissing ({"foo", "", "bar", ""}, "constant", {""}); 647s assert (A, {"foo", "", "bar", ""}); 647s assert (idx, logical ([0, 0, 0, 0])); 647s [A,idx] = fillmissing (" f o o ", @(x,y,z) repelem ("a", numel (z)), 3); 647s assert (A, "afaoaoa"); 647s assert (idx, logical ([1, 0, 1, 0, 1, 0, 1])); 647s [A,idx] = fillmissing (" f o o ", @(x,y,z) repelem (" ", numel (z)), 3); 647s assert (A, " f o o "); 647s assert (idx, logical ([0, 0, 0, 0, 0, 0, 0])); 647s [A,idx] = fillmissing ({"", "foo", ""}, @(x,y,z) repelem ({"a"}, numel (z)), 3); 647s assert (A, {"a", "foo", "a"}); 647s assert (idx, logical ([1, 0, 1])); 647s [A,idx] = fillmissing ({"", "foo", ""}, @(x,y,z) repelem ({""}, numel (z)), 3); 647s assert (A, {"", "foo", ""}); 647s assert (idx, logical ([0, 0, 0])); 648s ***** assert (fillmissing (logical ([1, 0, 1, 0, 1]), "constant", true), logical ([1, 0, 1, 0, 1])) 648s ***** assert (fillmissing (logical ([1, 0, 1, 0, 1]), "constant", false, "missinglocations", logical ([1, 0, 1, 0, 1])), logical ([0, 0, 0, 0, 0])) 648s ***** assert (fillmissing (logical ([1, 0, 1, 0, 1]), "previous", "missinglocations", logical ([1, 0, 1, 0, 1])), logical ([1, 0, 0, 0, 0])) 648s ***** assert (fillmissing (logical ([1, 0, 1, 0, 1]), "next", "missinglocations", logical ([1, 0, 1, 0, 1])), logical ([0, 0, 0, 0, 1])) 648s ***** assert (fillmissing (logical ([1, 0, 1, 0, 1]), "nearest", "missinglocations", logical ([1, 0, 1, 0, 1])), logical ([0, 0, 0, 0, 0])) 648s ***** assert (fillmissing (logical ([1, 0, 1, 0, 1]), @(x,y,z) false(size(z)), 3), logical ([1, 0, 1, 0, 1])) 648s ***** assert (fillmissing (logical ([1, 0, 1, 0, 1]), @(x,y,z) false(size(z)), 3, "missinglocations", logical ([1, 0, 1, 0, 1])), logical ([0, 0, 0, 0, 0])) 648s ***** assert (fillmissing (logical ([1, 0, 1, 0, 1]), @(x,y,z) false(size(z)), [2, 0], "missinglocations", logical ([1, 0, 1, 0, 1])), logical ([1, 0, 0, 0, 0])) 648s ***** test 648s x = logical ([1, 0, 1, 0, 1]); 648s [~, idx] = fillmissing (x, "constant", true); 648s assert (idx, logical ([0, 0, 0, 0, 0])); 648s [~, idx] = fillmissing (x, "constant", false, "missinglocations", logical ([1, 0, 1, 0, 1])); 648s assert (idx, logical ([1, 0, 1, 0, 1])); 648s [~, idx] = fillmissing (x, "constant", true, "missinglocations", logical ([1, 0, 1, 0, 1])); 648s assert (idx, logical ([1, 0, 1, 0, 1])); 648s [~, idx] = fillmissing (x, "previous", "missinglocations", logical ([1, 0, 1, 0, 1])); 648s assert (idx, logical ([0, 0, 1, 0, 1])); 648s [~, idx] = fillmissing (x, "next", "missinglocations", logical ([1, 0, 1, 0, 1])); 648s assert (idx, logical ([1, 0, 1, 0, 0])); 648s [~, idx] = fillmissing (x, "nearest", "missinglocations", logical ([1, 0, 1, 0, 1])); 648s assert (idx, logical ([1, 0, 1, 0, 1])); 648s [~, idx] = fillmissing (x, @(x,y,z) false(size(z)), 3); 648s assert (idx, logical ([0, 0, 0, 0, 0])) 648s [~, idx] = fillmissing (x, @(x,y,z) false(size(z)), 3, "missinglocations", logical ([1, 0, 1, 0, 1])); 648s assert (idx, logical ([1, 0, 1, 0, 1])) 648s [~, idx] = fillmissing (x, @(x,y,z) false(size(z)), [2 0], "missinglocations", logical ([1, 0, 1, 0, 1])); 648s assert (idx, logical ([0, 0, 1, 0, 1])) 648s ***** assert (fillmissing (int32 ([1, 2, 3, 4, 5]), "constant", 0), int32 ([1, 2, 3, 4, 5])) 648s ***** assert (fillmissing (int32 ([1, 2, 3, 4, 5]), "constant", 0, "missinglocations", logical ([1, 0, 1, 0, 1])), int32 ([0, 2, 0, 4, 0])) 648s ***** assert (fillmissing (int32 ([1, 2, 3, 4, 5]), "previous", "missinglocations", logical ([1, 0, 1, 0, 1])), int32 ([1, 2, 2, 4, 4])) 648s ***** assert (fillmissing (int32 ([1, 2, 3, 4, 5]), "next", "missinglocations", logical ([1, 0, 1, 0, 1])), int32 ([2, 2, 4, 4, 5])) 648s ***** assert (fillmissing (int32 ([1, 2, 3, 4, 5]), "nearest", "missinglocations", logical ([1, 0, 1, 0, 1])), int32 ([2, 2, 4, 4, 4])) 648s ***** assert (fillmissing (int32 ([1, 2, 3, 4, 5]), @(x,y,z) z+10, 3), int32 ([1, 2, 3, 4, 5])) 648s ***** assert (fillmissing (int32 ([1, 2, 3, 4, 5]), @(x,y,z) z+10, 3, "missinglocations", logical ([1, 0, 1, 0, 1])), int32 ([11, 2, 13, 4, 15])) 648s ***** assert (fillmissing (int32 ([1, 2, 3, 4, 5]), @(x,y,z) z+10, [2, 0], "missinglocations", logical ([1, 0, 1, 0, 1])), int32 ([1, 2, 13, 4, 15])) 648s ***** test 648s x = int32 ([1, 2, 3, 4, 5]); 648s [~, idx] = fillmissing (x, "constant", 0); 648s assert (idx, logical ([0, 0, 0, 0, 0])); 648s [~, idx] = fillmissing (x, "constant", 0, "missinglocations", logical ([1, 0, 1, 0, 1])); 648s assert (idx, logical ([1, 0, 1, 0, 1])); 648s [~, idx] = fillmissing (x, "constant", 3, "missinglocations", logical ([0, 0, 1, 0, 0])); 648s assert (idx, logical ([0, 0, 1, 0, 0])); 648s [~, idx] = fillmissing (x, "previous", "missinglocations", logical ([1, 0, 1, 0, 1])); 648s assert (idx, logical ([0, 0, 1, 0, 1])); 648s [~, idx] = fillmissing (x, "next", "missinglocations", logical ([1, 0, 1, 0, 1])); 648s assert (idx, logical ([1, 0, 1, 0, 0])); 648s [~, idx] = fillmissing (x, "nearest", "missinglocations", logical ([1, 0, 1, 0, 1])); 648s assert (idx, logical ([1, 0, 1, 0, 1])); 648s [~, idx] = fillmissing (x, @(x,y,z) z+10, 3); 648s assert (idx, logical ([0, 0, 0, 0, 0])); 648s [~, idx] = fillmissing (x, @(x,y,z) z+10, 3, "missinglocations", logical ([1, 0, 1, 0, 1])); 648s assert (idx, logical ([1, 0, 1, 0, 1])); 648s [~, idx] = fillmissing (x, @(x,y,z) z+10, [2 0], "missinglocations", logical ([1, 0, 1, 0, 1])); 648s assert (idx, logical ([0, 0, 1, 0, 1])); 648s ***** test 648s [A, idx] = fillmissing ([struct, struct], "constant", 1); 648s assert (A, [struct, struct]) 648s assert (idx, [false, false]) 648s ***** error fillmissing () 648s ***** error fillmissing (1) 648s ***** error fillmissing (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13) 648s ***** error fillmissing (1, 2) 648s ***** error fillmissing (1, "foo") 648s ***** error fillmissing (1, @(x) x, 1) 648s ***** error fillmissing (1, @(x,y) x+y, 1) 648s ***** error fillmissing ("a b c", "linear") 648s ***** error fillmissing ({"a", "b"}, "linear") 648s ***** error <'movmean' and 'movmedian' methods only valid for numeric> fillmissing ("a b c", "movmean", 2) 648s ***** error <'movmean' and 'movmedian' methods only valid for numeric> fillmissing ({"a", "b"}, "movmean", 2) 648s ***** error <'constant' method must be followed by> fillmissing (1, "constant") 648s ***** error fillmissing (1, "constant", []) 648s ***** error fillmissing (1, "constant", "a") 648s ***** error fillmissing ("a", "constant", 1) 648s ***** error fillmissing ("a", "constant", {"foo"}) 648s ***** error fillmissing ({"foo"}, "constant", 1) 648s ***** error fillmissing (1, "movmean") 648s ***** error fillmissing (1, "movmedian") 648s ***** error fillmissing (1, "constant", 1, 0) 648s ***** error fillmissing (1, "constant", 1, -1) 648s ***** error fillmissing (1, "constant", 1, [1, 2]) 648s ***** error fillmissing (1, "constant", 1, "samplepoints") 648s ***** error fillmissing (1, "constant", 1, "foo") 648s ***** error fillmissing (1, "constant", 1, 1, "foo") 648s ***** error fillmissing (1, "constant", 1, 2, {1}, 4) 648s ***** error fillmissing ([1, 2, 3], "constant", 1, 2, "samplepoints", [1, 2]) 648s ***** error fillmissing ([1, 2, 3], "constant", 1, 2, "samplepoints", [3, 1, 2]) 648s ***** error fillmissing ([1, 2, 3], "constant", 1, 2, "samplepoints", [1, 1, 2]) 648s ***** error fillmissing ([1, 2, 3], "constant", 1, 2, "samplepoints", "abc") 648s ***** error fillmissing ([1, 2, 3], "constant", 1, 2, "samplepoints", logical ([1, 1, 1])) 648s ***** error fillmissing ([1, 2, 3], "constant", 1, 1, "samplepoints", [1, 2, 3]) 648s ***** error fillmissing ("foo", "next", "endvalues", 1) 648s ***** error fillmissing (1, "constant", 1, 1, "endvalues", "foo") 648s ***** error fillmissing ([1, 2, 3], "constant", 1, 2, "endvalues", [1, 2, 3]) 648s ***** error fillmissing ([1, 2, 3], "constant", 1, 1, "endvalues", [1, 2]) 648s ***** error fillmissing (randi(5,4,3,2), "constant", 1, 3, "endvalues", [1, 2]) 648s ***** error fillmissing (1, "constant", 1, 1, "endvalues", {1}) 648s ***** error fillmissing (1, "constant", 1, 2, "foo", 4) 648s ***** error fillmissing (struct, "constant", 1, "missinglocations", false) 648s ***** error fillmissing (1, "constant", 1, 2, "maxgap", 1, "missinglocations", false) 648s ***** error fillmissing (1, "constant", 1, 2, "missinglocations", false, "maxgap", 1) 648s ***** error fillmissing (1, "constant", 1, "replacevalues", true) 648s ***** error fillmissing (1, "constant", 1, "datavariables", "Varname") 648s ***** error fillmissing (1, "constant", 1, 2, "missinglocations", 1) 648s ***** error fillmissing (1, "constant", 1, 2, "missinglocations", "a") 648s ***** error fillmissing (1, "constant", 1, 2, "missinglocations", [true, false]) 648s ***** error fillmissing (true, "linear", "missinglocations", true) 648s ***** error fillmissing (int8 (1), "linear", "missinglocations", true) 648s ***** error fillmissing (true, "next", "missinglocations", true, "EndValues", "linear") 648s ***** error fillmissing (true, "next", "EndValues", "linear", "missinglocations", true) 648s ***** error fillmissing (int8 (1), "next", "missinglocations", true, "EndValues", "linear") 648s ***** error fillmissing (int8 (1), "next", "EndValues", "linear", "missinglocations", true) 648s ***** error fillmissing (1, "constant", 1, 2, "maxgap", true) 648s ***** error fillmissing (1, "constant", 1, 2, "maxgap", "a") 648s ***** error fillmissing (1, "constant", 1, 2, "maxgap", [1, 2]) 648s ***** error fillmissing (1, "constant", 1, 2, "maxgap", 0) 648s ***** error fillmissing (1, "constant", 1, 2, "maxgap", -1) 648s ***** error fillmissing ([1, 2, 3], "constant", [1, 2, 3]) 648s ***** error fillmissing ([1, 2, 3]', "constant", [1, 2, 3]) 648s ***** error fillmissing ([1, 2, 3]', "constant", [1, 2, 3], 1) 648s ***** error fillmissing ([1, 2, 3], "constant", [1, 2, 3], 2) 648s ***** error fillmissing (randi (5, 4, 3, 2), "constant", [1, 2], 1) 648s ***** error fillmissing (randi (5, 4, 3, 2), "constant", [1, 2], 2) 648s ***** error fillmissing (randi (5, 4, 3, 2), "constant", [1, 2], 3) 648s ***** error fillmissing (1, @(x,y,z) x+y+z) 648s ***** error fillmissing ([1, NaN, 2], @(x,y,z) [1, 2], 2) 648s 380 tests, 379 passed, 0 known failure, 1 skipped 648s [inst/fishertest.m] 648s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/fishertest.m 648s ***** demo 648s ## A Fisher's exact test example 648s 648s x = [3, 1; 1, 3] 648s [h, p, stats] = fishertest(x) 648s ***** assert (fishertest ([3, 4; 5, 7]), false); 648s ***** assert (isa (fishertest ([3, 4; 5, 7]), "logical"), true); 648s ***** test 648s [h, pval, stats] = fishertest ([3, 4; 5, 7]); 648s assert (pval, 1, 1e-14); 648s assert (stats.OddsRatio, 1.05); 648s CI = [0.159222057151289, 6.92429189601808]; 648s assert (stats.ConfidenceInterval, CI, 1e-14) 648s ***** test 648s [h, pval, stats] = fishertest ([3, 4; 5, 0]); 648s assert (pval, 0.08080808080808080, 1e-14); 648s assert (stats.OddsRatio, 0); 648s assert (stats.ConfidenceInterval, [-Inf, Inf]) 648s ***** error fishertest (); 648s ***** error fishertest (1, 2, 3, 4, 5, 6); 648s ***** error ... 648s fishertest (ones (2, 2, 2)); 648s ***** error ... 648s fishertest ([1, 2; -3, 4]); 648s ***** error ... 648s fishertest ([1, 2; 3, 4+i]); 648s ***** error ... 648s fishertest ([1, 2; 3, 4.2]); 648s ***** error ... 648s fishertest ([NaN, 2; 3, 4]); 648s ***** error ... 648s fishertest ([1, Inf; 3, 4]); 648s ***** error ... 648s fishertest (ones (2) * 1e8); 648s ***** error ... 648s fishertest ([1, 2; 3, 4], "alpha", 0); 648s ***** error ... 648s fishertest ([1, 2; 3, 4], "alpha", 1.2); 648s ***** error ... 648s fishertest ([1, 2; 3, 4], "alpha", "val"); 648s ***** error ... 648s fishertest ([1, 2; 3, 4], "tail", "val"); 648s ***** error ... 648s fishertest ([1, 2; 3, 4], "alpha", 0.01, "tail", "val"); 648s ***** error ... 648s fishertest ([1, 2; 3, 4], "alpha", 0.01, "badoption", 3); 648s 19 tests, 19 passed, 0 known failure, 0 skipped 648s [inst/fitcdiscr.m] 648s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/fitcdiscr.m 648s ***** demo 648s ## Train a linear discriminant classifier for Gamma = 0.5 648s ## and plot the decision boundaries. 648s 648s load fisheriris 648s idx = ! strcmp (species, "setosa"); 648s X = meas(idx,3:4); 648s Y = cast (strcmpi (species(idx), "virginica"), "double"); 648s obj = fitcdiscr (X, Y, "Gamma", 0.5) 648s x1 = [min(X(:,1)):0.03:max(X(:,1))]; 648s x2 = [min(X(:,2)):0.02:max(X(:,2))]; 648s [x1G, x2G] = meshgrid (x1, x2); 648s XGrid = [x1G(:), x2G(:)]; 648s pred = predict (obj, XGrid); 648s gidx = logical (pred); 648s 648s figure 648s scatter (XGrid(gidx,1), XGrid(gidx,2), "markerfacecolor", "magenta"); 648s hold on 648s scatter (XGrid(!gidx,1), XGrid(!gidx,2), "markerfacecolor", "red"); 648s plot (X(Y == 0, 1), X(Y == 0, 2), "ko", X(Y == 1, 1), X(Y == 1, 2), "kx"); 648s xlabel ("Petal length (cm)"); 648s ylabel ("Petal width (cm)"); 648s title ("Linear Discriminant Analysis Decision Boundary"); 648s legend ({"Versicolor Region", "Virginica Region", ... 648s "Sampled Versicolor", "Sampled Virginica"}, ... 648s "location", "northwest") 648s axis tight 648s hold off 648s ***** test 648s load fisheriris 648s Mdl = fitcdiscr (meas, species, "Gamma", 0.5); 648s [label, score, cost] = predict (Mdl, [2, 2, 2, 2]); 648s assert (label, {'versicolor'}) 648s assert (score, [0, 0.9999, 0.0001], 1e-4) 648s assert (cost, [1, 0.0001, 0.9999], 1e-4) 648s [label, score, cost] = predict (Mdl, [2.5, 2.5, 2.5, 2.5]); 648s assert (label, {'versicolor'}) 648s assert (score, [0, 0.6368, 0.3632], 1e-4) 648s assert (cost, [1, 0.3632, 0.6368], 1e-4) 648s assert (class (Mdl), "ClassificationDiscriminant"); 648s assert ({Mdl.X, Mdl.Y, Mdl.NumObservations}, {meas, species, 150}) 648s assert ({Mdl.DiscrimType, Mdl.ResponseName}, {"linear", "Y"}) 648s assert ({Mdl.Gamma, Mdl.MinGamma}, {0.5, 0}) 648s assert (Mdl.ClassNames, unique (species)) 648s sigma = [0.265008, 0.046361, 0.083757, 0.019201; ... 648s 0.046361, 0.115388, 0.027622, 0.016355; ... 648s 0.083757, 0.027622, 0.185188, 0.021333; ... 648s 0.019201, 0.016355, 0.021333, 0.041882]; 648s assert (Mdl.Sigma, sigma, 1e-6) 648s mu = [5.0060, 3.4280, 1.4620, 0.2460; ... 648s 5.9360, 2.7700, 4.2600, 1.3260; ... 648s 6.5880, 2.9740, 5.5520, 2.0260]; 648s assert (Mdl.Mu, mu, 1e-14) 648s assert (Mdl.LogDetSigma, -8.6884, 1e-4) 648s ***** error fitcdiscr () 648s ***** error fitcdiscr (ones (4,1)) 648s ***** error 648s fitcdiscr (ones (4,2), ones (4, 1), "K") 648s ***** error 648s fitcdiscr (ones (4,2), ones (3, 1)) 648s ***** error 648s fitcdiscr (ones (4,2), ones (3, 1), "K", 2) 648s 6 tests, 6 passed, 0 known failure, 0 skipped 648s [inst/fitcgam.m] 648s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/fitcgam.m 648s ***** demo 648s ## Train a GAM classifier for binary classification 648s ## using specific data and plot the decision boundaries. 648s 648s ## Define specific data 648s X = [1, 2; 2, 3; 3, 3; 4, 5; 5, 5; ... 648s 6, 7; 7, 8; 8, 8; 9, 9; 10, 10]; 648s Y = [0; 0; 0; 0; 0; ... 648s 1; 1; 1; 1; 1]; 648s 648s ## Train the GAM model 648s obj = fitcgam (X, Y, "Interactions", "all"); 648s 648s ## Create a grid of values for prediction 648s x1 = [min(X(:,1)):0.1:max(X(:,1))]; 648s x2 = [min(X(:,2)):0.1:max(X(:,2))]; 648s [x1G, x2G] = meshgrid (x1, x2); 648s XGrid = [x1G(:), x2G(:)]; 648s pred = predict (obj, XGrid); 648s 648s ## Plot decision boundaries and data points 648s predNumeric = str2double (pred); 648s gidx = predNumeric > 0.5; 648s 648s figure 648s scatter(XGrid(gidx,1), XGrid(gidx,2), "markerfacecolor", "magenta"); 648s hold on 648s scatter(XGrid(!gidx,1), XGrid(!gidx,2), "markerfacecolor", "red"); 648s plot(X(Y == 0, 1), X(Y == 0, 2), "ko", X(Y == 1, 1), X(Y == 1, 2), "kx"); 648s xlabel("Feature 1"); 648s ylabel("Feature 2"); 648s title("Generalized Additive Model (GAM) Decision Boundary"); 648s legend({"Class 1 Region", "Class 0 Region", ... 648s "Class 1 Samples", "Class 0 Samples"}, ... 648s "location", "northwest") 648s axis tight 648s hold off 648s ***** test 648s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 648s y = [0; 0; 1; 1]; 648s PredictorNames = {'Feature1', 'Feature2', 'Feature3'}; 648s a = fitcgam (x, y, "PredictorNames", PredictorNames); 648s assert (class (a), "ClassificationGAM"); 648s assert ({a.X, a.Y, a.NumObservations}, {x, y, 4}) 648s assert ({a.NumPredictors, a.ResponseName}, {3, "Y"}) 648s assert (a.ClassNames, {'0'; '1'}) 648s assert (a.PredictorNames, PredictorNames) 648s assert (a.BaseModel.Intercept, 0) 650s ***** test 650s x = [1, 2; 3, 4; 5, 6; 7, 8; 9, 10]; 650s y = [1; 0; 1; 0; 1]; 650s a = fitcgam (x, y, "interactions", "all"); 650s assert (class (a), "ClassificationGAM"); 650s assert ({a.X, a.Y, a.NumObservations}, {x, y, 5}) 650s assert ({a.NumPredictors, a.ResponseName}, {2, "Y"}) 650s assert (a.ClassNames, {'1'; '0'}) 650s assert (a.PredictorNames, {'x1', 'x2'}) 650s assert (a.ModelwInt.Intercept, 0.4055, 1e-1) 654s ***** test 654s load fisheriris 654s inds = strcmp (species,'versicolor') | strcmp (species,'virginica'); 654s X = meas(inds, :); 654s Y = species(inds, :)'; 654s Y = strcmp (Y, 'virginica')'; 654s a = fitcgam (X, Y, 'Formula', 'Y ~ x1 + x2 + x3 + x4 + x1:x2 + x2:x3'); 654s assert (class (a), "ClassificationGAM"); 654s assert ({a.X, a.Y, a.NumObservations}, {X, Y, 100}) 654s assert ({a.NumPredictors, a.ResponseName}, {4, "Y"}) 654s assert (a.ClassNames, {'0'; '1'}) 654s assert (a.Formula, 'Y ~ x1 + x2 + x3 + x4 + x1:x2 + x2:x3') 654s assert (a.PredictorNames, {'x1', 'x2', 'x3', 'x4'}) 654s assert (a.ModelwInt.Intercept, 0) 661s ***** error fitcgam () 661s ***** error fitcgam (ones (4,1)) 661s ***** error 661s fitcgam (ones (4,2), ones (4, 1), "K") 661s ***** error 661s fitcgam (ones (4,2), ones (3, 1)) 661s ***** error 661s fitcgam (ones (4,2), ones (3, 1), "K", 2) 661s 8 tests, 8 passed, 0 known failure, 0 skipped 661s [inst/fitcnet.m] 661s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/fitcnet.m 661s ***** demo 661s ## Train a Neural Network on the Fisher's Iris data set and display 661s ## a confusion chart with the classification results. 661s 661s load fisheriris 661s Mdl = fitcnet (meas, species); 661s pred_species = resubPredict (Mdl); 661s confusionchart (species, pred_species, "Title", ... 661s "Fully Connected Neural Network classification on Fisher's Iris dataset"); 661s ***** test 661s load fisheriris 661s x = meas; 661s y = grp2idx (species); 661s Mdl = fitcnet (x, y, "IterationLimit", 50); 661s assert (class (Mdl), "ClassificationNeuralNetwork"); 661s assert (numel (Mdl.ModelParameters.LayerWeights), 2); 661s assert (size (Mdl.ModelParameters.LayerWeights{1}), [10, 5]); 661s assert (size (Mdl.ModelParameters.LayerWeights{2}), [3, 11]); 661s ***** error fitcnet () 661s ***** error fitcnet (ones (4,1)) 661s ***** error 661s fitcnet (ones (4,2), ones (4, 1), 'LayerSizes') 661s ***** error 661s fitcnet (ones (4,2), ones (3, 1)) 661s ***** error 661s fitcnet (ones (4,2), ones (3, 1), 'LayerSizes', 2) 661s 6 tests, 6 passed, 0 known failure, 0 skipped 661s [inst/fitcsvm.m] 661s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/fitcsvm.m 661s ***** demo 661s ## Use a subset of Fisher's iris data set 661s 661s load fisheriris 661s inds = ! strcmp (species, 'setosa'); 661s X = meas(inds, [3,4]); 661s Y = species(inds); 661s 661s ## Train a linear SVM classifier 661s SVMModel = fitcsvm (X, Y) 661s 661s ## Plot a scatter diagram of the data and circle the support vectors. 661s sv = SVMModel.SupportVectors; 661s figure 661s gscatter (X(:,1), X(:,2), Y) 661s hold on 661s plot (sv(:,1), sv(:,2), 'ko', 'MarkerSize', 10) 661s legend ('versicolor', 'virginica', 'Support Vector') 661s hold off 661s ***** test 661s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 661s y = {"a"; "a"; "b"; "b"}; 661s a = fitcsvm (x, y); 661s assert (class (a), "ClassificationSVM"); 661s assert ({a.X, a.Y}, {x, y}) 661s assert (a.NumObservations, 4) 661s assert ({a.ResponseName, a.PredictorNames}, {"Y", {"x1", "x2", "x3"}}) 661s assert (a.ModelParameters.SVMtype, "c_svc") 661s assert (a.ClassNames, {"a"; "b"}) 661s ***** test 661s x = [1, 2; 2, 3; 3, 4; 4, 5; 2, 3; 3, 4; 2, 3; 3, 4; 2, 3; 3, 4]; 661s y = [1; 1; -1; -1; 1; -1; -1; -1; -1; -1]; 661s a = fitcsvm (x, y); 661s assert (class (a), "ClassificationSVM"); 661s assert ({a.X, a.Y, a.ModelParameters.KernelFunction}, {x, y, "linear"}) 661s assert (a.ModelParameters.BoxConstraint, 1) 661s assert (a.ModelParameters.KernelOffset, 0) 661s assert (a.ClassNames, [1; -1]) 661s ***** test 661s x = [1, 2; 2, 3; 3, 4; 4, 5; 2, 3; 3, 4; 2, 3; 3, 4; 2, 3; 3, 4]; 661s y = [1; 1; -1; -1; 1; -1; -1; -1; -1; -1]; 661s a = fitcsvm (x, y, "KernelFunction", "rbf", "BoxConstraint", 2, ... 661s "KernelOffset", 2); 661s assert (class (a), "ClassificationSVM"); 661s assert ({a.X, a.Y, a.ModelParameters.KernelFunction}, {x, y, "rbf"}) 661s assert (a.ModelParameters.BoxConstraint, 2) 661s assert (a.ModelParameters.KernelOffset, 2) 661s assert (isempty (a.Alpha), true) 661s assert (isempty (a.Beta), false) 661s ***** test 661s x = [1, 2; 2, 3; 3, 4; 4, 5; 2, 3; 3, 4; 2, 3; 3, 4; 2, 3; 3, 4]; 661s y = [1; 1; -1; -1; 1; -1; -1; -1; -1; -1]; 661s a = fitcsvm (x, y, "KernelFunction", "polynomial", "PolynomialOrder", 3); 661s assert (class (a), "ClassificationSVM"); 661s assert ({a.X, a.Y, a.ModelParameters.KernelFunction}, {x, y, "polynomial"}) 661s assert (a.ModelParameters.PolynomialOrder, 3) 661s assert (isempty (a.Alpha), true) 661s assert (isempty (a.Beta), false) 661s ***** test 661s x = [1, 2; 2, 3; 3, 4; 4, 5; 2, 3; 3, 4; 2, 3; 3, 4; 2, 3; 3, 4]; 661s y = [1; 1; -1; -1; 1; -1; -1; -1; -1; -1]; 661s a = fitcsvm (x, y, "KernelFunction", "linear", "PolynomialOrder", 3); 661s assert (class (a), "ClassificationSVM"); 661s assert ({a.X, a.Y, a.ModelParameters.KernelFunction}, {x, y, "linear"}) 661s assert (a.ModelParameters.PolynomialOrder, 3) 661s assert (isempty (a.Alpha), false) 661s assert (isempty (a.Beta), true) 661s ***** test 661s x = [1, 2; 2, 3; 3, 4; 4, 5; 2, 3; 3, 4; 2, 3; 3, 4; 2, 3; 3, 4]; 661s y = [1; 1; -1; -1; 1; -1; -1; -1; -1; -1]; 661s a = fitcsvm (x, y, "KernelFunction", "linear", "CrossVal", 'on'); 661s assert (class (a), "ClassificationPartitionedModel"); 661s assert ({a.X, a.Y, a.ModelParameters.KernelFunction}, {x, y, "linear"}) 661s assert (a.ModelParameters.PolynomialOrder, 3) 661s assert (isempty (a.Trained{1}.Alpha), false) 661s assert (isempty (a.Trained{1}.Beta), true) 661s warning: One or more of the unique class values in the stratification variable is not present in one or more folds. 661s warning: called from 661s cvpartition at line 764 column 19 661s crossval at line 1300 column 9 661s fitcsvm at line 284 column 7 661s __test__ at line 5 column 2 661s test at line 685 column 11 661s /tmp/tmp.scCa8Po4At at line 2838 column 2 661s 661s ***** error fitcsvm () 661s ***** error fitcsvm (ones (4,1)) 661s ***** error 661s fitcsvm (ones (4,2), ones (4, 1), 'KFold') 661s ***** error 661s fitcsvm (ones (4,2), ones (3, 1)) 661s ***** error 661s fitcsvm (ones (4,2), ones (3, 1), 'KFold', 2) 661s ***** error 661s fitcsvm (ones (4,2), ones (4, 1), "CrossVal", 2) 661s ***** error 661s fitcsvm (ones (4,2), ones (4, 1), "CrossVal", 'a') 661s ***** error ... 661s fitcsvm (ones (4,2), ones (4, 1), "KFold", 10, "Holdout", 0.3) 661s 14 tests, 14 passed, 0 known failure, 0 skipped 661s [inst/fitgmdist.m] 661s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/fitgmdist.m 661s ***** demo 661s ## Generate a two-cluster problem 661s C1 = randn (100, 2) + 2; 661s C2 = randn (100, 2) - 2; 661s data = [C1; C2]; 661s 661s ## Perform clustering 661s GMModel = fitgmdist (data, 2); 661s 661s ## Plot the result 661s figure 661s [heights, bins] = hist3([C1; C2]); 661s [xx, yy] = meshgrid(bins{1}, bins{2}); 661s bbins = [xx(:), yy(:)]; 661s contour (reshape (GMModel.pdf (bbins), size (heights))); 661s ***** demo 661s Angle_Theta = [ 30 + 10 * randn(1, 10), 60 + 10 * randn(1, 10) ]'; 661s nbOrientations = 2; 661s initial_orientations = [38.0; 18.0]; 661s initial_weights = ones (1, nbOrientations) / nbOrientations; 661s initial_Sigma = 10 * ones (1, 1, nbOrientations); 661s start = struct ("mu", initial_orientations, "Sigma", initial_Sigma, ... 661s "ComponentProportion", initial_weights); 661s GMModel_Theta = fitgmdist (Angle_Theta, nbOrientations, "Start", start , ... 661s "RegularizationValue", 0.0001) 661s ***** test 661s load fisheriris 661s classes = unique (species); 661s [~, score] = pca (meas, "NumComponents", 2); 661s options.MaxIter = 1000; 661s options.TolFun = 1e-6; 661s options.Display = "off"; 661s GMModel = fitgmdist (score, 2, "Options", options); 661s assert (isa (GMModel, "gmdistribution"), true); 661s assert (GMModel.mu, [1.3212, -0.0954; -2.6424, 0.1909], 1e-4); 661s 1 test, 1 passed, 0 known failure, 0 skipped 661s [inst/fitlm.m] 661s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/fitlm.m 661s ***** demo 661s y = [ 8.706 10.362 11.552 6.941 10.983 10.092 6.421 14.943 15.931 ... 661s 22.968 18.590 16.567 15.944 21.637 14.492 17.965 18.851 22.891 ... 661s 22.028 16.884 17.252 18.325 25.435 19.141 21.238 22.196 18.038 ... 661s 22.628 31.163 26.053 24.419 32.145 28.966 30.207 29.142 33.212 ... 661s 25.694 ]'; 661s X = [1 1 1 1 1 1 1 1 2 2 2 2 2 3 3 3 3 3 3 3 3 4 4 4 4 4 4 4 5 5 5 5 5 5 5 5 5]'; 661s 661s [TAB,STATS] = fitlm (X,y,"linear","CategoricalVars",1,"display","on"); 661s ***** demo 661s popcorn = [5.5, 4.5, 3.5; 5.5, 4.5, 4.0; 6.0, 4.0, 3.0; ... 661s 6.5, 5.0, 4.0; 7.0, 5.5, 5.0; 7.0, 5.0, 4.5]; 661s brands = {'Gourmet', 'National', 'Generic'; ... 661s 'Gourmet', 'National', 'Generic'; ... 661s 'Gourmet', 'National', 'Generic'; ... 661s 'Gourmet', 'National', 'Generic'; ... 661s 'Gourmet', 'National', 'Generic'; ... 661s 'Gourmet', 'National', 'Generic'}; 661s popper = {'oil', 'oil', 'oil'; 'oil', 'oil', 'oil'; 'oil', 'oil', 'oil'; ... 661s 'air', 'air', 'air'; 'air', 'air', 'air'; 'air', 'air', 'air'}; 661s 661s [TAB, STATS] = fitlm ({brands(:),popper(:)},popcorn(:),"interactions",... 661s "CategoricalVars",[1,2],"display","on"); 661s ***** test 661s y = [ 8.706 10.362 11.552 6.941 10.983 10.092 6.421 14.943 15.931 ... 661s 22.968 18.590 16.567 15.944 21.637 14.492 17.965 18.851 22.891 ... 661s 22.028 16.884 17.252 18.325 25.435 19.141 21.238 22.196 18.038 ... 661s 22.628 31.163 26.053 24.419 32.145 28.966 30.207 29.142 33.212 ... 661s 25.694 ]'; 661s X = [1 1 1 1 1 1 1 1 2 2 2 2 2 3 3 3 3 3 3 3 3 4 4 4 4 4 4 4 5 5 5 5 5 5 5 5 5]'; 661s [TAB,STATS] = fitlm (X,y,"continuous",[],"display","off"); 661s [TAB,STATS] = fitlm (X,y,"CategoricalVars",1,"display","off"); 661s [TAB,STATS] = fitlm (X,y,"constant","categorical",1,"display","off"); 661s [TAB,STATS] = fitlm (X,y,"linear","categorical",1,"display","off"); 661s [TAB,STATS] = fitlm (X,y,[0,0;1,0],"categorical",1,"display","off"); 661s assert (TAB{2,2}, 10, 1e-04); 661s assert (TAB{3,2}, 7.99999999999999, 1e-09); 661s assert (TAB{4,2}, 8.99999999999999, 1e-09); 661s assert (TAB{5,2}, 11.0001428571429, 1e-09); 661s assert (TAB{6,2}, 19.0001111111111, 1e-09); 661s assert (TAB{2,3}, 1.01775379540949, 1e-09); 661s assert (TAB{3,3}, 1.64107868458008, 1e-09); 661s assert (TAB{4,3}, 1.43932122062479, 1e-09); 661s assert (TAB{5,3}, 1.48983900477565, 1e-09); 661s assert (TAB{6,3}, 1.3987687997822, 1e-09); 661s assert (TAB{2,6}, 9.82555903510687, 1e-09); 661s assert (TAB{3,6}, 4.87484242844031, 1e-09); 661s assert (TAB{4,6}, 6.25294748040552, 1e-09); 661s assert (TAB{5,6}, 7.38344399756088, 1e-09); 661s assert (TAB{6,6}, 13.5834536158296, 1e-09); 661s assert (TAB{3,7}, 2.85812420217862e-05, 1e-12); 661s assert (TAB{4,7}, 5.22936741204002e-07, 1e-06); 661s assert (TAB{5,7}, 2.12794763209106e-08, 1e-07); 661s assert (TAB{6,7}, 7.82091664406755e-15, 1e-08); 661s ***** test 661s popcorn = [5.5, 4.5, 3.5; 5.5, 4.5, 4.0; 6.0, 4.0, 3.0; ... 661s 6.5, 5.0, 4.0; 7.0, 5.5, 5.0; 7.0, 5.0, 4.5]; 661s brands = bsxfun (@times, ones(6,1), [1,2,3]); 661s popper = bsxfun (@times, [1;1;1;2;2;2], ones(1,3)); 661s 661s [TAB, STATS] = fitlm ({brands(:),popper(:)},popcorn(:),"interactions",... 661s "categoricalvars",[1,2],"display","off"); 661s assert (TAB{2,2}, 5.66666666666667, 1e-09); 661s assert (TAB{3,2}, -1.33333333333333, 1e-09); 661s assert (TAB{4,2}, -2.16666666666667, 1e-09); 661s assert (TAB{5,2}, 1.16666666666667, 1e-09); 661s assert (TAB{6,2}, -0.333333333333334, 1e-09); 661s assert (TAB{7,2}, -0.166666666666667, 1e-09); 661s assert (TAB{2,3}, 0.215165741455965, 1e-09); 661s assert (TAB{3,3}, 0.304290309725089, 1e-09); 661s assert (TAB{4,3}, 0.304290309725089, 1e-09); 661s assert (TAB{5,3}, 0.304290309725089, 1e-09); 661s assert (TAB{6,3}, 0.43033148291193, 1e-09); 661s assert (TAB{7,3}, 0.43033148291193, 1e-09); 661s assert (TAB{2,6}, 26.3362867542108, 1e-09); 661s assert (TAB{3,6}, -4.38178046004138, 1e-09); 661s assert (TAB{4,6}, -7.12039324756724, 1e-09); 661s assert (TAB{5,6}, 3.83405790253621, 1e-09); 661s assert (TAB{6,6}, -0.774596669241495, 1e-09); 661s assert (TAB{7,6}, -0.387298334620748, 1e-09); 661s assert (TAB{2,7}, 5.49841502258254e-12, 1e-09); 661s assert (TAB{3,7}, 0.000893505495903642, 1e-09); 661s assert (TAB{4,7}, 1.21291454302428e-05, 1e-09); 661s assert (TAB{5,7}, 0.00237798044119407, 1e-09); 661s assert (TAB{6,7}, 0.453570536021938, 1e-09); 661s assert (TAB{7,7}, 0.705316781644046, 1e-09); 661s ## Test with string ids for categorical variables 661s brands = {'Gourmet', 'National', 'Generic'; ... 661s 'Gourmet', 'National', 'Generic'; ... 661s 'Gourmet', 'National', 'Generic'; ... 661s 'Gourmet', 'National', 'Generic'; ... 661s 'Gourmet', 'National', 'Generic'; ... 661s 'Gourmet', 'National', 'Generic'}; 661s popper = {'oil', 'oil', 'oil'; 'oil', 'oil', 'oil'; 'oil', 'oil', 'oil'; ... 661s 'air', 'air', 'air'; 'air', 'air', 'air'; 'air', 'air', 'air'}; 661s [TAB, STATS] = fitlm ({brands(:),popper(:)},popcorn(:),"interactions",... 661s "categoricalvars",[1,2],"display","off"); 662s ***** test 662s load carsmall 662s X = [Weight,Horsepower,Acceleration]; 662s [TAB, STATS] = fitlm (X, MPG,"constant","display","off"); 662s [TAB, STATS] = fitlm (X, MPG,"linear","display","off"); 662s assert (TAB{2,2}, 47.9767628118615, 1e-09); 662s assert (TAB{3,2}, -0.00654155878851796, 1e-09); 662s assert (TAB{4,2}, -0.0429433065881864, 1e-09); 662s assert (TAB{5,2}, -0.0115826516894871, 1e-09); 662s assert (TAB{2,3}, 3.87851641748551, 1e-09); 662s assert (TAB{3,3}, 0.00112741016370336, 1e-09); 662s assert (TAB{4,3}, 0.0243130608813806, 1e-09); 662s assert (TAB{5,3}, 0.193325043113178, 1e-09); 662s assert (TAB{2,6}, 12.369874881944, 1e-09); 662s assert (TAB{3,6}, -5.80228828790225, 1e-09); 662s assert (TAB{4,6}, -1.76626492228599, 1e-09); 662s assert (TAB{5,6}, -0.0599128364487485, 1e-09); 662s assert (TAB{2,7}, 4.89570341688996e-21, 1e-09); 662s assert (TAB{3,7}, 9.87424814144e-08, 1e-09); 662s assert (TAB{4,7}, 0.0807803098213114, 1e-09); 662s assert (TAB{5,7}, 0.952359384151778, 1e-09); 662s 3 tests, 3 passed, 0 known failure, 0 skipped 662s [inst/fitrgam.m] 662s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/fitrgam.m 662s ***** demo 662s # Train a RegressionGAM Model for synthetic values 662s 662s f1 = @(x) cos (3 *x); 662s f2 = @(x) x .^ 3; 662s 662s # generate x1 and x2 for f1 and f2 662s x1 = 2 * rand (50, 1) - 1; 662s x2 = 2 * rand (50, 1) - 1; 662s 662s # calculate y 662s y = f1(x1) + f2(x2); 662s 662s # add noise 662s y = y + y .* 0.2 .* rand (50,1); 662s X = [x1, x2]; 662s 662s # create an object 662s a = fitrgam (X, y, "tol", 1e-3) 662s ***** test 662s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 662s y = [1; 2; 3; 4]; 662s a = fitrgam (x, y); 662s assert ({a.X, a.Y}, {x, y}) 662s assert ({a.BaseModel.Intercept}, {2.5000}) 662s assert ({a.Knots, a.Order, a.DoF}, {[5, 5, 5], [3, 3, 3], [8, 8, 8]}) 662s assert ({a.NumObservations, a.NumPredictors}, {4, 3}) 662s assert ({a.ResponseName, a.PredictorNames}, {"Y", {"x1", "x2", "x3"}}) 662s assert ({a.Formula}, {[]}) 662s ***** test 662s x = [1, 2, 3, 4; 4, 5, 6, 7; 7, 8, 9, 1; 3, 2, 1, 2]; 662s y = [1; 2; 3; 4]; 662s pnames = {"A", "B", "C", "D"}; 662s formula = "Y ~ A + B + C + D + A:C"; 662s intMat = logical ([1,0,0,0;0,1,0,0;0,0,1,0;0,0,0,1;1,0,1,0]); 662s a = fitrgam (x, y, "predictors", pnames, "formula", formula); 662s assert ({a.IntMatrix}, {intMat}) 662s assert ({a.ResponseName, a.PredictorNames}, {"Y", pnames}) 662s assert ({a.Formula}, {formula}) 662s ***** error fitrgam () 662s ***** error fitrgam (ones(10,2)) 662s ***** error 662s fitrgam (ones (4,2), ones (4, 1), "K") 662s ***** error 662s fitrgam (ones (4,2), ones (3, 1)) 662s ***** error 662s fitrgam (ones (4,2), ones (3, 1), "K", 2) 662s 7 tests, 7 passed, 0 known failure, 0 skipped 662s [inst/friedman.m] 662s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/friedman.m 662s ***** demo 662s load popcorn; 662s friedman (popcorn, 3); 662s ***** demo 662s load popcorn; 662s [p, atab] = friedman (popcorn, 3, "off"); 662s disp (p); 662s ***** test 662s popcorn = [5.5, 4.5, 3.5; 5.5, 4.5, 4.0; 6.0, 4.0, 3.0; ... 662s 6.5, 5.0, 4.0; 7.0, 5.5, 5.0; 7.0, 5.0, 4.5]; 662s [p, atab] = friedman (popcorn, 3, "off"); 662s assert (p, 0.001028853354594794, 1e-14); 662s assert (atab{2,2}, 99.75, 1e-14); 662s assert (atab{2,3}, 2, 0); 662s assert (atab{2,4}, 49.875, 1e-14); 662s assert (atab{2,5}, 13.75862068965517, 1e-14); 662s assert (atab{2,6}, 0.001028853354594794, 1e-14); 662s assert (atab{3,2}, 0.08333333333333215, 1e-14); 662s assert (atab{3,4}, 0.04166666666666607, 1e-14); 662s assert (atab{4,3}, 12, 0); 662s ***** test 662s popcorn = [5.5, 4.5, 3.5; 5.5, 4.5, 4.0; 6.0, 4.0, 3.0; ... 662s 6.5, 5.0, 4.0; 7.0, 5.5, 5.0; 7.0, 5.0, 4.5]; 662s [p, atab, stats] = friedman (popcorn, 3, "off"); 662s assert (atab{5,2}, 116, 0); 662s assert (atab{5,3}, 17, 0); 662s assert (stats.source, "friedman"); 662s assert (stats.n, 2); 662s assert (stats.meanranks, [8, 4.75, 2.25], 0); 662s assert (stats.sigma, 2.692582403567252, 1e-14); 662s 2 tests, 2 passed, 0 known failure, 0 skipped 662s [inst/fullfact.m] 662s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/fullfact.m 662s ***** demo 662s ## Full factorial design with 3 ordinal variables 662s fullfact ([2, 3, 4]) 662s ***** error fullfact (); 662s ***** error ... 662s fullfact (Inf); 662s ***** error ... 662s fullfact (NaN); 662s ***** error ... 662s fullfact (ones (2)); 662s ***** error ... 662s fullfact ([1, 2, NaN]); 662s ***** error ... 662s fullfact ([1, 2, Inf]); 662s ***** error fullfact (2.5); 662s ***** error fullfact (0); 662s ***** error fullfact (-3); 662s ***** error fullfact (3+2i); 662s ***** error fullfact ([1, 2, -3]); 662s ***** error fullfact ([0, 1, 2]); 662s ***** test 662s A = fullfact (1); 662s assert (A, 1); 662s ***** test 662s A = fullfact (2); 662s assert (A, [1; 2]); 662s ***** test 662s ***** test 662s A = fullfact (3); 662s assert (A, [1; 2; 3]); 662s ***** test 662s A = fullfact ([1, 2, 4]); 662s A_out = [1, 1, 1; 1, 2, 1; 1, 1, 2; 1, 2, 2; ... 662s 1, 1, 3; 1, 2, 3; 1, 1, 4; 1, 2, 4]; 662s assert (A, A_out); 662s ***** test 662s A = fullfact ([2, 2]); 662s assert (A, [1, 1; 2, 1; 1, 2; 2, 2]); 662s ***** test 662s A = fullfact ([2, 2, 4]); 662s A_out = [1, 1, 1; 2, 1, 1; 1, 2, 1; 2, 2, 1; ... 662s 1, 1, 2; 2, 1, 2; 1, 2, 2; 2, 2, 2; ... 662s 1, 1, 3; 2, 1, 3; 1, 2, 3; 2, 2, 3; ... 662s 1, 1, 4; 2, 1, 4; 1, 2, 4; 2, 2, 4]; 662s assert (A, A_out); 662s ***** test 662s A = fullfact ([3, 2, 4]); 662s A_out = [1, 1, 1; 2, 1, 1; 3, 1, 1; 1, 2, 1; 2, 2, 1; 3, 2, 1; ... 662s 1, 1, 2; 2, 1, 2; 3, 1, 2; 1, 2, 2; 2, 2, 2; 3, 2, 2; ... 662s 1, 1, 3; 2, 1, 3; 3, 1, 3; 1, 2, 3; 2, 2, 3; 3, 2, 3; ... 662s 1, 1, 4; 2, 1, 4; 3, 1, 4; 1, 2, 4; 2, 2, 4; 3, 2, 4]; 662s assert (A, A_out); 662s ***** test 662s A = fullfact ([4, 2]); 662s assert (A, [1, 1; 2, 1; 3, 1; 4, 1; 1, 2; 2, 2; 3, 2; 4, 2]); 662s 21 tests, 21 passed, 0 known failure, 0 skipped 662s [inst/geomean.m] 662s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/geomean.m 662s ***** test 662s x = [0:10]; 662s y = [x;x+5;x+10]; 662s assert (geomean (x), 0); 662s m = [0 9.462942809849169 14.65658770861967]; 662s assert (geomean (y, 2), m', 4e-14); 662s assert (geomean (y, "all"), 0); 662s y(2,4) = NaN; 662s m(2) = 9.623207231679554; 662s assert (geomean (y, 2), [0 NaN m(3)]', 4e-14); 662s assert (geomean (y', "omitnan"), m, 4e-14); 662s z = y + 20; 662s assert (geomean (z, "all"), NaN); 662s assert (geomean (z, "all", "includenan"), NaN); 662s assert (geomean (z, "all", "omitnan"), 29.59298474535024, 4e-14); 662s m = [24.79790781765634 NaN 34.85638839503932]; 662s assert (geomean (z'), m, 4e-14); 662s assert (geomean (z', "includenan"), m, 4e-14); 662s m(2) = 30.02181156156319; 662s assert (geomean (z', "omitnan"), m, 4e-14); 662s assert (geomean (z, 2, "omitnan"), m', 4e-14); 662s ***** test 662s x = repmat ([1:20;6:25], [5 2 6 3]); 662s assert (size (geomean (x, [3 2])), [10 1 1 3]); 662s assert (size (geomean (x, [1 2])), [1 1 6 3]); 662s assert (size (geomean (x, [1 2 4])), [1 1 6]); 662s assert (size (geomean (x, [1 4 3])), [1 40]); 662s assert (size (geomean (x, [1 2 3 4])), [1 1]); 662s ***** test 662s x = repmat ([1:20;6:25], [5 2 6 3]); 662s m = repmat ([8.304361203739333;14.3078118884256], [5 1 1 3]); 662s assert (geomean (x, [3 2]), m, 4e-13); 662s x(2,5,6,3) = NaN; 662s m(2,3) = NaN; 662s assert (geomean (x, [3 2]), m, 4e-13); 662s m(2,3) = 14.3292729579901; 662s assert (geomean (x, [3 2], "omitnan"), m, 4e-13); 662s ***** error geomean ("char") 662s ***** error geomean ([1 -1 3]) 662s ***** error ... 662s geomean (repmat ([1:20;6:25], [5 2 6 3 5]), -1) 662s ***** error ... 662s geomean (repmat ([1:20;6:25], [5 2 6 3 5]), 0) 662s ***** error ... 662s geomean (repmat ([1:20;6:25], [5 2 6 3 5]), [1 1]) 662s 8 tests, 8 passed, 0 known failure, 0 skipped 662s [inst/glmfit.m] 662s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/glmfit.m 662s ***** demo 662s x = [210, 230, 250, 270, 290, 310, 330, 350, 370, 390, 410, 430]'; 662s n = [48, 42, 31, 34, 31, 21, 23, 23, 21, 16, 17, 21]'; 662s y = [1, 2, 0, 3, 8, 8, 14, 17, 19, 15, 17, 21]'; 662s b = glmfit (x, [y n], "binomial", "Link", "probit"); 662s yfit = glmval (b, x, "probit", "Size", n); 662s plot (x, y./n, 'o', x, yfit ./ n, '-') 662s ***** demo 662s load fisheriris 662s X = meas (51:end, :); 662s y = strcmp ("versicolor", species(51:end)); 662s b = glmfit (X, y, "binomial", "link", "logit") 662s ***** test 662s load fisheriris; 662s X = meas(51:end,:); 662s y = strcmp ("versicolor", species(51:end)); 662s b = glmfit (X, y, "binomial", "link", "logit"); 662s assert (b, [42.6379; 2.4652; 6.6809; -9.4294; -18.2861], 1e-4); 662s ***** test 662s X = [1.2, 2.3, 3.4, 4.5, 5.6, 6.7, 7.8, 8.9, 9.0, 10.1]'; 662s y = [0.5, 0.6, 0.7, 0.8, 0.9, 1.0, 1.1, 1.2, 1.3, 1.4]'; 662s [Bnew, dev] = glmfit (X, y, "gamma", "link", "log"); 662s b_matlab = [-0.7631; 0.1113]; 662s dev_matlab = 0.0111; 662s assert (Bnew, b_matlab, 0.001); 662s assert (dev, dev_matlab, 0.001); 662s ***** test 662s X = [1.2, 2.3, 3.4, 4.5, 5.6, 6.7, 7.8, 8.9, 9.0, 10.1]'; 662s y = [0.5, 0.6, 0.7, 0.8, 0.9, 1.0, 1.1, 1.2, 1.3, 1.4]'; 662s p_input = 1; 662s [Bnew, dev] = glmfit (X, y, "inverse gaussian", "link", p_input); 662s b_matlab = [0.3813; 0.0950]; 662s dev_matlab = 0.0051; 662s assert (Bnew, b_matlab, 0.001); 662s assert (dev, dev_matlab, 0.001); 662s ***** error glmfit () 662s ***** error glmfit (1) 662s ***** error glmfit (1, 2) 662s ***** error ... 662s glmfit (rand (6, 1), rand (6, 1), 'poisson', 'link') 662s ***** error ... 662s glmfit ('abc', rand (6, 1), 'poisson') 662s ***** error ... 662s glmfit ([], rand (6, 1), 'poisson') 662s ***** error ... 662s glmfit (rand (5, 2), 'abc', 'poisson') 662s ***** error ... 662s glmfit (rand (5, 2), [], 'poisson') 662s ***** error ... 662s glmfit (rand (5, 2), rand (6, 1), 'poisson') 662s ***** error ... 662s glmfit (rand (6, 2), rand (6, 1), 3) 662s ***** error ... 662s glmfit (rand (6, 2), rand (6, 1), {'poisson'}) 662s ***** error ... 662s glmfit (rand (5, 2), rand (5, 3), 'binomial') 662s ***** error ... 662s glmfit (rand (2, 2), [true, true; false, false], 'binomial') 662s ***** error ... 662s glmfit (rand (5, 2), rand (5, 2), 'normal') 662s ***** error ... 662s glmfit (rand (5, 2), rand (5, 1), 'chebychev') 662s ***** error ... 662s glmfit (rand (5, 2), rand (5, 1), 'normal', 'B0', [1; 2; 3; 4]) 662s ***** error ... 662s glmfit (rand (5, 2), rand (5, 1), 'normal', 'constant', 1) 662s ***** error ... 662s glmfit (rand (5, 2), rand (5, 1), 'normal', 'constant', 'o') 662s ***** error ... 662s glmfit (rand (5, 2), rand (5, 1), 'normal', 'constant', true) 662s ***** error ... 662s glmfit (rand (5, 2), rand (5, 1), 'normal', 'estdisp', 1) 662s ***** error ... 662s glmfit (rand (5, 2), rand (5, 1), 'normal', 'estdisp', 'o') 662s ***** error ... 662s glmfit (rand (5, 2), rand (5, 1), 'normal', 'estdisp', true) 662s ***** error ... 662s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', struct ("Link", {1, 2})) 662s ***** error ... 662s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', struct ("Link", "norminv")) 662s ***** error ... 662s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', struct ("Link", "some", "Derivative", @(x)x, "Inverse", "normcdf")) 663s ***** error ... 663s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', struct ("Link", 1, "Derivative", @(x)x, "Inverse", "normcdf")) 663s ***** error ... 663s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', struct ("Link", @(x) [x, x], "Derivative", @(x)x, "Inverse", "normcdf")) 663s ***** error ... 663s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', struct ("Link", "what", "Derivative", @(x)x, "Inverse", "normcdf")) 663s ***** error ... 663s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', struct ("Link", @(x)x, "Derivative", "some", "Inverse", "normcdf")) 663s ***** error ... 663s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', struct ("Link", @(x)x, "Derivative", 1, "Inverse", "normcdf")) 663s ***** error ... 663s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', struct ("Link", @(x)x, "Derivative", @(x) [x, x], "Inverse", "normcdf")) 663s ***** error ... 663s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', struct ("Link", @(x)x, "Derivative", "what", "Inverse", "normcdf")) 663s ***** error ... 663s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', struct ("Link", @(x)x, "Derivative", "normcdf", "Inverse", "some")) 663s ***** error ... 663s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', struct ("Link", @(x)x, "Derivative", "normcdf", "Inverse", 1)) 663s ***** error ... 663s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', struct ("Link", @(x)x, "Derivative", "normcdf", "Inverse", @(x) [x, x])) 663s ***** error ... 663s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', struct ("Link", @(x)x, "Derivative", "normcdf", "Inverse", "what")) 663s ***** error ... 663s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', {'log'}) 663s ***** error ... 663s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', {'log', 'hijy'}) 663s ***** error ... 663s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', {1, 2, 3, 4}) 663s ***** error ... 663s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', {"log", "dfv", "dfgvd"}) 663s ***** error ... 663s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', {@(x) [x, x], "dfv", "dfgvd"}) 663s ***** error ... 663s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', {@(x) what (x), "dfv", "dfgvd"}) 663s ***** error ... 663s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', {@(x) x, "dfv", "dfgvd"}) 663s ***** error ... 663s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', {@(x) x, @(x) [x, x], "dfgvd"}) 663s ***** error ... 663s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', {@(x) x, @(x) what (x), "dfgvd"}) 663s ***** error ... 663s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', {@(x) x, @(x) x, "dfgvd"}) 663s ***** error ... 663s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', {@(x) x, @(x) x, @(x) [x, x]}) 663s ***** error ... 663s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', {@(x) x, @(x) x, @(x) what (x)}) 663s ***** error ... 663s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', NaN) 663s ***** error ... 663s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', [1, 2]) 663s ***** error ... 663s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', [1i]) 663s ***** error ... 663s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', ["log"; "log1"]) 663s ***** error ... 663s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', 'somelinkfunction') 663s ***** error ... 663s glmfit (rand(5,2), rand(5,1), 'poisson', 'link', true) 663s ***** error ... 663s glmfit (rand(5,2), rand(5,1), 'poisson', 'options', true) 663s ***** error ... 663s glmfit (rand(5,2), rand(5,1), 'poisson', 'options', struct ("MaxIter", 100)) 663s ***** error ... 663s glmfit (rand(5,2), rand(5,1), 'poisson', 'options', struct ("MaxIter", 4.5, "TolX", 1e-6)) 663s ***** error ... 663s glmfit (rand(5,2), rand(5,1), 'poisson', 'options', struct ("MaxIter", 0, "TolX", 1e-6)) 663s ***** error ... 663s glmfit (rand(5,2), rand(5,1), 'poisson', 'options', struct ("MaxIter", -100, "TolX", 1e-6)) 663s ***** error ... 663s glmfit (rand(5,2), rand(5,1), 'poisson', 'options', struct ("MaxIter", [50 ,50], "TolX", 1e-6)) 663s ***** error ... 663s glmfit (rand(5,2), rand(5,1), 'poisson', 'options', struct ("MaxIter", 100, "TolX", 0)) 663s ***** error ... 663s glmfit (rand(5,2), rand(5,1), 'poisson', 'options', struct ("MaxIter", 100, "TolX", -1e-6)) 663s ***** error ... 663s glmfit (rand(5,2), rand(5,1), 'poisson', 'options', struct ("MaxIter", 100, "TolX", [1e-6, 1e-6])) 663s ***** error ... 663s glmfit (rand (5, 2), rand (5, 1), 'normal', 'offset', [1; 2; 3; 4]) 663s ***** error ... 663s glmfit (rand (5, 2), rand (5, 1), 'normal', 'offset', 'asdfg') 663s ***** error ... 663s glmfit (rand (5, 2), rand (5, 1), 'normal', 'weights', [1; 2; 3; 4]) 663s ***** error ... 663s glmfit (rand (5, 2), rand (5, 1), 'normal', 'weights', 'asdfg') 663s 70 tests, 70 passed, 0 known failure, 0 skipped 663s [inst/glmval.m] 663s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/glmval.m 663s ***** demo 663s x = [210, 230, 250, 270, 290, 310, 330, 350, 370, 390, 410, 430]'; 663s n = [48, 42, 31, 34, 31, 21, 23, 23, 21, 16, 17, 21]'; 663s y = [1, 2, 0, 3, 8, 8, 14, 17, 19, 15, 17, 21]'; 663s b = glmfit (x, [y n], "binomial", "Link", "probit"); 663s yfit = glmval (b, x, "probit", "Size", n); 663s plot (x, y./n, 'o', x, yfit ./ n, '-') 663s ***** error glmval () 663s ***** error glmval (1) 663s ***** error glmval (1, 2) 663s ***** error ... 663s glmval ("asd", [1; 1; 1], 'probit') 663s ***** error ... 663s glmval ([], [1; 1; 1], 'probit') 663s ***** error ... 663s glmval ([0.1; 0.3; 0.4], [], 'probit') 663s ***** error ... 663s glmval ([0.1; 0.3; 0.4], "asd", 'probit') 663s ***** error ... 663s glmval (rand (3,1), rand (5,2), struct ("Link", {1, 2})) 663s ***** error ... 663s glmval (rand (3,1), rand (5,2), struct ("Link", "norminv")) 663s ***** error ... 663s glmval (rand (3,1), rand (5,2), struct ("Link", "some", "Derivative", @(x)x, "Inverse", "normcdf")) 663s ***** error ... 663s glmval (rand (3,1), rand (5,2), struct ("Link", 1, "Derivative", @(x)x, "Inverse", "normcdf")) 663s ***** error ... 663s glmval (rand (3,1), rand (5,2), struct ("Link", @(x) [x, x], "Derivative", @(x)x, "Inverse", "normcdf")) 663s ***** error ... 663s glmval (rand (3,1), rand (5,2), struct ("Link", "what", "Derivative", @(x)x, "Inverse", "normcdf")) 663s ***** error ... 663s glmval (rand (3,1), rand (5,2), struct ("Link", @(x)x, "Derivative", "some", "Inverse", "normcdf")) 663s ***** error ... 663s glmval (rand (3,1), rand (5,2), struct ("Link", @(x)x, "Derivative", 1, "Inverse", "normcdf")) 663s ***** error ... 663s glmval (rand (3,1), rand (5,2), struct ("Link", @(x)x, "Derivative", @(x) [x, x], "Inverse", "normcdf")) 663s ***** error ... 663s glmval (rand (3,1), rand (5,2), struct ("Link", @(x)x, "Derivative", "what", "Inverse", "normcdf")) 663s ***** error ... 663s glmval (rand (3,1), rand (5,2), struct ("Link", @(x)x, "Derivative", "normcdf", "Inverse", "some")) 663s ***** error ... 663s glmval (rand (3,1), rand (5,2), struct ("Link", @(x)x, "Derivative", "normcdf", "Inverse", 1)) 663s ***** error ... 663s glmval (rand (3,1), rand (5,2), struct ("Link", @(x)x, "Derivative", "normcdf", "Inverse", @(x) [x, x])) 663s ***** error ... 663s glmval (rand (3,1), rand (5,2), struct ("Link", @(x)x, "Derivative", "normcdf", "Inverse", "what")) 663s ***** error ... 663s glmval (rand (3,1), rand (5,2), {'log'}) 663s ***** error ... 663s glmval (rand (3,1), rand (5,2), {'log', 'hijy'}) 663s ***** error ... 663s glmval (rand (3,1), rand (5,2), {1, 2, 3, 4}) 663s ***** error ... 663s glmval (rand (3,1), rand (5,2), {"log", "dfv", "dfgvd"}) 663s ***** error ... 663s glmval (rand (3,1), rand (5,2), {@(x) [x, x], "dfv", "dfgvd"}) 663s ***** error ... 663s glmval (rand (3,1), rand (5,2), {@(x) what (x), "dfv", "dfgvd"}) 663s ***** error ... 663s glmval (rand (3,1), rand (5,2), {@(x) x, "dfv", "dfgvd"}) 663s ***** error ... 663s glmval (rand (3,1), rand (5,2), {@(x) x, @(x) [x, x], "dfgvd"}) 663s ***** error ... 663s glmval (rand (3,1), rand (5,2), {@(x) x, @(x) what (x), "dfgvd"}) 663s ***** error ... 663s glmval (rand (3,1), rand (5,2), {@(x) x, @(x) x, "dfgvd"}) 663s ***** error ... 663s glmval (rand (3,1), rand (5,2), {@(x) x, @(x) x, @(x) [x, x]}) 663s ***** error ... 663s glmval (rand (3,1), rand (5,2), {@(x) x, @(x) x, @(x) what (x)}) 663s ***** error ... 663s glmval (rand (3,1), rand (5,2), NaN) 663s ***** error ... 663s glmval (rand (3,1), rand (5,2), [1, 2]) 663s ***** error ... 663s glmval (rand (3,1), rand (5,2), [1i]) 663s ***** error ... 663s glmval (rand (3,1), rand (5,2), ["log"; "log1"]) 663s ***** error ... 663s glmval (rand (3,1), rand (5,2), 'somelinkfunction') 663s ***** error ... 663s glmval (rand (3,1), rand (5,2), true) 663s ***** error ... 663s glmval (rand (3,1), rand (5,2), 'probit', struct ("s", 1)) 663s ***** error ... 663s glmval (rand (3,1), rand (5,2), 'probit', 'confidence') 663s ***** error ... 663s glmval (rand (3,1), rand (5,2), 'probit', 'confidence', 0) 663s ***** error ... 663s glmval (rand (3,1), rand (5,2), 'probit', 'confidence', 1.2) 663s ***** error ... 663s glmval (rand (3,1), rand (5,2), 'probit', 'confidence', [0.9, 0.95]) 663s ***** error ... 663s glmval (rand (3, 1), rand (5, 2), 'probit', 'constant', 1) 663s ***** error ... 663s glmval (rand (3, 1), rand (5, 2), 'probit', 'constant', 'o') 663s ***** error ... 663s glmval (rand (3, 1), rand (5, 2), 'probit', 'constant', true) 663s ***** error ... 663s glmval (rand (3, 1), rand (5, 2), 'probit', 'offset', [1; 2; 3; 4]) 663s ***** error ... 663s glmval (rand (3, 1), rand (5, 2), 'probit', 'offset', 'asdfg') 663s ***** error ... 663s glmval (rand (3, 1), rand (5, 2), 'probit', 'simultaneous', 'asdfg') 663s ***** error ... 663s glmval (rand (3, 1), rand (5, 2), 'probit', 'simultaneous', [true, false]) 663s ***** error ... 663s glmval (rand (3, 1), rand (5, 2), 'probit', 'size', "asd") 663s ***** error ... 663s glmval (rand (3, 1), rand (5, 2), 'probit', 'size', [2, 3, 4]) 663s ***** error ... 663s glmval (rand (3, 1), rand (5, 2), 'probit', 'size', [2; 3; 4]) 663s ***** error ... 663s glmval (rand (3, 1), rand (5, 2), 'probit', 'size', ones (3)) 663s ***** error ... 663s glmval (rand (3, 1), rand (5, 2), 'probit', 'someparam', 4) 663s ***** error ... 663s [y,lo,hi] = glmval (rand (3, 1), rand (5, 2), 'probit') 663s 57 tests, 57 passed, 0 known failure, 0 skipped 663s [inst/gmdistribution.m] 663s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/gmdistribution.m 663s ***** test 663s mu = eye(2); 663s Sigma = eye(2); 663s GM = gmdistribution (mu, Sigma); 663s density = GM.pdf ([0 0; 1 1]); 663s assert (density(1) - density(2), 0, 1e-6); 663s 663s [idx, nlogl, P, logpdf,M] = cluster (GM, eye(2)); 663s assert (idx, [1; 2]); 663s [idx2,nlogl2,P2,logpdf2] = GM.cluster (eye(2)); 663s assert (nlogl - nlogl2, 0, 1e-6); 663s [idx3,nlogl3,P3] = cluster (GM, eye(2)); 663s assert (P - P3, zeros (2), 1e-6); 663s [idx4,nlogl4] = cluster (GM, eye(2)); 663s assert (size (nlogl4), [1 1]); 663s idx5 = cluster (GM, eye(2)); 663s assert (idx - idx5, zeros (2,1)); 663s 663s D = GM.mahal ([1;0]); 663s assert (D - M(1,:), zeros (1,2), 1e-6); 663s 663s P = GM.posterior ([0 1]); 663s assert (P - P2(2,:), zeros (1,2), 1e-6); 663s 663s R = GM.random(20); 663s assert (size(R), [20, 2]); 663s 663s R = GM.random(); 663s assert (size(R), [1, 2]); 663s 1 test, 1 passed, 0 known failure, 0 skipped 663s [inst/grp2idx.m] 663s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/grp2idx.m 663s ***** test 663s in = [true false false true]; 663s out = {[1; 2; 2; 1] {"1"; "0"} [true; false]}; 663s assert (nthargout (1:3, @grp2idx, in), out) 663s assert (nthargout (1:3, @grp2idx, in), nthargout (1:3, @grp2idx, in')) 663s ***** test 663s assert (nthargout (1:3, @grp2idx, [false, true]), 663s {[1; 2] {"0"; "1"} [false; true]}); 663s assert (nthargout (1:3, @grp2idx, [true, false]), 663s {[1; 2] {"1"; "0"} [true; false]}); 663s ***** assert (nthargout (1:3, @grp2idx, ["oct"; "sci"; "oct"; "oct"; "sci"]), 663s {[1; 2; 1; 1; 2] {"oct"; "sci"} ["oct"; "sci"]}); 663s ***** assert (nthargout (1:3, @grp2idx, {"oct"; "sci"; "oct"; "oct"; "sci"}), 663s {[1; 2; 1; 1; 2] {"oct"; "sci"} {"oct"; "sci"}}); 663s ***** assert (nthargout (1:3, @grp2idx, [ 1 -3 -2 -3 -3 2 1 -1 3 -3]), 663s {[1; 2; 3; 2; 2; 4; 1; 5; 6; 2], {"1"; "-3"; "-2"; "2"; "-1"; "3"}, ... 663s [1; -3; -2; 2; -1; 3]}); 663s ***** assert (nthargout (1:3, @grp2idx, [2 2 3 NaN 2 3]), 663s {[1; 1; 2; NaN; 1; 2] {"2"; "3"} [2; 3]}) 663s ***** assert (nthargout (1:3, @grp2idx, {"et" "sa" "sa" "" "et"}), 663s {[1; 2; 2; NaN; 1] {"et"; "sa"} {"et"; "sa"}}) 663s ***** test assert (nthargout (1:3, @grp2idx, ["sci"; "oct"; "sci"; "oct"; "oct"]), 663s {[1; 2; 1; 2; 2] {"sci"; "oct"} ["sci"; "oct"]}); 663s ***** test assert (nthargout (1:3, @grp2idx, {"sci"; "oct"; "sci"; "oct"; "oct"}), 663s {[1; 2; 1; 2; 2] {"sci"; "oct"} {"sci"; "oct"}}); 663s ***** test assert (nthargout (1:3, @grp2idx, {"sa" "et" "et" "" "sa"}), 663s {[1; 2; 2; NaN; 1] {"sa"; "et"} {"sa"; "et"}}) 663s 10 tests, 10 passed, 0 known failure, 0 skipped 663s [inst/grpstats.m] 663s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/grpstats.m 663s ***** demo 663s load carsmall; 663s [m,p,g] = grpstats (Weight, Model_Year, {"mean", "predci", "gname"}) 663s n = length(m); 663s errorbar((1:n)',m,p(:,2)-m); 663s set (gca, "xtick", 1:n, "xticklabel", g); 663s title ("95% prediction intervals for mean weight by year"); 663s ***** demo 663s load carsmall; 663s [m,p,g] = grpstats ([Acceleration,Weight/1000],Cylinders, ... 663s {"mean", "meanci", "gname"}, 0.05) 663s [c,r] = size (m); 663s errorbar((1:c)'.*ones(c,r),m,p(:,[(1:r)])-m); 663s set (gca, "xtick", 1:c, "xticklabel", g); 663s title ("95% prediction intervals for mean weight by year"); 663s ***** test 663s load carsmall 663s means = grpstats (Acceleration, Origin); 663s assert (means, [14.4377; 18.0500; 15.8867; 16.3778; 16.6000; 15.5000], 0.001); 663s ***** test 663s load carsmall 663s [grpMin,grpMax,grp] = grpstats (Acceleration, Origin, {"min","max","gname"}); 663s assert (grpMin, [8.0; 15.3; 13.9; 12.2; 15.7; 15.5]); 663s assert (grpMax, [22.2; 21.9; 18.2; 24.6; 17.5; 15.5]); 664s ***** test 664s load carsmall 664s [grpMin,grpMax,grp] = grpstats (Acceleration, Origin, {"min","max","gname"}); 664s assert (grp', {"USA", "France", "Japan", "Germany", "Sweden", "Italy"}); 664s ***** test 664s load carsmall 664s [m,p,g] = grpstats ([Acceleration,Weight/1000], Cylinders, ... 664s {"mean", "meanci", "gname"}, 0.05); 664s assert (p(:,1), [11.17621760075134, 16.13845847655224, 16.16222663683362]', ... 664s [1e-14, 2e-14, 1e-14]'); 664s ***** test 664s [mC, g] = grpstats ([], []); 664s assert (isempty (mC), true); 664s assert (isempty (g), true); 664s ***** error ... 664s grpstats (ones (3, 3, 3)); 664s ***** error ... 664s grpstats ([], {'A'; 'B'; 'A'; 'B'}) 664s ***** error ... 664s grpstats ([1:4]', {'A'; 'B'; 'A'; 'B'}, "predci", "alpha"); 664s ***** error ... 664s grpstats ([1:4]', {'A'; 'B'; 'A'; 'B'}, "predci", "somename", -0.1); 664s ***** error ... 664s grpstats ([1:4]', {'A'; 'B'; 'A'; 'B'}, "predci", {2, 3}, -0.1); 664s ***** error ... 664s grpstats ([1:4]', {'A'; 'B'; 'A'; 'B'}, "predci", "alpha", -0.1); 664s ***** error ... 664s grpstats ([1:4]', {'A'; 'B'; 'A'; 'B'}, {'mean', 'sum'}); 664s ***** error ... 664s [q, w] = grpstats ([1:4]', {'A'; 'B'; 'A'; 'B'}); 664s ***** error ... 664s grpstats ([1:4]', {'A'; 'B'; 'A'; 'B'}, "whatever"); 664s 14 tests, 14 passed, 0 known failure, 0 skipped 664s [inst/gscatter.m] 664s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/gscatter.m 664s ***** demo 664s load fisheriris; 664s X = meas(:,3:4); 664s cidcs = kmeans (X, 3, "Replicates", 5); 664s gscatter (X(:,1), X(:,2), cidcs, [.75 .75 0; 0 .75 .75; .75 0 .75], "os^"); 664s title ("Fisher's iris data"); 664s ***** shared visibility_setting 664s visibility_setting = get (0, "DefaultFigureVisible"); 664s ***** test 664s hf = figure ("visible", "off"); 664s unwind_protect 664s load fisheriris; 664s X = meas(:,3:4); 664s cidcs = kmeans (X, 3, "Replicates", 5); 664s gscatter (X(:,1), X(:,2), cidcs, [.75 .75 0; 0 .75 .75; .75 0 .75], "os^"); 664s title ("Fisher's iris data"); 664s unwind_protect_cleanup 664s close (hf); 664s end_unwind_protect 664s warning: legend: 'best' not yet implemented for location specifier, using 'northeast' instead 664s ***** error gscatter (); 664s ***** error gscatter ([1]); 664s ***** error gscatter ([1], [2]); 664s ***** error gscatter ('abc', [1 2 3], [1]); 664s ***** error gscatter ([1 2 3], [1 2], [1]); 664s ***** error gscatter ([1 2 3], 'abc', [1]); 664s ***** error gscatter ([1 2], [1 2], [1]); 664s ***** error gscatter ([1 2], [1 2], [1 2], 'rb', 'so', 12, 'xxx'); 664s 9 tests, 9 passed, 0 known failure, 0 skipped 664s [inst/harmmean.m] 664s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/harmmean.m 664s ***** test 664s x = [0:10]; 664s y = [x;x+5;x+10]; 664s assert (harmmean (x), 0); 664s m = [0 8.907635160795225 14.30854471766802]; 664s assert (harmmean (y, 2), m', 4e-14); 664s assert (harmmean (y, "all"), 0); 664s y(2,4) = NaN; 664s m(2) = 9.009855936313949; 664s assert (harmmean (y, 2), [0 NaN m(3)]', 4e-14); 664s assert (harmmean (y', "omitnan"), m, 4e-14); 664s z = y + 20; 664s assert (harmmean (z, "all"), NaN); 664s assert (harmmean (z, "all", "includenan"), NaN); 664s assert (harmmean (z, "all", "omitnan"), 29.1108719858295, 4e-14); 664s m = [24.59488458841874 NaN 34.71244385944397]; 664s assert (harmmean (z'), m, 4e-14); 664s assert (harmmean (z', "includenan"), m, 4e-14); 664s m(2) = 29.84104075528277; 664s assert (harmmean (z', "omitnan"), m, 4e-14); 664s assert (harmmean (z, 2, "omitnan"), m', 4e-14); 664s ***** test 664s x = repmat ([1:20;6:25], [5 2 6 3]); 664s assert (size (harmmean (x, [3 2])), [10 1 1 3]); 664s assert (size (harmmean (x, [1 2])), [1 1 6 3]); 664s assert (size (harmmean (x, [1 2 4])), [1 1 6]); 664s assert (size (harmmean (x, [1 4 3])), [1 40]); 664s assert (size (harmmean (x, [1 2 3 4])), [1 1]); 664s ***** test 664s x = repmat ([1:20;6:25], [5 2 6 3]); 664s m = repmat ([5.559045930488016;13.04950789021461], [5 1 1 3]); 664s assert (harmmean (x, [3 2]), m, 4e-14); 664s x(2,5,6,3) = NaN; 664s m(2,3) = NaN; 664s assert (harmmean (x, [3 2]), m, 4e-14); 664s m(2,3) = 13.06617961315406; 664s assert (harmmean (x, [3 2], "omitnan"), m, 4e-14); 664s ***** error harmmean ("char") 664s ***** error harmmean ([1 -1 3]) 664s ***** error ... 664s harmmean (repmat ([1:20;6:25], [5 2 6 3 5]), -1) 664s ***** error ... 664s harmmean (repmat ([1:20;6:25], [5 2 6 3 5]), 0) 664s ***** error ... 664s harmmean (repmat ([1:20;6:25], [5 2 6 3 5]), [1 1]) 664s 8 tests, 8 passed, 0 known failure, 0 skipped 664s [inst/hist3.m] 664s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/hist3.m 664s ***** demo 664s X = [ 664s 1 1 664s 1 1 664s 1 10 664s 1 10 664s 5 5 664s 5 5 664s 5 5 664s 5 5 664s 5 5 664s 7 3 664s 7 3 664s 7 3 664s 10 10 664s 10 10]; 664s hist3 (X) 664s ***** test 664s N_exp = [ 0 0 0 5 20 664s 0 0 10 15 0 664s 0 15 10 0 0 664s 20 5 0 0 0]; 664s 664s n = 100; 664s x = [1:n]'; 664s y = [n:-1:1]'; 664s D = [x y]; 664s N = hist3 (D, [4 5]); 664s assert (N, N_exp); 664s ***** test 664s N_exp = [0 0 0 0 1 664s 0 0 0 0 1 664s 0 0 0 0 1 664s 1 1 1 1 93]; 664s 664s n = 100; 664s x = [1:n]'; 664s y = [n:-1:1]'; 664s D = [x y]; 664s C{1} = [1 1.7 3 4]; 664s C{2} = [1:5]; 664s N = hist3 (D, C); 664s assert (N, N_exp); 664s ***** test 664s D = [1 1; 3 1; 3 3; 3 1]; 664s [c, nn] = hist3 (D, {0:4, 0:4}); 664s exp_c = zeros (5); 664s exp_c([7 9 19]) = [1 2 1]; 664s assert (c, exp_c); 664s assert (nn, {0:4, 0:4}); 664s ***** test 664s for i = 10 664s assert (size (hist3 (rand (9, 2), "Edges", {[0:.2:1]; [0:.2:1]})), [6 6]) 664s endfor 664s ***** test 664s edge_1 = linspace (0, 10, 10); 664s edge_2 = linspace (0, 50, 10); 664s [c, nn] = hist3 ([1:10; 1:5:50]', "Edges", {edge_1, edge_2}); 664s exp_c = zeros (10, 10); 664s exp_c([1 12 13 24 35 46 57 68 79 90]) = 1; 664s assert (c, exp_c); 664s 664s assert (nn{1}, edge_1 + edge_1(2)/2, eps*10^4) 664s assert (nn{2}, edge_2 + edge_2(2)/2, eps*10^4) 664s ***** shared X 664s X = [ 664s 5 2 664s 5 3 664s 1 4 664s 5 3 664s 4 4 664s 1 2 664s 2 3 664s 3 3 664s 5 4 664s 5 3]; 664s ***** test 664s N = zeros (10); 664s N([1 10 53 56 60 91 98 100]) = [1 1 1 1 3 1 1 1]; 664s C = {(1.2:0.4:4.8), (2.1:0.2:3.9)}; 664s assert (nthargout ([1 2], @hist3, X), {N C}, eps*10^3) 664s ***** test 664s N = zeros (5, 7); 664s N([1 5 17 18 20 31 34 35]) = [1 1 1 1 3 1 1 1]; 664s C = {(1.4:0.8:4.6), ((2+(1/7)):(2/7):(4-(1/7)))}; 664s assert (nthargout ([1 2], @hist3, X, [5 7]), {N C}, eps*10^3) 664s assert (nthargout ([1 2], @hist3, X, "Nbins", [5 7]), {N C}, eps*10^3) 664s ***** test 664s N = [0 1 0; 0 1 0; 0 0 1; 0 0 0]; 664s C = {(2:5), (2.5:1:4.5)}; 664s assert (nthargout ([1 2], @hist3, X, "Edges", {(1.5:4.5), (2:4)}), {N C}) 664s ***** test 664s N = [0 0 1 0 1 0; 0 0 0 1 0 0; 0 0 1 4 2 0]; 664s C = {(1.2:3.2), (0:5)}; 664s assert (nthargout ([1 2], @hist3, X, "Ctrs", C), {N C}) 664s assert (nthargout ([1 2], @hist3, X, C), {N C}) 664s ***** test 664s [~, C] = hist3 (rand (10, 2), "Edges", {[0 .05 .15 .35 .55 .95], 664s [-1 .05 .07 .2 .3 .5 .89 1.2]}); 664s C_exp = {[ 0.025 0.1 0.25 0.45 0.75 1.15], ... 664s [-0.475 0.06 0.135 0.25 0.4 0.695 1.045 1.355]}; 664s assert (C, C_exp, eps*10^2) 664s ***** test 664s Xv = repmat ([1:10]', [1 2]); 664s 664s ## Test Centers 664s assert (hist3 (Xv, "Ctrs", {1:10, 1:10}), eye (10)) 664s 664s N_exp = eye (6); 664s N_exp([1 end]) = 3; 664s assert (hist3 (Xv, "Ctrs", {3:8, 3:8}), N_exp) 664s 664s N_exp = zeros (8, 6); 664s N_exp([1 2 11 20 29 38 47 48]) = [2 1 1 1 1 1 1 2]; 664s assert (hist3 (Xv, "Ctrs", {2:9, 3:8}), N_exp) 664s 664s ## Test Edges 664s assert (hist3 (Xv, "Edges", {1:10, 1:10}), eye (10)) 664s assert (hist3 (Xv, "Edges", {3:8, 3:8}), eye (6)) 664s assert (hist3 (Xv, "Edges", {2:9, 3:8}), [zeros(1, 6); eye(6); zeros(1, 6)]) 664s 664s N_exp = zeros (14); 664s N_exp(3:12, 3:12) = eye (10); 664s assert (hist3 (Xv, "Edges", {-1:12, -1:12}), N_exp) 664s 664s ## Test for Nbins 664s assert (hist3 (Xv), eye (10)) 664s assert (hist3 (Xv, [10 10]), eye (10)) 664s assert (hist3 (Xv, "nbins", [10 10]), eye (10)) 664s assert (hist3 (Xv, [5 5]), eye (5) * 2) 664s 664s N_exp = zeros (7, 5); 664s N_exp([1 9 10 18 26 27 35]) = [2 1 1 2 1 1 2]; 664s assert (hist3 (Xv, [7 5]), N_exp) 664s ***** test # bug #51059 664s D = [1 1; NaN 2; 3 1; 3 3; 1 NaN; 3 1]; 664s [c, nn] = hist3 (D, {0:4, 0:4}); 664s exp_c = zeros (5); 664s exp_c([7 9 19]) = [1 2 1]; 664s assert (c, exp_c) 664s assert (nn, {0:4, 0:4}) 664s ***** test 664s [c, nn] = hist3 ([1 8]); 664s exp_c = zeros (10, 10); 664s exp_c(6, 6) = 1; 664s exp_nn = {-4:5, 3:12}; 664s assert (c, exp_c) 664s assert (nn, exp_nn, eps) 664s 664s [c, nn] = hist3 ([1 8], [10 11]); 664s exp_c = zeros (10, 11); 664s exp_c(6, 6) = 1; 664s exp_nn = {-4:5, 3:13}; 664s assert (c, exp_c) 664s assert (nn, exp_nn, eps) 664s ***** test 664s [c, nn] = hist3 ([1 NaN; 2 3; 6 9; 8 NaN]); 664s exp_c = zeros (10, 10); 664s exp_c(2, 1) = 1; 664s exp_c(8, 10) = 1; 664s exp_nn = {linspace(1.35, 7.65, 10) linspace(3.3, 8.7, 10)}; 664s assert (c, exp_c) 664s assert (nn, exp_nn, eps*100) 664s ***** test 664s [c, nn] = hist3 ([1 NaN; 2 NaN; 6 NaN; 8 NaN]); 664s exp_c = zeros (10, 10); 664s exp_nn = {linspace(1.35, 7.65, 10) NaN(1, 10)}; 664s assert (c, exp_c) 664s assert (nn, exp_nn, eps*100) 664s ***** test 664s [c, nn] = hist3 ([1 NaN; NaN 3; NaN 9; 8 NaN]); 664s exp_c = zeros (10, 10); 664s exp_nn = {linspace(1.35, 7.65, 10) linspace(3.3, 8.7, 10)}; 664s assert (c, exp_c) 664s assert (nn, exp_nn, eps*100) 664s 16 tests, 16 passed, 0 known failure, 0 skipped 664s [inst/histfit.m] 664s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/histfit.m 664s ***** demo 664s histfit (randn (100, 1)) 664s ***** demo 664s histfit (poissrnd (2, 1000, 1), 10, "Poisson") 664s ***** demo 664s histfit (betarnd (3, 10, 1000, 1), 10, "beta") 664s ***** test 664s hf = figure ("visible", "off"); 664s unwind_protect 664s x = [2, 4, 3, 2, 4, 3, 2, 5, 6, 4, 7, 5, 9, 8, 10, 4, 11]; 664s histfit (x); 664s unwind_protect_cleanup 664s close (hf); 664s end_unwind_protect 665s ***** test 665s hf = figure ("visible", "off"); 665s unwind_protect 665s x = [2, 4, 3, 2, NaN, 3, 2, 5, 6, 4, 7, 5, 9, 8, 10, 4, 11]; 665s histfit (x); 665s unwind_protect_cleanup 665s close (hf); 665s end_unwind_protect 665s ***** test 665s hf = figure ("visible", "off"); 665s unwind_protect 665s x = [2, 4, 3, 2, NaN, 3, 2, 5, 6, 4, 7, 5, 9, 8, 10, 4, 11]; 665s histfit (x, 3); 665s unwind_protect_cleanup 665s close (hf); 665s end_unwind_protect 665s ***** test 665s hf = figure ("visible", "off"); 665s unwind_protect 665s histfit (randn (100, 1)); 665s unwind_protect_cleanup 665s close (hf); 665s end_unwind_protect 665s ***** test 665s hf = figure ("visible", "off"); 665s unwind_protect 665s histfit (poissrnd (2, 1000, 1), 10, "Poisson"); 665s unwind_protect_cleanup 665s close (hf); 665s end_unwind_protect 665s ***** test 665s hf = figure ("visible", "off"); 665s unwind_protect 665s histfit (betarnd (3, 10, 1000, 1), 10, "beta"); 665s unwind_protect_cleanup 665s close (hf); 665s end_unwind_protect 665s ***** test 665s hf = figure ("visible", "off"); 665s unwind_protect 665s ax = gca (); 665s histfit (ax, randn (100, 1)); 665s unwind_protect_cleanup 665s close (hf); 665s end_unwind_protect 666s ***** test 666s hf = figure ("visible", "off"); 666s unwind_protect 666s ax = gca (); 666s histfit (ax, poissrnd (2, 1000, 1), 10, "Poisson"); 666s unwind_protect_cleanup 666s close (hf); 666s end_unwind_protect 666s ***** test 666s hf = figure ("visible", "off"); 666s unwind_protect 666s ax = gca (); 666s histfit (ax, betarnd (3, 10, 1000, 1), 10, "beta"); 666s unwind_protect_cleanup 666s close (hf); 666s end_unwind_protect 666s ***** test 666s hf = figure ("visible", "off"); 666s unwind_protect 666s ax = axes ("parent", hf); 666s fail ("histfit (ax)", "histfit: too few input arguments."); 666s unwind_protect_cleanup 666s close (hf); 666s end_unwind_protect 666s ***** error ... 666s histfit ('wer') 666s ***** error histfit ([NaN, NaN, NaN]); 666s ***** error ... 666s histfit (randn (100, 1), 5.6) 666s ***** error ... 666s histfit (randn (100, 1), 8, 5) 666s ***** error ... 666s histfit (randn (100, 1), 8, {'normal'}) 666s ***** error ... 666s histfit (randn (100, 1), 8, 'Kernel') 666s ***** error ... 666s histfit (randn (100, 1), 8, 'ASDASDASD') 666s 17 tests, 17 passed, 0 known failure, 0 skipped 666s [inst/hmmestimate.m] 666s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/hmmestimate.m 666s ***** test 666s sequence = [1, 2, 1, 1, 1, 2, 2, 1, 2, 3, 3, ... 666s 3, 3, 2, 3, 1, 1, 1, 1, 3, 3, 2, 3, 1, 3]; 666s states = [1, 1, 2, 2, 2, 1, 1, 1, 1, 1, 1, ... 666s 1, 1, 1, 1, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1]; 666s [transprobest, outprobest] = hmmestimate (sequence, states); 666s expectedtransprob = [0.88889, 0.11111; 0.28571, 0.71429]; 666s expectedoutprob = [0.16667, 0.33333, 0.50000; 1.00000, 0.00000, 0.00000]; 666s assert (transprobest, expectedtransprob, 0.001); 666s assert (outprobest, expectedoutprob, 0.001); 666s ***** test 666s sequence = {"A", "B", "A", "A", "A", "B", "B", "A", "B", "C", "C", "C", ... 666s "C", "B", "C", "A", "A", "A", "A", "C", "C", "B", "C", "A", "C"}; 666s states = {"One", "One", "Two", "Two", "Two", "One", "One", "One", "One", ... 666s "One", "One", "One", "One", "One", "One", "Two", "Two", "Two", ... 666s "Two", "One", "One", "One", "One", "One", "One"}; 666s symbols = {"A", "B", "C"}; 666s statenames = {"One", "Two"}; 666s [transprobest, outprobest] = hmmestimate (sequence, states, "symbols", ... 666s symbols, "statenames", statenames); 666s expectedtransprob = [0.88889, 0.11111; 0.28571, 0.71429]; 666s expectedoutprob = [0.16667, 0.33333, 0.50000; 1.00000, 0.00000, 0.00000]; 666s assert (transprobest, expectedtransprob, 0.001); 666s assert (outprobest, expectedoutprob, 0.001); 666s ***** test 666s sequence = [1, 2, 1, 1, 1, 2, 2, 1, 2, 3, 3, 3, ... 666s 3, 2, 3, 1, 1, 1, 1, 3, 3, 2, 3, 1, 3]; 666s states = [1, 1, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, ... 666s 1, 1, 1, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1]; 666s pseudotransitions = [8, 2; 4, 6]; 666s pseudoemissions = [2, 4, 4; 7, 2, 1]; 666s [transprobest, outprobest] = hmmestimate (sequence, states, ... 666s "pseudotransitions", pseudotransitions, "pseudoemissions", pseudoemissions); 666s expectedtransprob = [0.85714, 0.14286; 0.35294, 0.64706]; 666s expectedoutprob = [0.178571, 0.357143, 0.464286; ... 666s 0.823529, 0.117647, 0.058824]; 666s assert (transprobest, expectedtransprob, 0.001); 666s assert (outprobest, expectedoutprob, 0.001); 666s 3 tests, 3 passed, 0 known failure, 0 skipped 666s [inst/hmmgenerate.m] 666s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/hmmgenerate.m 666s ***** test 666s len = 25; 666s transprob = [0.8, 0.2; 0.4, 0.6]; 666s outprob = [0.2, 0.4, 0.4; 0.7, 0.2, 0.1]; 666s [sequence, states] = hmmgenerate (len, transprob, outprob); 666s assert (length (sequence), len); 666s assert (length (states), len); 666s assert (min (sequence) >= 1); 666s assert (max (sequence) <= columns (outprob)); 666s assert (min (states) >= 1); 666s assert (max (states) <= rows (transprob)); 666s ***** test 666s len = 25; 666s transprob = [0.8, 0.2; 0.4, 0.6]; 666s outprob = [0.2, 0.4, 0.4; 0.7, 0.2, 0.1]; 666s symbols = {"A", "B", "C"}; 666s statenames = {"One", "Two"}; 666s [sequence, states] = hmmgenerate (len, transprob, outprob, ... 666s "symbols", symbols, "statenames", statenames); 666s assert (length (sequence), len); 666s assert (length (states), len); 666s assert (strcmp (sequence, "A") + strcmp (sequence, "B") + ... 666s strcmp (sequence, "C") == ones (1, len)); 666s assert (strcmp (states, "One") + strcmp (states, "Two") == ones (1, len)); 666s 2 tests, 2 passed, 0 known failure, 0 skipped 666s [inst/hmmviterbi.m] 666s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/hmmviterbi.m 666s ***** test 666s sequence = [1, 2, 1, 1, 1, 2, 2, 1, 2, 3, 3, 3, ... 666s 3, 2, 3, 1, 1, 1, 1, 3, 3, 2, 3, 1, 3]; 666s transprob = [0.8, 0.2; 0.4, 0.6]; 666s outprob = [0.2, 0.4, 0.4; 0.7, 0.2, 0.1]; 666s vpath = hmmviterbi (sequence, transprob, outprob); 666s expected = [1, 1, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, ... 666s 1, 1, 1, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1]; 666s assert (vpath, expected); 666s ***** test 666s sequence = {"A", "B", "A", "A", "A", "B", "B", "A", "B", "C", "C", "C", ... 666s "C", "B", "C", "A", "A", "A", "A", "C", "C", "B", "C", "A", "C"}; 666s transprob = [0.8, 0.2; 0.4, 0.6]; 666s outprob = [0.2, 0.4, 0.4; 0.7, 0.2, 0.1]; 666s symbols = {"A", "B", "C"}; 666s statenames = {"One", "Two"}; 666s vpath = hmmviterbi (sequence, transprob, outprob, "symbols", symbols, ... 666s "statenames", statenames); 666s expected = {"One", "One", "Two", "Two", "Two", "One", "One", "One", ... 666s "One", "One", "One", "One", "One", "One", "One", "Two", ... 666s "Two", "Two", "Two", "One", "One", "One", "One", "One", "One"}; 666s assert (vpath, expected); 666s 2 tests, 2 passed, 0 known failure, 0 skipped 666s [inst/hotelling_t2test.m] 666s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/hotelling_t2test.m 666s ***** error hotelling_t2test (); 666s ***** error ... 666s hotelling_t2test (1); 666s ***** error ... 666s hotelling_t2test (ones(2,2,2)); 666s ***** error ... 666s hotelling_t2test (ones(20,2), [0, 0], "alpha", 1); 666s ***** error ... 666s hotelling_t2test (ones(20,2), [0, 0], "alpha", -0.2); 666s ***** error ... 666s hotelling_t2test (ones(20,2), [0, 0], "alpha", "a"); 666s ***** error ... 666s hotelling_t2test (ones(20,2), [0, 0], "alpha", [0.01, 0.05]); 666s ***** error ... 666s hotelling_t2test (ones(20,2), [0, 0], "name", 0.01); 666s ***** error ... 666s hotelling_t2test (ones(20,1), [0, 0]); 666s ***** error ... 666s hotelling_t2test (ones(4,5), [0, 0, 0, 0, 0]); 666s ***** error ... 666s hotelling_t2test (ones(20,5), [0, 0, 0, 0]); 666s ***** test 666s randn ("seed", 1); 666s x = randn (50000, 5); 666s [h, pval, stats] = hotelling_t2test (x); 666s assert (h, 0); 666s assert (stats.df1, 5); 666s assert (stats.df2, 49995); 666s ***** test 666s randn ("seed", 1); 666s x = randn (50000, 5); 666s [h, pval, stats] = hotelling_t2test (x, ones (1, 5) * 10); 666s assert (h, 1); 666s assert (stats.df1, 5); 666s assert (stats.df2, 49995); 666s 13 tests, 13 passed, 0 known failure, 0 skipped 666s [inst/hotelling_t2test2.m] 666s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/hotelling_t2test2.m 666s ***** error hotelling_t2test2 (); 666s ***** error ... 666s hotelling_t2test2 ([2, 3, 4, 5, 6]); 666s ***** error ... 666s hotelling_t2test2 (1, [2, 3, 4, 5, 6]); 666s ***** error ... 666s hotelling_t2test2 (ones (2,2,2), [2, 3, 4, 5, 6]); 666s ***** error ... 666s hotelling_t2test2 ([2, 3, 4, 5, 6], 2); 666s ***** error ... 666s hotelling_t2test2 ([2, 3, 4, 5, 6], ones (2,2,2)); 666s ***** error ... 666s hotelling_t2test2 (ones (20,2), ones (20,2), "alpha", 1); 666s ***** error ... 666s hotelling_t2test2 (ones (20,2), ones (20,2), "alpha", -0.2); 666s ***** error ... 666s hotelling_t2test2 (ones (20,2), ones (20,2), "alpha", "a"); 666s ***** error ... 666s hotelling_t2test2 (ones (20,2), ones (20,2), "alpha", [0.01, 0.05]); 666s ***** error ... 666s hotelling_t2test2 (ones (20,2), ones (20,2), "name", 0.01); 666s ***** error ... 666s hotelling_t2test2 (ones (20,1), ones (20,2)); 666s ***** error ... 666s hotelling_t2test2 (ones (20,2), ones (25,3)); 666s ***** test 666s randn ("seed", 1); 666s x1 = randn (60000, 5); 666s randn ("seed", 5); 666s x2 = randn (30000, 5); 666s [h, pval, stats] = hotelling_t2test2 (x1, x2); 666s assert (h, 0); 666s assert (stats.df1, 5); 666s assert (stats.df2, 89994); 666s 14 tests, 14 passed, 0 known failure, 0 skipped 666s [inst/inconsistent.m] 666s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/inconsistent.m 666s ***** error inconsistent () 666s ***** error inconsistent ([1 2 1], 2, 3) 666s ***** error inconsistent (ones (2, 2)) 666s ***** error inconsistent ([1 2 1], -1) 666s ***** error inconsistent ([1 2 1], 1.3) 666s ***** error inconsistent ([1 2 1], [1 1]) 666s ***** error inconsistent (ones (2, 3)) 666s ***** test 666s load fisheriris; 666s Z = linkage(meas, 'average', 'chebychev'); 666s assert (cond (inconsistent (Z)), 39.9, 1e-3); 667s 8 tests, 8 passed, 0 known failure, 0 skipped 667s [inst/ismissing.m] 667s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/ismissing.m 667s ***** assert (ismissing ([1,NaN,3]), [false,true,false]) 667s ***** assert (ismissing ('abcd f'), [false,false,false,false,true,false]) 667s ***** assert (ismissing ({'xxx','','xyz'}), [false,true,false]) 667s ***** assert (ismissing ({'x','','y'}), [false,true,false]) 667s ***** assert (ismissing ({'x','','y';'z','a',''}), logical([0,1,0;0,0,1])) 667s ***** assert (ismissing ([1,2;NaN,2]), [false,false;true,false]) 667s ***** assert (ismissing ([1,2;NaN,2], 2), [false,true;false,true]) 667s ***** assert (ismissing ([1,2;NaN,2], [1 2]), [true,true;false,true]) 667s ***** assert (ismissing ([1,2;NaN,2], NaN), [false,false;true,false]) 667s ***** assert (ismissing (cat(3,magic(2),magic(2))), logical (zeros (2,2,2))) 667s ***** assert (ismissing (cat(3,magic(2),[1 2;3 NaN])), logical (cat(3,[0,0;0,0],[0,0;0,1]))) 667s ***** assert (ismissing ([1 2; 3 4], [5 1; 2 0]), logical([1 1; 0 0])) 667s ***** assert (ismissing (cat(3,'f oo','ba r')), logical(cat(3,[0 1 0 0],[0 0 1 0]))) 667s ***** assert (ismissing (cat(3,{'foo'},{''},{'bar'})), logical(cat(3,0,1,0))) 667s ***** assert (ismissing (double (NaN)), true) 667s ***** assert (ismissing (single (NaN)), true) 667s ***** assert (ismissing (' '), true) 667s ***** assert (ismissing ({''}), true) 667s ***** assert (ismissing ({' '}), false) 667s ***** assert (ismissing (double (eye(3)), single (1)), logical(eye(3))) 667s ***** assert (ismissing (double (eye(3)), true), logical(eye(3))) 667s ***** assert (ismissing (double (eye(3)), int32 (1)), logical(eye(3))) 667s ***** assert (ismissing (single (eye(3)), true), logical(eye(3))) 667s ***** assert (ismissing (single (eye(3)), double (1)), logical(eye(3))) 667s ***** assert (ismissing (single(eye(3)), int32 (1)), logical(eye(3))) 667s ***** assert (ismissing ({'123', '', 123}), [false false false]) 667s ***** assert (ismissing (logical ([1 0 1])), [false false false]) 667s ***** assert (ismissing (int32 ([1 2 3])), [false false false]) 667s ***** assert (ismissing (uint32 ([1 2 3])), [false false false]) 667s ***** assert (ismissing ({1, 2, 3}), [false false false]) 667s ***** assert (ismissing ([struct struct struct]), [false false false]) 667s ***** assert (ismissing (logical (eye(3)), true), logical(eye(3))) 667s ***** assert (ismissing (logical (eye(3)), double (1)), logical(eye(3))) 667s ***** assert (ismissing (logical (eye(3)), single (1)), logical(eye(3))) 667s ***** assert (ismissing (logical (eye(3)), int32 (1)), logical(eye(3))) 667s ***** assert (ismissing (int32 (eye(3)), int32 (1)), logical(eye(3))) 667s ***** assert (ismissing (int32 (eye(3)), true), logical(eye(3))) 667s ***** assert (ismissing (int32 (eye(3)), double (1)), logical(eye(3))) 667s ***** assert (ismissing (int32 (eye(3)), single (1)), logical(eye(3))) 667s ***** assert (ismissing ([]), logical([])) 667s ***** assert (ismissing (''), logical([])) 667s ***** assert (ismissing (ones (0,1)), logical(ones(0,1))) 667s ***** assert (ismissing (ones (1,0)), logical(ones(1,0))) 667s ***** assert (ismissing (ones (1,2,0)), logical(ones(1,2,0))) 667s ***** error ismissing () 667s ***** error <'indicator' and 'A' must have the same> ismissing ([1 2; 3 4], "abc") 667s ***** error <'indicator' and 'A' must have the same> ismissing ({"", "", ""}, 1) 667s ***** error <'indicator' and 'A' must have the same> ismissing (1, struct) 667s ***** error ismissing (struct, 1) 667s 49 tests, 49 passed, 0 known failure, 0 skipped 667s [inst/isoutlier.m] 667s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/isoutlier.m 667s ***** demo 667s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 667s TF = isoutlier (A, "mean") 667s ***** demo 667s ## Use a moving detection method to detect local outliers in a sine wave 667s 667s x = -2*pi:0.1:2*pi; 667s A = sin(x); 667s A(47) = 0; 667s time = datenum (2023,1,1,0,0,0) + (1/24)*[0:length(x)-1] - 730485; 667s TF = isoutlier (A, "movmedian", 5*(1/24), "SamplePoints", time); 667s plot (time, A) 667s hold on 667s plot (time(TF), A(TF), "x") 667s datetick ('x', 20, 'keepticks') 667s legend ("Original Data", "Outlier Data") 667s ***** demo 667s ## Locate an outlier in a vector of data and visualize the outlier 667s 667s x = 1:10; 667s A = [60 59 49 49 58 100 61 57 48 58]; 667s [TF, L, U, C] = isoutlier (A); 667s plot (x, A); 667s hold on 667s plot (x(TF), A(TF), "x"); 667s xlim ([1,10]); 667s line ([1,10], [L, L], "Linestyle", ":"); 667s text (1.1, L-2, "Lower Threshold"); 667s line ([1,10], [U, U], "Linestyle", ":"); 667s text (1.1, U-2, "Upper Threshold"); 667s line ([1,10], [C, C], "Linestyle", ":"); 667s text (1.1, C-3, "Center Value"); 667s legend ("Original Data", "Outlier Data"); 667s ***** test 667s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 667s assert (isoutlier (A, "mean"), logical([zeros(1,8) 1 zeros(1,6)])) 667s assert (isoutlier (A, "median"), ... 667s logical([zeros(1,3) 1 zeros(1,4) 1 zeros(1,6)])) 667s ***** test 667s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 667s [TF, L, U, C] = isoutlier (A, "mean"); 667s assert (L, -109.2459044922864, 1e-12) 667s assert (U, 264.9792378256198, 1e-12) 667s assert (C, 77.8666666666666, 1e-12) 667s ***** test 667s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 667s [TF, L, U, C] = isoutlier (A, "median"); 667s assert (L, 50.104386688966386, 1e-12) 667s assert (U, 67.895613311033610, 1e-12) 667s assert (C, 59) 667s ***** test 667s A = magic(5) + diag(200*ones(1,5)); 667s T = logical (eye (5)); 667s assert (isoutlier (A, 2), T) 667s ***** test 667s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 667s [TF, L, U, C] = isoutlier (A, "movmedian", 5); 667s l = [54.5522, 52.8283, 54.5522, 54.5522, 54.5522, 53.5522, 53.5522, ... 667s 53.5522, 47.6566, 56.5522, 57.5522, 56.5522, 51.1044, 52.3283, 53.5522]; 667s u = [63.4478, 66.1717, 63.4478, 63.4478, 63.4478, 62.4478, 62.4478, ... 667s 62.4478, 74.3434, 65.4478, 66.4478, 65.4478, 68.8956, 65.6717, 62.4478]; 667s c = [59, 59.5, 59, 59, 59, 58, 58, 58, 61, 61, 62, 61, 60, 59, 58]; 667s assert (L, l, 1e-4) 667s assert (U, u, 1e-4) 667s assert (C, c) 667s ***** test 667s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 667s [TF, L, U, C] = isoutlier (A, "movmedian", 5, "SamplePoints", [1:15]); 667s l = [54.5522, 52.8283, 54.5522, 54.5522, 54.5522, 53.5522, 53.5522, ... 667s 53.5522, 47.6566, 56.5522, 57.5522, 56.5522, 51.1044, 52.3283, 53.5522]; 667s u = [63.4478, 66.1717, 63.4478, 63.4478, 63.4478, 62.4478, 62.4478, ... 667s 62.4478, 74.3434, 65.4478, 66.4478, 65.4478, 68.8956, 65.6717, 62.4478]; 667s c = [59, 59.5, 59, 59, 59, 58, 58, 58, 61, 61, 62, 61, 60, 59, 58]; 667s assert (L, l, 1e-4) 667s assert (U, u, 1e-4) 667s assert (C, c) 667s ***** test 667s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 667s [TF, L, U, C] = isoutlier (A, "movmean", 5); 667s l = [54.0841, 6.8872, 11.5608, 12.1518, 11.0210, 10.0112, -218.2840, ... 667s -217.2375, -215.1239, -213.4890, -211.3264, 55.5800, 52.9589, ... 667s 52.5979, 51.0627]; 667s u = [63.2492, 131.1128, 122.4392, 122.2482, 122.5790, 122.7888, 431.0840, ... 667s 430.8375, 430.3239, 429.8890, 429.3264, 65.6200, 66.6411, 65.9021, ... 667s 66.9373]; 667s c = [58.6667, 69, 67, 67.2, 66.8, 66.4, 106.4, 106.8, 107.6, 108.2, 109, ... 667s 60.6, 59.8, 59.25, 59]; 667s assert (L, l, 1e-4) 667s assert (U, u, 1e-4) 667s assert (C, c, 1e-4) 667s ***** test 667s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 667s [TF, L, U, C] = isoutlier (A, "movmean", 5, "SamplePoints", [1:15]); 667s l = [54.0841, 6.8872, 11.5608, 12.1518, 11.0210, 10.0112, -218.2840, ... 667s -217.2375, -215.1239, -213.4890, -211.3264, 55.5800, 52.9589, ... 667s 52.5979, 51.0627]; 667s u = [63.2492, 131.1128, 122.4392, 122.2482, 122.5790, 122.7888, 431.0840, ... 667s 430.8375, 430.3239, 429.8890, 429.3264, 65.6200, 66.6411, 65.9021, ... 667s 66.9373]; 667s c = [58.6667, 69, 67, 67.2, 66.8, 66.4, 106.4, 106.8, 107.6, 108.2, 109, ... 667s 60.6, 59.8, 59.25, 59]; 667s assert (L, l, 1e-4) 667s assert (U, u, 1e-4) 667s assert (C, c, 1e-4) 667s ***** test 667s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 667s [TF, L, U, C] = isoutlier (A, "gesd"); 667s assert (TF, logical ([0 0 0 1 0 0 0 0 1 0 0 0 0 0 0])) 667s assert (L, 34.235977035439944, 1e-12) 667s assert (U, 89.764022964560060, 1e-12) 667s assert (C, 62) 667s ***** test 667s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 667s [TF, L, U, C] = isoutlier (A, "gesd", "ThresholdFactor", 0.01); 667s assert (TF, logical ([0 0 0 1 0 0 0 0 1 0 0 0 0 0 0])) 667s assert (L, 31.489256770616173, 1e-12) 667s assert (U, 92.510743229383820, 1e-12) 667s assert (C, 62) 667s ***** test 667s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 667s [TF, L, U, C] = isoutlier (A, "gesd", "ThresholdFactor", 5e-10); 667s assert (TF, logical ([0 0 0 0 0 0 0 0 1 0 0 0 0 0 0])) 667s assert (L, 23.976664158788935, 1e-12) 667s assert (U, 100.02333584121110, 1e-12) 667s assert (C, 62) 667s ***** test 667s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 667s [TF, L, U, C] = isoutlier (A, "grubbs"); 667s assert (TF, logical ([0 0 0 1 0 0 0 0 1 0 0 0 0 0 0])) 667s assert (L, 54.642809574646606, 1e-12) 667s assert (U, 63.511036579199555, 1e-12) 667s assert (C, 59.076923076923080, 1e-12) 667s ***** test 667s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 667s [TF, L, U, C] = isoutlier (A, "grubbs", "ThresholdFactor", 0.01); 667s assert (TF, logical ([0 0 0 1 0 0 0 0 1 0 0 0 0 0 0])) 667s assert (L, 54.216083184201850, 1e-12) 667s assert (U, 63.937762969644310, 1e-12) 667s assert (C, 59.076923076923080, 1e-12) 667s ***** test 667s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 667s [TF, L, U, C] = isoutlier (A, "percentiles", [10 90]); 667s assert (TF, logical ([0 0 0 0 0 0 0 0 1 0 0 0 0 0 0])) 667s assert (L, 57) 667s assert (U, 100) 667s assert (C, 78.5) 667s ***** test 667s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 667s [TF, L, U, C] = isoutlier (A, "percentiles", [20 80]); 667s assert (TF, logical ([1 0 0 1 0 0 1 0 1 0 0 0 0 0 1])) 667s assert (L, 57.5) 667s assert (U, 62) 667s assert (C, 59.75) 667s ***** shared A 667s A = [57 59 60 100 59 58 57 58 300 61 62 60 62 58 57]; 667s ***** error ... 667s isoutlier (A, "movmedian", 0); 667s ***** error ... 667s isoutlier (A, "movmedian", []); 667s ***** error ... 667s isoutlier (A, "movmedian", [2 3 4]); 667s ***** error ... 667s isoutlier (A, "movmedian", 1.4); 667s ***** error ... 667s isoutlier (A, "movmedian", [0 1]); 667s ***** error ... 667s isoutlier (A, "movmedian", [2 -1]); 667s ***** error ... 667s isoutlier (A, "movmedian", {2 3}); 667s ***** error ... 667s isoutlier (A, "movmedian", "char"); 667s 667s ***** error ... 667s isoutlier (A, "movmean", 0); 667s ***** error ... 667s isoutlier (A, "movmean", []); 667s ***** error ... 667s isoutlier (A, "movmean", [2 3 4]); 667s ***** error ... 667s isoutlier (A, "movmean", 1.4); 667s ***** error ... 667s isoutlier (A, "movmean", [0 1]); 667s ***** error ... 667s isoutlier (A, "movmean", [2 -1]); 667s ***** error ... 667s isoutlier (A, "movmean", {2 3}); 667s ***** error ... 667s isoutlier (A, "movmean", "char"); 667s 667s ***** error ... 667s isoutlier (A, "percentiles", [-1 90]); 667s ***** error ... 667s isoutlier (A, "percentiles", [10 -90]); 667s ***** error ... 667s isoutlier (A, "percentiles", [90]); 667s ***** error ... 667s isoutlier (A, "percentiles", [90 20]); 667s ***** error ... 667s isoutlier (A, "percentiles", [90 20]); 667s ***** error ... 667s isoutlier (A, "percentiles", [10 20 90]); 667s ***** error ... 667s isoutlier (A, "percentiles", {10 90}); 667s ***** error ... 667s isoutlier (A, "percentiles", "char"); 667s 667s ***** error ... 667s isoutlier (A, "movmean", 5, "SamplePoints", ones(3,15)); 667s ***** error ... 667s isoutlier (A, "movmean", 5, "SamplePoints", 15); 667s ***** error ... 667s isoutlier (A, "movmean", 5, "SamplePoints", [1,1:14]); 667s ***** error ... 667s isoutlier (A, "movmean", 5, "SamplePoints", [2,1,3:15]); 667s ***** error ... 667s isoutlier (A, "movmean", 5, "SamplePoints", [1:14]); 667s 667s ***** error ... 667s isoutlier (A, "movmean", 5, "ThresholdFactor", [1:14]); 667s ***** error ... 667s isoutlier (A, "movmean", 5, "ThresholdFactor", -1); 667s ***** error ... 667s isoutlier (A, "gesd", "ThresholdFactor", 3); 667s ***** error ... 667s isoutlier (A, "grubbs", "ThresholdFactor", 3); 667s 667s ***** error ... 667s isoutlier (A, "movmean", 5, "MaxNumOutliers", [1:14]); 667s ***** error ... 667s isoutlier (A, "movmean", 5, "MaxNumOutliers", -1); 667s ***** error ... 667s isoutlier (A, "movmean", 5, "MaxNumOutliers", 0); 667s ***** error ... 667s isoutlier (A, "movmean", 5, "MaxNumOutliers", 1.5); 667s 667s ***** error ... 667s isoutlier (A, {"movmean"}, 5, "SamplePoints", [1:15]); 667s ***** error isoutlier (A, {1}); 667s ***** error isoutlier (A, true); 667s ***** error isoutlier (A, false); 667s ***** error isoutlier (A, 0); 667s ***** error isoutlier (A, [1 2]); 667s ***** error isoutlier (A, -2); 667s 59 tests, 59 passed, 0 known failure, 0 skipped 667s [inst/jackknife.m] 667s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/jackknife.m 667s ***** demo 667s for k = 1:1000 667s rand ("seed", k); # for reproducibility 667s x = rand (10, 1); 667s s(k) = std (x); 667s jackstat = jackknife (@std, x); 667s j(k) = 10 * std (x) - 9 * mean (jackstat); 667s endfor 667s figure(); 667s hist ([s', j'], 0:sqrt(1/12)/10:2*sqrt(1/12)) 667s ***** demo 667s for k = 1:1000 667s randn ("seed", k); # for reproducibility 667s x = randn (1, 50); 667s rand ("seed", k); # for reproducibility 667s y = rand (1, 50); 667s jackstat = jackknife (@(x) std(x{1})/std(x{2}), y, x); 667s j(k) = 50 * std (y) / std (x) - 49 * mean (jackstat); 667s v(k) = sumsq ((50 * std (y) / std (x) - 49 * jackstat) - j(k)) / (50 * 49); 667s endfor 667s t = (j - sqrt (1 / 12)) ./ sqrt (v); 667s figure(); 667s plot (sort (tcdf (t, 49)), ... 667s "-;Almost linear mapping indicates good fit with t-distribution.;") 667s ***** test 667s ##Example from Quenouille, Table 1 667s d=[0.18 4.00 1.04 0.85 2.14 1.01 3.01 2.33 1.57 2.19]; 667s jackstat = jackknife ( @(x) 1/mean(x), d ); 667s assert ( 10 / mean(d) - 9 * mean(jackstat), 0.5240, 1e-5 ); 667s 1 test, 1 passed, 0 known failure, 0 skipped 667s [inst/kmeans.m] 668s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/kmeans.m 668s ***** demo 668s ## Generate a two-cluster problem 668s randn ("seed", 31) # for reproducibility 668s C1 = randn (100, 2) + 1; 668s randn ("seed", 32) # for reproducibility 668s C2 = randn (100, 2) - 1; 668s data = [C1; C2]; 668s 668s ## Perform clustering 668s rand ("seed", 1) # for reproducibility 668s [idx, centers] = kmeans (data, 2); 668s 668s ## Plot the result 668s figure; 668s plot (data (idx==1, 1), data (idx==1, 2), "ro"); 668s hold on; 668s plot (data (idx==2, 1), data (idx==2, 2), "bs"); 668s plot (centers (:, 1), centers (:, 2), "kv", "markersize", 10); 668s title ("A simple two-clusters example"); 668s hold off; 668s ***** demo 668s ## Cluster data using k-means clustering, then plot the cluster regions 668s ## Load Fisher's iris data set and use the petal lengths and widths as 668s ## predictors 668s 668s load fisheriris 668s X = meas(:,3:4); 668s 668s plot (X(:,1), X(:,2), "k*", "MarkerSize", 5); 668s title ("Fisher's Iris Data"); 668s xlabel ("Petal Lengths (cm)"); 668s ylabel ("Petal Widths (cm)"); 668s 668s ## Cluster the data. Specify k = 3 clusters 668s rand ("seed", 1) # for reproducibility 668s [idx, C] = kmeans (X, 3); 668s x1 = min (X(:,1)):0.01:max (X(:,1)); 668s x2 = min (X(:,2)):0.01:max (X(:,2)); 668s [x1G, x2G] = meshgrid (x1, x2); 668s XGrid = [x1G(:), x2G(:)]; 668s 668s idx2Region = kmeans (XGrid, 3, "MaxIter", 10, "Start", C); 668s figure; 668s gscatter (XGrid(:,1), XGrid(:,2), idx2Region, ... 668s [0, 0.75, 0.75; 0.75, 0, 0.75; 0.75, 0.75, 0], ".."); 668s hold on; 668s plot (X(:,1), X(:,2), "k*", "MarkerSize", 5); 668s title ("Fisher's Iris Data"); 668s xlabel ("Petal Lengths (cm)"); 668s ylabel ("Petal Widths (cm)"); 668s legend ("Region 1", "Region 2", "Region 3", "Data", "Location", "SouthEast"); 668s hold off 668s ***** demo 668s ## Partition Data into Two Clusters 668s 668s randn ("seed", 1) # for reproducibility 668s r1 = randn (100, 2) * 0.75 + ones (100, 2); 668s randn ("seed", 2) # for reproducibility 668s r2 = randn (100, 2) * 0.5 - ones (100, 2); 668s X = [r1; r2]; 668s 668s plot (X(:,1), X(:,2), "."); 668s title ("Randomly Generated Data"); 668s rand ("seed", 1) # for reproducibility 668s [idx, C] = kmeans (X, 2, "Distance", "cityblock", ... 668s "Replicates", 5, "Display", "final"); 668s figure; 668s plot (X(idx==1,1), X(idx==1,2), "r.", "MarkerSize", 12); 668s hold on 668s plot(X(idx==2,1), X(idx==2,2), "b.", "MarkerSize", 12); 668s plot (C(:,1), C(:,2), "kx", "MarkerSize", 15, "LineWidth", 3); 668s legend ("Cluster 1", "Cluster 2", "Centroids", "Location", "NorthWest"); 668s title ("Cluster Assignments and Centroids"); 668s hold off 668s ***** demo 668s ## Assign New Data to Existing Clusters 668s 668s ## Generate a training data set using three distributions 668s randn ("seed", 5) # for reproducibility 668s r1 = randn (100, 2) * 0.75 + ones (100, 2); 668s randn ("seed", 7) # for reproducibility 668s r2 = randn (100, 2) * 0.5 - ones (100, 2); 668s randn ("seed", 9) # for reproducibility 668s r3 = randn (100, 2) * 0.75; 668s X = [r1; r2; r3]; 668s 668s ## Partition the training data into three clusters by using kmeans 668s 668s rand ("seed", 1) # for reproducibility 668s [idx, C] = kmeans (X, 3); 668s 668s ## Plot the clusters and the cluster centroids 668s 668s gscatter (X(:,1), X(:,2), idx, "bgm", "***"); 668s hold on 668s plot (C(:,1), C(:,2), "kx"); 668s legend ("Cluster 1", "Cluster 2", "Cluster 3", "Cluster Centroid") 668s 668s ## Generate a test data set 668s randn ("seed", 25) # for reproducibility 668s r1 = randn (100, 2) * 0.75 + ones (100, 2); 668s randn ("seed", 27) # for reproducibility 668s r2 = randn (100, 2) * 0.5 - ones (100, 2); 668s randn ("seed", 29) # for reproducibility 668s r3 = randn (100, 2) * 0.75; 668s Xtest = [r1; r2; r3]; 668s 668s ## Classify the test data set using the existing clusters 668s ## Find the nearest centroid from each test data point by using pdist2 668s 668s D = pdist2 (C, Xtest, "euclidean"); 668s [group, ~] = find (D == min (D)); 668s 668s ## Plot the test data and label the test data using idx_test with gscatter 668s 668s gscatter (Xtest(:,1), Xtest(:,2), group, "bgm", "ooo"); 668s box on; 668s legend ("Cluster 1", "Cluster 2", "Cluster 3", "Cluster Centroid", ... 668s "Data classified to Cluster 1", "Data classified to Cluster 2", ... 668s "Data classified to Cluster 3", "Location", "NorthWest"); 668s title ("Assign New Data to Existing Clusters"); 668s ***** test 668s samples = 4; 668s dims = 3; 668s k = 2; 668s [cls, c, d, z] = kmeans (rand (samples,dims), k, "start", rand (k,dims, 5), 668s "emptyAction", "singleton"); 668s assert (size (cls), [samples, 1]); 668s assert (size (c), [k, dims]); 668s assert (size (d), [k, 1]); 668s assert (size (z), [samples, k]); 668s ***** test 668s samples = 4; 668s dims = 3; 668s k = 2; 668s [cls, c, d, z] = kmeans (rand (samples,dims), [], "start", rand (k,dims, 5), 668s "emptyAction", "singleton"); 668s assert (size (cls), [samples, 1]); 668s assert (size (c), [k, dims]); 668s assert (size (d), [k, 1]); 668s assert (size (z), [samples, k]); 668s ***** test 668s [cls, c] = kmeans ([1 0; 2 0], 2, "start", [8,0;0,8], "emptyaction", "drop"); 668s assert (cls, [1; 1]); 668s assert (c, [1.5, 0; NA, NA]); 668s ***** test 668s kmeans (rand (4,3), 2, "start", rand (2,3, 5), "replicates", 5, 668s "emptyAction", "singleton"); 668s ***** test 668s kmeans (rand (3,4), 2, "start", "sample", "emptyAction", "singleton"); 668s ***** test 668s kmeans (rand (3,4), 2, "start", "plus", "emptyAction", "singleton"); 668s ***** test 668s kmeans (rand (3,4), 2, "start", "cluster", "emptyAction", "singleton"); 668s ***** test 668s kmeans (rand (3,4), 2, "start", "uniform", "emptyAction", "singleton"); 668s ***** test 668s kmeans (rand (4,3), 2, "distance", "sqeuclidean", "emptyAction", "singleton"); 668s ***** test 668s kmeans (rand (4,3), 2, "distance", "cityblock", "emptyAction", "singleton"); 668s ***** test 668s kmeans (rand (4,3), 2, "distance", "cosine", "emptyAction", "singleton"); 668s ***** test 668s kmeans (rand (4,3), 2, "distance", "correlation", "emptyAction", "singleton"); 668s ***** test 668s kmeans (rand (4,3), 2, "distance", "hamming", "emptyAction", "singleton"); 668s ***** test 668s kmeans ([1 0; 1.1 0], 2, "start", eye(2), "emptyaction", "singleton"); 668s ***** error kmeans (rand (3,2), 4); 668s ***** error kmeans ([1 0; 1.1 0], 2, "start", eye(2), "emptyaction", "panic"); 668s ***** error kmeans (rand (4,3), 2, "start", rand (2,3, 5), "replicates", 1); 668s ***** error kmeans (rand (4,3), 2, "start", rand (2,2)); 668s ***** error kmeans (rand (4,3), 2, "distance", "manhattan"); 668s ***** error kmeans (rand (3,4), 2, "start", "normal"); 668s ***** error kmeans (rand (4,3), 2, "replicates", i); 668s ***** error kmeans (rand (4,3), 2, "replicates", -1); 668s ***** error kmeans (rand (4,3), 2, "replicates", []); 668s ***** error kmeans (rand (4,3), 2, "replicates", [1 2]); 668s ***** error kmeans (rand (4,3), 2, "replicates", "one"); 668s ***** error kmeans (rand (4,3), 2, "MAXITER", i); 668s ***** error kmeans (rand (4,3), 2, "MaxIter", -1); 668s ***** error kmeans (rand (4,3), 2, "maxiter", []); 668s ***** error kmeans (rand (4,3), 2, "maxiter", [1 2]); 668s ***** error kmeans (rand (4,3), 2, "maxiter", "one"); 668s ***** error kmeans ([1 0; 1.1 0], 2, "start", eye(2), "emptyaction", "error"); 668s 31 tests, 31 passed, 0 known failure, 0 skipped 668s [inst/knnsearch.m] 668s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/knnsearch.m 668s ***** demo 668s ## find 10 nearest neighbour of a point using different distance metrics 668s ## and compare the results by plotting 668s load fisheriris 668s X = meas(:,3:4); 668s Y = species; 668s point = [5, 1.45]; 668s 668s ## calculate 10 nearest-neighbours by minkowski distance 668s [id, d] = knnsearch (X, point, "K", 10); 668s 668s ## calculate 10 nearest-neighbours by minkowski distance 668s [idm, dm] = knnsearch (X, point, "K", 10, "distance", "minkowski", "p", 5); 668s 668s ## calculate 10 nearest-neighbours by chebychev distance 668s [idc, dc] = knnsearch (X, point, "K", 10, "distance", "chebychev"); 668s 668s ## plotting the results 668s gscatter (X(:,1), X(:,2), species, [.75 .75 0; 0 .75 .75; .75 0 .75], ".", 20); 668s title ("Fisher's Iris Data - Nearest Neighbors with different types of distance metrics"); 668s xlabel("Petal length (cm)"); 668s ylabel("Petal width (cm)"); 668s 668s line (point(1), point(2), "marker", "X", "color", "k", ... 668s "linewidth", 2, "displayname", "query point") 668s line (X(id,1), X(id,2), "color", [0.5 0.5 0.5], "marker", "o", ... 668s "linestyle", "none", "markersize", 10, "displayname", "euclidean") 668s line (X(idm,1), X(idm,2), "color", [0.5 0.5 0.5], "marker", "d", ... 668s "linestyle", "none", "markersize", 10, "displayname", "Minkowski") 668s line (X(idc,1), X(idc,2), "color", [0.5 0.5 0.5], "marker", "p", ... 668s "linestyle", "none", "markersize", 10, "displayname", "chebychev") 668s xlim ([4.5 5.5]); 668s ylim ([1 2]); 668s axis square; 668s ***** demo 668s ## knnsearch on iris dataset using kdtree method 668s load fisheriris 668s X = meas(:,3:4); 668s gscatter (X(:,1), X(:,2), species, [.75 .75 0; 0 .75 .75; .75 0 .75], ".", 20); 668s title ("Fisher's iris dataset : Nearest Neighbors with kdtree search"); 668s 668s ## new point to be predicted 668s point = [5 1.45]; 668s 668s line (point(1), point(2), "marker", "X", "color", "k", ... 668s "linewidth", 2, "displayname", "query point") 668s 668s ## knnsearch using kdtree method 668s [idx, d] = knnsearch (X, point, "K", 10, "NSMethod", "kdtree"); 668s 668s ## plotting predicted neighbours 668s line (X(idx,1), X(idx,2), "color", [0.5 0.5 0.5], "marker", "o", ... 668s "linestyle", "none", "markersize", 10, ... 668s "displayname", "nearest neighbour") 668s xlim ([4 6]) 668s ylim ([1 3]) 668s axis square 668s ## details of predicted labels 668s tabulate (species(idx)) 668s 668s ctr = point - d(end); 668s diameter = 2 * d(end); 668s ## Draw a circle around the 10 nearest neighbors. 668s h = rectangle ("position", [ctr, diameter, diameter], "curvature", [1 1]); 668s 668s ## here only 8 neighbours are plotted instead of 10 since the dataset 668s ## contains duplicate values 668s ***** shared X, Y 668s X = [1, 2, 3, 4; 2, 3, 4, 5; 3, 4, 5, 6]; 668s Y = [1, 2, 2, 3; 2, 3, 3, 4]; 668s ***** test 668s [idx, D] = knnsearch (X, Y, "Distance", "euclidean"); 668s assert (idx, [1; 1]); 668s assert (D, ones (2, 1) * sqrt (2)); 668s ***** test 668s eucldist = @(v,m) sqrt(sumsq(repmat(v,rows(m),1)-m,2)); 668s [idx, D] = knnsearch (X, Y, "Distance", eucldist); 668s assert (idx, [1; 1]); 668s assert (D, ones (2, 1) * sqrt (2)); 668s ***** test 668s [idx, D] = knnsearch (X, Y, "Distance", "euclidean", "includeties", true); 668s assert (iscell (idx), true); 668s assert (iscell (D), true) 668s assert (idx {1}, [1]); 668s assert (idx {2}', [1, 2]); 668s assert (D{1}, ones (1, 1) * sqrt (2)); 668s assert (D{2}', ones (1, 2) * sqrt (2)); 668s ***** test 668s [idx, D] = knnsearch (X, Y, "Distance", "euclidean", "k", 2); 668s assert (idx, [1, 2; 1, 2]); 668s assert (D, [sqrt(2), 3.162277660168380; sqrt(2), sqrt(2)], 1e-14); 668s ***** test 668s [idx, D] = knnsearch (X, Y, "Distance", "seuclidean"); 668s assert (idx, [1; 1]); 668s assert (D, ones (2, 1) * sqrt (2)); 668s ***** test 668s [idx, D] = knnsearch (X, Y, "Distance", "seuclidean", "k", 2); 668s assert (idx, [1, 2; 1, 2]); 668s assert (D, [sqrt(2), 3.162277660168380; sqrt(2), sqrt(2)], 1e-14); 668s ***** test 668s xx = [1, 2; 1, 3; 2, 4; 3, 6]; 668s yy = [2, 4; 2, 6]; 668s [idx, D] = knnsearch (xx, yy, "Distance", "mahalanobis"); 668s assert (idx, [3; 2]); 668s assert (D, [0; 3.162277660168377], 1e-14); 668s ***** test 668s [idx, D] = knnsearch (X, Y, "Distance", "minkowski"); 668s assert (idx, [1; 1]); 668s assert (D, ones (2, 1) * sqrt (2)); 668s ***** test 668s [idx, D] = knnsearch (X, Y, "Distance", "minkowski", "p", 3); 668s assert (idx, [1; 1]); 668s assert (D, ones (2, 1) * 1.259921049894873, 1e-14); 668s ***** test 668s [idx, D] = knnsearch (X, Y, "Distance", "cityblock"); 668s assert (idx, [1; 1]); 668s assert (D, [2; 2]); 668s ***** test 668s [idx, D] = knnsearch (X, Y, "Distance", "chebychev"); 668s assert (idx, [1; 1]); 668s assert (D, [1; 1]); 668s ***** test 668s [idx, D] = knnsearch (X, Y, "Distance", "cosine"); 668s assert (idx, [2; 3]); 668s assert (D, [0.005674536395645; 0.002911214328620], 1e-14); 668s ***** test 668s [idx, D] = knnsearch (X, Y, "Distance", "correlation"); 668s assert (idx, [1; 1]); 668s assert (D, ones (2, 1) * 0.051316701949486, 1e-14); 668s ***** test 668s [idx, D] = knnsearch (X, Y, "Distance", "spearman"); 668s assert (idx, [1; 1]); 668s assert (D, ones (2, 1) * 0.051316701949486, 1e-14); 668s ***** test 668s [idx, D] = knnsearch (X, Y, "Distance", "hamming"); 668s assert (idx, [1; 1]); 668s assert (D, [0.5; 0.5]); 668s ***** test 668s [idx, D] = knnsearch (X, Y, "Distance", "jaccard"); 668s assert (idx, [1; 1]); 668s assert (D, [0.5; 0.5]); 668s ***** test 668s [idx, D] = knnsearch (X, Y, "Distance", "jaccard", "k", 2); 668s assert (idx, [1, 2; 1, 2]); 668s assert (D, [0.5, 1; 0.5, 0.5]); 668s ***** test 668s a = [1, 5; 1, 2; 2, 2; 1.5, 1.5; 5, 1; 2 -1.34; 1, -3; 4, -4; -3, 1; 8, 9]; 668s b = [1, 1]; 668s [idx, D] = knnsearch (a, b, "K", 5, "NSMethod", "kdtree", "includeties", true); 668s assert (iscell (idx), true); 668s assert (iscell (D), true) 668s assert (cell2mat (idx)', [4, 2, 3, 6, 1, 5, 7, 9]); 668s assert (cell2mat (D)', [0.7071, 1.0000, 1.4142, 2.5447, 4.0000, 4.0000, 4.0000, 4.0000], 1e-4); 668s ***** test 668s a = [1, 5; 1, 2; 2, 2; 1.5, 1.5; 5, 1; 2 -1.34; 1, -3; 4, -4; -3, 1; 8, 9]; 668s b = [1, 1]; 668s [idx, D] = knnsearch (a, b, "K", 5, "NSMethod", "exhaustive", "includeties", true); 668s assert (iscell (idx), true); 668s assert (iscell (D), true) 668s assert (cell2mat (idx), [4, 2, 3, 6, 1, 5, 7, 9]); 668s assert (cell2mat (D), [0.7071, 1.0000, 1.4142, 2.5447, 4.0000, 4.0000, 4.0000, 4.0000], 1e-4); 668s ***** test 668s a = [1, 5; 1, 2; 2, 2; 1.5, 1.5; 5, 1; 2 -1.34; 1, -3; 4, -4; -3, 1; 8, 9]; 668s b = [1, 1]; 668s [idx, D] = knnsearch (a, b, "K", 5, "NSMethod", "kdtree", "includeties", false); 668s assert (iscell (idx), false); 668s assert (iscell (D), false) 668s assert (idx, [4, 2, 3, 6, 1]); 668s assert (D, [0.7071, 1.0000, 1.4142, 2.5447, 4.0000], 1e-4); 668s ***** test 668s a = [1, 5; 1, 2; 2, 2; 1.5, 1.5; 5, 1; 2 -1.34; 1, -3; 4, -4; -3, 1; 8, 9]; 668s b = [1, 1]; 668s [idx, D] = knnsearch (a, b, "K", 5, "NSMethod", "exhaustive", "includeties", false); 668s assert (iscell (idx), false); 668s assert (iscell (D), false) 668s assert (idx, [4, 2, 3, 6, 1]); 668s assert (D, [0.7071, 1.0000, 1.4142, 2.5447, 4.0000], 1e-4); 668s ***** test 668s load fisheriris 668s a = meas; 668s b = min(meas); 668s [idx, D] = knnsearch (a, b, "K", 5, "NSMethod", "kdtree"); 668s assert (idx, [42, 9, 14, 39, 13]); 668s assert (D, [0.5099, 0.9950, 1.0050, 1.0536, 1.1874], 1e-4); 668s ***** test 668s load fisheriris 668s a = meas; 668s b = mean(meas); 668s [idx, D] = knnsearch (a, b, "K", 5, "NSMethod", "kdtree"); 668s assert (idx, [65, 83, 89, 72, 100]); 668s assert (D, [0.3451, 0.3869, 0.4354, 0.4481, 0.4625], 1e-4); 668s ***** test 668s load fisheriris 668s a = meas; 668s b = max(meas); 668s [idx, D] = knnsearch (a, b, "K", 5, "NSMethod", "kdtree"); 668s assert (idx, [118, 132, 110, 106, 136]); 668s assert (D, [0.7280, 0.9274, 1.3304, 1.5166, 1.6371], 1e-4); 668s 668s ***** test 668s load fisheriris 668s a = meas; 668s b = max(meas); 668s [idx, D] = knnsearch (a, b, "K", 5, "includeties", true); 668s assert (iscell (idx), true); 668s assert (iscell (D), true); 668s assert (cell2mat (idx)', [118, 132, 110, 106, 136]); 668s assert (cell2mat (D)', [0.7280, 0.9274, 1.3304, 1.5166, 1.6371], 1e-4); 668s ***** error knnsearch (1) 668s ***** error ... 668s knnsearch (ones (4, 5), ones (4)) 668s ***** error ... 668s knnsearch (ones (4, 2), ones (3, 2), "Distance", "euclidean", "some", "some") 668s ***** error ... 668s knnsearch (ones (4, 5), ones (1, 5), "scale", ones (1, 5), "P", 3) 668s ***** error ... 668s knnsearch (ones (4, 5), ones (1, 5), "K", 0) 668s ***** error ... 668s knnsearch (ones (4, 5), ones (1, 5), "P", -2) 668s ***** error ... 668s knnsearch (ones (4, 5), ones (1, 5), "scale", ones(4,5), "distance", "euclidean") 668s ***** error ... 668s knnsearch (ones (4, 5), ones (1, 5), "cov", ["some" "some"]) 668s ***** error ... 668s knnsearch (ones (4, 5), ones (1, 5), "cov", ones(4,5), "distance", "euclidean") 668s ***** error ... 668s knnsearch (ones (4, 5), ones (1, 5), "bucketsize", -1) 668s ***** error ... 668s knnsearch (ones (4, 5), ones (1, 5), "NSmethod", "kdtree", "distance", "cosine") 668s ***** error ... 668s knnsearch (ones (4, 5), ones (1, 5), "NSmethod", "kdtree", "distance", "mahalanobis") 668s ***** error ... 668s knnsearch (ones (4, 5), ones (1, 5), "NSmethod", "kdtree", "distance", "correlation") 668s ***** error ... 668s knnsearch (ones (4, 5), ones (1, 5), "NSmethod", "kdtree", "distance", "seuclidean") 668s ***** error ... 668s knnsearch (ones (4, 5), ones (1, 5), "NSmethod", "kdtree", "distance", "spearman") 668s ***** error ... 668s knnsearch (ones (4, 5), ones (1, 5), "NSmethod", "kdtree", "distance", "hamming") 668s ***** error ... 668s knnsearch (ones (4, 5), ones (1, 5), "NSmethod", "kdtree", "distance", "jaccard") 668s 42 tests, 42 passed, 0 known failure, 0 skipped 668s [inst/kruskalwallis.m] 668s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/kruskalwallis.m 668s ***** demo 668s x = meshgrid (1:6); 668s x = x + normrnd (0, 1, 6, 6); 668s kruskalwallis (x, [], 'off'); 668s ***** demo 668s x = meshgrid (1:6); 668s x = x + normrnd (0, 1, 6, 6); 668s [p, atab] = kruskalwallis(x); 668s ***** demo 668s x = ones (30, 4) .* [-2, 0, 1, 5]; 668s x = x + normrnd (0, 2, 30, 4); 668s group = {"A", "B", "C", "D"}; 668s kruskalwallis (x, group); 668s ***** test 668s data = [1.006, 0.996, 0.998, 1.000, 0.992, 0.993, 1.002, 0.999, 0.994, 1.000, ... 668s 0.998, 1.006, 1.000, 1.002, 0.997, 0.998, 0.996, 1.000, 1.006, 0.988, ... 668s 0.991, 0.987, 0.997, 0.999, 0.995, 0.994, 1.000, 0.999, 0.996, 0.996, ... 668s 1.005, 1.002, 0.994, 1.000, 0.995, 0.994, 0.998, 0.996, 1.002, 0.996, ... 668s 0.998, 0.998, 0.982, 0.990, 1.002, 0.984, 0.996, 0.993, 0.980, 0.996, ... 668s 1.009, 1.013, 1.009, 0.997, 0.988, 1.002, 0.995, 0.998, 0.981, 0.996, ... 668s 0.990, 1.004, 0.996, 1.001, 0.998, 1.000, 1.018, 1.010, 0.996, 1.002, ... 668s 0.998, 1.000, 1.006, 1.000, 1.002, 0.996, 0.998, 0.996, 1.002, 1.006, ... 668s 1.002, 0.998, 0.996, 0.995, 0.996, 1.004, 1.004, 0.998, 0.999, 0.991, ... 668s 0.991, 0.995, 0.984, 0.994, 0.997, 0.997, 0.991, 0.998, 1.004, 0.997]; 668s group = [1:10] .* ones (10,10); 668s group = group(:); 668s [p, tbl] = kruskalwallis (data, group, "off"); 668s assert (p, 0.048229, 1e-6); 668s assert (tbl{2,5}, 17.03124, 1e-5); 668s assert (tbl{2,3}, 9, 0); 668s assert (tbl{4,2}, 82655.5, 1e-16); 668s data = reshape (data, 10, 10); 668s [p, tbl, stats] = kruskalwallis (data, [], "off"); 668s assert (p, 0.048229, 1e-6); 668s assert (tbl{2,5}, 17.03124, 1e-5); 668s assert (tbl{2,3}, 9, 0); 668s assert (tbl{4,2}, 82655.5, 1e-16); 668s means = [51.85, 60.45, 37.6, 51.1, 29.5, 54.25, 64.55, 66.7, 53.65, 35.35]; 668s N = 10 * ones (1, 10); 668s assert (stats.meanranks, means, 1e-6); 668s assert (length (stats.gnames), 10, 0); 668s assert (stats.n, N, 0); 668s 1 test, 1 passed, 0 known failure, 0 skipped 668s [inst/kstest.m] 668s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/kstest.m 668s ***** demo 668s ## Use the stock return data set to test the null hypothesis that the data 668s ## come from a standard normal distribution against the alternative 668s ## hypothesis that the population CDF of the data is larger that the 668s ## standard normal CDF. 668s 668s load stockreturns; 668s x = stocks(:,2); 668s [h, p, k, c] = kstest (x, "Tail", "larger") 668s 668s ## Compute the empirical CDF and plot against the standard normal CDF 668s [f, x_values] = ecdf (x); 668s h1 = plot (x_values, f); 668s hold on; 668s h2 = plot (x_values, normcdf (x_values), 'r--'); 668s set (h1, "LineWidth", 2); 668s set (h2, "LineWidth", 2); 668s legend ([h1, h2], "Empirical CDF", "Standard Normal CDF", ... 668s "Location", "southeast"); 668s title ("Empirical CDF of stock return data against standard normal CDF") 668s ***** error kstest () 668s ***** error kstest (ones (2, 4)) 668s ***** error kstest ([2, 3, 5, 3+3i]) 668s ***** error kstest ([2, 3, 4, 5, 6], "opt", 0.51) 668s ***** error ... 668s kstest ([2, 3, 4, 5, 6], "tail") 668s ***** error ... 668s kstest ([2,3,4,5,6],"alpha", [0.05, 0.05]) 668s ***** error ... 668s kstest ([2, 3, 4, 5, 6], "alpha", NaN) 668s ***** error ... 668s kstest ([2, 3, 4, 5, 6], "tail", 0) 668s ***** error ... 668s kstest ([2,3,4,5,6], "tail", "whatever") 668s ***** error ... 668s kstest ([1, 2, 3, 4, 5], "CDF", @(x) repmat (x, 2, 3)) 668s ***** error ... 668s kstest ([1, 2, 3, 4, 5], "CDF", "somedist") 668s ***** error ... 668s kstest ([1, 2, 3, 4, 5], "CDF", cvpartition (5, 'resubstitution')) 668s ***** error ... 668s kstest ([2, 3, 4, 5, 6], "alpha", 0.05, "CDF", [2, 3, 4; 1, 3, 4; 1, 2, 1]) 668s ***** error ... 668s kstest ([2, 3, 4, 5, 6], "alpha", 0.05, "CDF", nan (5, 2)) 668s ***** error ... 668s kstest ([2, 3, 4, 5, 6], "CDF", [2, 3; 1, 4; 3, 2]) 668s ***** error ... 668s kstest ([2, 3, 4, 5, 6], "CDF", [2, 3; 2, 4; 3, 5]) 668s ***** error ... 668s kstest ([2, 3, 4, 5, 6], "CDF", {1, 2, 3, 4, 5}) 668s ***** test 668s load examgrades 668s [h, p] = kstest (grades(:,1)); 668s assert (h, true); 668s assert (p, 7.58603305206105e-107, 1e-14); 668s ***** test 668s load examgrades 668s [h, p] = kstest (grades(:,1), "CDF", @(x) normcdf(x, 75, 10)); 668s assert (h, false); 668s assert (p, 0.5612, 1e-4); 668s ***** test 668s load examgrades 668s x = grades(:,1); 668s test_cdf = makedist ("tlocationscale", "mu", 75, "sigma", 10, "nu", 1); 668s [h, p] = kstest (x, "alpha", 0.01, "CDF", test_cdf); 668s assert (h, true); 668s assert (p, 0.0021, 1e-4); 668s ***** test 668s load stockreturns 668s x = stocks(:,3); 668s [h,p,k,c] = kstest (x, "Tail", "larger"); 668s assert (h, true); 668s assert (p, 5.085438806199252e-05, 1e-14); 668s assert (k, 0.2197, 1e-4); 668s assert (c, 0.1207, 1e-4); 668s 21 tests, 21 passed, 0 known failure, 0 skipped 668s [inst/kstest2.m] 668s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/kstest2.m 668s ***** error kstest2 ([1,2,3,4,5,5]) 668s ***** error kstest2 (ones(2,4), [1,2,3,4,5,5]) 668s ***** error kstest2 ([2,3,5,7,3+3i], [1,2,3,4,5,5]) 668s ***** error kstest2 ([2,3,4,5,6],[3;5;7;8;7;6;5],"tail") 668s ***** error kstest2 ([2,3,4,5,6],[3;5;7;8;7;6;5],"tail", "whatever") 668s ***** error kstest2 ([2,3,4,5,6],[3;5;7;8;7;6;5],"badoption", 0.51) 668s ***** error kstest2 ([2,3,4,5,6],[3;5;7;8;7;6;5],"tail", 0) 668s ***** error kstest2 ([2,3,4,5,6],[3;5;7;8;7;6;5],"alpha", 0) 668s ***** error kstest2 ([2,3,4,5,6],[3;5;7;8;7;6;5],"alpha", NaN) 668s ***** error kstest2 ([NaN,NaN,NaN,NaN,NaN],[3;5;7;8;7;6;5],"tail", "unequal") 668s ***** test 668s load examgrades 668s [h, p] = kstest2 (grades(:,1), grades(:,2)); 668s assert (h, false); 668s assert (p, 0.1222791870137312, 1e-14); 668s ***** test 668s load examgrades 668s [h, p] = kstest2 (grades(:,1), grades(:,2), "tail", "larger"); 668s assert (h, false); 668s assert (p, 0.1844421391011258, 1e-14); 668s ***** test 668s load examgrades 668s [h, p] = kstest2 (grades(:,1), grades(:,2), "tail", "smaller"); 668s assert (h, false); 668s assert (p, 0.06115357930171663, 1e-14); 668s ***** test 668s load examgrades 668s [h, p] = kstest2 (grades(:,1), grades(:,2), "tail", "smaller", "alpha", 0.1); 668s assert (h, true); 668s assert (p, 0.06115357930171663, 1e-14); 668s 14 tests, 14 passed, 0 known failure, 0 skipped 668s [inst/levene_test.m] 668s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/levene_test.m 668s ***** error levene_test () 668s ***** error ... 668s levene_test (1, 2, 3, 4, 5); 668s ***** error levene_test (randn (50, 2), 0); 668s ***** error ... 668s levene_test (randn (50, 2), [1, 2, 3]); 668s ***** error ... 668s levene_test (randn (50, 1), ones (55, 1)); 668s ***** error ... 668s levene_test (randn (50, 1), ones (50, 2)); 668s ***** error ... 668s levene_test (randn (50, 2), [], 1.2); 668s ***** error ... 668s levene_test (randn (50, 2), "some_string"); 668s ***** error ... 668s levene_test (randn (50, 2), [], "alpha"); 668s ***** error ... 668s levene_test (randn (50, 1), [ones(25, 1); 2*ones(25, 1)], 1.2); 668s ***** error ... 668s levene_test (randn (50, 1), [ones(25, 1); 2*ones(25, 1)], "err"); 668s ***** error ... 668s levene_test (randn (50, 1), [ones(25, 1); 2*ones(25, 1)], 0.05, "type"); 668s ***** warning ... 668s levene_test (randn (50, 1), [ones(24, 1); 2*ones(25, 1); 3]); 668s ***** test 668s load examgrades 668s [h, pval, W, df] = levene_test (grades); 668s assert (h, 1); 668s assert (pval, 9.523239714592791e-07, 1e-14); 668s assert (W, 8.59529, 1e-5); 668s assert (df, [4, 595]); 668s ***** test 668s load examgrades 668s [h, pval, W, df] = levene_test (grades, [], "quadratic"); 668s assert (h, 1); 668s assert (pval, 9.523239714592791e-07, 1e-14); 668s assert (W, 8.59529, 1e-5); 668s assert (df, [4, 595]); 669s ***** test 669s load examgrades 669s [h, pval, W, df] = levene_test (grades, [], "median"); 669s assert (h, 1); 669s assert (pval, 1.312093241723211e-06, 1e-14); 669s assert (W, 8.415969, 1e-6); 669s assert (df, [4, 595]); 669s ***** test 669s load examgrades 669s [h, pval, W, df] = levene_test (grades(:,[1:3])); 669s assert (h, 1); 669s assert (pval, 0.004349390980463497, 1e-14); 669s assert (W, 5.52139, 1e-5); 669s assert (df, [2, 357]); 669s ***** test 669s load examgrades 669s [h, pval, W, df] = levene_test (grades(:,[1:3]), "median"); 669s assert (h, 1); 669s assert (pval, 0.004355216763951453, 1e-14); 669s assert (W, 5.52001, 1e-5); 669s assert (df, [2, 357]); 669s ***** test 669s load examgrades 669s [h, pval, W, df] = levene_test (grades(:,[3,4]), "quadratic"); 669s assert (h, 0); 669s assert (pval, 0.1807494957440653, 2e-14); 669s assert (W, 1.80200, 1e-5); 669s assert (df, [1, 238]); 669s ***** test 669s load examgrades 669s [h, pval, W, df] = levene_test (grades(:,[3,4]), "median"); 669s assert (h, 0); 669s assert (pval, 0.1978225622063785, 2e-14); 669s assert (W, 1.66768, 1e-5); 669s assert (df, [1, 238]); 669s 20 tests, 20 passed, 0 known failure, 0 skipped 669s [inst/linkage.m] 669s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/linkage.m 669s ***** shared x, t 669s x = reshape (mod (magic (6),5), [], 3); 669s t = 1e-6; 669s ***** assert (cond (linkage (pdist (x))), 34.119045, t); 669s ***** assert (cond (linkage (pdist (x), "complete")), 21.793345, t); 669s ***** assert (cond (linkage (pdist (x), "average")), 27.045012, t); 669s ***** assert (cond (linkage (pdist (x), "weighted")), 27.412889, t); 669s lastwarn(); # Clear last warning before the test 669s ***** warning linkage (pdist (x), "centroid"); 669s ***** test 669s warning off Octave:clustering 669s assert (cond (linkage (pdist (x), "centroid")), 27.457477, t); 669s warning on Octave:clustering 669s ***** warning linkage (pdist (x), "median"); 669s ***** test 669s warning off Octave:clustering 669s assert (cond (linkage (pdist (x), "median")), 27.683325, t); 669s warning on Octave:clustering 669s ***** assert (cond (linkage (pdist (x), "ward")), 17.195198, t); 669s ***** assert (cond (linkage (x, "ward", "euclidean")), 17.195198, t); 669s ***** assert (cond (linkage (x, "ward", {"euclidean"})), 17.195198, t); 669s ***** assert (cond (linkage (x, "ward", {"minkowski", 2})), 17.195198, t); 669s 12 tests, 12 passed, 0 known failure, 0 skipped 669s [inst/loadmodel.m] 669s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/loadmodel.m 669s ***** error loadmodel () 669s ***** error ... 669s loadmodel ("fisheriris.mat") 669s ***** error ... 669s loadmodel ("fail_loadmodel.mdl") 669s ***** error ... 669s loadmodel ("fail_load_model.mdl") 669s 4 tests, 4 passed, 0 known failure, 0 skipped 669s [inst/logistic_regression.m] 669s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/logistic_regression.m 669s ***** test 669s # Output compared to following MATLAB commands 669s # [B, DEV, STATS] = mnrfit(X,Y+1,'model','ordinal'); 669s # P = mnrval(B,X) 669s X = [1.489381332449196, 1.1534152241851305; ... 669s 1.8110085304863965, 0.9449666896938425; ... 669s -0.04453299665130296, 0.34278203449678646; ... 669s -0.36616019468850347, 1.130254275908322; ... 669s 0.15339143291005095, -0.7921044310668951; ... 669s -1.6031878794469698, -1.8343471035233376; ... 669s -0.14349521143198166, -0.6762996896828459; ... 669s -0.4403818557740143, -0.7921044310668951; ... 669s -0.7372685001160434, -0.027793137932169563; ... 669s -0.11875465773681024, 0.5512305689880763]; 669s Y = [1,1,1,1,1,0,0,0,0,0]'; 669s [INTERCEPT, SLOPE, DEV, DL, D2L, P] = logistic_regression (Y, X, false); 669s ***** test 669s # Output compared to following MATLAB commands 669s # [B, DEV, STATS] = mnrfit(X,Y+1,'model','ordinal'); 669s load carbig 669s X = [Acceleration Displacement Horsepower Weight]; 669s miles = [1,1,1,1,1,1,1,1,1,1,NaN,NaN,NaN,NaN,NaN,1,1,NaN,1,1,2,2,1,2,2,2, ... 669s 2,2,2,2,2,1,1,1,1,2,2,2,2,NaN,2,1,1,2,1,1,1,1,1,1,1,1,1,2,2,1,2, ... 669s 2,3,3,3,3,2,2,2,2,2,2,2,1,1,1,1,1,1,1,1,1,2,1,1,1,1,1,2,2,2,2,2, ... 669s 2,2,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,1,1,1,1,1,2,2,2,1,2,2, ... 669s 2,1,1,3,2,2,2,1,2,2,1,2,2,2,1,3,2,3,2,1,1,1,1,1,1,1,1,3,2,2,3,3, ... 669s 2,2,2,2,2,3,2,1,1,1,1,1,1,1,1,1,1,1,2,2,1,3,2,2,2,2,2,2,1,3,2,2, ... 669s 2,2,2,3,2,2,2,2,2,1,1,1,1,2,2,2,2,3,2,3,3,2,1,1,1,3,3,2,2,2,1,2, ... 669s 2,1,1,1,1,1,3,3,3,2,3,1,1,1,1,1,2,2,1,1,1,1,1,3,2,2,2,3,3,3,3,2, ... 669s 2,2,4,3,3,4,3,2,2,2,2,2,2,2,2,2,2,2,1,1,2,1,1,1,3,2,2,3,2,2,2,2, ... 669s 2,1,2,1,3,3,2,2,2,2,2,1,1,1,1,1,1,2,1,3,3,3,2,2,2,2,2,3,3,3,3,2, ... 669s 2,2,3,4,3,3,3,2,2,2,2,3,3,3,3,3,4,2,4,4,4,3,3,4,4,3,3,3,2,3,2,3, ... 669s 2,2,2,2,3,4,4,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,NaN,3,2,2,2,2,2,1,2, ... 669s 2,3,3,3,2,2,2,3,3,3,3,3,3,3,3,3,3,3,2,3,2,2,3,3,2,2,4,3,2,3]'; 669s [INTERCEPT, SLOPE, DEV, DL, D2L, P] = logistic_regression (miles, X, false); 669s assert (DEV, 433.197174495549, 1e-05); 669s assert (INTERCEPT(1), -16.6895155618903, 1e-05); 669s assert (INTERCEPT(2), -11.7207818178493, 1e-05); 669s assert (INTERCEPT(3), -8.0605768506075, 1e-05); 669s assert (SLOPE(1), 0.104762463756714, 1e-05); 669s assert (SLOPE(2), 0.0103357623191891, 1e-05); 669s assert (SLOPE(3), 0.0645199313242276, 1e-05); 669s assert (SLOPE(4), 0.00166377028388103, 1e-05); 669s 2 tests, 2 passed, 0 known failure, 0 skipped 669s [inst/logit.m] 669s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/logit.m 669s ***** test 669s p = [0.01:0.01:0.99]; 669s assert (logit (p), log (p ./ (1-p)), 25*eps); 669s ***** assert (logit ([-1, 0, 0.5, 1, 2]), [NaN, -Inf, 0, +Inf, NaN]) 669s ***** error logit () 669s ***** error logit (1, 2) 669s 4 tests, 4 passed, 0 known failure, 0 skipped 669s [inst/mahal.m] 669s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/mahal.m 669s ***** error mahal () 669s ***** error mahal (1, 2, 3) 669s ***** error mahal ("A", "B") 669s ***** error mahal ([1, 2], ["A", "B"]) 669s ***** error mahal (ones (2, 2, 2)) 669s ***** error mahal (ones (2, 2), ones (2, 2, 2)) 669s ***** error mahal (ones (2, 2), ones (2, 3)) 669s ***** test 669s X = [1 0; 0 1; 1 1; 0 0]; 669s assert (mahal (X, X), [1.5; 1.5; 1.5; 1.5], 10*eps) 669s assert (mahal (X, X+1), [7.5; 7.5; 1.5; 13.5], 10*eps) 669s ***** assert (mahal ([true; true], [false; true]), [0.5; 0.5], eps) 669s 9 tests, 9 passed, 0 known failure, 0 skipped 669s [inst/manova1.m] 669s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/manova1.m 669s ***** demo 669s load carbig 669s [d,p] = manova1([MPG, Acceleration, Weight, Displacement], Origin) 669s ***** test 669s load carbig 669s [d,p] = manova1([MPG, Acceleration, Weight, Displacement], Origin); 669s assert (d, 3); 669s assert (p, [0, 3.140583347827075e-07, 0.007510999577743149, ... 669s 0.1934100745898493]', [1e-12, 1e-12, 1e-12, 1e-12]'); 669s ***** test 669s load carbig 669s [d,p] = manova1([MPG, Acceleration, Weight], Origin); 669s assert (d, 2); 669s assert (p, [0, 0.00516082975137544, 0.1206528056514453]', ... 669s [1e-12, 1e-12, 1e-12]'); 669s 2 tests, 2 passed, 0 known failure, 0 skipped 669s [inst/manovacluster.m] 669s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/manovacluster.m 669s ***** demo 669s load carbig 669s X = [MPG Acceleration Weight Displacement]; 669s [d, p, stats] = manova1 (X, Origin); 669s manovacluster (stats) 669s ***** test 669s hf = figure ("visible", "off"); 669s unwind_protect 669s load carbig 669s X = [MPG Acceleration Weight Displacement]; 669s [d, p, stats] = manova1 (X, Origin); 669s manovacluster (stats); 669s unwind_protect_cleanup 669s close (hf); 669s end_unwind_protect 669s ***** error manovacluster (stats, "some"); 669s 2 tests, 2 passed, 0 known failure, 0 skipped 669s [inst/mcnemar_test.m] 669s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/mcnemar_test.m 669s ***** test 669s [h, pval, chisq] = mcnemar_test ([101,121;59,33]); 669s assert (h, 1); 669s assert (pval, 3.8151e-06, 1e-10); 669s assert (chisq, 21.356, 1e-3); 670s ***** test 670s [h, pval, chisq] = mcnemar_test ([59,6;16,80]); 670s assert (h, 1); 670s assert (pval, 0.034690, 1e-6); 670s assert (isempty (chisq), true); 670s ***** test 670s [h, pval, chisq] = mcnemar_test ([59,6;16,80], 0.01); 670s assert (h, 0); 670s assert (pval, 0.034690, 1e-6); 670s assert (isempty (chisq), true); 670s ***** test 670s [h, pval, chisq] = mcnemar_test ([59,6;16,80], "mid-p"); 670s assert (h, 1); 670s assert (pval, 0.034690, 1e-6); 670s assert (isempty (chisq), true); 670s ***** test 670s [h, pval, chisq] = mcnemar_test ([59,6;16,80], "asymptotic"); 670s assert (h, 1); 670s assert (pval, 0.033006, 1e-6); 670s assert (chisq, 4.5455, 1e-4); 670s ***** test 670s [h, pval, chisq] = mcnemar_test ([59,6;16,80], "exact"); 670s assert (h, 0); 670s assert (pval, 0.052479, 1e-6); 670s assert (isempty (chisq), true); 670s ***** test 670s [h, pval, chisq] = mcnemar_test ([59,6;16,80], "corrected"); 670s assert (h, 0); 670s assert (pval, 0.055009, 1e-6); 670s assert (chisq, 3.6818, 1e-4); 670s ***** test 670s [h, pval, chisq] = mcnemar_test ([59,6;16,80], 0.1, "corrected"); 670s assert (h, 1); 670s assert (pval, 0.055009, 1e-6); 670s assert (chisq, 3.6818, 1e-4); 670s ***** error mcnemar_test (59, 6, 16, 80) 670s ***** error mcnemar_test (ones (3, 3)) 670s ***** error ... 670s mcnemar_test ([59,6;16,-80]) 670s ***** error ... 670s mcnemar_test ([59,6;16,4.5]) 670s ***** error ... 670s mcnemar_test ([59,6;16,80], {""}) 670s ***** error ... 670s mcnemar_test ([59,6;16,80], -0.2) 670s ***** error ... 670s mcnemar_test ([59,6;16,80], [0.05, 0.1]) 670s ***** error ... 670s mcnemar_test ([59,6;16,80], 1) 670s ***** error ... 670s mcnemar_test ([59,6;16,80], "") 670s 17 tests, 17 passed, 0 known failure, 0 skipped 670s [inst/mhsample.m] 670s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/mhsample.m 670s ***** demo 670s ## Define function to sample 670s d = 2; 670s mu = [-1; 2]; 670s rand ("seed", 5) # for reproducibility 670s Sigma = rand (d); 670s Sigma = (Sigma + Sigma'); 670s Sigma += eye (d) * abs (eigs (Sigma, 1, "sa")) * 1.1; 670s pdf = @(x)(2*pi)^(-d/2)*det(Sigma)^-.5*exp(-.5*sum((x.'-mu).*(Sigma\(x.'-mu)),1)); 670s ## Inputs 670s start = ones (1, 2); 670s nsamples = 500; 670s sym = true; 670s K = 500; 670s m = 10; 670s rand ("seed", 8) # for reproducibility 670s proprnd = @(x) (rand (size (x)) - .5) * 3 + x; 670s [smpl, accept] = mhsample (start, nsamples, "pdf", pdf, "proprnd", proprnd, ... 670s "symmetric", sym, "burnin", K, "thin", m); 670s figure; 670s hold on; 670s plot (smpl(:, 1), smpl(:, 2), 'x'); 670s [x, y] = meshgrid (linspace (-6, 4), linspace(-3, 7)); 670s z = reshape (pdf ([x(:), y(:)]), size(x)); 670s mesh (x, y, z, "facecolor", "None"); 670s ## Using sample points to find the volume of half a sphere with radius of .5 670s f = @(x) ((.25-(x(:,1)+1).^2-(x(:,2)-2).^2).^.5.*(((x(:,1)+1).^2+(x(:,2)-2).^2)<.25)).'; 670s int = mean (f (smpl) ./ pdf (smpl)); 670s errest = std (f (smpl) ./ pdf (smpl)) / nsamples ^ .5; 670s trueerr = abs (2 / 3 * pi * .25 ^ (3 / 2) - int); 670s printf ("Monte Carlo integral estimate int f(x) dx = %f\n", int); 670s printf ("Monte Carlo integral error estimate %f\n", errest); 670s printf ("The actual error %f\n", trueerr); 670s mesh (x, y, reshape (f([x(:), y(:)]), size(x)), "facecolor", "None"); 670s ***** demo 670s ## Integrate truncated normal distribution to find normalization constant 670s pdf = @(x) exp (-.5*x.^2)/(pi^.5*2^.5); 670s nsamples = 1e3; 670s rand ("seed", 5) # for reproducibility 670s proprnd = @(x) (rand (size (x)) - .5) * 3 + x; 670s [smpl, accept] = mhsample (1, nsamples, "pdf", pdf, "proprnd", proprnd, ... 670s "symmetric", true, "thin", 4); 670s f = @(x) exp(-.5 * x .^ 2) .* (x >= -2 & x <= 2); 670s x = linspace (-3, 3, 1000); 670s area(x, f(x)); 670s xlabel ('x'); 670s ylabel ('f(x)'); 670s int = mean (f (smpl) ./ pdf (smpl)); 670s errest = std (f (smpl) ./ pdf (smpl)) / nsamples^ .5; 670s trueerr = abs (erf (2 ^ .5) * 2 ^ .5 * pi ^ .5 - int); 670s printf ("Monte Carlo integral estimate int f(x) dx = %f\n", int); 670s printf ("Monte Carlo integral error estimate %f\n", errest); 670s printf ("The actual error %f\n", trueerr); 670s ***** test 670s nchain = 1e4; 670s start = rand (nchain, 1); 670s nsamples = 1e3; 670s pdf = @(x) exp (-.5*(x-1).^2)/(2*pi)^.5; 670s proppdf = @(x, y) 1/3; 670s proprnd = @(x) 3 * (rand (size (x)) - .5) + x; 670s [smpl, accept] = mhsample (start, nsamples, "pdf", pdf, "proppdf", proppdf, ... 670s "proprnd", proprnd, "thin", 2, "nchain", nchain, ... 670s "burnin", 0); 670s assert (mean (mean (smpl, 1), 3), 1, .01); 670s assert (mean (var (smpl, 1), 3), 1, .01) 676s ***** error mhsample (); 676s ***** error mhsample (1); 676s ***** error mhsample (1, 1); 676s ***** error mhsample (1, 1, "pdf", @(x)x); 676s ***** error mhsample (1, 1, "pdf", @(x)x, "proprnd", @(x)x+rand(size(x))); 676s 6 tests, 6 passed, 0 known failure, 0 skipped 676s [inst/mnrfit.m] 676s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/mnrfit.m 676s ***** error mnrfit (ones (50,1)) 676s ***** error ... 676s mnrfit ({1 ;2 ;3 ;4 ;5}, ones (5,1)) 676s ***** error ... 676s mnrfit (ones (50, 4, 2), ones (50, 1)) 676s ***** error ... 676s mnrfit (ones (50, 4), ones (50, 1, 3)) 676s ***** error ... 676s mnrfit (ones (50, 4), ones (45,1)) 676s ***** error ... 676s mnrfit (ones (5, 4), {1 ;2 ;3 ;4 ;5}) 676s ***** error ... 676s mnrfit (ones (5, 4), ones (5, 1), "model") 676s ***** error ... 676s mnrfit (ones (5, 4), {"q","q";"w","w";"q","q";"w","w";"q","q"}) 676s ***** error ... 676s mnrfit (ones (5, 4), [1, 2; 1, 2; 1, 2; 1, 2; 1, 2]) 676s ***** error ... 676s mnrfit (ones (5, 4), [1; -1; 1; 2; 1]) 676s ***** error ... 676s mnrfit (ones (5, 4), [1; 2; 3; 2; 1], "model", "nominal") 676s ***** error ... 676s mnrfit (ones (5, 4), [1; 2; 3; 2; 1], "model", "hierarchical") 676s ***** error ... 676s mnrfit (ones (5, 4), [1; 2; 3; 2; 1], "model", "whatever") 676s 13 tests, 13 passed, 0 known failure, 0 skipped 676s [inst/monotone_smooth.m] 676s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/monotone_smooth.m 676s ***** error ... 676s monotone_smooth (1) 676s ***** error ... 676s monotone_smooth ("char", 1) 676s ***** error ... 676s monotone_smooth ({1,2,3}, 1) 676s ***** error ... 676s monotone_smooth (ones(20,3), 1) 676s ***** error ... 676s monotone_smooth (1, "char") 676s ***** error ... 676s monotone_smooth (1, {1,2,3}) 676s ***** error ... 676s monotone_smooth (1, ones(20,3)) 676s ***** error monotone_smooth (ones (10,1), ones(10,1), [1, 2]) 676s ***** error monotone_smooth (ones (10,1), ones(10,1), {2}) 676s ***** error monotone_smooth (ones (10,1), ones(10,1), "char") 676s 10 tests, 10 passed, 0 known failure, 0 skipped 676s [inst/multcompare.m] 676s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/multcompare.m 676s ***** demo 676s 676s ## Demonstration using balanced one-way ANOVA from anova1 676s 676s x = ones (50, 4) .* [-2, 0, 1, 5]; 676s randn ("seed", 1); # for reproducibility 676s x = x + normrnd (0, 2, 50, 4); 676s groups = {"A", "B", "C", "D"}; 676s [p, tbl, stats] = anova1 (x, groups, "off"); 676s multcompare (stats); 676s ***** demo 676s 676s ## Demonstration using unbalanced one-way ANOVA example from anovan 676s 676s dv = [ 8.706 10.362 11.552 6.941 10.983 10.092 6.421 14.943 15.931 ... 676s 22.968 18.590 16.567 15.944 21.637 14.492 17.965 18.851 22.891 ... 676s 22.028 16.884 17.252 18.325 25.435 19.141 21.238 22.196 18.038 ... 676s 22.628 31.163 26.053 24.419 32.145 28.966 30.207 29.142 33.212 ... 676s 25.694 ]'; 676s g = [1 1 1 1 1 1 1 1 2 2 2 2 2 3 3 3 3 3 3 3 3 ... 676s 4 4 4 4 4 4 4 5 5 5 5 5 5 5 5 5]'; 676s 676s [P,ATAB, STATS] = anovan (dv, g, "varnames", "score", "display", "off"); 676s 676s [C, M, H, GNAMES] = multcompare (STATS, "dim", 1, "ctype", "holm", ... 676s "ControlGroup", 1, "display", "on") 676s 676s ***** demo 676s 676s ## Demonstration using factorial ANCOVA example from anovan 676s 676s score = [95.6 82.2 97.2 96.4 81.4 83.6 89.4 83.8 83.3 85.7 ... 676s 97.2 78.2 78.9 91.8 86.9 84.1 88.6 89.8 87.3 85.4 ... 676s 81.8 65.8 68.1 70.0 69.9 75.1 72.3 70.9 71.5 72.5 ... 676s 84.9 96.1 94.6 82.5 90.7 87.0 86.8 93.3 87.6 92.4 ... 676s 100. 80.5 92.9 84.0 88.4 91.1 85.7 91.3 92.3 87.9 ... 676s 91.7 88.6 75.8 75.7 75.3 82.4 80.1 86.0 81.8 82.5]'; 676s treatment = {"yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" ... 676s "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" ... 676s "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" "yes" ... 676s "no" "no" "no" "no" "no" "no" "no" "no" "no" "no" ... 676s "no" "no" "no" "no" "no" "no" "no" "no" "no" "no" ... 676s "no" "no" "no" "no" "no" "no" "no" "no" "no" "no"}'; 676s exercise = {"lo" "lo" "lo" "lo" "lo" "lo" "lo" "lo" "lo" "lo" ... 676s "mid" "mid" "mid" "mid" "mid" "mid" "mid" "mid" "mid" "mid" ... 676s "hi" "hi" "hi" "hi" "hi" "hi" "hi" "hi" "hi" "hi" ... 676s "lo" "lo" "lo" "lo" "lo" "lo" "lo" "lo" "lo" "lo" ... 676s "mid" "mid" "mid" "mid" "mid" "mid" "mid" "mid" "mid" "mid" ... 676s "hi" "hi" "hi" "hi" "hi" "hi" "hi" "hi" "hi" "hi"}'; 676s age = [59 65 70 66 61 65 57 61 58 55 62 61 60 59 55 57 60 63 62 57 ... 676s 58 56 57 59 59 60 55 53 55 58 68 62 61 54 59 63 60 67 60 67 ... 676s 75 54 57 62 65 60 58 61 65 57 56 58 58 58 52 53 60 62 61 61]'; 676s 676s [P, ATAB, STATS] = anovan (score, {treatment, exercise, age}, "model", ... 676s [1 0 0; 0 1 0; 0 0 1; 1 1 0], "continuous", 3, ... 676s "sstype", "h", "display", "off", "contrasts", ... 676s {"simple","poly",""}); 676s 676s [C, M, H, GNAMES] = multcompare (STATS, "dim", [1 2], "ctype", "holm", ... 676s "display", "on") 676s 676s ***** demo 676s 676s ## Demonstration using one-way ANOVA from anovan, with fit by weighted least 676s ## squares to account for heteroskedasticity. 676s 676s g = [1, 1, 1, 1, 1, 1, 1, 1, ... 676s 2, 2, 2, 2, 2, 2, 2, 2, ... 676s 3, 3, 3, 3, 3, 3, 3, 3]'; 676s 676s y = [13, 16, 16, 7, 11, 5, 1, 9, ... 676s 10, 25, 66, 43, 47, 56, 6, 39, ... 676s 11, 39, 26, 35, 25, 14, 24, 17]'; 676s 676s [P,ATAB,STATS] = anovan(y, g, "display", "off"); 676s fitted = STATS.X * STATS.coeffs(:,1); # fitted values 676s b = polyfit (fitted, abs (STATS.resid), 1); 676s v = polyval (b, fitted); # Variance as a function of the fitted values 676s [P,ATAB,STATS] = anovan (y, g, "weights", v.^-1, "display", "off"); 676s [C, M] = multcompare (STATS, "display", "on", "ctype", "mvt") 676s ***** demo 676s 676s ## Demonstration of p-value adjustments to control the false discovery rate 676s ## Data from Westfall (1997) JASA. 92(437):299-306 676s 676s p = [.005708; .023544; .024193; .044895; ... 676s .048805; .221227; .395867; .693051; .775755]; 676s 676s padj = multcompare(p,'ctype','fdr') 676s ***** test 676s 676s ## Tests using unbalanced one-way ANOVA example from anovan and anova1 676s 676s ## Test for anovan - compare pairwise comparisons with matlab for CTYPE "lsd" 676s 676s dv = [ 8.706 10.362 11.552 6.941 10.983 10.092 6.421 14.943 15.931 ... 676s 22.968 18.590 16.567 15.944 21.637 14.492 17.965 18.851 22.891 ... 676s 22.028 16.884 17.252 18.325 25.435 19.141 21.238 22.196 18.038 ... 676s 22.628 31.163 26.053 24.419 32.145 28.966 30.207 29.142 33.212 ... 676s 25.694 ]'; 676s g = [1 1 1 1 1 1 1 1 2 2 2 2 2 3 3 3 3 3 3 3 3 ... 676s 4 4 4 4 4 4 4 5 5 5 5 5 5 5 5 5]'; 676s 676s [P, ATAB, STATS] = anovan (dv, g, "varnames", "score", "display", "off"); 676s [C, M, H, GNAMES] = multcompare (STATS, "dim", 1, "ctype", "lsd", ... 676s "display", "off"); 676s assert (C(1,6), 2.85812420217898e-05, 1e-09); 676s assert (C(2,6), 5.22936741204085e-07, 1e-09); 676s assert (C(3,6), 2.12794763209146e-08, 1e-09); 676s assert (C(4,6), 7.82091664406946e-15, 1e-09); 676s assert (C(5,6), 0.546591417210693, 1e-09); 676s assert (C(6,6), 0.0845897945254446, 1e-09); 676s assert (C(7,6), 9.47436557975328e-08, 1e-09); 676s assert (C(8,6), 0.188873478781067, 1e-09); 676s assert (C(9,6), 4.08974010364197e-08, 1e-09); 676s assert (C(10,6), 4.44427348175241e-06, 1e-09); 676s assert (M(1,1), 10, 1e-09); 676s assert (M(2,1), 18, 1e-09); 676s assert (M(3,1), 19, 1e-09); 676s assert (M(4,1), 21.0001428571429, 1e-09); 676s assert (M(5,1), 29.0001111111111, 1e-09); 676s assert (M(1,2), 1.0177537954095, 1e-09); 676s assert (M(2,2), 1.28736803631001, 1e-09); 676s assert (M(3,2), 1.0177537954095, 1e-09); 676s assert (M(4,2), 1.0880245732889, 1e-09); 676s assert (M(5,2), 0.959547480416536, 1e-09); 676s 676s ## Compare "fdr" adjusted p-values to those obtained using p.adjust in R 676s 676s [C, M, H, GNAMES] = multcompare (STATS, "dim", 1, "ctype", "fdr", ... 676s "display", "off"); 676s assert (C(1,6), 4.08303457454140e-05, 1e-09); 676s assert (C(2,6), 1.04587348240817e-06, 1e-09); 676s assert (C(3,6), 1.06397381604573e-07, 1e-09); 676s assert (C(4,6), 7.82091664406946e-14, 1e-09); 676s assert (C(5,6), 5.46591417210693e-01, 1e-09); 676s assert (C(6,6), 1.05737243156806e-01, 1e-09); 676s assert (C(7,6), 2.36859139493832e-07, 1e-09); 676s assert (C(8,6), 2.09859420867852e-01, 1e-09); 676s assert (C(9,6), 1.36324670121399e-07, 1e-09); 676s assert (C(10,6), 7.40712246958735e-06, 1e-09); 676s 676s ## Compare "hochberg" adjusted p-values to those obtained using p.adjust in R 676s 676s [C, M, H, GNAMES] = multcompare (STATS, "dim", 1, "ctype", "hochberg", ... 676s "display", "off"); 676s assert (C(1,6), 1.14324968087159e-04, 1e-09); 676s assert (C(2,6), 3.13762044722451e-06, 1e-09); 676s assert (C(3,6), 1.91515286888231e-07, 1e-09); 676s assert (C(4,6), 7.82091664406946e-14, 1e-09); 676s assert (C(5,6), 5.46591417210693e-01, 1e-09); 676s assert (C(6,6), 2.53769383576334e-01, 1e-09); 676s assert (C(7,6), 6.63205590582730e-07, 1e-09); 676s assert (C(8,6), 3.77746957562134e-01, 1e-09); 676s assert (C(9,6), 3.27179208291358e-07, 1e-09); 676s assert (C(10,6), 2.22213674087620e-05, 1e-09); 676s 676s ## Compare "holm" adjusted p-values to those obtained using p.adjust in R 676s 676s [C, M, H, GNAMES] = multcompare (STATS, "dim", 1, "ctype", "holm", ... 676s "display", "off"); 676s assert (C(1,6), 1.14324968087159e-04, 1e-09); 676s assert (C(2,6), 3.13762044722451e-06, 1e-09); 676s assert (C(3,6), 1.91515286888231e-07, 1e-09); 676s assert (C(4,6), 7.82091664406946e-14, 1e-09); 676s assert (C(5,6), 5.46591417210693e-01, 1e-09); 676s assert (C(6,6), 2.53769383576334e-01, 1e-09); 676s assert (C(7,6), 6.63205590582730e-07, 1e-09); 676s assert (C(8,6), 3.77746957562134e-01, 1e-09); 676s assert (C(9,6), 3.27179208291358e-07, 1e-09); 676s assert (C(10,6), 2.22213674087620e-05, 1e-09); 676s 676s ## Compare "scheffe" adjusted p-values to those obtained using 'scheffe' in Matlab 676s 676s [C, M, H, GNAMES] = multcompare (STATS, "dim", 1, "ctype", "scheffe", ... 676s "display", "off"); 676s assert (C(1,6), 0.00108105386141085, 1e-09); 676s assert (C(2,6), 2.7779386789517e-05, 1e-09); 676s assert (C(3,6), 1.3599854038198e-06, 1e-09); 676s assert (C(4,6), 7.58830197867751e-13, 1e-09); 676s assert (C(5,6), 0.984039948220281, 1e-09); 676s assert (C(6,6), 0.539077018557706, 1e-09); 676s assert (C(7,6), 5.59475764460574e-06, 1e-09); 676s assert (C(8,6), 0.771173490574105, 1e-09); 676s assert (C(9,6), 2.52838425729905e-06, 1e-09); 676s assert (C(10,6), 0.000200719143889168, 1e-09); 676s 676s ## Compare "bonferroni" adjusted p-values to those obtained using p.adjust in R 676s 676s [C, M, H, GNAMES] = multcompare (STATS, "dim", 1, "ctype", "bonferroni", ... 676s "display", "off"); 676s assert (C(1,6), 2.85812420217898e-04, 1e-09); 676s assert (C(2,6), 5.22936741204085e-06, 1e-09); 676s assert (C(3,6), 2.12794763209146e-07, 1e-09); 676s assert (C(4,6), 7.82091664406946e-14, 1e-09); 676s assert (C(5,6), 1.00000000000000e+00, 1e-09); 676s assert (C(6,6), 8.45897945254446e-01, 1e-09); 676s assert (C(7,6), 9.47436557975328e-07, 1e-09); 676s assert (C(8,6), 1.00000000000000e+00, 1e-09); 676s assert (C(9,6), 4.08974010364197e-07, 1e-09); 676s assert (C(10,6), 4.44427348175241e-05, 1e-09); 676s 676s ## Test for anova1 ("equal")- comparison of results from Matlab 676s 676s [P, ATAB, STATS] = anova1 (dv, g, "off", "equal"); 676s [C, M, H, GNAMES] = multcompare (STATS, "ctype", "lsd", "display", "off"); 676s assert (C(1,6), 2.85812420217898e-05, 1e-09); 676s assert (C(2,6), 5.22936741204085e-07, 1e-09); 676s assert (C(3,6), 2.12794763209146e-08, 1e-09); 676s assert (C(4,6), 7.82091664406946e-15, 1e-09); 676s assert (C(5,6), 0.546591417210693, 1e-09); 676s assert (C(6,6), 0.0845897945254446, 1e-09); 676s assert (C(7,6), 9.47436557975328e-08, 1e-09); 676s assert (C(8,6), 0.188873478781067, 1e-09); 676s assert (C(9,6), 4.08974010364197e-08, 1e-09); 676s assert (C(10,6), 4.44427348175241e-06, 1e-09); 676s assert (M(1,1), 10, 1e-09); 676s assert (M(2,1), 18, 1e-09); 676s assert (M(3,1), 19, 1e-09); 676s assert (M(4,1), 21.0001428571429, 1e-09); 676s assert (M(5,1), 29.0001111111111, 1e-09); 676s assert (M(1,2), 1.0177537954095, 1e-09); 676s assert (M(2,2), 1.28736803631001, 1e-09); 676s assert (M(3,2), 1.0177537954095, 1e-09); 676s assert (M(4,2), 1.0880245732889, 1e-09); 676s assert (M(5,2), 0.959547480416536, 1e-09); 676s 676s ## Test for anova1 ("unequal") - comparison with results from GraphPad Prism 8 676s [P, ATAB, STATS] = anova1 (dv, g, "off", "unequal"); 676s [C, M, H, GNAMES] = multcompare (STATS, "ctype", "lsd", "display", "off"); 676s assert (C(1,6), 0.001247025266382, 1e-09); 676s assert (C(2,6), 0.000018037115146, 1e-09); 676s assert (C(3,6), 0.000002974595187, 1e-09); 676s assert (C(4,6), 0.000000000786046, 1e-09); 676s assert (C(5,6), 0.5693192886650109, 1e-09); 676s assert (C(6,6), 0.110501699029776, 1e-09); 676s assert (C(7,6), 0.000131226488700, 1e-09); 676s assert (C(8,6), 0.1912101409715992, 1e-09); 676s assert (C(9,6), 0.000005385256394, 1e-09); 676s assert (C(10,6), 0.000074089106171, 1e-09); 677s ***** test 677s 677s ## Test for anova2 ("interaction") - comparison with results from Matlab for column effect 677s popcorn = [5.5, 4.5, 3.5; 5.5, 4.5, 4.0; 6.0, 4.0, 3.0; ... 677s 6.5, 5.0, 4.0; 7.0, 5.5, 5.0; 7.0, 5.0, 4.5]; 677s [P, ATAB, STATS] = anova2 (popcorn, 3, "off"); 677s [C, M, H, GNAMES] = multcompare (STATS, "estimate", "column",... 677s "ctype", "lsd", "display", "off"); 677s assert (C(1,6), 1.49311100811177e-05, 1e-09); 677s assert (C(2,6), 2.20506904243535e-07, 1e-09); 677s assert (C(3,6), 0.00449897860490058, 1e-09); 677s assert (M(1,1), 6.25, 1e-09); 677s assert (M(2,1), 4.75, 1e-09); 677s assert (M(3,1), 4, 1e-09); 677s assert (M(1,2), 0.152145154862547, 1e-09); 677s assert (M(2,2), 0.152145154862547, 1e-09); 677s assert (M(3,2), 0.152145154862547, 1e-09); 677s ***** test 677s 677s ## Test for anova2 ("linear") - comparison with results from GraphPad Prism 8 677s words = [10 13 13; 6 8 8; 11 14 14; 22 23 25; 16 18 20; ... 677s 15 17 17; 1 1 4; 12 15 17; 9 12 12; 8 9 12]; 677s [P, ATAB, STATS] = anova2 (words, 1, "off", "linear"); 677s [C, M, H, GNAMES] = multcompare (STATS, "estimate", "column",... 677s "ctype", "lsd", "display", "off"); 677s assert (C(1,6), 0.000020799832702, 1e-09); 677s assert (C(2,6), 0.000000035812410, 1e-09); 677s assert (C(3,6), 0.003038942449215, 1e-09); 677s ***** test 677s 677s ## Test for anova2 ("nested") - comparison with results from GraphPad Prism 8 677s data = [4.5924 7.3809 21.322; -0.5488 9.2085 25.0426; ... 677s 6.1605 13.1147 22.66; 2.3374 15.2654 24.1283; ... 677s 5.1873 12.4188 16.5927; 3.3579 14.3951 10.2129; ... 677s 6.3092 8.5986 9.8934; 3.2831 3.4945 10.0203]; 677s [P, ATAB, STATS] = anova2 (data, 4, "off", "nested"); 677s [C, M, H, GNAMES] = multcompare (STATS, "estimate", "column",... 677s "ctype", "lsd", "display", "off"); 677s assert (C(1,6), 0.261031111511073, 1e-09); 677s assert (C(2,6), 0.065879755907745, 1e-09); 677s assert (C(3,6), 0.241874613529270, 1e-09); 677s ***** shared visibility_setting 677s visibility_setting = get (0, "DefaultFigureVisible"); 677s ***** test 677s set (0, "DefaultFigureVisible", "off"); 677s 677s ## Test for kruskalwallis - comparison with results from MATLAB 677s data = [3,2,4; 5,4,4; 4,2,4; 4,2,4; 4,1,5; ... 677s 4,2,3; 4,3,5; 4,2,4; 5,2,4; 5,3,3]; 677s group = [1:3] .* ones (10,3); 677s [P, ATAB, STATS] = kruskalwallis (data(:), group(:), "off"); 677s C = multcompare (STATS, "ctype", "lsd", "display", "off"); 677s assert (C(1,6), 0.000163089828959986, 1e-09); 677s assert (C(2,6), 0.630298044801257, 1e-09); 677s assert (C(3,6), 0.00100567660695682, 1e-09); 677s C = multcompare (STATS, "ctype", "bonferroni", "display", "off"); 677s assert (C(1,6), 0.000489269486879958, 1e-09); 677s assert (C(2,6), 1, 1e-09); 677s assert (C(3,6), 0.00301702982087047, 1e-09); 677s C = multcompare(STATS, "ctype", "scheffe", "display", "off"); 677s assert (C(1,6), 0.000819054880289573, 1e-09); 677s assert (C(2,6), 0.890628039849261, 1e-09); 677s assert (C(3,6), 0.00447816059021654, 1e-09); 677s set (0, "DefaultFigureVisible", visibility_setting); 677s ***** test 677s set (0, "DefaultFigureVisible", "off"); 677s ## Test for friedman - comparison with results from MATLAB 677s popcorn = [5.5, 4.5, 3.5; 5.5, 4.5, 4.0; 6.0, 4.0, 3.0; ... 677s 6.5, 5.0, 4.0; 7.0, 5.5, 5.0; 7.0, 5.0, 4.5]; 677s [P, ATAB, STATS] = friedman (popcorn, 3, "off"); 677s C = multcompare(STATS, "ctype", "lsd", "display", "off"); 677s assert (C(1,6), 0.227424558028569, 1e-09); 677s assert (C(2,6), 0.0327204848315735, 1e-09); 677s assert (C(3,6), 0.353160353315988, 1e-09); 677s C = multcompare(STATS, "ctype", "bonferroni", "display", "off"); 677s assert (C(1,6), 0.682273674085708, 1e-09); 677s assert (C(2,6), 0.0981614544947206, 1e-09); 677s assert (C(3,6), 1, 1e-09); 677s C = multcompare(STATS, "ctype", "scheffe", "display", "off"); 677s assert (C(1,6), 0.482657360384373, 1e-09); 677s assert (C(2,6), 0.102266573027672, 1e-09); 677s assert (C(3,6), 0.649836502233148, 1e-09); 677s set (0, "DefaultFigureVisible", visibility_setting); 677s ***** test 677s set (0, "DefaultFigureVisible", "off"); 677s ## Test for fitlm - same comparisons as for first anovan example 677s y = [ 8.706 10.362 11.552 6.941 10.983 10.092 6.421 14.943 15.931 ... 677s 22.968 18.590 16.567 15.944 21.637 14.492 17.965 18.851 22.891 ... 677s 22.028 16.884 17.252 18.325 25.435 19.141 21.238 22.196 18.038 ... 677s 22.628 31.163 26.053 24.419 32.145 28.966 30.207 29.142 33.212 ... 677s 25.694 ]'; 677s X = [1 1 1 1 1 1 1 1 2 2 2 2 2 3 3 3 3 3 3 3 3 4 4 4 4 4 4 4 5 5 5 5 5 5 5 5 5]'; 677s [TAB,STATS] = fitlm (X,y,"linear","categorical",1,"display","off",... 677s "contrasts","simple"); 677s [C, M] = multcompare(STATS, "ctype", "lsd", "display", "off"); 677s assert (C(1,6), 2.85812420217898e-05, 1e-09); 677s assert (C(2,6), 5.22936741204085e-07, 1e-09); 677s assert (C(3,6), 2.12794763209146e-08, 1e-09); 677s assert (C(4,6), 7.82091664406946e-15, 1e-09); 677s assert (C(5,6), 0.546591417210693, 1e-09); 677s assert (C(6,6), 0.0845897945254446, 1e-09); 677s assert (C(7,6), 9.47436557975328e-08, 1e-09); 677s assert (C(8,6), 0.188873478781067, 1e-09); 677s assert (C(9,6), 4.08974010364197e-08, 1e-09); 677s assert (C(10,6), 4.44427348175241e-06, 1e-09); 677s assert (M(1,1), 10, 1e-09); 677s assert (M(2,1), 18, 1e-09); 677s assert (M(3,1), 19, 1e-09); 677s assert (M(4,1), 21.0001428571429, 1e-09); 677s assert (M(5,1), 29.0001111111111, 1e-09); 677s assert (M(1,2), 1.0177537954095, 1e-09); 677s assert (M(2,2), 1.28736803631001, 1e-09); 677s assert (M(3,2), 1.0177537954095, 1e-09); 677s assert (M(4,2), 1.0880245732889, 1e-09); 677s assert (M(5,2), 0.959547480416536, 1e-09); 677s set (0, "DefaultFigureVisible", visibility_setting); 677s ***** test 677s ## Test p-value adjustments compared to R stats package function p.adjust 677s ## Data from Westfall (1997) JASA. 92(437):299-306 677s p = [.005708; .023544; .024193; .044895; ... 677s .048805; .221227; .395867; .693051; .775755]; 677s padj = multcompare (p); 677s assert (padj(1), 0.051372, 1e-06); 677s assert (padj(2), 0.188352, 1e-06); 677s assert (padj(3), 0.188352, 1e-06); 677s assert (padj(4), 0.269370, 1e-06); 677s assert (padj(5), 0.269370, 1e-06); 677s assert (padj(6), 0.884908, 1e-06); 677s assert (padj(7), 1.000000, 1e-06); 677s assert (padj(8), 1.000000, 1e-06); 677s assert (padj(9), 1.000000, 1e-06); 677s padj = multcompare(p,'ctype','holm'); 677s assert (padj(1), 0.051372, 1e-06); 677s assert (padj(2), 0.188352, 1e-06); 677s assert (padj(3), 0.188352, 1e-06); 677s assert (padj(4), 0.269370, 1e-06); 677s assert (padj(5), 0.269370, 1e-06); 677s assert (padj(6), 0.884908, 1e-06); 677s assert (padj(7), 1.000000, 1e-06); 677s assert (padj(8), 1.000000, 1e-06); 677s assert (padj(9), 1.000000, 1e-06); 677s padj = multcompare(p,'ctype','hochberg'); 677s assert (padj(1), 0.051372, 1e-06); 677s assert (padj(2), 0.169351, 1e-06); 677s assert (padj(3), 0.169351, 1e-06); 677s assert (padj(4), 0.244025, 1e-06); 677s assert (padj(5), 0.244025, 1e-06); 677s assert (padj(6), 0.775755, 1e-06); 677s assert (padj(7), 0.775755, 1e-06); 677s assert (padj(8), 0.775755, 1e-06); 677s assert (padj(9), 0.775755, 1e-06); 677s padj = multcompare(p,'ctype','fdr'); 677s assert (padj(1), 0.0513720, 1e-07); 677s assert (padj(2), 0.0725790, 1e-07); 677s assert (padj(3), 0.0725790, 1e-07); 677s assert (padj(4), 0.0878490, 1e-07); 677s assert (padj(5), 0.0878490, 1e-07); 677s assert (padj(6), 0.3318405, 1e-07); 677s assert (padj(7), 0.5089719, 1e-07); 677s assert (padj(8), 0.7757550, 1e-07); 677s assert (padj(9), 0.7757550, 1e-07); 677s 8 tests, 8 passed, 0 known failure, 0 skipped 677s [inst/multiway.m] 677s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/multiway.m 677s ***** test 677s numbers = [4, 5, 6, 7, 8]; 677s num_parts = 2; 677s [groupindex, partition, groupsizes] = multiway (numbers, num_parts, "completeKK"); 677s assert (sort (cellfun (@sum, partition)), sort ([15, 15])); 677s ***** test 677s numbers = [1, 2, 3, 4, 5, 6]; 677s num_parts = 3; 677s [groupindex, partition, groupsizes] = multiway (numbers, num_parts, "completeKK"); 677s assert (sort (cellfun (@sum, partition)), sort ([7, 7, 7])); 677s ***** test 677s numbers = [24, 21, 18, 17, 12, 11, 8, 2]; 677s num_parts = 3; 677s [groupindex, partition, groupsizes] = multiway (numbers, num_parts, "completeKK"); 677s assert (sort (cellfun (@sum, partition)), sort ([38, 38, 37])); 677s ***** test 677s numbers = [10, 10, 10]; 677s num_parts = 3; 677s [~, partition] = multiway (numbers, num_parts, "completeKK"); 677s assert (sort (cellfun (@sum, partition)), [10, 10, 10]); 677s ***** test 677s numbers = 1:10; 677s num_parts = 2; 677s [~, partition] = multiway (numbers, num_parts, "completeKK"); 677s assert (sort (cellfun (@sum, partition)), [27, 28]); 677s ***** test 677s numbers = [4, 5, 6, 7, 8]; 677s num_parts = 2; 677s [groupindex, partition, groupsizes] = multiway (numbers, num_parts, "greedy"); 677s assert (sort (cellfun (@sum, partition)), sort ([13, 17])); 677s ***** test 677s numbers = [1, 2, 3, 4, 5, 6]; 677s num_parts = 3; 677s [groupindex, partition, groupsizes] = multiway (numbers, num_parts, "greedy"); 677s assert (sort (cellfun (@sum, partition)), sort ([7, 7, 7])); 677s ***** test 677s numbers = [10, 7, 5, 5, 6, 4, 10, 11, 12, 9, 10, 4, 3, 4, 5]; 677s num_parts = 4; 677s [groupindex, partition, groupsizes] = multiway (numbers, num_parts, "greedy"); 677s assert (sort (cellfun (@sum, partition)), sort ([27, 27, 27, 24])); 677s ***** test 677s numbers = [24, 21, 18, 17, 12, 11, 8, 2]; 677s num_parts = 3; 677s [groupindex, partition, groupsizes] = multiway (numbers, num_parts, "greedy"); 677s assert (sort (cellfun (@sum, partition)), sort ([35, 37, 41])); 677s ***** test 677s numbers = [10, 10, 10]; 677s num_parts = 3; 677s [~, partition] = multiway (numbers, num_parts, "greedy"); 677s assert (sort (cellfun (@sum, partition)), [10, 10, 10]); 677s ***** test 677s numbers = 1:10; 677s num_parts = 2; 677s [~, partition] = multiway (numbers, num_parts, "greedy"); 677s assert (sort (cellfun (@sum, partition)), [27, 28]); 677s ***** test 677s grpidx_ckk = multiway ([3 2 4 3 9 3 64], 3); 677s grpidx_greedy = multiway ([3 2 4 3 9 3 64], 3, 'greedy'); 677s assert (isequal (grpidx_ckk, grpidx_greedy), false); 678s ***** test 678s numbers = [4; 5; 6; 7; 8]; 678s num_parts = 2; 678s [groupindex, partition, groupsizes] = multiway (numbers, num_parts, "completeKK"); 678s assert (iscolumn (groupindex), true) 678s assert (iscolumn (groupsizes), true); 678s assert (sort (cellfun (@sum, partition)), sort ([15, 15])); 678s numbers = [4; 5; 6; 7; 8]; 678s num_parts = 2; 678s [groupindex, partition, groupsizes] = multiway (numbers, num_parts, "greedy"); 678s assert (iscolumn (groupindex), true) 678s assert (iscolumn (groupsizes), true); 678s assert (sort (cellfun (@sum, partition)), sort ([13, 17])); 678s ***** test 678s numbers = [4, 5, 6, 7, 8]; 678s num_parts = 2; 678s [groupindex, partition, groupsizes] = multiway (numbers, num_parts, "completeKK"); 678s assert (isrow (groupindex), true) 678s assert (isrow (groupsizes), true); 678s assert (sort (cellfun (@sum, partition)), sort ([15, 15])); 678s ***** test 678s numbers = [4, 5, 6, 7, 8]; 678s num_parts = 2; 678s [groupindex, partition, groupsizes] = multiway (numbers, num_parts, "greedy"); 678s assert (isrow (groupindex), true) 678s assert (isrow (groupsizes), true); 678s assert (sort (cellfun (@sum, partition)), sort ([13, 17])); 678s ***** error multiway () 678s ***** error multiway ([1, 2]) 678s ***** error ... 678s multiway ([1, 2, 3], 2, 1) 678s ***** error multiway ([], 2) 678s ***** error multiway (ones (2, 2), 2) 678s ***** error ... 678s multiway ({1, 2, 3}, 2) 678s ***** error multiway ([1, -2, 3], 2) 678s ***** error ... 678s multiway ([1, 2, NaN], 2) 678s ***** error multiway ([1,2,3], [1,2]) 678s ***** error ... 678s multiway ([1, 2, 3], "2") 678s ***** error multiway ([1, 2, 3], 0) 678s ***** error multiway ([1, 2, 3], 1.5) 678s ***** error multiway ([1, 2, 3], -1) 678s ***** error ... 678s multiway ([1, 2], 3) 678s ***** error ... 678s multiway ([1,2,3], 2, "greedyalgo") 678s 30 tests, 30 passed, 0 known failure, 0 skipped 678s [inst/nanmax.m] 678s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/nanmax.m 678s ***** demo 678s ## Find the column maximum values and their indices 678s ## for matrix data with missing values. 678s 678s x = magic (3); 678s x([1, 6:9]) = NaN 678s [y, ind] = nanmax (x) 678s ***** demo 678s ## Find the maximum of all the values in an array, ignoring missing values. 678s ## Create a 2-by-5-by-3 array x with some missing values. 678s 678s x = reshape (1:30, [2, 5, 3]); 678s x([10:12, 25]) = NaN 678s 678s ## Find the maximum of the elements of x. 678s 678s y = nanmax (x, [], 'all') 678s ***** assert (nanmax ([2, 4, NaN, 7]), 7) 678s ***** assert (nanmax ([2, 4, NaN, Inf]), Inf) 678s ***** assert (nanmax ([1, NaN, 3; NaN, 5, 6; 7, 8, NaN]), [7, 8, 6]) 678s ***** assert (nanmax ([1, NaN, 3; NaN, 5, 6; 7, 8, NaN]'), [3, 6, 8]) 678s ***** assert (nanmax (single ([1, NaN, 3; NaN, 5, 6; 7, 8, NaN])), single ([7, 8, 6])) 678s ***** shared x, y 678s x(:,:,1) = [1.77, -0.005, NaN, -2.95; NaN, 0.34, NaN, 0.19]; 678s x(:,:,2) = [1.77, -0.005, NaN, -2.95; NaN, 0.34, NaN, 0.19] + 5; 678s y = x; 678s y(2,3,1) = 0.51; 678s ***** assert (nanmax (x, [], [1, 2])(:), [1.77;6.77]) 678s ***** assert (nanmax (x, [], [1, 3])(:), [6.77;5.34;NaN;5.19]) 678s ***** assert (nanmax (x, [], [2, 3])(:), [6.77;5.34]) 678s ***** assert (nanmax (x, [], [1, 2, 3]), 6.77) 678s ***** assert (nanmax (x, [], 'all'), 6.77) 678s ***** assert (nanmax (y, [], [1, 3])(:), [6.77;5.34;0.51;5.19]) 678s ***** assert (nanmax (x(1,:,1), x(2,:,1)), [1.77, 0.34, NaN, 0.19]) 678s ***** assert (nanmax (x(1,:,2), x(2,:,2)), [6.77, 5.34, NaN, 5.19]) 678s ***** assert (nanmax (y(1,:,1), y(2,:,1)), [1.77, 0.34, 0.51, 0.19]) 678s ***** assert (nanmax (y(1,:,2), y(2,:,2)), [6.77, 5.34, NaN, 5.19]) 678s ***** test 678s xx = repmat ([1:20;6:25], [5 2 6 3]); 678s assert (size (nanmax (xx, [], [3, 2])), [10, 1, 1, 3]); 678s assert (size (nanmax (xx, [], [1, 2])), [1, 1, 6, 3]); 678s assert (size (nanmax (xx, [], [1, 2, 4])), [1, 1, 6]); 678s assert (size (nanmax (xx, [], [1, 4, 3])), [1, 40]); 678s assert (size (nanmax (xx, [], [1, 2, 3, 4])), [1, 1]); 678s ***** assert (nanmax (ones (2), [], 3), ones (2, 2)) 678s ***** assert (nanmax (ones (2, 2, 2), [], 99), ones (2, 2, 2)) 678s ***** assert (nanmax (magic (3), [], 3), magic (3)) 678s ***** assert (nanmax (magic (3), [], [1, 3]), [8, 9, 7]) 678s ***** assert (nanmax (magic (3), [], [1, 99]), [8, 9, 7]) 678s ***** assert (nanmax (ones (2), 3), 3 * ones (2,2)) 678s ***** error ... 678s nanmax (y, [], [1, 1, 2]) 678s ***** error ... 678s [v, idx] = nanmax(x, y, [1 2]) 678s 24 tests, 24 passed, 0 known failure, 0 skipped 678s [inst/nanmean.m] 678s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/nanmean.m 678s ***** demo 678s ## Find the column means for a matrix with missing values., 678s 678s x = magic (3); 678s x([1, 4, 7:9]) = NaN 678s y = nanmean (x) 678s ***** demo 678s ## Find the row means for a matrix with missing values., 678s 678s x = magic (3); 678s x([1, 4, 7:9]) = NaN 678s y = nanmean (x, 2) 678s ***** demo 678s ## Find the mean of all the values in a multidimensional array 678s ## with missing values. 678s 678s x = reshape (1:30, [2, 5, 3]); 678s x([10:12, 25]) = NaN 678s y = nanmean (x, "all") 678s ***** demo 678s ## Find the mean of a multidimensional array with missing values over 678s ## multiple dimensions. 678s 678s x = reshape (1:30, [2, 5, 3]); 678s x([10:12, 25]) = NaN 678s y = nanmean (x, [2, 3]) 678s ***** assert (nanmean ([]), NaN) 678s ***** assert (nanmean (NaN), NaN) 678s ***** assert (nanmean (NaN(3)), [NaN, NaN, NaN]) 678s ***** assert (nanmean ([3 2 NaN 7]), 4) 678s ***** assert (nanmean ([2 4 NaN Inf]), Inf) 678s ***** assert (nanmean ([1 NaN 3; NaN 4 6; 7 8 NaN]), [4 6 4.5]) 678s ***** assert (nanmean ([1 NaN 3; NaN 5 6; 7 8 NaN], 2), [2; 5.5; 7.5]) 678s ***** assert (nanmean (uint8 ([2 4 1 7])), 3.5) 678s ***** test 678s x = magic(3); 678s x([1 6:9]) = NaN; 678s assert (nanmean (x), [3.5, 3, NaN]) 678s assert (nanmean (x, 2), [1; 4; 4]) 678s ***** test 678s x = reshape(1:24, [2, 4, 3]); 678s x([5:6, 20]) = NaN; 678s assert (nanmean (x, "all"), 269/21) 678s ***** test 678s x = reshape(1:24,[2, 4, 3]); 678s x([5:6, 20]) = NaN; 678s assert (squeeze (nanmean (x, [1, 2])), [25/6; 100/8; 144/7]) 678s assert (nanmean (x, [2, 3]), [139/11; 13]) 678s 11 tests, 11 passed, 0 known failure, 0 skipped 678s [inst/nanmin.m] 678s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/nanmin.m 678s ***** demo 678s ## Find the column minimum values and their indices 678s ## for matrix data with missing values. 678s 678s x = magic (3); 678s x([1, 6:9]) = NaN 678s [y, ind] = nanmin (x) 678s ***** demo 678s ## Find the minimum of all the values in an array, ignoring missing values. 678s ## Create a 2-by-5-by-3 array x with some missing values. 678s 678s x = reshape (1:30, [2, 5, 3]); 678s x([10:12, 25]) = NaN 678s 678s ## Find the minimum of the elements of x. 678s 678s y = nanmin (x, [], 'all') 678s ***** assert (nanmin ([2, 4, NaN, 7]), 2) 678s ***** assert (nanmin ([2, 4, NaN, -Inf]), -Inf) 678s ***** assert (nanmin ([1, NaN, 3; NaN, 5, 6; 7, 8, NaN]), [1, 5, 3]) 678s ***** assert (nanmin ([1, NaN, 3; NaN, 5, 6; 7, 8, NaN]'), [1, 5, 7]) 678s ***** assert (nanmin (single ([1, NaN, 3; NaN, 5, 6; 7, 8, NaN])), single ([1, 5, 3])) 678s ***** shared x, y 678s x(:,:,1) = [1.77, -0.005, NaN, -2.95; NaN, 0.34, NaN, 0.19]; 678s x(:,:,2) = [1.77, -0.005, NaN, -2.95; NaN, 0.34, NaN, 0.19] + 5; 678s y = x; 678s y(2,3,1) = 0.51; 678s ***** assert (nanmin (x, [], [1, 2])(:), [-2.95; 2.05]) 678s ***** assert (nanmin (x, [], [1, 3])(:), [1.77; -0.005; NaN; -2.95]) 678s ***** assert (nanmin (x, [], [2, 3])(:), [-2.95; 0.19]) 678s ***** assert (nanmin (x, [], [1, 2, 3]), -2.95) 678s ***** assert (nanmin (x, [], 'all'), -2.95) 678s ***** assert (nanmin (y, [], [1, 3])(:), [1.77; -0.005; 0.51; -2.95]) 678s ***** assert (nanmin (x(1,:,1), x(2,:,1)), [1.77, -0.005, NaN, -2.95]) 678s ***** assert (nanmin (x(1,:,2), x(2,:,2)), [6.77, 4.995, NaN, 2.05]) 678s ***** assert (nanmin (y(1,:,1), y(2,:,1)), [1.77, -0.005, 0.51, -2.95]) 678s ***** assert (nanmin (y(1,:,2), y(2,:,2)), [6.77, 4.995, NaN, 2.05]) 678s ***** test 678s xx = repmat ([1:20;6:25], [5 2 6 3]); 678s assert (size (nanmin (xx, [], [3, 2])), [10, 1, 1, 3]); 678s assert (size (nanmin (xx, [], [1, 2])), [1, 1, 6, 3]); 678s assert (size (nanmin (xx, [], [1, 2, 4])), [1, 1, 6]); 678s assert (size (nanmin (xx, [], [1, 4, 3])), [1, 40]); 678s assert (size (nanmin (xx, [], [1, 2, 3, 4])), [1, 1]); 678s ***** assert (nanmin (ones (2), [], 3), ones (2, 2)) 678s ***** assert (nanmin (ones (2, 2, 2), [], 99), ones (2, 2, 2)) 678s ***** assert (nanmin (magic (3), [], 3), magic (3)) 678s ***** assert (nanmin (magic (3), [], [1, 3]), [3, 1, 2]) 678s ***** assert (nanmin (magic (3), [], [1, 99]), [3, 1, 2]) 678s ***** assert (nanmin (ones (2), 3), ones (2,2)) 678s ***** error ... 678s nanmin (y, [], [1, 1, 2]) 678s ***** error ... 678s [v, idx] = nanmin(x, y, [1 2]) 678s 24 tests, 24 passed, 0 known failure, 0 skipped 678s [inst/nansum.m] 678s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/nansum.m 678s ***** demo 678s ## Find the column sums for a matrix with missing values., 678s 678s x = magic (3); 678s x([1, 4, 7:9]) = NaN 678s s = nansum (x) 678s ***** demo 678s ## Find the row sums for a matrix with missing values., 678s 678s x = magic (3); 678s x([1, 4, 7:9]) = NaN 678s s = nansum (x, 2) 678s ***** demo 678s ## Find the sum of all the values in a multidimensional array 678s ## with missing values. 678s 678s x = reshape (1:30, [2, 5, 3]); 678s x([10:12, 25]) = NaN 678s s = nansum (x, "all") 678s ***** demo 678s ## Find the sum of a multidimensional array with missing values over 678s ## multiple dimensions. 678s 678s x = reshape (1:30, [2, 5, 3]); 678s x([10:12, 25]) = NaN 678s s = nansum (x, [2, 3]) 678s ***** assert (nansum ([]), 0) 678s ***** assert (nansum (NaN), 0) 678s ***** assert (nansum (NaN(3)), [0, 0, 0]) 678s ***** assert (nansum ([2 4 NaN 7]), 13) 678s ***** assert (nansum ([2 4 NaN Inf]), Inf) 678s ***** assert (nansum ([1 NaN 3; NaN 5 6; 7 8 NaN]), [8 13 9]) 678s ***** assert (nansum ([1 NaN 3; NaN 5 6; 7 8 NaN], 2), [4; 11; 15]) 678s ***** assert (nansum (uint8 ([2 4 1 7])), 14) 678s ***** test 678s x = magic(3); 678s x([1 6:9]) = NaN; 678s assert (nansum (x), [7, 6, 0]) 678s assert (nansum (x, 2), [1; 8; 4]) 678s ***** test 678s x = reshape(1:24, [2, 4, 3]); 678s x([5:6, 20]) = NaN; 678s assert (nansum (x, "all"), 269) 678s ***** test 678s x = reshape(1:24,[2, 4, 3]); 678s x([5:6, 20]) = NaN; 678s assert (squeeze (nansum (x, [1, 2])), [25; 100; 144]) 678s assert (nansum (x, [2, 3]), [139; 130]) 678s ***** error nansum ({3}) 678s ***** error nansum (ones (3), 0) 679s ***** error nansum (ones (3), 1.5) 679s ***** error nansum (ones (3), 1.5) 679s ***** error ... 679s nansum (ones (3, 3, 3), [2, 2.5]) 679s ***** error ... 679s nansum (ones (3, 3, 3), [-1, 2]) 679s ***** error ... 679s nansum (ones (3, 3, 3), [2, 2, 3]) 679s 18 tests, 18 passed, 0 known failure, 0 skipped 679s [inst/normalise_distribution.m] 679s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/normalise_distribution.m 679s ***** test 679s v = normalise_distribution ([1 2 3], [], 1); 679s assert (v, [0 0 0]) 679s ***** test 679s v = normalise_distribution ([1 2 3], [], 2); 679s assert (v, norminv ([1 3 5] / 6), 3 * eps) 679s ***** test 679s v = normalise_distribution ([1 2 3]', [], 2); 679s assert (v, [0 0 0]') 679s ***** test 679s v = normalise_distribution ([1 2 3]', [], 1); 679s assert (v, norminv ([1 3 5]' / 6), 3 * eps) 679s ***** test 679s v = normalise_distribution ([1 1 2 2 3 3], [], 2); 679s assert (v, norminv ([3 3 7 7 11 11] / 12), 3 * eps) 679s ***** test 679s v = normalise_distribution ([1 1 2 2 3 3]', [], 1); 679s assert (v, norminv ([3 3 7 7 11 11]' / 12), 3 * eps) 679s ***** test 679s A = randn ( 10 ); 679s N = normalise_distribution (A, @normcdf); 679s assert (A, N, 10000 * eps) 679s ***** test 679s A = exprnd (1, 100); 679s N = normalise_distribution (A, @(x)(expcdf (x, 1))); 679s assert (mean (vec (N)), 0, 0.1) 679s assert (std (vec (N)), 1, 0.1) 679s ***** test 679s A = rand (1000,1); 679s N = normalise_distribution (A, {@(x)(unifcdf (x, 0, 1))}); 679s assert (mean (vec (N)), 0, 0.2) 679s assert (std (vec (N)), 1, 0.1) 679s ***** test 679s A = [rand(1000,1), randn(1000, 1)]; 679s N = normalise_distribution (A, {@(x)(unifcdf (x, 0, 1)), @normcdf}); 679s assert (mean (N), [0, 0], 0.2) 679s assert (std (N), [1, 1], 0.1) 679s ***** test 679s A = [rand(1000,1), randn(1000, 1), exprnd(1, 1000, 1)]'; 679s N = normalise_distribution (A, {@(x)(unifcdf (x, 0, 1)); @normcdf; @(x)(expcdf (x, 1))}, 2); 679s assert (mean (N, 2), [0, 0, 0]', 0.2); 679s assert (std (N, [], 2), [1, 1, 1]', 0.1); 679s ***** xtest 679s A = exprnd (1, 1000, 9); A (300:500, 4:6) = 17; 679s N = normalise_distribution (A); 679s assert (mean (N), [0 0 0 0.38 0.38 0.38 0 0 0], 0.1); 679s assert (var (N), [1 1 1 2.59 2.59 2.59 1 1 1], 0.1); 679s ***** test 679s ***** error normalise_distribution (zeros (3, 4), ... 679s {@(x)(unifcdf (x, 0, 1)); @normcdf; @(x)(expcdf (x,1))}); 679s 14 tests, 14 passed, 0 known failure, 0 skipped 679s [inst/normplot.m] 679s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/normplot.m 679s ***** demo 679s h = normplot([1:20]); 679s ***** demo 679s h = normplot([1:20;5:2:44]'); 679s ***** demo 679s ax = newplot(); 679s h = normplot(ax, [1:20]); 679s ax = gca; 679s h = normplot(ax, [-10:10]); 679s set (ax, "xlim", [-11, 21]); 679s ***** error normplot (); 679s ***** error normplot (23); 679s ***** error normplot (23, [1:20]); 679s ***** error normplot (ones(3,4,5)); 679s ***** test 679s hf = figure ("visible", "off"); 679s unwind_protect 679s ax = newplot (hf); 679s h = normplot (ax, [1:20]); 679s ax = gca; 679s h = normplot(ax, [-10:10]); 679s set (ax, "xlim", [-11, 21]); 679s unwind_protect_cleanup 679s close (hf); 679s end_unwind_protect 679s ***** test 679s hf = figure ("visible", "off"); 679s unwind_protect 679s h = normplot([1:20;5:2:44]'); 679s unwind_protect_cleanup 679s close (hf); 679s end_unwind_protect 679s 6 tests, 6 passed, 0 known failure, 0 skipped 679s [inst/optimalleaforder.m] 679s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/optimalleaforder.m 679s ***** demo 679s randn ("seed", 5) # for reproducibility 679s X = randn (10, 2); 679s D = pdist (X); 679s tree = linkage(D, 'average'); 679s optimalleaforder (tree, D, 'Transformation', 'linear') 679s ***** error optimalleaforder () 679s ***** error optimalleaforder (1) 679s ***** error optimalleaforder (ones (2, 2), 1) 679s ***** error optimalleaforder ([1 2 3], [1 2; 3 4], "criteria", 5) 679s ***** error optimalleaforder ([1 2 1], [1 2 3]) 679s ***** error optimalleaforder ([1 2 1], 1, "xxx", "xxx") 679s ***** error optimalleaforder ([1 2 1], 1, "Transformation", "xxx") 679s 7 tests, 7 passed, 0 known failure, 0 skipped 679s [inst/pca.m] 679s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/pca.m 679s ***** shared COEFF,SCORE,latent,tsquare,m,x,R,V,lambda,i,S,F 679s ***** test 679s x=[7 4 3 679s 4 1 8 679s 6 3 5 679s 8 6 1 679s 8 5 7 679s 7 2 9 679s 5 3 3 679s 9 5 8 679s 7 4 5 679s 8 2 2]; 679s R = corrcoef (x); 679s [V, lambda] = eig (R); 679s [~, i] = sort(diag(lambda), "descend"); #arrange largest PC first 679s S = V(:, i) * diag(sqrt(diag(lambda)(i))); 679s ***** assert(diag(S(:, 1:2)*S(:, 1:2)'), [0.8662; 0.8420; 0.9876], 1E-4); #contribution of first 2 PCs to each original variable 679s B = V(:, i) * diag( 1./ sqrt(diag(lambda)(i))); 679s F = zscore(x)*B; 679s [COEFF,SCORE,latent,tsquare] = pca(zscore(x, 1)); 679s ***** assert(tsquare,sumsq(F, 2),1E4*eps); 679s ***** test 679s x=[1,2,3;2,1,3]'; 679s [COEFF,SCORE,latent,tsquare] = pca(x, "Economy", false); 679s m=[sqrt(2),sqrt(2);sqrt(2),-sqrt(2);-2*sqrt(2),0]/2; 679s m(:,1) = m(:,1)*sign(COEFF(1,1)); 679s m(:,2) = m(:,2)*sign(COEFF(1,2)); 679s ***** assert(COEFF,m(1:2,:),10*eps); 679s ***** assert(SCORE,-m,10*eps); 679s ***** assert(latent,[1.5;.5],10*eps); 679s ***** assert(tsquare,[4;4;4]/3,10*eps); 679s [COEFF,SCORE,latent,tsquare] = pca(x, "Economy", false, "weights", [1 2 1], "variableweights", "variance"); 679s ***** assert(COEFF, [0.632455532033676 -0.632455532033676; 0.741619848709566 0.741619848709566], 10*eps); 679s ***** assert(SCORE, [-0.622019449426284 0.959119380657905; -0.505649896847432 -0.505649896847431; 1.633319243121148 0.052180413036957], 10*eps); 679s ***** assert(latent, [1.783001790889027; 0.716998209110974], 10*eps); 679s ***** xtest assert(tsquare, [1.5; 0.5; 1.5], 10*eps); #currently, [4; 2; 4]/3 is actually returned; see comments above 679s !!!!! known failure 679s ASSERT errors for: assert (tsquare,([1.5; 0.5; 1.5]),10 * eps) 679s 679s Location | Observed | Expected | Reason 679s (1) 1.3333 1.5 Abs err 0.16667 exceeds tol 2.2204e-15 by 0.2 679s (2) 0.66667 0.5 Abs err 0.16667 exceeds tol 2.2204e-15 by 0.2 679s (3) 1.3333 1.5 Abs err 0.16667 exceeds tol 2.2204e-15 by 0.2 679s ***** test 679s x=x'; 679s [COEFF,SCORE,latent,tsquare] = pca(x, "Economy", false); 679s m=[sqrt(2),sqrt(2),0;-sqrt(2),sqrt(2),0;0,0,2]/2; 679s m(:,1) = m(:,1)*sign(COEFF(1,1)); 679s m(:,2) = m(:,2)*sign(COEFF(1,2)); 679s m(:,3) = m(:,3)*sign(COEFF(3,3)); 679s ***** assert(COEFF,m,10*eps); 679s ***** assert(SCORE(:,1),-m(1:2,1),10*eps); 679s ***** assert(SCORE(:,2:3),zeros(2),10*eps); 679s ***** assert(latent,[1;0;0],10*eps); 679s ***** assert(tsquare,[0.5;0.5],10*eps) 679s ***** test 679s [COEFF,SCORE,latent,tsquare] = pca(x); 679s ***** assert(COEFF,m(:, 1),10*eps); 679s ***** assert(SCORE,-m(1:2,1),10*eps); 679s ***** assert(latent,[1],10*eps); 679s ***** assert(tsquare,[0.5;0.5],10*eps) 679s ***** error pca([1 2; 3 4], "Algorithm", "xxx") 679s ***** error <'centered' requires a boolean value> pca([1 2; 3 4], "Centered", "xxx") 679s ***** error pca([1 2; 3 4], "NumComponents", -4) 679s ***** error pca([1 2; 3 4], "Rows", 1) 679s ***** error pca([1 2; 3 4], "Weights", [1 2 3]) 679s ***** error pca([1 2; 3 4], "Weights", [-1 2]) 679s ***** error pca([1 2; 3 4], "VariableWeights", [-1 2]) 679s ***** error pca([1 2; 3 4], "VariableWeights", "xxx") 679s ***** error pca([1 2; 3 4], "XXX", 1) 679s 32 tests, 31 passed, 1 known failure, 0 skipped 679s [inst/pcacov.m] 679s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/pcacov.m 679s ***** demo 679s x = [ 7 26 6 60; 679s 1 29 15 52; 679s 11 56 8 20; 679s 11 31 8 47; 679s 7 52 6 33; 679s 11 55 9 22; 679s 3 71 17 6; 679s 1 31 22 44; 679s 2 54 18 22; 679s 21 47 4 26; 679s 1 40 23 34; 679s 11 66 9 12; 679s 10 68 8 12 679s ]; 679s Kxx = cov (x); 679s [coeff, latent, explained] = pcacov (Kxx) 679s ***** test 679s load hald 679s Kxx = cov (ingredients); 679s [coeff,latent,explained] = pcacov(Kxx); 679s c_out = [-0.0678, -0.6460, 0.5673, 0.5062; ... 679s -0.6785, -0.0200, -0.5440, 0.4933; ... 679s 0.0290, 0.7553, 0.4036, 0.5156; ... 679s 0.7309, -0.1085, -0.4684, 0.4844]; 679s l_out = [517.7969; 67.4964; 12.4054; 0.2372]; 679s e_out = [ 86.5974; 11.2882; 2.0747; 0.0397]; 679s assert (coeff, c_out, 1e-4); 679s assert (latent, l_out, 1e-4); 679s assert (explained, e_out, 1e-4); 679s ***** error pcacov (ones (2,3)) 679s ***** error pcacov (ones (3,3,3)) 679s 3 tests, 3 passed, 0 known failure, 0 skipped 679s [inst/pcares.m] 679s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/pcares.m 679s ***** demo 679s x = [ 7 26 6 60; 679s 1 29 15 52; 679s 11 56 8 20; 679s 11 31 8 47; 679s 7 52 6 33; 679s 11 55 9 22; 679s 3 71 17 6; 679s 1 31 22 44; 679s 2 54 18 22; 679s 21 47 4 26; 679s 1 40 23 34; 679s 11 66 9 12; 679s 10 68 8 12]; 679s 679s ## As we increase the number of principal components, the norm 679s ## of the residuals matrix will decrease 679s r1 = pcares (x,1); 679s n1 = norm (r1) 679s r2 = pcares (x,2); 679s n2 = norm (r2) 679s r3 = pcares (x,3); 679s n3 = norm (r3) 679s r4 = pcares (x,4); 679s n4 = norm (r4) 679s ***** test 679s load hald 679s r1 = pcares (ingredients,1); 679s r2 = pcares (ingredients,2); 679s r3 = pcares (ingredients,3); 679s assert (r1(1,:), [2.0350, 2.8304, -6.8378, 3.0879], 1e-4); 679s assert (r2(1,:), [-2.4037, 2.6930, -1.6482, 2.3425], 1e-4); 679s assert (r3(1,:), [ 0.2008, 0.1957, 0.2045, 0.1921], 1e-4); 679s ***** error pcares (ones (20, 3)) 679s ***** error ... 679s pcares (ones (30, 2), 3) 679s 3 tests, 3 passed, 0 known failure, 0 skipped 679s [inst/pdist.m] 679s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/pdist.m 679s ***** shared xy, t, eucl, x 679s xy = [0 1; 0 2; 7 6; 5 6]; 679s t = 1e-3; 679s eucl = @(v,m) sqrt(sumsq(repmat(v,rows(m),1)-m,2)); 679s x = [1 2 3; 4 5 6; 7 8 9; 3 2 1]; 679s ***** assert (pdist (xy), [1.000 8.602 7.071 8.062 6.403 2.000], t); 679s ***** assert (pdist (xy, eucl), [1.000 8.602 7.071 8.062 6.403 2.000], t); 679s ***** assert (pdist (xy, "euclidean"), [1.000 8.602 7.071 8.062 6.403 2.000], t); 679s ***** assert (pdist (xy, "seuclidean"), [0.380 2.735 2.363 2.486 2.070 0.561], t); 679s ***** assert (pdist (xy, "mahalanobis"), [1.384 1.967 2.446 2.384 1.535 2.045], t); 679s ***** assert (pdist (xy, "cityblock"), [1.000 12.00 10.00 11.00 9.000 2.000], t); 679s ***** assert (pdist (xy, "minkowski"), [1.000 8.602 7.071 8.062 6.403 2.000], t); 679s ***** assert (pdist (xy, "minkowski", 3), [1.000 7.763 6.299 7.410 5.738 2.000], t); 679s ***** assert (pdist (xy, "cosine"), [0.000 0.349 0.231 0.349 0.231 0.013], t); 679s ***** assert (pdist (xy, "correlation"), [0.000 2.000 0.000 2.000 0.000 2.000], t); 679s ***** assert (pdist (xy, "spearman"), [0.000 2.000 0.000 2.000 0.000 2.000], t); 679s ***** assert (pdist (xy, "hamming"), [0.500 1.000 1.000 1.000 1.000 0.500], t); 679s ***** assert (pdist (xy, "jaccard"), [1.000 1.000 1.000 1.000 1.000 0.500], t); 679s ***** assert (pdist (xy, "chebychev"), [1.000 7.000 5.000 7.000 5.000 2.000], t); 679s ***** assert (pdist (x), [5.1962, 10.3923, 2.8284, 5.1962, 5.9161, 10.7703], 1e-4); 679s ***** assert (pdist (x, "euclidean"), ... 679s [5.1962, 10.3923, 2.8284, 5.1962, 5.9161, 10.7703], 1e-4); 679s ***** assert (pdist (x, eucl), ... 679s [5.1962, 10.3923, 2.8284, 5.1962, 5.9161, 10.7703], 1e-4); 679s ***** assert (pdist (x, "squaredeuclidean"), [27, 108, 8, 27, 35, 116]); 679s ***** assert (pdist (x, "seuclidean"), ... 679s [1.8071, 3.6142, 0.9831, 1.8071, 1.8143, 3.4854], 1e-4); 679s ***** warning ... 679s pdist (x, "mahalanobis"); 679s ***** assert (pdist (x, "cityblock"), [9, 18, 4, 9, 9, 18]); 679s ***** assert (pdist (x, "minkowski"), ... 679s [5.1962, 10.3923, 2.8284, 5.1962, 5.9161, 10.7703], 1e-4); 679s ***** assert (pdist (x, "minkowski", 3), ... 679s [4.3267, 8.6535, 2.5198, 4.3267, 5.3485, 9.2521], 1e-4); 679s ***** assert (pdist (x, "cosine"), ... 679s [0.0254, 0.0406, 0.2857, 0.0018, 0.1472, 0.1173], 1e-4); 679s ***** assert (pdist (x, "correlation"), [0, 0, 2, 0, 2, 2], 1e-14); 680s ***** assert (pdist (x, "spearman"), [0, 0, 2, 0, 2, 2], 1e-14); 680s ***** assert (pdist (x, "hamming"), [1, 1, 2/3, 1, 1, 1]); 680s ***** assert (pdist (x, "jaccard"), [1, 1, 2/3, 1, 1, 1]); 680s ***** assert (pdist (x, "chebychev"), [3, 6, 2, 3, 5, 8]); 680s 29 tests, 29 passed, 0 known failure, 0 skipped 680s [inst/pdist2.m] 680s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/pdist2.m 680s ***** shared x, y, xx 680s x = [1, 1, 1; 2, 2, 2; 3, 3, 3]; 680s y = [0, 0, 0; 1, 2, 3; 0, 2, 4; 4, 7, 1]; 680s xx = [1 2 3; 4 5 6; 7 8 9; 3 2 1]; 680s ***** test 680s d = sqrt([3, 5, 11, 45; 12, 2, 8, 30; 27, 5, 11, 21]); 680s assert (pdist2 (x, y), d); 680s ***** test 680s d = [5.1962, 2.2361, 3.3166, 6.7082; ... 680s 3.4641, 2.2361, 3.3166, 5.4772]; 680s i = [3, 1, 1, 1; 2, 3, 3, 2]; 680s [D, I] = pdist2 (x, y, "euclidean", "largest", 2); 680s assert ({D, I}, {d, i}, 1e-4); 680s ***** test 680s d = [1.7321, 1.4142, 2.8284, 4.5826; ... 680s 3.4641, 2.2361, 3.3166, 5.4772]; 680s i = [1, 2, 2, 3;2, 1, 1, 2]; 680s [D, I] = pdist2 (x, y, "euclidean", "smallest", 2); 680s assert ({D, I}, {d, i}, 1e-4); 680s ***** test 680s yy = [1 2 3;5 6 7;9 5 1]; 680s d = [0, 6.1644, 5.3852; 1.4142, 6.9282, 8.7750; ... 680s 3.7417, 7.0711, 9.9499; 6.1644, 10.4881, 10.3441]; 680s i = [2, 4, 4; 3, 2, 2; 1, 3, 3; 4, 1, 1]; 680s [D, I] = pdist2 (y, yy, "euclidean", "smallest", 4); 680s assert ({D, I}, {d, i}, 1e-4); 680s ***** test 680s yy = [1 2 3;5 6 7;9 5 1]; 680s d = [0, 38, 29; 2, 48, 77; 14, 50, 99; 38, 110, 107]; 680s i = [2, 4, 4; 3, 2, 2; 1, 3, 3; 4, 1, 1]; 680s [D, I] = pdist2 (y, yy, "squaredeuclidean", "smallest", 4); 680s assert ({D, I}, {d, i}, 1e-4); 680s ***** test 680s yy = [1 2 3;5 6 7;9 5 1]; 680s d = [0, 3.3256, 2.7249; 0.7610, 3.3453, 4.4799; ... 680s 1.8514, 3.3869, 5.0703; 2.5525, 5.0709, 5.1297]; 680s i = [2, 2, 4; 3, 4, 2; 1, 3, 1; 4, 1, 3]; 680s [D, I] = pdist2 (y, yy, "seuclidean", "smallest", 4); 680s assert ({D, I}, {d, i}, 1e-4); 680s ***** test 680s d = [2.1213, 4.2426, 6.3640; 1.2247, 2.4495, 4.4159; ... 680s 3.2404, 4.8990, 6.8191; 2.7386, 4.2426, 6.1237]; 680s assert (pdist2 (y, x, "mahalanobis"), d, 1e-4); 680s ***** test 680s xx = [1, 3, 4; 3, 5, 4; 8, 7, 6]; 680s d = [1.3053, 1.8257, 15.0499; 1.3053, 3.3665, 16.5680]; 680s i = [2, 2, 2; 3, 4, 4]; 680s [D, I] = pdist2 (y, xx, "mahalanobis", "smallest", 2); 680s assert ({D, I}, {d, i}, 1e-4); 680s ***** test 680s d = [2.5240, 4.1633, 17.3638; 2.0905, 3.9158, 17.0147]; 680s i = [1, 1, 3; 4, 3, 1]; 680s [D, I] = pdist2 (y, xx, "mahalanobis", "largest", 2); 680s assert ({D, I}, {d, i}, 1e-4); 680s ***** test 680s d = [3, 3, 5, 9; 6, 2, 4, 8; 9, 3, 5, 7]; 680s assert (pdist2 (x, y, "cityblock"), d); 680s ***** test 680s d = [1, 2, 3, 6; 2, 1, 2, 5; 3, 2, 3, 4]; 680s assert (pdist2 (x, y, "chebychev"), d); 680s ***** test 680s d = repmat ([NaN, 0.0742, 0.2254, 0.1472], [3, 1]); 680s assert (pdist2 (x, y, "cosine"), d, 1e-4); 680s ***** test 680s yy = [1 2 3;5 6 7;9 5 1]; 680s d = [0, 0, 0.5; 0, 0, 2; 1.5, 1.5, 2; NaN, NaN, NaN]; 680s i = [2, 2, 4; 3, 3, 2; 4, 4, 3; 1, 1, 1]; 680s [D, I] = pdist2 (y, yy, "correlation", "smallest", 4); 680s assert ({D, I}, {d, i}, eps); 680s [D, I] = pdist2 (y, yy, "spearman", "smallest", 4); 680s assert ({D, I}, {d, i}, eps); 680s ***** test 680s d = [1, 2/3, 1, 1; 1, 2/3, 1, 1; 1, 2/3, 2/3, 2/3]; 680s i = [1, 1, 1, 2; 2, 2, 3, 3; 3, 3, 2, 1]; 680s [D, I] = pdist2 (x, y, "hamming", "largest", 4); 680s assert ({D, I}, {d, i}, eps); 680s [D, I] = pdist2 (x, y, "jaccard", "largest", 4); 680s assert ({D, I}, {d, i}, eps); 680s ***** test 680s xx = [1, 2, 3, 4; 2, 3, 4, 5; 3, 4, 5, 6]; 680s yy = [1, 2, 2, 3; 2, 3, 3, 4]; 680s [D, I] = pdist2 (x, y, "euclidean", "Smallest", 4); 680s eucldist = @(v,m) sqrt(sumsq(repmat(v,rows(m),1)-m,2)); 680s [d, i] = pdist2 (x, y, eucldist, "Smallest", 4); 680s assert ({D, I}, {d, i}); 680s ***** warning ... 680s pdist2 (xx, xx, "mahalanobis"); 680s ***** error pdist2 (1) 680s ***** error ... 680s pdist2 (ones (4, 5), ones (4)) 680s ***** error ... 680s pdist2 (ones (4, 2, 3), ones (3, 2)) 680s ***** error ... 680s pdist2 (ones (3), ones (3), "euclidean", "Largest") 680s ***** error ... 680s pdist2 (ones (3), ones (3), "minkowski", 3, "Largest") 680s ***** error ... 680s pdist2 (ones (3), ones (3), "minkowski", 3, "large", 4) 680s ***** error ... 680s pdist2 (ones (3), ones (3), "minkowski", 3, "Largest", 4, "smallest", 5) 680s ***** error ... 680s [d, i] = pdist2(ones (3), ones (3), "minkowski", 3) 680s ***** error ... 680s pdist2 (ones (3), ones (3), "seuclidean", 3) 680s ***** error ... 680s pdist2 (ones (3), ones (3), "seuclidean", [1, -1, 3]) 680s ***** error ... 680s pdist2 (ones (3), eye (3), "mahalanobis", eye(2)) 680s ***** error ... 680s pdist2 (ones (3), eye (3), "mahalanobis", ones(3)) 680s ***** error ... 680s pdist2 (ones (3), eye (3), "minkowski", 0) 680s ***** error ... 680s pdist2 (ones (3), eye (3), "minkowski", -5) 680s ***** error ... 680s pdist2 (ones (3), eye (3), "minkowski", [1, 2]) 680s ***** error ... 680s pdist2 (ones (3), ones (3), @(v,m) sqrt(repmat(v,rows(m),1)-m,2)) 680s ***** error ... 680s pdist2 (ones (3), ones (3), @(v,m) sqrt(sum(sumsq(repmat(v,rows(m),1)-m,2)))) 680s 33 tests, 33 passed, 0 known failure, 0 skipped 680s [inst/plsregress.m] 680s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/plsregress.m 680s ***** demo 680s ## Perform Partial Least-Squares Regression 680s 680s ## Load the spectra data set and use the near infrared (NIR) spectral 680s ## intensities (NIR) as the predictor and the corresponding octave 680s ## ratings (octave) as the response. 680s load spectra 680s 680s ## Perform PLS regression with 10 components 680s [xload, yload, xscore, yscore, coef, ptcVar] = plsregress (NIR, octane, 10); 680s 680s ## Plot the percentage of explained variance in the response variable 680s ## (PCTVAR) as a function of the number of components. 680s plot (1:10, cumsum (100 * ptcVar(2,:)), "-ro"); 680s xlim ([1, 10]); 680s xlabel ("Number of PLS components"); 680s ylabel ("Percentage of Explained Variance in octane"); 680s title ("Explained Variance per PLS components"); 680s 680s ## Compute the fitted response and display the residuals. 680s octane_fitted = [ones(size(NIR,1),1), NIR] * coef; 680s residuals = octane - octane_fitted; 680s figure 680s stem (residuals, "color", "r", "markersize", 4, "markeredgecolor", "r") 680s xlabel ("Observations"); 680s ylabel ("Residuals"); 680s title ("Residuals in octane's fitted response"); 680s ***** demo 680s ## Calculate Variable Importance in Projection (VIP) for PLS Regression 680s 680s ## Load the spectra data set and use the near infrared (NIR) spectral 680s ## intensities (NIR) as the predictor and the corresponding octave 680s ## ratings (octave) as the response. Variables with a VIP score greater than 680s ## 1 are considered important for the projection of the PLS regression model. 680s load spectra 680s 680s ## Perform PLS regression with 10 components 680s [xload, yload, xscore, yscore, coef, pctVar, mse, stats] = ... 680s plsregress (NIR, octane, 10); 680s 680s ## Calculate the normalized PLS weights 680s W0 = stats.W ./ sqrt(sum(stats.W.^2,1)); 680s 680s ## Calculate the VIP scores for 10 components 680s nobs = size (xload, 1); 680s SS = sum (xscore .^ 2, 1) .* sum (yload .^ 2, 1); 680s VIPscore = sqrt (nobs * sum (SS .* (W0 .^ 2), 2) ./ sum (SS, 2)); 680s 680s ## Find variables with a VIP score greater than or equal to 1 680s VIPidx = find (VIPscore >= 1); 680s 680s ## Plot the VIP scores 680s scatter (1:length (VIPscore), VIPscore, "xb"); 680s hold on 680s scatter (VIPidx, VIPscore (VIPidx), "xr"); 680s plot ([1, length(VIPscore)], [1, 1], "--k"); 680s hold off 680s axis ("tight"); 680s xlabel ("Predictor Variables"); 680s ylabel ("VIP scores"); 680s title ("VIP scores for each predictor variable with 10 components"); 680s ***** test 680s load spectra 680s [xload, yload, xscore, yscore, coef, pctVar] = plsregress (NIR, octane, 10); 680s xload1_out = [-0.0170, 0.0039, 0.0095, 0.0258, 0.0025, ... 680s -0.0075, 0.0000, 0.0018, -0.0027, 0.0020]; 680s yload_out = [6.6384, 9.3106, 2.0505, 0.6471, 0.9625, ... 680s 0.5905, 0.4244, 0.2437, 0.3516, 0.2548]; 680s xscore1_out = [-0.0401, -0.1764, -0.0340, 0.1669, 0.1041, ... 680s -0.2067, 0.0457, 0.1565, 0.0706, -0.1471]; 680s yscore1_out = [-12.4635, -15.0003, 0.0638, 0.0652, -0.0070, ... 680s -0.0634, 0.0062, -0.0012, -0.0151, -0.0173]; 680s assert (xload(1,:), xload1_out, 1e-4); 680s assert (yload, yload_out, 1e-4); 680s assert (xscore(1,:), xscore1_out, 1e-4); 680s assert (yscore(1,:), yscore1_out, 1e-4); 680s ***** test 680s load spectra 680s [xload, yload, xscore, yscore, coef, pctVar] = plsregress (NIR, octane, 5); 680s xload1_out = [-0.0170, 0.0039, 0.0095, 0.0258, 0.0025]; 680s yload_out = [6.6384, 9.3106, 2.0505, 0.6471, 0.9625]; 680s xscore1_out = [-0.0401, -0.1764, -0.0340, 0.1669, 0.1041]; 680s yscore1_out = [-12.4635, -15.0003, 0.0638, 0.0652, -0.0070]; 680s assert (xload(1,:), xload1_out, 1e-4); 680s assert (yload, yload_out, 1e-4); 680s assert (xscore(1,:), xscore1_out, 1e-4); 680s assert (yscore(1,:), yscore1_out, 1e-4); 680s ***** error 680s plsregress (1) 680s ***** error plsregress (1, "asd") 680s ***** error plsregress (1, {1,2,3}) 680s ***** error plsregress ("asd", 1) 680s ***** error plsregress ({1,2,3}, 1) 680s ***** error ... 680s plsregress (ones (20,3), ones (15,1)) 680s ***** error ... 680s plsregress (ones (20,3), ones (20,1), 0) 680s ***** error ... 680s plsregress (ones (20,3), ones (20,1), -5) 680s ***** error ... 680s plsregress (ones (20,3), ones (20,1), 3.2) 680s ***** error ... 680s plsregress (ones (20,3), ones (20,1), [2, 3]) 680s ***** error ... 680s plsregress (ones (20,3), ones (20,1), 4) 680s ***** error ... 680s plsregress (ones (20,3), ones (20,1), 3, "cv", 4.5) 680s ***** error ... 680s plsregress (ones (20,3), ones (20,1), 3, "cv", -1) 680s ***** error ... 680s plsregress (ones (20,3), ones (20,1), 3, "cv", "somestring") 680s ***** error ... 680s plsregress (ones (20,3), ones (20,1), 3, "cv", 3, "mcreps", 2.2) 680s ***** error ... 680s plsregress (ones (20,3), ones (20,1), 3, "cv", 3, "mcreps", -2) 680s ***** error ... 680s plsregress (ones (20,3), ones (20,1), 3, "cv", 3, "mcreps", [1, 2]) 680s ***** error ... 680s plsregress (ones (20,3), ones (20,1), 3, "Name", 3, "mcreps", 1) 680s ***** error ... 680s plsregress (ones (20,3), ones (20,1), 3, "cv", 3, "Name", 1) 680s ***** error ... 680s plsregress (ones (20,3), ones (20,1), 3, "mcreps", 2) 680s ***** error ... 680s plsregress (ones (20,3), ones (20,1), 3, "cv", "resubstitution", "mcreps", 2) 680s ***** error plsregress (1, 2) 680s 24 tests, 24 passed, 0 known failure, 0 skipped 680s [inst/ppplot.m] 680s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/ppplot.m 680s ***** test 680s hf = figure ("visible", "off"); 680s unwind_protect 680s ppplot ([2 3 3 4 4 5 6 5 6 7 8 9 8 7 8 9 0 8 7 6 5 4 6 13 8 15 9 9]); 680s unwind_protect_cleanup 680s close (hf); 680s end_unwind_protect 680s ***** error ppplot () 680s ***** error ppplot (ones (2,2)) 680s ***** error ppplot (1, 2) 680s ***** error ppplot ([1 2 3 4], 2) 680s 5 tests, 5 passed, 0 known failure, 0 skipped 680s [inst/princomp.m] 680s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/princomp.m 680s ***** shared COEFF,SCORE,latent,tsquare,m,x,R,V,lambda,i,S,F 680s ***** test 680s x=[7 4 3 680s 4 1 8 680s 6 3 5 680s 8 6 1 680s 8 5 7 680s 7 2 9 680s 5 3 3 680s 9 5 8 680s 7 4 5 680s 8 2 2]; 680s R = corrcoef (x); 680s [V, lambda] = eig (R); 680s [~, i] = sort(diag(lambda), "descend"); #arrange largest PC first 680s S = V(:, i) * diag(sqrt(diag(lambda)(i))); 680s ## contribution of first 2 PCs to each original variable 680s ***** assert(diag(S(:, 1:2)*S(:, 1:2)'), [0.8662; 0.8420; 0.9876], 1E-4); 680s B = V(:, i) * diag( 1./ sqrt(diag(lambda)(i))); 680s F = zscore(x)*B; 680s [COEFF,SCORE,latent,tsquare] = princomp(zscore(x, 1)); 680s ***** assert(tsquare,sumsq(F, 2),1E4*eps); 680s ***** test 680s x=[1,2,3;2,1,3]'; 680s [COEFF,SCORE,latent,tsquare] = princomp(x); 680s m=[sqrt(2),sqrt(2);sqrt(2),-sqrt(2);-2*sqrt(2),0]/2; 680s m(:,1) = m(:,1)*sign(COEFF(1,1)); 680s m(:,2) = m(:,2)*sign(COEFF(1,2)); 680s ***** assert(COEFF,m(1:2,:),10*eps); 680s ***** assert(SCORE,-m,10*eps); 680s ***** assert(latent,[1.5;.5],10*eps); 680s ***** assert(tsquare,[4;4;4]/3,10*eps); 680s ***** test 680s x=x'; 680s [COEFF,SCORE,latent,tsquare] = princomp(x); 680s m=[sqrt(2),sqrt(2),0;-sqrt(2),sqrt(2),0;0,0,2]/2; 680s m(:,1) = m(:,1)*sign(COEFF(1,1)); 680s m(:,2) = m(:,2)*sign(COEFF(1,2)); 680s m(:,3) = m(:,3)*sign(COEFF(3,3)); 680s ***** assert(COEFF,m,10*eps); 680s ***** assert(SCORE(:,1),-m(1:2,1),10*eps); 680s ***** assert(SCORE(:,2:3),zeros(2),10*eps); 680s ***** assert(latent,[1;0;0],10*eps); 680s ***** assert(tsquare,[0.5;0.5],10*eps) 680s ***** test 680s [COEFF,SCORE,latent,tsquare] = princomp(x, "econ"); 680s ***** assert(COEFF,m(:, 1),10*eps); 680s ***** assert(SCORE,-m(1:2,1),10*eps); 680s ***** assert(latent,[1],10*eps); 680s ***** assert(tsquare,[0.5;0.5],10*eps) 680s 19 tests, 19 passed, 0 known failure, 0 skipped 680s [inst/probit.m] 680s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/probit.m 680s ***** assert (probit ([-1, 0, 0.5, 1, 2]), [NaN, -Inf, 0, Inf, NaN]) 680s ***** assert (probit ([0.2, 0.99]), norminv ([0.2, 0.99])) 680s ***** error probit () 680s ***** error probit (1, 2) 680s 4 tests, 4 passed, 0 known failure, 0 skipped 680s [inst/procrustes.m] 680s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/procrustes.m 680s ***** demo 680s ## Create some random points in two dimensions 680s n = 10; 680s randn ("seed", 1); 680s X = normrnd (0, 1, [n, 2]); 680s 680s ## Those same points, rotated, scaled, translated, plus some noise 680s S = [0.5, -sqrt(3)/2; sqrt(3)/2, 0.5]; # rotate 60 degrees 680s Y = normrnd (0.5*X*S + 2, 0.05, n, 2); 680s 680s ## Conform Y to X, plot original X and Y, and transformed Y 680s [d, Z] = procrustes (X, Y); 680s plot (X(:,1), X(:,2), "rx", Y(:,1), Y(:,2), "b.", Z(:,1), Z(:,2), "bx"); 680s ***** demo 680s ## Find Procrustes distance and plot superimposed shape 680s 680s X = [40 88; 51 88; 35 78; 36 75; 39 72; 44 71; 48 71; 52 74; 55 77]; 680s Y = [36 43; 48 42; 31 26; 33 28; 37 30; 40 31; 45 30; 48 28; 51 24]; 680s plot (X(:,1),X(:,2),"x"); 680s hold on 680s plot (Y(:,1),Y(:,2),"o"); 680s xlim ([0 100]); 680s ylim ([0 100]); 680s legend ("Target shape (X)", "Source shape (Y)"); 680s [d, Z] = procrustes (X, Y) 680s plot (Z(:,1), Z(:,2), "s"); 680s legend ("Target shape (X)", "Source shape (Y)", "Transformed shape (Z)"); 680s hold off 680s ***** demo 680s ## Apply Procrustes transformation to larger set of points 680s 680s ## Create matrices with landmark points for two triangles 680s X = [5, 0; 5, 5; 8, 5]; # target 680s Y = [0, 0; 1, 0; 1, 1]; # source 680s 680s ## Create a matrix with more points on the source triangle 680s Y_mp = [linspace(Y(1,1),Y(2,1),10)', linspace(Y(1,2),Y(2,2),10)'; ... 680s linspace(Y(2,1),Y(3,1),10)', linspace(Y(2,2),Y(3,2),10)'; ... 680s linspace(Y(3,1),Y(1,1),10)', linspace(Y(3,2),Y(1,2),10)']; 680s 680s ## Plot both shapes, including the larger set of points for the source shape 680s plot ([X(:,1); X(1,1)], [X(:,2); X(1,2)], "bx-"); 680s hold on 680s plot ([Y(:,1); Y(1,1)], [Y(:,2); Y(1,2)], "ro-", "MarkerFaceColor", "r"); 680s plot (Y_mp(:,1), Y_mp(:,2), "ro"); 680s xlim ([-1 10]); 680s ylim ([-1 6]); 680s legend ("Target shape (X)", "Source shape (Y)", ... 680s "More points on Y", "Location", "northwest"); 680s hold off 680s 680s ## Obtain the Procrustes transformation 680s [d, Z, transform] = procrustes (X, Y) 680s 680s ## Use the Procrustes transformation to superimpose the more points (Y_mp) 680s ## on the source shape onto the target shape, and then visualize the results. 680s Z_mp = transform.b * Y_mp * transform.T + transform.c(1,:); 680s figure 680s plot ([X(:,1); X(1,1)], [X(:,2); X(1,2)], "bx-"); 680s hold on 680s plot ([Y(:,1); Y(1,1)], [Y(:,2); Y(1,2)], "ro-", "MarkerFaceColor", "r"); 680s plot (Y_mp(:,1), Y_mp(:,2), "ro"); 680s xlim ([-1 10]); 680s ylim ([-1 6]); 680s plot ([Z(:,1); Z(1,1)],[Z(:,2); Z(1,2)],"ks-","MarkerFaceColor","k"); 680s plot (Z_mp(:,1),Z_mp(:,2),"ks"); 680s legend ("Target shape (X)", "Source shape (Y)", ... 680s "More points on Y", "Transformed source shape (Z)", ... 680s "Transformed additional points", "Location", "northwest"); 680s hold off 680s ***** demo 680s ## Compare shapes without reflection 680s 680s T = [33, 93; 33, 87; 33, 80; 31, 72; 32, 65; 32, 58; 30, 72; ... 680s 28, 72; 25, 69; 22, 64; 23, 59; 26, 57; 30, 57]; 680s S = [48, 83; 48, 77; 48, 70; 48, 65; 49, 59; 49, 56; 50, 66; ... 680s 52, 66; 56, 65; 58, 61; 57, 57; 54, 56; 51, 55]; 680s plot (T(:,1), T(:,2), "x-"); 680s hold on 680s plot (S(:,1), S(:,2), "o-"); 680s legend ("Target shape (d)", "Source shape (b)"); 680s hold off 680s d_false = procrustes (T, S, "reflection", false); 680s printf ("Procrustes distance without reflection: %f\n", d_false); 680s d_true = procrustes (T, S, "reflection", true); 680s printf ("Procrustes distance with reflection: %f\n", d_true); 680s d_best = procrustes (T, S, "reflection", "best"); 680s printf ("Procrustes distance with best fit: %f\n", d_true); 680s ***** error procrustes (); 680s ***** error procrustes (1, 2, 3, 4, 5, 6); 680s ***** error ... 680s procrustes (ones (2, 2, 2), ones (2, 2, 2)); 680s ***** error ... 680s procrustes ([1, 2; -3, 4; 2, 3], [1, 2; -3, 4; 2, 3+i]); 680s ***** error ... 680s procrustes ([1, 2; -3, 4; 2, 3], [1, 2; -3, 4; 2, NaN]); 680s ***** error ... 680s procrustes ([1, 2; -3, 4; 2, 3], [1, 2; -3, 4; 2, Inf]); 680s ***** error ... 680s procrustes (ones (10 ,3), ones (11, 3)); 680s ***** error ... 680s procrustes (ones (10 ,3), ones (10, 4)); 680s ***** error ... 680s procrustes (ones (10 ,3), ones (10, 3), "reflection"); 680s ***** error ... 680s procrustes (ones (10 ,3), ones (10, 3), true); 680s ***** error ... 680s procrustes (ones (10 ,3), ones (10, 3), "scaling", 0); 680s ***** error ... 680s procrustes (ones (10 ,3), ones (10, 3), "scaling", [true true]); 680s ***** error ... 680s procrustes (ones (10 ,3), ones (10, 3), "reflection", 1); 680s ***** error ... 680s procrustes (ones (10 ,3), ones (10, 3), "reflection", "some"); 680s ***** error ... 680s procrustes (ones (10 ,3), ones (10, 3), "param1", "some"); 680s 15 tests, 15 passed, 0 known failure, 0 skipped 680s [inst/qqplot.m] 680s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/qqplot.m 680s ***** test 680s hf = figure ("visible", "off"); 680s unwind_protect 680s qqplot ([2 3 3 4 4 5 6 5 6 7 8 9 8 7 8 9 0 8 7 6 5 4 6 13 8 15 9 9]); 680s unwind_protect_cleanup 680s close (hf); 680s end_unwind_protect 680s ***** error qqplot () 680s ***** error qqplot ({1}) 680s ***** error qqplot (ones (2,2)) 680s ***** error qqplot (1, "foobar") 680s ***** error qqplot ([1 2 3], "foobar") 680s 6 tests, 6 passed, 0 known failure, 0 skipped 680s [inst/qrandn.m] 680s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/qrandn.m 680s ***** demo 680s z = qrandn (-5, 5e6); 680s [c x] = hist (z,linspace(-1.5,1.5,200),1); 680s figure(1) 680s plot(x,c,"r."); axis tight; axis([-1.5,1.5]); 680s 680s z = qrandn (-0.14286, 5e6); 680s [c x] = hist (z,linspace(-2,2,200),1); 680s figure(2) 680s plot(x,c,"r."); axis tight; axis([-2,2]); 680s 680s z = qrandn (2.75, 5e6); 680s [c x] = hist (z,linspace(-1e3,1e3,1e3),1); 680s figure(3) 680s semilogy(x,c,"r."); axis tight; axis([-100,100]); 680s 680s # --------- 680s # Figures from the reference paper. 680s ***** error qrandn ([1 2], 1) 680s ***** error qrandn (4, 1) 680s ***** error qrandn (3, 1) 680s ***** error qrandn (2.5, 1, 2, 3) 680s ***** error qrandn (2.5) 680s ***** test 680s q = 1.5; 680s s = [2, 3]; 680s z = qrandn (q, s); 680s assert (isnumeric (z) && isequal (size (z), s)); 680s 6 tests, 6 passed, 0 known failure, 0 skipped 680s [inst/randsample.m] 680s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/randsample.m 680s ***** test 680s n = 20; 680s k = 5; 680s x = randsample(n, k); 680s assert (size(x), [1 k]); 680s x = randsample(n, k, true); 680s assert (size(x), [1 k]); 680s x = randsample(n, k, false); 680s assert (size(x), [1 k]); 680s x = randsample(n, k, true, ones(n, 1)); 680s assert (size(x), [1 k]); 680s x = randsample(1:n, k); 680s assert (size(x), [1 k]); 680s x = randsample(1:n, k, true); 680s assert (size(x), [1 k]); 680s x = randsample(1:n, k, false); 680s assert (size(x), [1 k]); 680s x = randsample(1:n, k, true, ones(n, 1)); 680s assert (size(x), [1 k]); 680s x = randsample((1:n)', k); 680s assert (size(x), [k 1]); 680s x = randsample((1:n)', k, true); 680s assert (size(x), [k 1]); 680s x = randsample((1:n)', k, false); 680s assert (size(x), [k 1]); 680s x = randsample((1:n)', k, true, ones(n, 1)); 680s assert (size(x), [k 1]); 680s n = 10; 680s k = 100; 680s x = randsample(n, k, true, 1:n); 680s assert (size(x), [1 k]); 680s x = randsample((1:n)', k, true); 680s assert (size(x), [k 1]); 680s x = randsample(k, k, false, 1:k); 680s assert (size(x), [1 k]); 680s 1 test, 1 passed, 0 known failure, 0 skipped 680s [inst/rangesearch.m] 680s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/rangesearch.m 680s ***** demo 680s ## Generate 1000 random 2D points from each of five distinct multivariate 680s ## normal distributions that form five separate classes 680s N = 1000; 680s d = 10; 680s randn ("seed", 5); 680s X1 = mvnrnd (d * [0, 0], eye (2), 1000); 680s randn ("seed", 6); 680s X2 = mvnrnd (d * [1, 1], eye (2), 1000); 680s randn ("seed", 7); 680s X3 = mvnrnd (d * [-1, -1], eye (2), 1000); 680s randn ("seed", 8); 680s X4 = mvnrnd (d * [1, -1], eye (2), 1000); 680s randn ("seed", 8); 680s X5 = mvnrnd (d * [-1, 1], eye (2), 1000); 680s X = [X1; X2; X3; X4; X5]; 680s 680s ## For each point in X, find the points in X that are within a radius d 680s ## away from the points in X. 680s Idx = rangesearch (X, X, d, "NSMethod", "exhaustive"); 680s 680s ## Select the first point in X (corresponding to the first class) and find 680s ## its nearest neighbors within the radius d. Display these points in 680s ## one color and the remaining points in a different color. 680s x = X(1,:); 680s nearestPoints = X (Idx{1},:); 680s nonNearestIdx = true (size (X, 1), 1); 680s nonNearestIdx(Idx{1}) = false; 680s 680s scatter (X(nonNearestIdx,1), X(nonNearestIdx,2)) 680s hold on 680s scatter (nearestPoints(:,1),nearestPoints(:,2)) 680s scatter (x(1), x(2), "black", "filled") 680s hold off 680s 680s ## Select the last point in X (corresponding to the fifth class) and find 680s ## its nearest neighbors within the radius d. Display these points in 680s ## one color and the remaining points in a different color. 680s x = X(end,:); 680s nearestPoints = X (Idx{1},:); 680s nonNearestIdx = true (size (X, 1), 1); 680s nonNearestIdx(Idx{1}) = false; 680s 680s figure 680s scatter (X(nonNearestIdx,1), X(nonNearestIdx,2)) 680s hold on 680s scatter (nearestPoints(:,1),nearestPoints(:,2)) 680s scatter (x(1), x(2), "black", "filled") 680s hold off 680s ***** shared x, y, X, Y 680s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 680s y = [2, 3, 4; 1, 4, 3]; 680s X = [1, 2, 3, 4; 2, 3, 4, 5; 3, 4, 5, 6]; 680s Y = [1, 2, 2, 3; 2, 3, 3, 4]; 680s ***** test 680s [idx, D] = rangesearch (x, y, 4); 680s assert (idx, {[1; 4; 2]; [1; 4]}); 680s assert (D, {[1.7321; 3.3166; 3.4641]; [2; 3.4641]}, 1e-4); 680s ***** test 680s [idx, D] = rangesearch (x, y, 4, "NSMethod", "exhaustive"); 680s assert (idx, {[1, 4, 2]; [1, 4]}); 680s assert (D, {[1.7321, 3.3166, 3.4641]; [2, 3.4641]}, 1e-4); 680s ***** test 680s [idx, D] = rangesearch (x, y, 4, "NSMethod", "kdtree"); 680s assert (idx, {[1; 4; 2]; [1; 4]}); 680s assert (D, {[1.7321; 3.3166; 3.4641]; [2; 3.4641]}, 1e-4); 680s ***** test 680s [idx, D] = rangesearch (x, y, 4, "SortIndices", true); 680s assert (idx, {[1; 4; 2]; [1; 4]}); 680s assert (D, {[1.7321; 3.3166; 3.4641]; [2; 3.4641]}, 1e-4); 681s ***** test 681s [idx, D] = rangesearch (x, y, 4, "SortIndices", false); 681s assert (idx, {[1; 2; 4]; [1; 4]}); 681s assert (D, {[1.7321; 3.4641; 3.3166]; [2; 3.4641]}, 1e-4); 681s ***** test 681s [idx, D] = rangesearch (x, y, 4, "NSMethod", "exhaustive", ... 681s "SortIndices", false); 681s assert (idx, {[1, 2, 4]; [1, 4]}); 681s assert (D, {[1.7321, 3.4641, 3.3166]; [2, 3.4641]}, 1e-4); 681s ***** test 681s eucldist = @(v,m) sqrt(sumsq(repmat(v,rows(m),1)-m,2)); 681s [idx, D] = rangesearch (x, y, 4, "Distance", eucldist); 681s assert (idx, {[1, 4, 2]; [1, 4]}); 681s assert (D, {[1.7321, 3.3166, 3.4641]; [2, 3.4641]}, 1e-4); 681s ***** test 681s eucldist = @(v,m) sqrt(sumsq(repmat(v,rows(m),1)-m,2)); 681s [idx, D] = rangesearch (x, y, 4, "Distance", eucldist, ... 681s "NSMethod", "exhaustive"); 681s assert (idx, {[1, 4, 2]; [1, 4]}); 681s assert (D, {[1.7321, 3.3166, 3.4641]; [2, 3.4641]}, 1e-4); 681s ***** test 681s [idx, D] = rangesearch (x, y, 1.5, "Distance", "seuclidean", ... 681s "NSMethod", "exhaustive"); 681s assert (idx, {[1, 4, 2]; [1, 4]}); 681s assert (D, {[0.6024, 1.0079, 1.2047]; [0.6963, 1.2047]}, 1e-4); 681s ***** test 681s [idx, D] = rangesearch (x, y, 1.5, "Distance", "seuclidean", ... 681s "NSMethod", "exhaustive", "SortIndices", false); 681s assert (idx, {[1, 2, 4]; [1, 4]}); 681s assert (D, {[0.6024, 1.2047, 1.0079]; [0.6963, 1.2047]}, 1e-4); 681s ***** test 681s [idx, D] = rangesearch (X, Y, 4); 681s assert (idx, {[1; 2]; [1; 2; 3]}); 681s assert (D, {[1.4142; 3.1623]; [1.4142; 1.4142; 3.1623]}, 1e-4); 681s ***** test 681s [idx, D] = rangesearch (X, Y, 2); 681s assert (idx, {[1]; [1; 2]}); 681s assert (D, {[1.4142]; [1.4142; 1.4142]}, 1e-4); 681s ***** test 681s eucldist = @(v,m) sqrt(sumsq(repmat(v,rows(m),1)-m,2)); 681s [idx, D] = rangesearch (X, Y, 4, "Distance", eucldist); 681s assert (idx, {[1, 2]; [1, 2, 3]}); 681s assert (D, {[1.4142, 3.1623]; [1.4142, 1.4142, 3.1623]}, 1e-4); 681s ***** test 681s [idx, D] = rangesearch (X, Y, 4, "SortIndices", false); 681s assert (idx, {[1; 2]; [1; 2; 3]}); 681s assert (D, {[1.4142; 3.1623]; [1.4142; 1.4142; 3.1623]}, 1e-4); 681s ***** test 681s [idx, D] = rangesearch (X, Y, 4, "Distance", "seuclidean", ... 681s "NSMethod", "exhaustive"); 681s assert (idx, {[1, 2]; [1, 2, 3]}); 681s assert (D, {[1.4142, 3.1623]; [1.4142, 1.4142, 3.1623]}, 1e-4); 681s ***** error rangesearch (1) 681s ***** error rangesearch (ones (4, 5)) 681s ***** error ... 681s rangesearch (ones (4, 5), ones (4)) 681s ***** error ... 681s rangesearch (ones (4, 5), ones (4), 1) 681s ***** error ... 681s rangesearch (ones (4, 2), ones (3, 2), 1, "Distance", "euclidean", "some", "some") 681s ***** error ... 681s rangesearch (ones (4, 5), ones (1, 5), 1, "scale", ones (1, 5), "P", 3) 681s ***** error ... 681s rangesearch (ones (4, 5), ones (1, 5), 1, "P", -2) 681s ***** error ... 681s rangesearch (ones (4, 5), ones (1, 5), 1, "scale", ones(4,5), "distance", "euclidean") 681s ***** error ... 681s rangesearch (ones (4, 5), ones (1, 5), 1, "cov", ["some" "some"]) 681s ***** error ... 681s rangesearch (ones (4, 5), ones (1, 5), 1, "cov", ones(4,5), "distance", "euclidean") 681s ***** error ... 681s rangesearch (ones (4, 5), ones (1, 5), 1, "bucketsize", -1) 681s ***** error ... 681s rangesearch (ones (4, 5), ones (1, 5), 1, "NSmethod", "kdtree", "distance", "cosine") 681s ***** error ... 681s rangesearch (ones (4, 5), ones (1, 5), 1, "NSmethod", "kdtree", "distance", "mahalanobis") 681s ***** error ... 681s rangesearch (ones (4, 5), ones (1, 5), 1, "NSmethod", "kdtree", "distance", "correlation") 681s ***** error ... 681s rangesearch (ones (4, 5), ones (1, 5), 1, "NSmethod", "kdtree", "distance", "seuclidean") 681s ***** error ... 681s rangesearch (ones (4, 5), ones (1, 5), 1, "NSmethod", "kdtree", "distance", "spearman") 681s ***** error ... 681s rangesearch (ones (4, 5), ones (1, 5), 1, "NSmethod", "kdtree", "distance", "hamming") 681s ***** error ... 681s rangesearch (ones (4, 5), ones (1, 5), 1, "NSmethod", "kdtree", "distance", "jaccard") 681s 33 tests, 33 passed, 0 known failure, 0 skipped 681s [inst/ranksum.m] 681s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/ranksum.m 681s ***** test 681s mileage = [33.3, 34.5, 37.4; 33.4, 34.8, 36.8; ... 681s 32.9, 33.8, 37.6; 32.6, 33.4, 36.6; ... 681s 32.5, 33.7, 37.0; 33.0, 33.9, 36.7]; 681s [p,h,stats] = ranksum(mileage(:,1),mileage(:,2)); 681s assert (p, 0.004329004329004329, 1e-14); 681s assert (h, true); 681s assert (stats.ranksum, 21.5); 681s ***** test 681s year1 = [51 52 62 62 52 52 51 53 59 63 59 56 63 74 68 86 82 70 69 75 73 ... 681s 49 47 50 60 59 60 62 61 71]'; 681s year2 = [54 53 64 66 57 53 54 54 62 66 59 59 67 76 75 86 82 67 74 80 75 ... 681s 54 50 53 62 62 62 72 60 67]'; 681s [p,h,stats] = ranksum(year1, year2, "alpha", 0.01, "tail", "left"); 681s assert (p, 0.1270832752950605, 1e-14); 681s assert (h, false); 681s assert (stats.ranksum, 837.5); 681s assert (stats.zval, -1.140287483634606, 1e-14); 681s [p,h,stats] = ranksum(year1, year2, "alpha", 0.01, "tail", "left", ... 681s "method", "exact"); 681s assert (p, 0.127343916432862, 1e-14); 681s assert (h, false); 681s assert (stats.ranksum, 837.5); 694s 2 tests, 2 passed, 0 known failure, 0 skipped 694s [inst/regress.m] 694s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/regress.m 694s ***** test 694s % Longley data from the NIST Statistical Reference Dataset 694s Z = [ 60323 83.0 234289 2356 1590 107608 1947 694s 61122 88.5 259426 2325 1456 108632 1948 694s 60171 88.2 258054 3682 1616 109773 1949 694s 61187 89.5 284599 3351 1650 110929 1950 694s 63221 96.2 328975 2099 3099 112075 1951 694s 63639 98.1 346999 1932 3594 113270 1952 694s 64989 99.0 365385 1870 3547 115094 1953 694s 63761 100.0 363112 3578 3350 116219 1954 694s 66019 101.2 397469 2904 3048 117388 1955 694s 67857 104.6 419180 2822 2857 118734 1956 694s 68169 108.4 442769 2936 2798 120445 1957 694s 66513 110.8 444546 4681 2637 121950 1958 694s 68655 112.6 482704 3813 2552 123366 1959 694s 69564 114.2 502601 3931 2514 125368 1960 694s 69331 115.7 518173 4806 2572 127852 1961 694s 70551 116.9 554894 4007 2827 130081 1962 ]; 694s % Results certified by NIST using 500 digit arithmetic 694s % b and standard error in b 694s V = [ -3482258.63459582 890420.383607373 694s 15.0618722713733 84.9149257747669 694s -0.358191792925910E-01 0.334910077722432E-01 694s -2.02022980381683 0.488399681651699 694s -1.03322686717359 0.214274163161675 694s -0.511041056535807E-01 0.226073200069370 694s 1829.15146461355 455.478499142212 ]; 694s Rsq = 0.995479004577296; 694s F = 330.285339234588; 694s y = Z(:,1); X = [ones(rows(Z),1), Z(:,2:end)]; 694s alpha = 0.05; 694s [b, bint, r, rint, stats] = regress (y, X, alpha); 694s assert(b,V(:,1),4e-6); 694s assert(stats(1),Rsq,1e-12); 694s assert(stats(2),F,3e-8); 694s assert(((bint(:,1)-bint(:,2))/2)/tinv(alpha/2,9),V(:,2),-1.e-5); 694s warning: matrix singular to machine precision, rcond = 3.50566e-20 694s warning: called from 694s regress at line 131 column 5 694s __test__ at line 33 column 3 694s test at line 685 column 11 694s /tmp/tmp.scCa8Po4At at line 3366 column 2 694s 694s 1 test, 1 passed, 0 known failure, 0 skipped 694s [inst/regress_gp.m] 694s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/regress_gp.m 694s ***** demo 694s ## Linear fitting of 1D Data 694s rand ("seed", 125); 694s X = 2 * rand (5, 1) - 1; 694s randn ("seed", 25); 694s Y = 2 * X - 1 + 0.3 * randn (5, 1); 694s 694s ## Points for interpolation/extrapolation 694s Xfit = linspace (-2, 2, 10)'; 694s 694s ## Fit regression model 694s [Yfit, Yint, m] = regress_gp (X, Y, Xfit); 694s 694s ## Plot fitted data 694s plot (X, Y, "xk", Xfit, Yfit, "r-", Xfit, Yint, "b-"); 694s title ("Gaussian process regression with linear kernel"); 694s ***** demo 694s ## Linear fitting of 2D Data 694s rand ("seed", 135); 694s X = 2 * rand (4, 2) - 1; 694s randn ("seed", 35); 694s Y = 2 * X(:,1) - 3 * X(:,2) - 1 + 1 * randn (4, 1); 694s 694s ## Mesh for interpolation/extrapolation 694s [x1, x2] = meshgrid (linspace (-1, 1, 10)); 694s Xfit = [x1(:), x2(:)]; 694s 694s ## Fit regression model 694s [Ypred, Yint, Ysd] = regress_gp (X, Y, Xfit); 694s Ypred = reshape (Ypred, 10, 10); 694s YintU = reshape (Yint(:,1), 10, 10); 694s YintL = reshape (Yint(:,2), 10, 10); 694s 694s ## Plot fitted data 694s plot3 (X(:,1), X(:,2), Y, ".k", "markersize", 16); 694s hold on; 694s h = mesh (x1, x2, Ypred, zeros (10, 10)); 694s set (h, "facecolor", "none", "edgecolor", "yellow"); 694s h = mesh (x1, x2, YintU, ones (10, 10)); 694s set (h, "facecolor", "none", "edgecolor", "cyan"); 694s h = mesh (x1, x2, YintL, ones (10, 10)); 694s set (h, "facecolor", "none", "edgecolor", "cyan"); 694s hold off 694s axis tight 694s view (75, 25) 694s title ("Gaussian process regression with linear kernel"); 694s ***** demo 694s ## Projection over basis function with linear kernel 694s pp = [2, 2, 0.3, 1]; 694s n = 10; 694s rand ("seed", 145); 694s X = 2 * rand (n, 1) - 1; 694s randn ("seed", 45); 694s Y = polyval (pp, X) + 0.3 * randn (n, 1); 694s 694s ## Powers 694s px = [sqrt(abs(X)), X, X.^2, X.^3]; 694s 694s ## Points for interpolation/extrapolation 694s Xfit = linspace (-1, 1, 100)'; 694s pxi = [sqrt(abs(Xfit)), Xfit, Xfit.^2, Xfit.^3]; 694s 694s ## Define a prior covariance assuming that the sqrt component is not present 694s Sp = 100 * eye (size (px, 2) + 1); 694s Sp(2,2) = 1; # We don't believe the sqrt(abs(X)) is present 694s 694s ## Fit regression model 694s [Yfit, Yint, Ysd] = regress_gp (px, Y, pxi, Sp); 694s 694s ## Plot fitted data 694s plot (X, Y, "xk;Data;", Xfit, Yfit, "r-;Estimation;", ... 694s Xfit, polyval (pp, Xfit), "g-;True;"); 694s axis tight 694s axis manual 694s hold on 694s plot (Xfit, Yint(:,1), "m-;Upper bound;", Xfit, Yint(:,2), "b-;Lower bound;"); 694s hold off 694s title ("Linear kernel over basis function with prior covariance"); 694s ***** demo 694s ## Projection over basis function with linear kernel 694s pp = [2, 2, 0.3, 1]; 694s n = 10; 694s rand ("seed", 145); 694s X = 2 * rand (n, 1) - 1; 694s randn ("seed", 45); 694s Y = polyval (pp, X) + 0.3 * randn (n, 1); 694s 694s ## Powers 694s px = [sqrt(abs(X)), X, X.^2, X.^3]; 694s 694s ## Points for interpolation/extrapolation 694s Xfit = linspace (-1, 1, 100)'; 694s pxi = [sqrt(abs(Xfit)), Xfit, Xfit.^2, Xfit.^3]; 694s 694s ## Fit regression model without any assumption on prior covariance 694s [Yfit, Yint, Ysd] = regress_gp (px, Y, pxi); 694s 694s ## Plot fitted data 694s plot (X, Y, "xk;Data;", Xfit, Yfit, "r-;Estimation;", ... 694s Xfit, polyval (pp, Xfit), "g-;True;"); 694s axis tight 694s axis manual 694s hold on 694s plot (Xfit, Yint(:,1), "m-;Upper bound;", Xfit, Yint(:,2), "b-;Lower bound;"); 694s hold off 694s title ("Linear kernel over basis function without prior covariance"); 694s ***** demo 694s ## Projection over basis function with rbf kernel 694s pp = [2, 2, 0.3, 1]; 694s n = 10; 694s rand ("seed", 145); 694s X = 2 * rand (n, 1) - 1; 694s randn ("seed", 45); 694s Y = polyval (pp, X) + 0.3 * randn (n, 1); 694s 694s ## Powers 694s px = [sqrt(abs(X)), X, X.^2, X.^3]; 694s 694s ## Points for interpolation/extrapolation 694s Xfit = linspace (-1, 1, 100)'; 694s pxi = [sqrt(abs(Xfit)), Xfit, Xfit.^2, Xfit.^3]; 694s 694s ## Fit regression model with RBF kernel (standard parameters) 694s [Yfit, Yint, Ysd] = regress_gp (px, Y, pxi, "rbf"); 694s 694s ## Plot fitted data 694s plot (X, Y, "xk;Data;", Xfit, Yfit, "r-;Estimation;", ... 694s Xfit, polyval (pp, Xfit), "g-;True;"); 694s axis tight 694s axis manual 694s hold on 694s plot (Xfit, Yint(:,1), "m-;Upper bound;", Xfit, Yint(:,2), "b-;Lower bound;"); 694s hold off 694s title ("RBF kernel over basis function with standard parameters"); 694s text (-0.5, 4, "theta = 5\n g = 0.01"); 694s ***** demo 694s ## Projection over basis function with rbf kernel 694s pp = [2, 2, 0.3, 1]; 694s n = 10; 694s rand ("seed", 145); 694s X = 2 * rand (n, 1) - 1; 694s randn ("seed", 45); 694s Y = polyval (pp, X) + 0.3 * randn (n, 1); 694s 694s ## Powers 694s px = [sqrt(abs(X)), X, X.^2, X.^3]; 694s 694s ## Points for interpolation/extrapolation 694s Xfit = linspace (-1, 1, 100)'; 694s pxi = [sqrt(abs(Xfit)), Xfit, Xfit.^2, Xfit.^3]; 694s 694s ## Fit regression model with RBF kernel with different parameters 694s [Yfit, Yint, Ysd] = regress_gp (px, Y, pxi, "rbf", 10, 0.01); 694s 694s ## Plot fitted data 694s plot (X, Y, "xk;Data;", Xfit, Yfit, "r-;Estimation;", ... 694s Xfit, polyval (pp, Xfit), "g-;True;"); 694s axis tight 694s axis manual 694s hold on 694s plot (Xfit, Yint(:,1), "m-;Upper bound;", Xfit, Yint(:,2), "b-;Lower bound;"); 694s hold off 694s title ("GP regression with RBF kernel and non default parameters"); 694s text (-0.5, 4, "theta = 10\n g = 0.01"); 694s 694s ## Fit regression model with RBF kernel with different parameters 694s [Yfit, Yint, Ysd] = regress_gp (px, Y, pxi, "rbf", 50, 0.01); 694s 694s ## Plot fitted data 694s figure 694s plot (X, Y, "xk;Data;", Xfit, Yfit, "r-;Estimation;", ... 694s Xfit, polyval (pp, Xfit), "g-;True;"); 694s axis tight 694s axis manual 694s hold on 694s plot (Xfit, Yint(:,1), "m-;Upper bound;", Xfit, Yint(:,2), "b-;Lower bound;"); 694s hold off 694s title ("GP regression with RBF kernel and non default parameters"); 694s text (-0.5, 4, "theta = 50\n g = 0.01"); 694s 694s ## Fit regression model with RBF kernel with different parameters 694s [Yfit, Yint, Ysd] = regress_gp (px, Y, pxi, "rbf", 50, 0.001); 694s 694s ## Plot fitted data 694s figure 694s plot (X, Y, "xk;Data;", Xfit, Yfit, "r-;Estimation;", ... 694s Xfit, polyval (pp, Xfit), "g-;True;"); 694s axis tight 694s axis manual 694s hold on 694s plot (Xfit, Yint(:,1), "m-;Upper bound;", Xfit, Yint(:,2), "b-;Lower bound;"); 694s hold off 694s title ("GP regression with RBF kernel and non default parameters"); 694s text (-0.5, 4, "theta = 50\n g = 0.001"); 694s 694s ## Fit regression model with RBF kernel with different parameters 694s [Yfit, Yint, Ysd] = regress_gp (px, Y, pxi, "rbf", 50, 0.05); 694s 694s ## Plot fitted data 694s figure 694s plot (X, Y, "xk;Data;", Xfit, Yfit, "r-;Estimation;", ... 694s Xfit, polyval (pp, Xfit), "g-;True;"); 694s axis tight 694s axis manual 694s hold on 694s plot (Xfit, Yint(:,1), "m-;Upper bound;", Xfit, Yint(:,2), "b-;Lower bound;"); 694s hold off 694s title ("GP regression with RBF kernel and non default parameters"); 694s text (-0.5, 4, "theta = 50\n g = 0.05"); 694s ***** demo 694s ## RBF fitting on noiseless 1D Data 694s x = [0:2*pi/7:2*pi]'; 694s y = 5 * sin (x); 694s 694s ## Predictive grid of 500 equally spaced locations 694s xi = [-0.5:(2*pi+1)/499:2*pi+0.5]'; 694s 694s ## Fit regression model with RBF kernel 694s [Yfit, Yint, Ysd] = regress_gp (x, y, xi, "rbf"); 694s 694s ## Plot fitted data 694s r = mvnrnd (Yfit, diag (Ysd)', 50); 694s plot (xi, r', "c-"); 694s hold on 694s plot (xi, Yfit, "r-;Estimation;", xi, Yint, "b-;Confidence interval;"); 694s plot (x, y, ".k;Predictor points;", "markersize", 20) 694s plot (xi, 5 * sin (xi), "-y;True Function;"); 694s xlim ([-0.5,2*pi+0.5]); 694s ylim ([-10,10]); 694s hold off 694s title ("GP regression with RBF kernel on noiseless 1D data"); 694s text (0, -7, "theta = 5\n g = 0.01"); 694s ***** demo 694s ## RBF fitting on noisy 1D Data 694s x = [0:2*pi/7:2*pi]'; 694s x = [x; x]; 694s y = 5 * sin (x) + randn (size (x)); 694s 694s ## Predictive grid of 500 equally spaced locations 694s xi = [-0.5:(2*pi+1)/499:2*pi+0.5]'; 694s 694s ## Fit regression model with RBF kernel 694s [Yfit, Yint, Ysd] = regress_gp (x, y, xi, "rbf"); 694s 694s ## Plot fitted data 694s r = mvnrnd (Yfit, diag (Ysd)', 50); 694s plot (xi, r', "c-"); 694s hold on 694s plot (xi, Yfit, "r-;Estimation;", xi, Yint, "b-;Confidence interval;"); 694s plot (x, y, ".k;Predictor points;", "markersize", 20) 694s plot (xi, 5 * sin (xi), "-y;True Function;"); 694s xlim ([-0.5,2*pi+0.5]); 694s ylim ([-10,10]); 694s hold off 694s title ("GP regression with RBF kernel on noisy 1D data"); 694s text (0, -7, "theta = 5\n g = 0.01"); 694s ***** error regress_gp (ones (20, 2)) 694s ***** error regress_gp (ones (20, 2), ones (20, 1)) 694s ***** error ... 694s regress_gp (ones (20, 2, 3), ones (20, 1), ones (20, 2)) 694s ***** error ... 694s regress_gp (ones (20, 2), ones (20, 2), ones (20, 2)) 694s ***** error ... 694s regress_gp (ones (20, 2), ones (15, 1), ones (20, 2)) 694s ***** error ... 694s regress_gp (ones (20, 2), ones (20, 1), ones (20, 3)) 694s ***** error ... 694s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), {[3]}) 694s ***** error ... 694s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), "kernel") 694s ***** error ... 694s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), "rbf", ones (4)) 694s ***** error ... 694s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), "linear", 1) 694s ***** error ... 694s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), "rbf", "value") 694s ***** error ... 694s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), "rbf", {5}) 694s ***** error ... 694s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), ones (3), 5) 694s ***** error ... 694s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), "linear", 5) 694s ***** error ... 694s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), "rbf", 5, {5}) 694s ***** error ... 694s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), "rbf", 5, ones (2)) 694s ***** error ... 694s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), 5, 0.01, [1, 1]) 694s ***** error ... 694s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), 5, 0.01, "f") 694s ***** error ... 694s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), 5, 0.01, "f") 694s ***** error ... 694s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), "rbf", 5, 0.01, "f") 694s ***** error ... 694s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), "rbf", 5, 0.01, [1, 1]) 694s ***** error ... 694s regress_gp (ones (20, 2), ones (20, 1), ones (10, 2), "linear", 1) 694s 22 tests, 22 passed, 0 known failure, 0 skipped 694s [inst/regression_ftest.m] 694s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/regression_ftest.m 694s ***** error regression_ftest (); 694s ***** error ... 694s regression_ftest ([1 2 3]', [2 3 4; 3 4 5]'); 694s ***** error ... 694s regression_ftest ([1 2 NaN]', [2 3 4; 3 4 5]', [1 0.5]); 694s ***** error ... 694s regression_ftest ([1 2 Inf]', [2 3 4; 3 4 5]', [1 0.5]); 694s ***** error ... 694s regression_ftest ([1 2 3+i]', [2 3 4; 3 4 5]', [1 0.5]); 694s ***** error ... 694s regression_ftest ([1 2 3]', [2 3 NaN; 3 4 5]', [1 0.5]); 694s ***** error ... 694s regression_ftest ([1 2 3]', [2 3 Inf; 3 4 5]', [1 0.5]); 694s ***** error ... 694s regression_ftest ([1 2 3]', [2 3 4; 3 4 3+i]', [1 0.5]); 694s ***** error ... 694s regression_ftest ([1 2 3]', [2 3 4; 3 4 5]', [1 0.5], [], "alpha", 0); 694s ***** error ... 694s regression_ftest ([1 2 3]', [2 3 4; 3 4 5]', [1 0.5], [], "alpha", 1.2); 694s ***** error ... 694s regression_ftest ([1 2 3]', [2 3 4; 3 4 5]', [1 0.5], [], "alpha", [.02 .1]); 694s ***** error ... 694s regression_ftest ([1 2 3]', [2 3 4; 3 4 5]', [1 0.5], [], "alpha", "a"); 694s ***** error ... 694s regression_ftest ([1 2 3]', [2 3 4; 3 4 5]', [1 0.5], [], "some", 0.05); 694s ***** error ... 694s regression_ftest ([1 2 3]', [2 3; 3 4]', [1 0.5]); 694s ***** error ... 694s regression_ftest ([1 2; 3 4]', [2 3; 3 4]', [1 0.5]); 694s ***** error ... 694s regression_ftest ([1 2 3]', [2 3 4; 3 4 5]', [1 0.5], ones (2)); 694s ***** error ... 694s regression_ftest ([1 2 3]', [2 3 4; 3 4 5]', [1 0.5], "alpha"); 694s ***** error ... 694s regression_ftest ([1 2 3]', [2 3 4; 3 4 5]', [1 0.5], [1 2]); 694s 18 tests, 18 passed, 0 known failure, 0 skipped 694s [inst/regression_ttest.m] 694s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/regression_ttest.m 694s ***** error regression_ttest (); 694s ***** error regression_ttest (1); 694s ***** error ... 694s regression_ttest ([1 2 NaN]', [2 3 4]'); 694s ***** error ... 694s regression_ttest ([1 2 Inf]', [2 3 4]'); 694s ***** error ... 694s regression_ttest ([1 2 3+i]', [2 3 4]'); 694s ***** error ... 694s regression_ttest ([1 2 3]', [2 3 NaN]'); 694s ***** error ... 694s regression_ttest ([1 2 3]', [2 3 Inf]'); 694s ***** error ... 694s regression_ttest ([1 2 3]', [3 4 3+i]'); 694s ***** error ... 694s regression_ttest ([1 2 3]', [3 4 4 5]'); 694s ***** error ... 694s regression_ttest ([1 2 3]', [2 3 4]', "alpha", 0); 694s ***** error ... 694s regression_ttest ([1 2 3]', [2 3 4]', "alpha", 1.2); 694s ***** error ... 694s regression_ttest ([1 2 3]', [2 3 4]', "alpha", [.02 .1]); 694s ***** error ... 694s regression_ttest ([1 2 3]', [2 3 4]', "alpha", "a"); 694s ***** error ... 694s regression_ttest ([1 2 3]', [2 3 4]', "some", 0.05); 694s ***** error ... 694s regression_ttest ([1 2 3]', [2 3 4]', "tail", "val"); 694s ***** error ... 694s regression_ttest ([1 2 3]', [2 3 4]', "alpha", 0.01, "tail", "val"); 694s 16 tests, 16 passed, 0 known failure, 0 skipped 694s [inst/ridge.m] 694s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/ridge.m 694s ***** demo 694s ## Perform ridge regression for a range of ridge parameters and observe 694s ## how the coefficient estimates change based on the acetylene dataset. 694s 694s load acetylene 694s 694s X = [x1, x2, x3]; 694s 694s x1x2 = x1 .* x2; 694s x1x3 = x1 .* x3; 694s x2x3 = x2 .* x3; 694s 694s D = [x1, x2, x3, x1x2, x1x3, x2x3]; 694s 694s k = 0:1e-5:5e-3; 694s 694s b = ridge (y, D, k); 694s 694s figure 694s plot (k, b, "LineWidth", 2) 694s ylim ([-100, 100]) 694s grid on 694s xlabel ("Ridge Parameter") 694s ylabel ("Standardized Coefficient") 694s title ("Ridge Trace") 694s legend ("x1", "x2", "x3", "x1x2", "x1x3", "x2x3") 694s 694s ***** demo 694s 694s load carbig 694s X = [Acceleration Weight Displacement Horsepower]; 694s y = MPG; 694s 694s n = length(y); 694s 694s rand("seed",1); % For reproducibility 694s 694s c = cvpartition(n,'HoldOut',0.3); 694s idxTrain = training(c,1); 694s idxTest = ~idxTrain; 694s 694s idxTrain = training(c,1); 694s idxTest = ~idxTrain; 694s 694s k = 5; 694s b = ridge(y(idxTrain),X(idxTrain,:),k,0); 694s 694s % Predict MPG values for the test data using the model. 694s yhat = b(1) + X(idxTest,:)*b(2:end); 694s scatter(y(idxTest),yhat) 694s 694s hold on 694s plot(y(idxTest),y(idxTest),"r") 694s xlabel('Actual MPG') 694s ylabel('Predicted MPG') 694s hold off 694s 694s ***** test 694s b = ridge ([1 2 3 4]', [1 2 3 4; 2 3 4 5]', 1); 694s assert (b, [0.5533; 0.5533], 1e-4); 694s ***** test 694s b = ridge ([1 2 3 4]', [1 2 3 4; 2 3 4 5]', 2); 694s assert (b, [0.4841; 0.4841], 1e-4); 694s ***** test 694s load acetylene 694s x = [x1, x2, x3]; 694s b = ridge (y, x, 0); 694s assert (b,[10.2273;1.97128;-0.601818],1e-4); 694s ***** test 694s load acetylene 694s x = [x1, x2, x3]; 694s b = ridge (y, x, 0.0005); 694s assert (b,[10.2233;1.9712;-0.6056],1e-4); 694s ***** test 694s load acetylene 694s x = [x1, x2, x3]; 694s b = ridge (y, x, 0.001); 694s assert (b,[10.2194;1.9711;-0.6094],1e-4); 694s ***** test 694s load acetylene 694s x = [x1, x2, x3]; 694s b = ridge (y, x, 0.002); 694s assert (b,[10.2116;1.9709;-0.6169],1e-4); 694s ***** test 694s load acetylene 694s x = [x1, x2, x3]; 694s b = ridge (y, x, 0.005); 694s assert (b,[10.1882;1.9704;-0.6393],1e-4); 694s ***** test 694s load acetylene 694s x = [x1, x2, x3]; 694s b = ridge (y, x, 0.01); 694s assert (b,[10.1497;1.9695;-0.6761],1e-4); 694s ***** error ridge (1) 694s ***** error ridge (1, 2) 694s ***** error ridge (ones (3), ones (3), 2) 694s ***** error ridge ([1, 2], ones (2), 2) 694s ***** error ridge ([], ones (3), 2) 694s ***** error ridge (ones (5,1), [], 2) 694s ***** error ... 694s ridge ([1; 2; 3; 4; 5], ones (3), 3) 694s ***** error ... 694s ridge ([1; 2; 3], ones (3), 3, 2) 694s ***** error ... 694s ridge ([1; 2; 3], ones (3), 3, "some") 694s 17 tests, 17 passed, 0 known failure, 0 skipped 694s [inst/rmmissing.m] 694s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/rmmissing.m 694s ***** assert (rmmissing ([1,NaN,3]), [1,3]) 694s ***** assert (rmmissing ('abcd f'), 'abcdf') 694s ***** assert (rmmissing ({'xxx','','xyz'}), {'xxx','xyz'}) 694s ***** assert (rmmissing ({'xxx','';'xyz','yyy'}), {'xyz','yyy'}) 694s ***** assert (rmmissing ({'xxx','';'xyz','yyy'}, 2), {'xxx';'xyz'}) 694s ***** assert (rmmissing ([1,2;NaN,2]), [1,2]) 694s ***** assert (rmmissing ([1,2;NaN,2], 2), [2,2]') 694s ***** assert (rmmissing ([1,2;NaN,4;NaN,NaN],"MinNumMissing", 2), [1,2;NaN,4]) 694s ***** test 694s x = [1:6]; 694s x([2,4]) = NaN; 694s [~, idx] = rmmissing (x); 694s assert (idx, logical ([0, 1, 0, 1, 0, 0])); 694s assert (class(idx), 'logical'); 694s x = reshape (x, [2, 3]); 694s [~, idx] = rmmissing (x); 694s assert (idx, logical ([0; 1])); 694s assert (class(idx), 'logical'); 694s [~, idx] = rmmissing (x, 2); 694s assert (idx, logical ([1, 1, 0])); 694s assert (class(idx), 'logical'); 694s [~, idx] = rmmissing (x, 1, "MinNumMissing", 2); 694s assert (idx, logical ([0; 1])); 694s assert (class(idx), 'logical'); 694s [~, idx] = rmmissing (x, 2, "MinNumMissing", 2); 694s assert (idx, logical ([0, 0, 0])); 694s assert (class(idx), 'logical'); 694s ***** assert (rmmissing (single ([1 2 NaN; 3 4 5])), single ([3 4 5])) 694s ***** assert (rmmissing (logical (ones (3))), logical (ones (3))) 694s ***** assert (rmmissing (int32 (ones (3))), int32 (ones (3))) 694s ***** assert (rmmissing (uint32 (ones (3))), uint32 (ones (3))) 694s ***** assert (rmmissing ({1, 2, 3}), {1, 2, 3}) 694s ***** assert (rmmissing ([struct, struct, struct]), [struct, struct, struct]) 694s ***** assert (rmmissing ([]), []) 694s ***** assert (rmmissing (ones (1,0)), ones (1,0)) 694s ***** assert (rmmissing (ones (1,0), 1), ones (1,0)) 694s ***** assert (rmmissing (ones (1,0), 2), ones (1,0)) 694s ***** assert (rmmissing (ones (0,1)), ones (0,1)) 694s ***** assert (rmmissing (ones (0,1), 1), ones (0,1)) 694s ***** assert (rmmissing (ones (0,1), 2), ones (0,1)) 694s ***** error rmmissing (ones (0,1,2)) 694s ***** error rmmissing () 694s ***** error rmmissing (ones(2,2,2)) 694s ***** error rmmissing ([1 2; 3 4], 5) 694s ***** error rmmissing ([1 2; 3 4], "XXX", 1) 694s ***** error <'MinNumMissing'> rmmissing ([1 2; 3 4], 2, "MinNumMissing", -2) 694s ***** error <'MinNumMissing'> rmmissing ([1 2; 3 4], "MinNumMissing", 3.8) 694s ***** error <'MinNumMissing'> rmmissing ([1 2; 3 4], "MinNumMissing", [1 2 3]) 694s ***** error <'MinNumMissing'> rmmissing ([1 2; 3 4], "MinNumMissing", 'xxx') 694s 31 tests, 31 passed, 0 known failure, 0 skipped 694s [inst/runstest.m] 694s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/runstest.m 694s ***** test 694s ## NIST beam deflection data 694s ## http://www.itl.nist.gov/div898/handbook/eda/section4/eda425.htm 694s data = [-213, -564, -35, -15, 141, 115, -420, -360, 203, -338, -431, ... 694s 194, -220, -513, 154, -125, -559, 92, -21, -579, -52, 99, -543, ... 694s -175, 162, -457, -346, 204, -300, -474, 164, -107, -572, -8, 83, ... 694s -541, -224, 180, -420, -374, 201, -236, -531, 83, 27, -564, -112, ... 694s 131, -507, -254, 199, -311, -495, 143, -46, -579, -90, 136, ... 694s -472, -338, 202, -287, -477, 169, -124, -568, 17, 48, -568, -135, ... 694s 162, -430, -422, 172, -74, -577, -13, 92, -534, -243, 194, -355, ... 694s -465, 156, -81, -578, -64, 139, -449, -384, 193, -198, -538, 110, ... 694s -44, -577, -6, 66, -552, -164, 161, -460, -344, 205, -281, -504, ... 694s 134, -28, -576, -118, 156, -437, -381, 200, -220, -540, 83, 11, ... 694s -568, -160, 172, -414, -408, 188, -125, -572, -32, 139, -492, ... 694s -321, 205, -262, -504, 142, -83, -574, 0, 48, -571, -106, 137, ... 694s -501, -266, 190, -391, -406, 194, -186, -553, 83, -13, -577, -49, ... 694s 103, -515, -280, 201, 300, -506, 131, -45, -578, -80, 138, -462, ... 694s -361, 201, -211, -554, 32, 74, -533, -235, 187, -372, -442, 182, ... 694s -147, -566, 25, 68, -535, -244, 194, -351, -463, 174, -125, -570, ... 694s 15, 72, -550, -190, 172, -424, -385, 198, -218, -536, 96]; 694s [h, p, stats] = runstest (data, median (data)); 694s expected_h = 1; 694s expected_p = 0.008562; 694s expected_z = 2.6229; 694s assert (h, expected_h); 694s assert (p, expected_p, 1E-6); 694s assert (stats.z, expected_z, 1E-4); 694s ***** shared x 694s x = [45, -60, 1.225, 55.4, -9 27]; 694s ***** test 694s [h, p, stats] = runstest (x); 694s assert (h, 0); 694s assert (p, 0.6, 1e-14); 694s assert (stats.nruns, 5); 694s assert (stats.n1, 3); 694s assert (stats.n0, 3); 694s assert (stats.z, 0.456435464587638, 1e-14); 694s ***** test 694s [h, p, stats] = runstest (x, [], "method", "approximate"); 694s assert (h, 0); 694s assert (p, 0.6481, 1e-4); 694s assert (stats.z, 0.456435464587638, 1e-14); 694s ***** test 694s [h, p, stats] = runstest (x, [], "tail", "left"); 694s assert (h, 0); 694s assert (p, 0.9, 1e-14); 694s assert (stats.z, 1.369306393762915, 1e-14); 694s ***** error runstest (ones (2,20)) 694s ***** error runstest (["asdasda"]) 694s ***** error ... 694s runstest ([2 3 4 3 2 3 4], "updown") 694s ***** error ... 694s runstest ([2 3 4 3 2 3 4], [], "alpha", 0) 694s ***** error ... 694s runstest ([2 3 4 3 2 3 4], [], "alpha", [0.02 0.2]) 694s ***** error ... 694s runstest ([2 3 4 3 2 3 4], [], "alpha", 1.2) 694s ***** error ... 694s runstest ([2 3 4 3 2 3 4], [], "alpha", -0.05) 694s ***** error ... 694s runstest ([2 3 4 3 2 3 4], [], "method", "some") 694s ***** error ... 694s runstest ([2 3 4 3 2 3 4], [], "tail", "some") 694s ***** error ... 694s runstest ([2 3 4 3 2 3 4], [], "option", "some") 694s 14 tests, 14 passed, 0 known failure, 0 skipped 694s [inst/sampsizepwr.m] 694s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/sampsizepwr.m 694s ***** demo 694s ## Compute the mean closest to 100 that can be determined to be 694s ## significantly different from 100 using a t-test with a sample size 694s ## of 60 and a power of 0.8. 694s mu1 = sampsizepwr ("t", [100, 10], [], 0.8, 60); 694s disp (mu1); 694s ***** demo 694s ## Compute the sample sizes required to distinguish mu0 = 100 from 694s ## mu1 = 110 by a two-sample t-test with a ratio of the larger and the 694s ## smaller sample sizes of 1.5 and a power of 0.6. 694s [N1,N2] = sampsizepwr ("t2", [100, 10], 110, 0.6, [], "ratio", 1.5) 694s ***** demo 694s ## Compute the sample size N required to distinguish p=.26 from p=.2 694s ## with a binomial test. The result is approximate, so make a plot to 694s ## see if any smaller N values also have the required power of 0.6. 694s Napprox = sampsizepwr ("p", 0.2, 0.26, 0.6); 694s nn = 1:250; 694s pwr = sampsizepwr ("p", 0.2, 0.26, [], nn); 694s Nexact = min (nn(pwr >= 0.6)); 694s plot(nn,pwr,'b-', [Napprox Nexact],pwr([Napprox Nexact]),'ro'); 694s grid on 694s ***** demo 694s ## The company must test 52 bottles to detect the difference between a mean 694s ## volume of 100 mL and 102 mL with a power of 0.80. Generate a power curve 694s ## to visualize how the sample size affects the power of the test. 694s 694s nout = sampsizepwr('t',[100 5],102,0.80); 694s nn = 1:100; 694s pwrout = sampsizepwr('t',[100 5],102,[],nn); 694s 694s figure; 694s plot (nn, pwrout, "b-", nout, 0.8, "ro") 694s title ("Power versus Sample Size") 694s xlabel ("Sample Size") 694s ylabel ("Power") 694s ***** error ... 694s out = sampsizepwr ([], [100, 10], [], 0.8, 60); 694s ***** error ... 694s out = sampsizepwr (3, [100, 10], [], 0.8, 60); 694s ***** error ... 694s out = sampsizepwr ({"t", "t2"}, [100, 10], [], 0.8, 60); 694s ***** error ... 694s out = sampsizepwr ("reg", [100, 10], [], 0.8, 60); 694s ***** error ... 694s out = sampsizepwr ("t", ["a", "e"], [], 0.8, 60); 694s ***** error ... 694s out = sampsizepwr ("z", 100, [], 0.8, 60); 694s ***** error ... 694s out = sampsizepwr ("t", 100, [], 0.8, 60); 694s ***** error ... 694s out = sampsizepwr ("t2", 60, [], 0.8, 60); 694s ***** error ... 694s out = sampsizepwr ("var", [100, 10], [], 0.8, 60); 694s ***** error ... 694s out = sampsizepwr ("p", [100, 10], [], 0.8, 60); 694s ***** error ... 694s out = sampsizepwr ("r", [100, 10], [], 0.8, 60); 694s ***** error ... 694s [out, N1] = sampsizepwr ("z", [100, 10], [], 0.8, 60); 694s ***** error ... 694s [out, N1] = sampsizepwr ("t", [100, 10], [], 0.8, 60); 694s ***** error ... 694s [out, N1] = sampsizepwr ("var", 2, [], 0.8, 60); 694s ***** error ... 694s [out, N1] = sampsizepwr ("p", 0.1, [], 0.8, 60); 694s ***** error ... 694s [out, N1] = sampsizepwr ("r", 0.5, [], 0.8, 60); 694s ***** error ... 694s out = sampsizepwr ("z", [100, 0], [], 0.8, 60); 694s ***** error ... 694s out = sampsizepwr ("z", [100, -5], [], 0.8, 60); 694s ***** error ... 694s out = sampsizepwr ("t", [100, 0], [], 0.8, 60); 694s ***** error ... 694s out = sampsizepwr ("t", [100, -5], [], 0.8, 60); 694s ***** error ... 694s [out, N1] = sampsizepwr ("t2", [100, 0], [], 0.8, 60); 694s ***** error ... 694s [out, N1] = sampsizepwr ("t2", [100, -5], [], 0.8, 60); 694s ***** error ... 694s out = sampsizepwr ("var", 0, [], 0.8, 60); 694s ***** error ... 694s out = sampsizepwr ("var", -5, [], 0.8, 60); 694s ***** error ... 694s out = sampsizepwr ("p", 0, [], 0.8, 60); 694s ***** error ... 694s out = sampsizepwr ("p", 1.2, [], 0.8, 60); 694s ***** error ... 694s out = sampsizepwr ("r", -1.5, [], 0.8, 60); 694s ***** error ... 694s out = sampsizepwr ("r", -1, [], 0.8, 60); 694s ***** error ... 694s out = sampsizepwr ("r", 1.2, [], 0.8, 60); 695s ***** error ... 695s out = sampsizepwr ("r", 0, [], 0.8, 60); 695s ***** error ... 695s out = sampsizepwr ("r", 0.2, [], 0.8, 60, "alpha", -0.2); 695s ***** error ... 695s out = sampsizepwr ("r", 0.2, [], 0.8, 60, "alpha", 0); 695s ***** error ... 695s out = sampsizepwr ("r", 0.2, [], 0.8, 60, "alpha", 1.5); 695s ***** error ... 695s out = sampsizepwr ("r", 0.2, [], 0.8, 60, "alpha", "zero"); 695s ***** error ... 695s out = sampsizepwr ("r", 0.2, [], 0.8, 60, "tail", 1.5); 695s ***** error ... 695s out = sampsizepwr ("r", 0.2, [], 0.8, 60, "tail", {"both", "left"}); 695s ***** error ... 695s out = sampsizepwr ("r", 0.2, [], 0.8, 60, "tail", "other"); 695s ***** error ... 695s out = sampsizepwr ("r", 0.2, [], 0.8, 60, "ratio", "some"); 695s ***** error ... 695s out = sampsizepwr ("r", 0.2, [], 0.8, 60, "ratio", 0.5); 695s ***** error ... 695s out = sampsizepwr ("r", 0.2, [], 0.8, 60, "ratio", [2, 1.3, 0.3]); 695s ***** error ... 695s out = sampsizepwr ("z", [100, 5], [], [], 60); 695s ***** error ... 695s out = sampsizepwr ("z", [100, 5], 110, [], []); 695s ***** error ... 695s out = sampsizepwr ("z", [100, 5], [], 0.8, []); 695s ***** error ... 695s out = sampsizepwr ("z", [100, 5], 110, 0.8, 60); 695s ***** error ... 695s out = sampsizepwr ("z", [100, 5], "mu", [], 60); 695s ***** error ... 695s out = sampsizepwr ("var", 5, -1, [], 60); 695s ***** error ... 695s out = sampsizepwr ("p", 0.8, 1.2, [], 60, "tail", "right"); 695s ***** error ... 695s out = sampsizepwr ("r", 0.8, 1.2, [], 60); 695s ***** error ... 695s out = sampsizepwr ("r", 0.8, -1.2, [], 60); 695s ***** error ... 695s out = sampsizepwr ("z", [100, 5], 110, 1.2); 695s ***** error ... 695s out = sampsizepwr ("z", [100, 5], 110, 0); 695s ***** error ... 695s out = sampsizepwr ("z", [100, 5], 110, 0.05, [], "alpha", 0.1); 695s ***** error ... 695s out = sampsizepwr ("z", [100, 5], [], [0.8, 0.7], [60, 80, 100]); 695s ***** error ... 695s out = sampsizepwr ("t", [100, 5], 100, 0.8, []); 695s ***** error ... 695s out = sampsizepwr ("t", [100, 5], 110, 0.8, [], "tail", "left"); 695s ***** error ... 695s out = sampsizepwr ("t", [100, 5], 90, 0.8, [], "tail", "right"); 695s ***** warning ... 695s Napprox = sampsizepwr ("p", 0.2, 0.26, 0.6); 695s ***** warning ... 695s Napprox = sampsizepwr ("p", 0.30, 0.36, 0.8); 695s ***** test 695s mu1 = sampsizepwr ("t", [100, 10], [], 0.8, 60); 695s assert (mu1, 103.67704316, 1e-8); 696s ***** test 696s [N1,N2] = sampsizepwr ("t2", [100, 10], 110, 0.6, [], "ratio", 1.5); 696s assert (N1, 9); 696s assert (N2, 14); 697s ***** test 697s nn = 1:250; 697s pwr = sampsizepwr ("p", 0.2, 0.26, [], nn); 697s pwr_out = [0, 0.0676, 0.0176, 0.0566, 0.0181, 0.0431, 0.0802, 0.0322]; 697s assert (pwr([1:8]), pwr_out, 1e-4 * ones (1,8)); 697s pwr_out = [0.59275, 0.6073, 0.62166, 0.6358, 0.6497, 0.6087, 0.6229, 0.6369]; 697s assert (pwr([243:end]), pwr_out, 1e-4 * ones (1,8)); 697s ***** test 697s nout = sampsizepwr ("t", [100, 5], 102, 0.80); 697s assert (nout, 52); 697s ***** test 697s power = sampsizepwr ("t", [20, 5], 25, [], 5, "Tail", "right"); 697s assert (power, 0.5797373588621888, 1e-14); 697s ***** test 697s nout = sampsizepwr ("t", [20, 5], 25, 0.99, [], "Tail", "right"); 697s assert (nout, 18); 697s ***** test 697s p1out = sampsizepwr ("t", [20, 5], [], 0.95, 10, "Tail", "right"); 697s assert (p1out, 25.65317979360237, 2e-14); 698s ***** test 698s pwr = sampsizepwr ("t2", [1.4, 0.2], 1.7, [], 5, "Ratio", 2); 698s assert (pwr, 0.716504004686586, 1e-14); 698s ***** test 698s n = sampsizepwr ("t2", [1.4, 0.2], 1.7, 0.9, []); 698s assert (n, 11); 698s ***** test 698s [n1, n2] = sampsizepwr ("t2", [1.4, 0.2], 1.7, 0.9, [], "Ratio", 2); 698s assert ([n1, n2], [8, 16]); 699s 68 tests, 68 passed, 0 known failure, 0 skipped 699s [inst/sigma_pts.m] 699s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/sigma_pts.m 699s ***** demo 699s K = [1 0.5; 0.5 1]; # covariance matrix 699s # calculate and build associated ellipse 699s [R,S,~] = svd (K); 699s theta = atan2 (R(2,1), R(1,1)); 699s v = sqrt (diag (S)); 699s v = v .* [cos(theta) sin(theta); -sin(theta) cos(theta)]; 699s t = linspace (0, 2*pi, 100).'; 699s xe = v(1,1) * cos (t) + v(2,1) * sin (t); 699s ye = v(1,2) * cos (t) + v(2,2) * sin (t); 699s 699s figure(1); clf; hold on 699s # Plot ellipse and axes 699s line ([0 0; v(:,1).'],[0 0; v(:,2).']) 699s plot (xe,ye,'-r'); 699s 699s col = 'rgb'; 699s l = [-1.8 -1 1.5]; 699s for li = 1:3 699s p = sigma_pts (2, [], K, l(li)); 699s tmp = plot (p(2:end,1), p(2:end,2), ['x' col(li)], ... 699s p(1,1), p(1,2), ['o' col(li)]); 699s h(li) = tmp(1); 699s endfor 699s hold off 699s axis image 699s legend (h, arrayfun (@(x) sprintf ("l:%.2g", x), l, "unif", 0)); 699s ***** test 699s p = sigma_pts (5); 699s assert (mean (p), zeros(1,5), sqrt(eps)); 699s assert (cov (p), eye(5), sqrt(eps)); 699s ***** test 699s m = randn(1, 5); 699s p = sigma_pts (5, m); 699s assert (mean (p), m, sqrt(eps)); 699s assert (cov (p), eye(5), sqrt(eps)); 699s ***** test 699s x = linspace (0,1,5); 699s K = exp (- (x.' - x).^2/ 0.5); 699s p = sigma_pts (5, [], K); 699s assert (mean (p), zeros(1,5), sqrt(eps)); 699s assert (cov (p), K, sqrt(eps)); 699s ***** error sigma_pts(2,1); 699s ***** error sigma_pts(2,[],1); 699s ***** error sigma_pts(2,1,1); 699s ***** error sigma_pts(2,[0.5 0.5],[-1 0; 0 0]); 699s 7 tests, 7 passed, 0 known failure, 0 skipped 699s [inst/signrank.m] 699s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/signrank.m 699s ***** test 699s load gradespaired.mat 699s [p, h, stats] = signrank (gradespaired(:,1), ... 699s gradespaired(:,2), 'tail', 'left'); 699s assert (p, 0.0047, 1e-4); 699s assert (h, true); 699s assert (stats.zval, -2.5982, 1e-4); 699s assert (stats.signedrank, 2017.5); 699s ***** test 699s load ('gradespaired.mat'); 699s [p, h, stats] = signrank (gradespaired(:,1), gradespaired(:,2), ... 699s 'tail', 'left', 'method', 'exact'); 699s assert (p, 0.0045, 1e-4); 699s assert (h, true); 699s assert (stats.zval, NaN); 699s assert (stats.signedrank, 2017.5); 699s ***** test 699s load mileage 699s [p, h, stats] = signrank (mileage(:,2), 33); 699s assert (p, 0.0312, 1e-4); 699s assert (h, true); 699s assert (stats.zval, NaN); 699s assert (stats.signedrank, 21); 699s ***** test 699s load mileage 699s [p, h, stats] = signrank (mileage(:,2), 33, 'tail', 'right'); 699s assert (p, 0.0156, 1e-4); 699s assert (h, true); 699s assert (stats.zval, NaN); 699s assert (stats.signedrank, 21); 699s ***** test 699s load mileage 699s [p, h, stats] = signrank (mileage(:,2), 33, 'tail', 'right', ... 699s 'alpha', 0.01, 'method', 'approximate'); 699s assert (p, 0.0180, 1e-4); 699s assert (h, false); 699s assert (stats.zval, 2.0966, 1e-4); 699s assert (stats.signedrank, 21); 699s ***** error signrank (ones (2)) 699s ***** error ... 699s signrank ([1, 2, 3, 4], ones (2)) 699s ***** error ... 699s signrank ([1, 2, 3, 4], [1, 2, 3]) 699s ***** error ... 699s signrank ([1, 2, 3, 4], [], 'tail') 699s ***** error ... 699s signrank ([1, 2, 3, 4], [], 'alpha', 1.2) 699s ***** error ... 699s signrank ([1, 2, 3, 4], [], 'alpha', 0) 699s ***** error ... 699s signrank ([1, 2, 3, 4], [], 'alpha', -0.05) 699s ***** error ... 699s signrank ([1, 2, 3, 4], [], 'alpha', "a") 699s ***** error ... 699s signrank ([1, 2, 3, 4], [], 'alpha', [0.01, 0.05]) 699s ***** error ... 699s signrank ([1, 2, 3, 4], [], 'tail', 0.01) 699s ***** error ... 699s signrank ([1, 2, 3, 4], [], 'tail', {"both"}) 699s ***** error ... 699s signrank ([1, 2, 3, 4], [], 'tail', "some") 699s ***** error ... 699s signrank ([1, 2, 3, 4], [], 'method', 'exact', 'tail', "some") 699s ***** error ... 699s signrank ([1, 2, 3, 4], [], 'method', 0.01) 699s ***** error ... 699s signrank ([1, 2, 3, 4], [], 'method', {"exact"}) 699s ***** error ... 699s signrank ([1, 2, 3, 4], [], 'method', "some") 699s ***** error ... 699s signrank ([1, 2, 3, 4], [], 'tail', "both", 'method', "some") 699s 22 tests, 22 passed, 0 known failure, 0 skipped 699s [inst/signtest.m] 699s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/signtest.m 699s ***** test 699s [pval, h, stats] = signtest ([-ones(1, 1000) 1], 0, "tail", "left"); 699s assert (pval, 1.091701889420221e-218, 1e-14); 699s assert (h, 1); 699s assert (stats.zval, -31.5437631079266, 1e-14); 699s ***** test 699s [pval, h, stats] = signtest ([-2 -1 0 2 1 3 1], 0); 699s assert (pval, 0.6875000000000006, 1e-14); 699s assert (h, 0); 699s assert (stats.zval, NaN); 699s assert (stats.sign, 4); 699s ***** test 699s [pval, h, stats] = signtest ([-2 -1 0 2 1 3 1], 0, "method", "approximate"); 699s assert (pval, 0.6830913983096086, 1e-14); 699s assert (h, 0); 699s assert (stats.zval, 0.4082482904638631, 1e-14); 699s assert (stats.sign, 4); 699s ***** error signtest (ones (2)) 699s ***** error ... 699s signtest ([1, 2, 3, 4], ones (2)) 699s ***** error ... 699s signtest ([1, 2, 3, 4], [1, 2, 3]) 699s ***** error ... 699s signtest ([1, 2, 3, 4], [], 'tail') 699s ***** error ... 699s signtest ([1, 2, 3, 4], [], 'alpha', 1.2) 699s ***** error ... 699s signtest ([1, 2, 3, 4], [], 'alpha', 0) 699s ***** error ... 699s signtest ([1, 2, 3, 4], [], 'alpha', -0.05) 699s ***** error ... 699s signtest ([1, 2, 3, 4], [], 'alpha', "a") 699s ***** error ... 699s signtest ([1, 2, 3, 4], [], 'alpha', [0.01, 0.05]) 699s ***** error ... 699s signtest ([1, 2, 3, 4], [], 'tail', 0.01) 699s ***** error ... 699s signtest ([1, 2, 3, 4], [], 'tail', {"both"}) 699s ***** error ... 699s signtest ([1, 2, 3, 4], [], 'tail', "some") 699s ***** error ... 699s signtest ([1, 2, 3, 4], [], 'method', 'exact', 'tail', "some") 699s ***** error ... 699s signtest ([1, 2, 3, 4], [], 'method', 0.01) 699s ***** error ... 699s signtest ([1, 2, 3, 4], [], 'method', {"exact"}) 699s ***** error ... 699s signtest ([1, 2, 3, 4], [], 'method', "some") 699s ***** error ... 699s signtest ([1, 2, 3, 4], [], 'tail', "both", 'method', "some") 699s 20 tests, 20 passed, 0 known failure, 0 skipped 699s [inst/silhouette.m] 699s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/silhouette.m 699s ***** demo 699s load fisheriris; 699s X = meas(:,3:4); 699s cidcs = kmeans (X, 3, "Replicates", 5); 699s silhouette (X, cidcs); 699s y_labels(cidcs([1 51 101])) = unique (species); 699s set (gca, "yticklabel", y_labels); 699s title ("Fisher's iris data"); 699s ***** error silhouette (); 699s ***** error silhouette ([1 2; 1 1]); 699s ***** error silhouette ([1 2; 1 1], [1 2 3]'); 699s ***** error silhouette ([1 2; 1 1], [1 2]', "xxx"); 700s 4 tests, 4 passed, 0 known failure, 0 skipped 700s [inst/slicesample.m] 700s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/slicesample.m 700s ***** demo 700s ## Define function to sample 700s d = 2; 700s mu = [-1; 2]; 700s rand ("seed", 5) # for reproducibility 700s Sigma = rand (d); 700s Sigma = (Sigma + Sigma'); 700s Sigma += eye (d)*abs (eigs (Sigma, 1, "sa")) * 1.1; 700s pdf = @(x)(2*pi)^(-d/2)*det(Sigma)^-.5*exp(-.5*sum((x.'-mu).*(Sigma\(x.'-mu)),1)); 700s 700s ## Inputs 700s start = ones (1,2); 700s nsamples = 500; 700s K = 500; 700s m = 10; 700s rande ("seed", 4); rand ("seed", 5) # for reproducibility 700s [smpl, accept] = slicesample (start, nsamples, "pdf", pdf, "burnin", K, "thin", m, "width", [20, 30]); 700s figure; 700s hold on; 700s plot (smpl(:,1), smpl(:,2), 'x'); 700s [x, y] = meshgrid (linspace (-6,4), linspace(-3,7)); 700s z = reshape (pdf ([x(:), y(:)]), size(x)); 700s mesh (x, y, z, "facecolor", "None"); 700s 700s ## Using sample points to find the volume of half a sphere with radius of .5 700s f = @(x) ((.25-(x(:,1)+1).^2-(x(:,2)-2).^2).^.5.*(((x(:,1)+1).^2+(x(:,2)-2).^2)<.25)).'; 700s int = mean (f (smpl) ./ pdf (smpl)); 700s errest = std (f (smpl) ./ pdf (smpl)) / nsamples^.5; 700s trueerr = abs (2/3*pi*.25^(3/2)-int); 700s fprintf ("Monte Carlo integral estimate int f(x) dx = %f\n", int); 700s fprintf ("Monte Carlo integral error estimate %f\n", errest); 700s fprintf ("The actual error %f\n", trueerr); 700s mesh (x,y,reshape (f([x(:), y(:)]), size(x)), "facecolor", "None"); 700s ***** demo 700s ## Integrate truncated normal distribution to find normalization constant 700s pdf = @(x) exp (-.5*x.^2)/(pi^.5*2^.5); 700s nsamples = 1e3; 700s rande ("seed", 4); rand ("seed", 5) # for reproducibility 700s [smpl, accept] = slicesample (1, nsamples, "pdf", pdf, "thin", 4); 700s f = @(x) exp (-.5 * x .^ 2) .* (x >= -2 & x <= 2); 700s x = linspace (-3, 3, 1000); 700s area (x, f(x)); 700s xlabel ("x"); 700s ylabel ("f(x)"); 700s int = mean (f (smpl) ./ pdf (smpl)); 700s errest = std (f (smpl) ./ pdf (smpl)) / nsamples ^ 0.5; 700s trueerr = abs (erf (2 ^ 0.5) * 2 ^ 0.5 * pi ^ 0.5 - int); 700s fprintf("Monte Carlo integral estimate int f(x) dx = %f\n", int); 700s fprintf("Monte Carlo integral error estimate %f\n", errest); 700s fprintf("The actual error %f\n", trueerr); 700s ***** test 700s start = 0.5; 700s nsamples = 1e3; 700s pdf = @(x) exp (-.5*(x-1).^2)/(2*pi)^.5; 700s [smpl, accept] = slicesample (start, nsamples, "pdf", pdf, "thin", 2, "burnin", 0, "width", 5); 700s assert (mean (smpl, 1), 1, .15); 700s assert (var (smpl, 1), 1, .25); 700s ***** error slicesample (); 700s ***** error slicesample (1); 700s ***** error slicesample (1, 1); 700s 4 tests, 4 passed, 0 known failure, 0 skipped 700s [inst/squareform.m] 700s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/squareform.m 700s ***** shared v, m 700s v = 1:6; 700s m = [0 1 2 3;1 0 4 5;2 4 0 6;3 5 6 0]; 700s ***** assert (squareform (v), m) 700s ***** assert (squareform (squareform (v)), v) 700s ***** assert (squareform (m), v) 700s ***** assert (squareform (v'), m) 700s ***** assert (squareform (1), [0 1;1 0]) 700s ***** assert (squareform (1, "tomatrix"), [0 1; 1 0]) 700s ***** assert (squareform (0, "tovector"), zeros (1, 0)) 700s ***** warning squareform ([0 1 2; 3 0 4; 5 6 0]); 700s ***** test 700s for c = {@single, @double, @uint8, @uint32, @uint64} 700s f = c{1}; 700s assert (squareform (f (v)), f (m)) 700s assert (squareform (f (m)), f (v)) 700s endfor 700s 9 tests, 9 passed, 0 known failure, 0 skipped 700s [inst/standardizeMissing.m] 700s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/standardizeMissing.m 700s ***** assert (standardizeMissing (1, 1), NaN) 700s ***** assert (standardizeMissing (1, 0), 1) 701s ***** assert (standardizeMissing (eye(2), 1), [NaN 0;0 NaN]) 701s ***** assert (standardizeMissing ([1:3;4:6], [2 3; 4 5]), [1, NaN, NaN; NaN, NaN, 6]) 701s ***** assert (standardizeMissing (cat (3,1,2,3,4), 3), cat (3,1,2,NaN,4)) 701s ***** assert (standardizeMissing ('foo', 'a'), 'foo') 701s ***** assert (standardizeMissing ('foo', 'f'), ' oo') 701s ***** assert (standardizeMissing ('foo', 'o'), 'f ') 701s ***** assert (standardizeMissing ('foo', 'oo'), 'f ') 701s ***** assert (standardizeMissing ({'foo'}, 'f'), {'foo'}) 701s ***** assert (standardizeMissing ({'foo'}, {'f'}), {'foo'}) 701s ***** assert (standardizeMissing ({'foo'}, 'test'), {'foo'}) 701s ***** assert (standardizeMissing ({'foo'}, {'test'}), {'foo'}) 701s ***** assert (standardizeMissing ({'foo'}, 'foo'), {''}) 701s ***** assert (standardizeMissing ({'foo'}, {'foo'}), {''}) 701s ***** assert (standardizeMissing (['foo';'bar'], 'oar'), ['f ';'b ']) 701s ***** assert (standardizeMissing (['foo';'bar'], ['o';'a';'r']), ['f ';'b ']) 701s ***** assert (standardizeMissing (['foo';'bar'], ['o ';'ar']), ['f ';'b ']) 701s ***** assert (standardizeMissing ({'foo','bar'}, 'foo'), {'','bar'}) 701s ***** assert (standardizeMissing ({'foo','bar'}, 'f'), {'foo','bar'}) 701s ***** assert (standardizeMissing ({'foo','bar'}, {'foo', 'a'}), {'','bar'}) 701s ***** assert (standardizeMissing ({'foo'}, {'f', 'oo'}), {'foo'}) 701s ***** assert (standardizeMissing ({'foo','bar'}, {'foo'}), {'','bar'}) 701s ***** assert (standardizeMissing ({'foo','bar'}, {'foo', 'a'}), {'','bar'}) 701s ***** assert (standardizeMissing (double (1), single (1)), double (NaN)) 701s ***** assert (standardizeMissing (single (1), single (1)), single (NaN)) 701s ***** assert (standardizeMissing (single (1), double (1)), single (NaN)) 701s ***** assert (standardizeMissing (single (1), true), single (NaN)) 701s ***** assert (standardizeMissing (double (1), int32(1)), double (NaN)) 701s ***** assert (standardizeMissing (true, true), true) 701s ***** assert (standardizeMissing (true, 1), true) 701s ***** assert (standardizeMissing (int32 (1), int32 (1)), int32 (1)) 701s ***** assert (standardizeMissing (int32 (1), 1), int32 (1)) 701s ***** assert (standardizeMissing (uint32 (1), uint32 (1)), uint32 (1)) 701s ***** assert (standardizeMissing (uint32 (1), 1), uint32 (1)) 701s ***** error standardizeMissing (); 701s ***** error standardizeMissing (1); 701s ***** error standardizeMissing (1,2,3); 701s ***** error standardizeMissing ({'abc', 1}, 1); 701s ***** error standardizeMissing (struct ('a','b'), 1); 701s ***** error <'indicator' and 'A' must have > standardizeMissing ([1 2 3], {1}); 701s ***** error <'indicator' and 'A' must have > standardizeMissing ([1 2 3], 'a'); 701s ***** error <'indicator' and 'A' must have > standardizeMissing ([1 2 3], struct ('a', 1)); 701s ***** error <'indicator' and 'A' must have > standardizeMissing ('foo', 1); 701s ***** error <'indicator' and 'A' must have > standardizeMissing ('foo', {1}); 701s ***** error <'indicator' and 'A' must have > standardizeMissing ('foo', {'f'}); 701s ***** error <'indicator' and 'A' must have > standardizeMissing ('foo', struct ('a', 1)); 701s ***** error <'indicator' and 'A' must have > standardizeMissing ({'foo'}, 1); 701s ***** error <'indicator' and 'A' must have > standardizeMissing ({'foo'}, 1); 701s 49 tests, 49 passed, 0 known failure, 0 skipped 701s [inst/stepwisefit.m] 701s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/stepwisefit.m 701s ***** test 701s % Sample data from Draper and Smith (n = 13, k = 4) 701s X = [7 1 11 11 7 11 3 1 2 21 1 11 10; ... 701s 26 29 56 31 52 55 71 31 54 47 40 66 68; ... 701s 6 15 8 8 6 9 17 22 18 4 23 9 8; ... 701s 60 52 20 47 33 22 6 44 22 26 34 12 12]'; 701s y = [78.5 74.3 104.3 87.6 95.9 109.2 102.7 72.5 93.1 115.9 83.8 113.3 109.4]'; 701s [X_use, b, bint, r, rint, stats] = stepwisefit(y, X); 701s assert(X_use, [4 1]) 701s assert(b, regress(y, [ones(size(y)) X(:, X_use)], 0.05)) 701s [X_use, b, bint, r, rint, stats] = stepwisefit(y, X, 0.05, 0.1, "corr"); 701s assert(X_use, [4 1]) 701s assert(b, regress(y, [ones(size(y)) X(:, X_use)], 0.05)) 701s [X_use, b, bint, r, rint, stats] = stepwisefit(y, X, [], [], "p"); 701s assert(X_use, [4 1]) 701s assert(b, regress(y, [ones(size(y)) X(:, X_use)], 0.05)) 701s 1 test, 1 passed, 0 known failure, 0 skipped 701s [inst/tabulate.m] 701s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/tabulate.m 701s ***** demo 701s ## Generate a frequency table for a vector of data in a cell array 701s load patients 701s 701s ## Display the first seven entries of the Gender variable 701s gender = Gender(1:7) 701s 701s ## Compute the frequency table that shows the number and 701s ## percentage of Male and Female patients 701s tabulate (Gender) 701s ***** demo 701s ## Create a frequency table for a vector of positive integers 701s load patients 701s 701s ## Display the first seven entries of the Gender variable 701s height = Height(1:7) 701s 701s ## Create a frequency table that shows, in its second and third columns, 701s ## the number and percentage of patients with a particular height. 701s table = tabulate (Height); 701s 701s ## Display the first and last seven entries of the frequency table 701s first = table(1:7,:) 701s 701s last = table(end-6:end,:) 701s ***** demo 701s ## Create a frequency table from a character array 701s load carsmall 701s 701s ## Tabulate the data in the Origin variable, which shows the 701s ## country of origin of each car in the data set 701s tabulate (Origin) 701s ***** demo 701s ## Create a frequency table from a numeric vector with NaN values 701s load carsmall 701s 701s ## The carsmall dataset contains measurements of 100 cars 701s total_cars = length (MPG) 701s ## For six cars, the MPG value is missing 701s missingMPG = length (MPG(isnan (MPG))) 701s 701s ## Create a frequency table using MPG 701s tabulate (MPG) 701s table = tabulate (MPG); 701s 701s ## Only 94 cars were used 701s valid_cars = sum (table(:,2)) 701s ***** test 701s load patients 701s table = tabulate (Gender); 701s assert (table{1,1}, "Male"); 701s assert (table{2,1}, "Female"); 701s assert (table{1,2}, 47); 701s assert (table{2,2}, 53); 701s ***** test 701s load patients 701s table = tabulate (Height); 701s assert (table(end-4,:), [68, 15, 15]); 701s assert (table(end-3,:), [69, 8, 8]); 701s assert (table(end-2,:), [70, 11, 11]); 701s assert (table(end-1,:), [71, 10, 10]); 701s assert (table(end,:), [72, 4, 4]); 701s ***** error tabulate (ones (3)) 701s ***** error tabulate ({1, 2, 3, 4}) 701s ***** error ... 701s tabulate ({"a", "b"; "a", "c"}) 701s 5 tests, 5 passed, 0 known failure, 0 skipped 701s [inst/tiedrank.m] 701s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/tiedrank.m 701s ***** test 701s [r,tieadj] = tiedrank ([10, 20, 30, 40, 20]); 701s assert (r, [1, 2.5, 4, 5, 2.5]); 701s assert (tieadj, 3); 701s ***** test 701s [r,tieadj] = tiedrank ([10; 20; 30; 40; 20]); 701s assert (r, [1; 2.5; 4; 5; 2.5]); 701s assert (tieadj, 3); 701s ***** test 701s [r,tieadj] = tiedrank ([10, 20, 30, 40, 20], 1); 701s assert (r, [1, 2.5, 4, 5, 2.5]); 701s assert (tieadj, [1; 0; 18]); 701s ***** test 701s [r,tieadj] = tiedrank ([10, 20, 30, 40, 20], 0, 1); 701s assert (r, [1, 2.5, 2, 1, 2.5]); 701s assert (tieadj, 3); 701s ***** test 701s [r,tieadj] = tiedrank ([10, 20, 30, 40, 20], 1, 1); 701s assert (r, [1, 2.5, 2, 1, 2.5]); 701s assert (tieadj, [1; 0; 18]); 701s ***** error tiedrank (ones (2)) 701s ***** error ... 701s tiedrank ([1, 2, 3, 4, 5], [1, 1]) 701s ***** error ... 701s tiedrank ([1, 2, 3, 4, 5], "A") 701s ***** error ... 701s tiedrank ([1, 2, 3, 4, 5], [true, true]) 701s ***** error ... 701s tiedrank ([1, 2, 3, 4, 5], 0, [1, 1]) 701s ***** error ... 701s tiedrank ([1, 2, 3, 4, 5], 0, "A") 701s ***** error ... 701s tiedrank ([1, 2, 3, 4, 5], 0, [true, true]) 701s 12 tests, 12 passed, 0 known failure, 0 skipped 701s [inst/trimmean.m] 701s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/trimmean.m 701s ***** test 701s x = reshape (1:40, [5, 4, 2]); 701s x([3, 37]) = -100; 701s assert (trimmean (x, 10, "all"), 19.4722, 1e-4); 701s ***** test 701s x = reshape (1:40, [5, 4, 2]); 701s x([3, 37]) = -100; 701s out = trimmean (x, 10, [1, 2]); 701s assert (out(1,1,1), 10.3889, 1e-4); 701s assert (out(1,1,2), 29.6111, 1e-4); 701s ***** test 701s x = reshape (1:40, [5, 4, 2]); 701s x([3, 37]) = -100; 701s x([4, 38]) = NaN; 701s assert (trimmean (x, 10, "all"), 19.3824, 1e-4); 701s ***** test 701s x = reshape (1:40, [5, 4, 2]); 701s x([3, 37]) = -100; 701s out = trimmean (x, 10, 1); 701s assert (out(:,:,1), [-17.6, 8, 13, 18]); 701s assert (out(:,:,2), [23, 28, 33, 10.6]); 701s ***** test 701s x = reshape (1:40, [5, 4, 2]); 701s x([3, 37]) = -100; 701s x([4, 38]) = NaN; 701s out = trimmean (x, 10, 1); 701s assert (out(:,:,1), [-23, 8, 13, 18]); 701s assert (out(:,:,2), [23, 28, 33, 3.75]); 701s ***** test 701s x = reshape (1:40, [5, 4, 2]); 701s x([3, 37]) = -100; 701s out = trimmean (x, 10, 2); 701s assert (out(:,:,1), [8.5; 9.5; -15.25; 11.5; 12.5]); 701s assert (out(:,:,2), [28.5; -4.75; 30.5; 31.5; 32.5]); 701s ***** test 701s x = reshape (1:40, [5, 4, 2]); 701s x([3, 37]) = -100; 701s x([4, 38]) = NaN; 701s out = trimmean (x, 10, 2); 701s assert (out(:,:,1), [8.5; 9.5; -15.25; 14; 12.5]); 701s assert (out(:,:,2), [28.5; -4.75; 28; 31.5; 32.5]); 701s ***** test 701s x = reshape (1:40, [5, 4, 2]); 701s x([3, 37]) = -100; 701s out = trimmean (x, 10, [1, 2, 3]); 701s assert (out, trimmean (x, 10, "all")); 701s ***** test 701s x = reshape (1:40, [5, 4, 2]); 701s x([3, 37]) = -100; 701s x([4, 38]) = NaN; 701s out = trimmean (x, 10, [1, 2]); 701s assert (out(1,1,1), 10.7647, 1e-4); 701s assert (out(1,1,2), 29.1176, 1e-4); 701s ***** test 701s x = reshape (1:40, [5, 4, 2]); 701s x([3, 37]) = -100; 701s x([4, 38]) = NaN; 701s out = trimmean (x, 10, [1, 3]); 701s assert (out, [2.5556, 18, 23, 11.6667], 1e-4); 701s ***** test 701s x = reshape (1:40, [5, 4, 2]); 701s x([3, 37]) = -100; 701s x([4, 38]) = NaN; 701s out = trimmean (x, 10, [2, 3]); 701s assert (out, [18.5; 2.3750; 3.2857; 24; 22.5], 1e-4); 701s ***** test 701s x = reshape (1:40, [5, 4, 2]); 701s x([3, 37]) = -100; 701s x([4, 38]) = NaN; 701s out = trimmean (x, 10, [1, 2, 3]); 701s assert (out, trimmean (x, 10, "all")); 701s ***** test 701s x = reshape (1:40, [5, 4, 2]); 701s x([3, 37]) = -100; 701s x([4, 38]) = NaN; 701s out = trimmean (x, 10, [2, 3, 5]); 701s assert (out, [18.5; 2.3750; 3.2857; 24; 22.5], 1e-4); 701s ***** assert (trimmean (reshape (1:40, [5, 4, 2]), 10, 4), reshape(1:40, [5, 4, 2])) 701s ***** assert (trimmean ([], 10), NaN) 701s ***** assert (trimmean ([1;2;3;4;5], 10, 2), [1;2;3;4;5]) 701s ***** error trimmean (1) 701s ***** error trimmean (1,2,3,4,5) 701s ***** error trimmean ([1 2 3 4], -10) 701s ***** error trimmean ([1 2 3 4], 100) 701s ***** error trimmean ([1 2 3 4], 10, "flag") 701s ***** error trimmean ([1 2 3 4], 10, "flag", 1) 701s ***** error ... 701s trimmean ([1 2 3 4], 10, -1) 701s ***** error ... 701s trimmean ([1 2 3 4], 10, "floor", -1) 701s ***** error ... 701s trimmean (reshape (1:40, [5, 4, 2]), 10, [-1, 2]) 701s ***** error ... 701s trimmean (reshape (1:40, [5, 4, 2]), 10, [1, 2, 2]) 701s 26 tests, 26 passed, 0 known failure, 0 skipped 701s [inst/ttest.m] 701s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/ttest.m 701s ***** test 701s x = 8:0.1:12; 701s [h, pval, ci] = ttest (x, 10); 701s assert (h, 0) 701s assert (pval, 1, 10*eps) 701s assert (ci, [9.6219 10.3781], 1E-5) 701s [h, pval, ci0] = ttest (x, 0); 701s assert (h, 1) 701s assert (pval, 0) 701s assert (ci0, ci, 2e-15) 701s [h, pval, ci] = ttest (x, 10, "tail", "right", "dim", 2, "alpha", 0.05); 701s assert (h, 0) 701s assert (pval, 0.5, 10*eps) 701s assert (ci, [9.68498 Inf], 1E-5) 702s ***** error ttest ([8:0.1:12], 10, "tail", "invalid"); 702s ***** error ttest ([8:0.1:12], 10, "tail", 25); 702s 3 tests, 3 passed, 0 known failure, 0 skipped 702s [inst/ttest2.m] 702s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/ttest2.m 702s ***** test 702s a = 1:5; 702s b = 6:10; 702s b(5) = NaN; 702s [h,p,ci,stats] = ttest2 (a,b); 702s assert (h, 1); 702s assert (p, 0.002535996080258229, 1e-14); 702s assert (ci, [-6.822014919225481, -2.17798508077452], 1e-14); 702s assert (stats.tstat, -4.582575694955839, 1e-14); 702s assert (stats.df, 7); 702s assert (stats.sd, 1.4638501094228, 1e-13); 702s ***** error ttest2 ([8:0.1:12], [8:0.1:12], "tail", "invalid"); 702s ***** error ttest2 ([8:0.1:12], [8:0.1:12], "tail", 25); 702s 3 tests, 3 passed, 0 known failure, 0 skipped 702s [inst/vartest.m] 702s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/vartest.m 702s ***** error vartest (); 702s ***** error vartest ([1, 2, 3, 4], -0.5); 702s ***** error ... 702s vartest ([1, 2, 3, 4], 1, "alpha", 0); 702s ***** error ... 702s vartest ([1, 2, 3, 4], 1, "alpha", 1.2); 702s ***** error ... 702s vartest ([1, 2, 3, 4], 1, "alpha", "val"); 702s ***** error ... 702s vartest ([1, 2, 3, 4], 1, "tail", "val"); 702s ***** error ... 702s vartest ([1, 2, 3, 4], 1, "alpha", 0.01, "tail", "val"); 702s ***** error ... 702s vartest ([1, 2, 3, 4], 1, "dim", 3); 702s ***** error ... 702s vartest ([1, 2, 3, 4], 1, "alpha", 0.01, "tail", "both", "dim", 3); 702s ***** error ... 702s vartest ([1, 2, 3, 4], 1, "alpha", 0.01, "tail", "both", "badoption", 3); 702s ***** error ... 702s vartest ([1, 2, 3, 4], 1, "alpha", 0.01, "tail"); 702s ***** test 702s load carsmall 702s [h, pval, ci] = vartest (MPG, 7^2); 702s assert (h, 1); 702s assert (pval, 0.04335086742174443, 1e-14); 702s assert (ci, [49.397; 88.039], 1e-3); 702s ***** test 702s load carsmall 702s [h, pval, ci] = vartest (MPG, 7^2, "tail", "left"); 702s assert (h, 0); 702s assert (pval, 0.978324566289128, 1e-14); 702s assert (ci, [0; 83.685], 1e-3); 702s ***** test 702s load carsmall 702s [h, pval, ci] = vartest (MPG, 7^2, "tail", "right"); 702s assert (h, 1); 702s assert (pval, 0.021675433710872, 1e-14); 702s assert (ci, [51.543; Inf], 1e-3); 702s 14 tests, 14 passed, 0 known failure, 0 skipped 702s [inst/vartest2.m] 702s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/vartest2.m 702s ***** error vartest2 (); 702s ***** error vartest2 (ones (20,1)); 702s ***** error ... 702s vartest2 (rand (20,1), 5); 702s ***** error ... 702s vartest2 (rand (20,1), rand (25,1)*2, "alpha", 0); 702s ***** error ... 702s vartest2 (rand (20,1), rand (25,1)*2, "alpha", 1.2); 702s ***** error ... 702s vartest2 (rand (20,1), rand (25,1)*2, "alpha", "some"); 702s ***** error ... 702s vartest2 (rand (20,1), rand (25,1)*2, "alpha", [0.05, 0.001]); 702s ***** error ... 702s vartest2 (rand (20,1), rand (25,1)*2, "tail", [0.05, 0.001]); 702s ***** error ... 702s vartest2 (rand (20,1), rand (25,1)*2, "tail", "some"); 702s ***** error ... 702s vartest2 (rand (20,1), rand (25,1)*2, "dim", 3); 702s ***** error ... 702s vartest2 (rand (20,1), rand (25,1)*2, "alpha", 0.001, "dim", 3); 702s ***** error ... 702s vartest2 (rand (20,1), rand (25,1)*2, "some", 3); 702s ***** error ... 702s vartest2 (rand (20,1), rand (25,1)*2, "some"); 702s ***** test 702s load carsmall 702s [h, pval, ci, stat] = vartest2 (MPG(Model_Year==82), MPG(Model_Year==76)); 702s assert (h, 0); 702s assert (pval, 0.6288022362718455, 1e-13); 702s assert (ci, [0.4139; 1.7193], 1e-4); 702s assert (stat.fstat, 0.8384, 1e-4); 702s assert (stat.df1, 30); 702s assert (stat.df2, 33); 702s ***** test 702s load carsmall 702s [h, pval, ci, stat] = vartest2 (MPG(Model_Year==82), MPG(Model_Year==76), ... 702s "tail", "left"); 702s assert (h, 0); 702s assert (pval, 0.314401118135922, 1e-13); 702s assert (ci, [0; 1.5287], 1e-4); 702s assert (stat.fstat, 0.8384, 1e-4); 702s assert (stat.df1, 30); 702s assert (stat.df2, 33); 702s ***** test 702s load carsmall 702s [h, pval, ci, stat] = vartest2 (MPG(Model_Year==82), MPG(Model_Year==76), ... 702s "tail", "right"); 702s assert (h, 0); 702s assert (pval, 0.685598881864077, 1e-13); 702s assert (ci, [0.4643; Inf], 1e-4); 702s assert (stat.fstat, 0.8384, 1e-4); 702s assert (stat.df1, 30); 702s assert (stat.df2, 33); 702s 16 tests, 16 passed, 0 known failure, 0 skipped 702s [inst/vartestn.m] 702s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/vartestn.m 702s ***** demo 702s ## Test the null hypothesis that the variances are equal across the five 702s ## columns of data in the students’ exam grades matrix, grades. 702s 702s load examgrades 702s vartestn (grades) 702s ***** demo 702s ## Test the null hypothesis that the variances in miles per gallon (MPG) are 702s ## equal across different model years. 702s 702s load carsmall 702s vartestn (MPG, Model_Year) 702s ***** demo 702s ## Use Levene’s test to test the null hypothesis that the variances in miles 702s ## per gallon (MPG) are equal across different model years. 702s 702s load carsmall 702s p = vartestn (MPG, Model_Year, "TestType", "LeveneAbsolute") 702s ***** demo 702s ## Test the null hypothesis that the variances are equal across the five 702s ## columns of data in the students’ exam grades matrix, grades, using the 702s ## Brown-Forsythe test. Suppress the display of the summary table of 702s ## statistics and the box plot. 702s 702s load examgrades 702s [p, stats] = vartestn (grades, "TestType", "BrownForsythe", "Display", "off") 702s ***** error vartestn (); 702s ***** error vartestn (1); 702s ***** error ... 702s vartestn ([1, 2, 3, 4, 5, 6, 7]); 702s ***** error ... 702s vartestn ([1, 2, 3, 4, 5, 6, 7], []); 702s ***** error ... 702s vartestn ([1, 2, 3, 4, 5, 6, 7], "TestType", "LeveneAbsolute"); 702s ***** error ... 702s vartestn ([1, 2, 3, 4, 5, 6, 7], [], "TestType", "LeveneAbsolute"); 702s ***** error ... 702s vartestn ([1, 2, 3, 4, 5, 6, 7], [1, 1, 1, 2, 2, 2, 2], "Display", "some"); 702s ***** error ... 702s vartestn (ones (50,3), "Display", "some"); 702s ***** error ... 702s vartestn (ones (50,3), "Display", "off", "testtype", "some"); 702s ***** error ... 702s vartestn (ones (50,3), [], "som"); 702s ***** error ... 702s vartestn (ones (50,3), [], "some", "some"); 702s ***** error ... 702s vartestn (ones (50,3), [1, 2], "Display", "off"); 702s ***** test 702s load examgrades 702s [p, stat] = vartestn (grades, "Display", "off"); 702s assert (p, 7.908647337018238e-08, 1e-14); 702s assert (stat.chisqstat, 38.7332, 1e-4); 702s assert (stat.df, 4); 702s ***** test 702s load examgrades 702s [p, stat] = vartestn (grades, "Display", "off", "TestType", "LeveneAbsolute"); 702s assert (p, 9.523239714592791e-07, 1e-14); 702s assert (stat.fstat, 8.5953, 1e-4); 702s assert (stat.df, [4, 595]); 702s ***** test 702s load examgrades 702s [p, stat] = vartestn (grades, "Display", "off", "TestType", "LeveneQuadratic"); 702s assert (p, 7.219514351897161e-07, 1e-14); 702s assert (stat.fstat, 8.7503, 1e-4); 702s assert (stat.df, [4, 595]); 702s ***** test 702s load examgrades 702s [p, stat] = vartestn (grades, "Display", "off", "TestType", "BrownForsythe"); 702s assert (p, 1.312093241723211e-06, 1e-14); 702s assert (stat.fstat, 8.4160, 1e-4); 702s assert (stat.df, [4, 595]); 702s ***** test 702s load examgrades 702s [p, stat] = vartestn (grades, "Display", "off", "TestType", "OBrien"); 702s assert (p, 8.235660885480556e-07, 1e-14); 702s assert (stat.fstat, 8.6766, 1e-4); 702s assert (stat.df, [4, 595]); 702s 17 tests, 17 passed, 0 known failure, 0 skipped 702s [inst/violin.m] 702s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/violin.m 702s ***** demo 702s clf 702s x = zeros (9e2, 10); 702s for i=1:10 702s x(:,i) = (0.1 * randn (3e2, 3) * (randn (3,1) + 1) + 2 * randn (1,3))(:); 702s endfor 702s h = violin (x, "color", "c"); 702s axis tight 702s set (h.violin, "linewidth", 2); 702s set (gca, "xgrid", "on"); 702s xlabel ("Variables") 702s ylabel ("Values") 702s ***** demo 702s clf 702s data = {randn(100,1)*5+140, randn(130,1)*8+135}; 702s subplot (1,2,1) 702s title ("Grade 3 heights - vertical"); 702s set (gca, "xtick", 1:2, "xticklabel", {"girls"; "boys"}); 702s violin (data, "Nbins", 10); 702s axis tight 702s 702s subplot(1,2,2) 702s title ("Grade 3 heights - horizontal"); 702s set (gca, "ytick", 1:2, "yticklabel", {"girls"; "boys"}); 702s violin (data, "horizontal", "Nbins", 10); 702s axis tight 702s ***** demo 702s clf 702s data = exprnd (0.1, 500,4); 702s violin (data, "nbins", {5,10,50,100}); 702s axis ([0 5 0 max(data(:))]) 702s ***** demo 702s clf 702s data = exprnd (0.1, 500,4); 702s violin (data, "color", jet(4)); 702s axis ([0 5 0 max(data(:))]) 702s ***** demo 702s clf 702s data = repmat(exprnd (0.1, 500,1), 1, 4); 702s violin (data, "width", linspace (0.1,0.5,4)); 702s axis ([0 5 0 max(data(:))]) 702s ***** demo 702s clf 702s data = repmat(exprnd (0.1, 500,1), 1, 4); 702s violin (data, "nbins", [5,10,50,100], "smoothfactor", [4 4 8 10]); 702s axis ([0 5 0 max(data(:))]) 702s ***** test 702s hf = figure ("visible", "off"); 702s unwind_protect 702s data = exprnd (0.1, 500,4); 702s violin (data, "color", jet(4)); 702s axis ([0 5 0 max(data(:))]) 702s unwind_protect_cleanup 702s close (hf); 702s end_unwind_protect 703s ***** test 703s hf = figure ("visible", "off"); 703s unwind_protect 703s data = {randn(100,1)*5+140, randn(130,1)*8+135}; 703s subplot (1,2,1) 703s title ("Grade 3 heights - vertical"); 703s set (gca, "xtick", 1:2, "xticklabel", {"girls"; "boys"}); 703s violin (data, "Nbins", 10); 703s axis tight 703s unwind_protect_cleanup 703s close (hf); 703s end_unwind_protect 703s ***** test 703s hf = figure ("visible", "off"); 703s unwind_protect 703s data = {randn(100,1)*5+140, randn(130,1)*8+135}; 703s subplot (1,2,1) 703s title ("Grade 3 heights - vertical"); 703s set (gca, "xtick", 1:2, "xticklabel", {"girls"; "boys"}); 703s violin (data, "Nbins", 10); 703s axis tight 703s subplot(1,2,2) 703s title ("Grade 3 heights - horizontal"); 703s set (gca, "ytick", 1:2, "yticklabel", {"girls"; "boys"}); 703s violin (data, "horizontal", "Nbins", 10); 703s axis tight 703s unwind_protect_cleanup 703s close (hf); 703s end_unwind_protect 704s ***** test 704s hf = figure ("visible", "off"); 704s unwind_protect 704s data = repmat(exprnd (0.1, 500,1), 1, 4); 704s violin (data, "nbins", [5,10,50,100], "smoothfactor", [4 4 8 10]); 704s axis ([0 5 0 max(data(:))]) 704s unwind_protect_cleanup 704s close (hf); 704s end_unwind_protect 705s ***** test 705s hf = figure ("visible", "off"); 705s unwind_protect 705s data = repmat(exprnd (0.1, 500,1), 1, 4); 705s violin (data, "width", linspace (0.1,0.5,4)); 705s axis ([0 5 0 max(data(:))]) 705s unwind_protect_cleanup 705s close (hf); 705s end_unwind_protect 706s 5 tests, 5 passed, 0 known failure, 0 skipped 706s [inst/wblplot.m] 706s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/wblplot.m 706s ***** demo 706s x = [16 34 53 75 93 120]; 706s wblplot (x); 706s ***** demo 706s x = [2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67]'; 706s c = [0 1 0 1 0 1 1 1 0 0 1 0 1 0 1 1 0 1 1]'; 706s [h, p] = wblplot (x, c); 706s p 706s ***** demo 706s x = [16, 34, 53, 75, 93, 120, 150, 191, 240 ,339]; 706s [h, p] = wblplot (x, [], [], 0.05); 706s p 706s ## Benchmark Reliasoft eta = 146.2545 beta 1.1973 rho = 0.9999 706s ***** demo 706s x = [46 64 83 105 123 150 150]; 706s c = [0 0 0 0 0 0 1]; 706s f = [1 1 1 1 1 1 4]; 706s wblplot (x, c, f, 0.05); 706s ***** demo 706s x = [46 64 83 105 123 150 150]; 706s c = [0 0 0 0 0 0 1]; 706s f = [1 1 1 1 1 1 4]; 706s ## Subtract 30.92 from x to simulate a 3 parameter wbl with gamma = 30.92 706s wblplot (x - 30.92, c, f, 0.05); 706s ***** test 706s hf = figure ("visible", "off"); 706s unwind_protect 706s x = [16, 34, 53, 75, 93, 120, 150, 191, 240 ,339]; 706s [h, p] = wblplot (x, [], [], 0.05); 706s assert (numel (h), 4) 706s assert (p(1), 146.2545, 1E-4) 706s assert (p(2), 1.1973, 1E-4) 706s assert (p(3), 0.9999, 5E-5) 706s unwind_protect_cleanup 706s close (hf); 706s end_unwind_protect 707s 1 test, 1 passed, 0 known failure, 0 skipped 707s [inst/x2fx.m] 707s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/x2fx.m 707s ***** test 707s X = [1, 10; 2, 20; 3, 10; 4, 20; 5, 15; 6, 15]; 707s D = x2fx(X,'quadratic'); 707s assert (D(1,:), [1, 1, 10, 10, 1, 100]); 707s assert (D(2,:), [1, 2, 20, 40, 4, 400]); 707s ***** test 707s X = [1, 10; 2, 20; 3, 10; 4, 20; 5, 15; 6, 15]; 707s model = [0, 0; 1, 0; 0, 1; 1, 1; 2, 0]; 707s D = x2fx(X,model); 707s assert (D(1,:), [1, 1, 10, 10, 1]); 707s assert (D(2,:), [1, 2, 20, 40, 4]); 707s assert (D(4,:), [1, 4, 20, 80, 16]); 707s ***** test 707s x = [1, 2, 3; 2, 3, 4; 3, 4, 5]; 707s D = x2fx (x, 'linear'); 707s assert (D, [1, 1, 2, 3; 1, 2, 3, 4;, 1, 3, 4, 5]); 707s D = x2fx (x, 'interaction'); 707s assert (D(1,:), [1, 1, 2, 3, 2, 3, 6]); 707s assert (D(2,:), [1, 2, 3, 4, 6, 8, 12]); 707s assert (D(3,:), [1, 3, 4, 5, 12, 15, 20]); 707s D = x2fx (x, 'quadratic'); 707s assert (D(1,:), [1, 1, 2, 3, 2, 3, 6, 1, 4, 9]); 707s assert (D(2,:), [1, 2, 3, 4, 6, 8, 12, 4, 9, 16]); 707s assert (D(3,:), [1, 3, 4, 5, 12, 15, 20, 9, 16, 25]); 707s D = x2fx (x, 'purequadratic'); 707s assert (D(1,:), [1, 1, 2, 3, 1, 4, 9]); 707s assert (D(2,:), [1, 2, 3, 4, 4, 9, 16]); 707s assert (D(3,:), [1, 3, 4, 5, 9, 16, 25]); 707s ***** test 707s x = [1, 2, 3; 2, 3, 4; 3, 4, 5]; 707s D = x2fx (x, [0, 0, 1; 1, 0, 2]); 707s assert (D, [3, 9; 4, 32; 5, 75]); 707s ***** test 707s x = [1, 2, 3; 2, 3, 4; 3, 4, 5]; 707s D = x2fx (x, 'linear', [1, 3]); 707s assert (D, [1, 1, 0, 2, 1, 0; 1, 0, 1, 3, 0, 1; 1, 0, 0, 4, 0, 0]); 707s ***** test 707s x = [1, 2, 3; 2, 3, 4; 3, 4, 5]; 707s D = x2fx (x, 'quadratic', [1, 3]); 707s assert (D(1,:), [1, 1, 0, 2, 1, 0, 2, 0, 1, 0, 0, 0, 2, 0, 4]); 707s assert (D(2,:), [1, 0, 1, 3, 0, 1, 0, 3, 0, 0, 0, 1, 0, 3, 9]); 707s assert (D(3,:), [1, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16]); 707s ***** test 707s x = [1, 2, 3; 2, 3, 4; 3, 4, 5]; 707s D = x2fx (x, 'cos'); 707s assert (D(1,:), [0.5403, -0.4161, -0.9900], 1e-4); 707s assert (D(2,:), [-0.4161, -0.9900, -0.6536], 1e-4); 707s assert (D(3,:), [-0.9900, -0.6536, 0.2837], 1e-4); 707s ***** error ... 707s x2fx ([1, 2, 3; 2, 3, 4], 'quadratic', [1, 4]) 707s ***** error ... 707s D = x2fx ([1, 2, 3; 2, 3, 4; 3, 4, 5], 'cosine') 707s ***** error ... 707s x2fx ([1, 10; 2, 20; 3, 10], [0; 1]); 707s ***** error ... 707s x2fx ([1, 10, 15; 2, 20, 40; 3, 10, 25], [0, 0; 1, 0; 0, 1; 1, 1; 2, 0]); 707s 11 tests, 11 passed, 0 known failure, 0 skipped 707s [inst/ztest.m] 707s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/ztest.m 707s ***** error ztest (); 707s ***** error ... 707s ztest ([1, 2, 3, 4], 2, -0.5); 707s ***** error ... 707s ztest ([1, 2, 3, 4], 1, 2, "alpha", 0); 707s ***** error ... 707s ztest ([1, 2, 3, 4], 1, 2, "alpha", 1.2); 707s ***** error ... 707s ztest ([1, 2, 3, 4], 1, 2, "alpha", "val"); 707s ***** error ... 707s ztest ([1, 2, 3, 4], 1, 2, "tail", "val"); 707s ***** error ... 707s ztest ([1, 2, 3, 4], 1, 2, "alpha", 0.01, "tail", "val"); 707s ***** error ... 707s ztest ([1, 2, 3, 4], 1, 2, "dim", 3); 707s ***** error ... 707s ztest ([1, 2, 3, 4], 1, 2, "alpha", 0.01, "tail", "both", "dim", 3); 707s ***** error ... 707s ztest ([1, 2, 3, 4], 1, 2, "alpha", 0.01, "tail", "both", "badoption", 3); 707s ***** test 707s load carsmall 707s [h, pval, ci] = ztest (MPG, mean (MPG, "omitnan"), std (MPG, "omitnan")); 707s assert (h, 0); 707s assert (pval, 1, 1e-14); 707s assert (ci, [22.094; 25.343], 1e-3); 707s ***** test 707s load carsmall 707s [h, pval, ci] = ztest (MPG, 26, 8); 707s assert (h, 1); 707s assert (pval, 0.00568359158544743, 1e-14); 707s assert (ci, [22.101; 25.335], 1e-3); 707s ***** test 707s load carsmall 707s [h, pval, ci] = ztest (MPG, 26, 4); 707s assert (h, 1); 707s assert (pval, 3.184168011941316e-08, 1e-14); 707s assert (ci, [22.909; 24.527], 1e-3); 707s ***** test 707s x = normrnd (10, 2, 100, 1); 707s [h, pval, ci] = ztest (x, 10, 2, "tail", "right"); 707s assert (isnan (pval), false); 707s assert (pval >= 0 && pval <= 1, true); 707s ***** test 707s x = normrnd (10, 2, 100, 1); 707s [h, pval, ci] = ztest (x, 10, 2, "tail", "left"); 707s assert (isnan (pval), false); 707s assert (pval >= 0 && pval <= 1, true); 707s ***** test 707s load fisheriris; 707s x = meas(:,1); 707s m = 5.8; 707s sigma = 0.8; 707s [h, pval, ci] = ztest (x, m, sigma, "tail", "right"); 707s assert (h, 0) 707s assert (pval, 0.2535, 1e-4) 707s assert (ci, [5.7359; Inf], 1e-5) 707s ***** test 707s load fisheriris; 707s x = meas(:,1); 707s m = 5.8; 707s sigma = 0.8; 707s [h, pval, ci] = ztest (x, m, sigma, "tail", "left"); 707s assert (h, 0) 707s assert (pval, 0.7465, 1e-4) 707s assert (ci, [-Inf; 5.9508], 1e-4) 707s 17 tests, 17 passed, 0 known failure, 0 skipped 707s [inst/ztest2.m] 707s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/ztest2.m 707s ***** error ztest2 (); 707s ***** error ztest2 (1); 707s ***** error ztest2 (1, 2); 707s ***** error ztest2 (1, 2, 3); 707s ***** error ztest2 (1, 2, 3, 2); 707s ***** error ... 707s ztest2 (1, 2, 3, 4, "alpha") 707s ***** error ... 707s ztest2 (1, 2, 3, 4, "alpha", 0); 707s ***** error ... 707s ztest2 (1, 2, 3, 4, "alpha", 1.2); 707s ***** error ... 707s ztest2 (1, 2, 3, 4, "alpha", "val"); 707s ***** error ... 707s ztest2 (1, 2, 3, 4, "tail", "val"); 707s ***** error ... 707s ztest2 (1, 2, 3, 4, "alpha", 0.01, "tail", "val"); 707s ***** error ... 707s ztest2 (1, 2, 3, 4, "alpha", 0.01, "tail", "both", "badoption", 3); 707s 12 tests, 12 passed, 0 known failure, 0 skipped 707s [inst/fitcknn.m] 707s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/inst/fitcknn.m 707s ***** demo 707s ## Train a k-nearest neighbor classifier for k = 10 707s ## and plot the decision boundaries. 707s 707s load fisheriris 707s idx = ! strcmp (species, "setosa"); 707s X = meas(idx,3:4); 707s Y = cast (strcmpi (species(idx), "virginica"), "double"); 707s obj = fitcknn (X, Y, "Standardize", 1, "NumNeighbors", 10, "NSMethod", "exhaustive") 707s x1 = [min(X(:,1)):0.03:max(X(:,1))]; 707s x2 = [min(X(:,2)):0.02:max(X(:,2))]; 707s [x1G, x2G] = meshgrid (x1, x2); 707s XGrid = [x1G(:), x2G(:)]; 707s pred = predict (obj, XGrid); 707s gidx = logical (pred); 707s 707s figure 707s scatter (XGrid(gidx,1), XGrid(gidx,2), "markerfacecolor", "magenta"); 707s hold on 707s scatter (XGrid(!gidx,1), XGrid(!gidx,2), "markerfacecolor", "red"); 707s plot (X(Y == 0, 1), X(Y == 0, 2), "ko", X(Y == 1, 1), X(Y == 1, 2), "kx"); 707s xlabel ("Petal length (cm)"); 707s ylabel ("Petal width (cm)"); 707s title ("5-Nearest Neighbor Classifier Decision Boundary"); 707s legend ({"Versicolor Region", "Virginica Region", ... 707s "Sampled Versicolor", "Sampled Virginica"}, ... 707s "location", "northwest") 707s axis tight 707s hold off 707s ***** test 707s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 707s y = ["a"; "a"; "b"; "b"]; 707s a = fitcknn (x, y); 707s assert (class (a), "ClassificationKNN"); 707s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 1}) 707s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 707s assert ({a.BucketSize}, {50}) 707s ***** test 707s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 707s y = ["a"; "a"; "b"; "b"]; 707s a = fitcknn (x, y, "NSMethod", "exhaustive"); 707s assert (class (a), "ClassificationKNN"); 707s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 1}) 707s assert ({a.NSMethod, a.Distance}, {"exhaustive", "euclidean"}) 707s assert ({a.BucketSize}, {50}) 707s ***** test 707s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 707s y = ["a"; "a"; "b"; "b"]; 707s k = 10; 707s a = fitcknn (x, y, "NumNeighbors" ,k); 707s assert (class (a), "ClassificationKNN"); 707s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 10}) 707s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 707s assert ({a.BucketSize}, {50}) 707s ***** test 707s x = ones (4, 11); 707s y = ["a"; "a"; "b"; "b"]; 707s k = 10; 707s a = fitcknn (x, y, "NumNeighbors" ,k); 707s assert (class (a), "ClassificationKNN"); 707s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 10}) 707s assert ({a.NSMethod, a.Distance}, {"exhaustive", "euclidean"}) 707s assert ({a.BucketSize}, {50}) 707s ***** test 707s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 707s y = ["a"; "a"; "b"; "b"]; 707s k = 10; 707s a = fitcknn (x, y, "NumNeighbors" ,k, "NSMethod", "exhaustive"); 707s assert (class (a), "ClassificationKNN"); 707s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 10}) 707s assert ({a.NSMethod, a.Distance}, {"exhaustive", "euclidean"}) 707s assert ({a.BucketSize}, {50}) 707s ***** test 707s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 707s y = ["a"; "a"; "b"; "b"]; 707s k = 10; 707s a = fitcknn (x, y, "NumNeighbors" ,k, "Distance", "hamming"); 707s assert (class (a), "ClassificationKNN"); 707s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 10}) 707s assert ({a.NSMethod, a.Distance}, {"exhaustive", "hamming"}) 707s assert ({a.BucketSize}, {50}) 707s ***** test 707s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 707s y = ["a"; "a"; "b"; "b"]; 707s weights = ones (4,1); 707s a = fitcknn (x, y, "Standardize", 1); 707s assert (class (a), "ClassificationKNN"); 707s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 1}) 707s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 707s assert ({a.Standardize}, {true}) 707s assert ({a.Sigma}, {std(x, [], 1)}) 707s assert ({a.Mu}, {[3.75, 4.25, 4.75]}) 707s ***** test 707s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 707s y = ["a"; "a"; "b"; "b"]; 707s weights = ones (4,1); 707s a = fitcknn (x, y, "Standardize", false); 707s assert (class (a), "ClassificationKNN"); 707s assert ({a.X, a.Y, a.NumNeighbors}, {x, y, 1}) 707s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 707s assert ({a.Standardize}, {false}) 707s assert ({a.Sigma}, {[]}) 707s assert ({a.Mu}, {[]}) 707s ***** test 707s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 707s y = ["a"; "a"; "b"; "b"]; 707s s = ones (1, 3); 707s a = fitcknn (x, y, "Scale" , s, "Distance", "seuclidean"); 707s assert (class (a), "ClassificationKNN"); 707s assert ({a.DistParameter}, {s}) 707s assert ({a.NSMethod, a.Distance}, {"exhaustive", "seuclidean"}) 707s assert ({a.BucketSize}, {50}) 707s ***** test 707s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 707s y = ["a"; "a"; "b"; "b"]; 707s a = fitcknn (x, y, "Exponent" , 5, "Distance", "minkowski"); 707s assert (class (a), "ClassificationKNN"); 707s assert (a.DistParameter, 5) 707s assert ({a.NSMethod, a.Distance}, {"kdtree", "minkowski"}) 707s ***** test 707s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 707s y = ["a"; "a"; "b"; "b"]; 707s a = fitcknn (x, y, "Exponent" , 5, "Distance", "minkowski", ... 707s "NSMethod", "exhaustive"); 707s assert (class (a), "ClassificationKNN"); 707s assert (a.DistParameter, 5) 707s assert ({a.NSMethod, a.Distance}, {"exhaustive", "minkowski"}) 707s ***** test 707s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 707s y = ["a"; "a"; "b"; "b"]; 707s a = fitcknn (x, y, "BucketSize" , 20, "distance", "mahalanobis"); 707s assert (class (a), "ClassificationKNN"); 707s assert ({a.NSMethod, a.Distance}, {"exhaustive", "mahalanobis"}) 707s assert ({a.BucketSize}, {20}) 707s ***** test 707s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 707s y = ["a"; "a"; "b"; "b"]; 707s a = fitcknn (x, y, "IncludeTies", true); 707s assert (class (a), "ClassificationKNN"); 707s assert (a.IncludeTies, true); 707s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 707s ***** test 707s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 707s y = ["a"; "a"; "b"; "b"]; 707s a = fitcknn (x, y); 707s assert (class (a), "ClassificationKNN"); 707s assert (a.IncludeTies, false); 707s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 707s ***** test 707s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 707s y = ["a"; "a"; "b"; "b"]; 707s a = fitcknn (x, y); 707s assert (class (a), "ClassificationKNN") 707s assert (a.Prior, [0.5; 0.5]) 707s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 707s assert ({a.BucketSize}, {50}) 708s ***** test 708s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 708s y = ["a"; "a"; "b"; "b"]; 708s prior = [0.5; 0.5]; 708s a = fitcknn (x, y, "Prior", "empirical"); 708s assert (class (a), "ClassificationKNN") 708s assert (a.Prior, prior) 708s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 708s assert ({a.BucketSize}, {50}) 708s ***** test 708s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 708s y = ["a"; "a"; "a"; "b"]; 708s prior = [0.75; 0.25]; 708s a = fitcknn (x, y, "Prior", "empirical"); 708s assert (class (a), "ClassificationKNN") 708s assert (a.Prior, prior) 708s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 708s assert ({a.BucketSize}, {50}) 708s ***** test 708s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 708s y = ["a"; "a"; "a"; "b"]; 708s prior = [0.5; 0.5]; 708s a = fitcknn (x, y, "Prior", "uniform"); 708s assert (class (a), "ClassificationKNN") 708s assert (a.Prior, prior) 708s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 708s assert ({a.BucketSize}, {50}) 708s ***** test 708s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 708s y = ["a"; "a"; "b"; "b"]; 708s cost = eye (2); 708s a = fitcknn (x, y, "Cost", cost); 708s assert (class (a), "ClassificationKNN") 708s assert (a.Cost, [1, 0; 0, 1]) 708s assert ({a.NSMethod, a.Distance}, {"kdtree", "euclidean"}) 708s assert ({a.BucketSize}, {50}) 708s ***** test 708s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 708s y = ["a"; "a"; "b"; "b"]; 708s cost = eye (2); 708s a = fitcknn (x, y, "Cost", cost, "Distance", "hamming" ); 708s assert (class (a), "ClassificationKNN") 708s assert (a.Cost, [1, 0; 0, 1]) 708s assert ({a.NSMethod, a.Distance}, {"exhaustive", "hamming"}) 708s assert ({a.BucketSize}, {50}) 708s ***** test 708s x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1]; 708s y = ["a"; "a"; "b"; "b"]; 708s rand ("seed", 23); 708s a = fitcknn (x, y, "NSMethod", "exhaustive", "CrossVal", "on"); 708s assert (class (a), "ClassificationPartitionedModel"); 708s assert ({a.X, a.Y, a.Trained{1}.NumNeighbors}, {x, y, 1}) 708s assert (a.ModelParameters.NSMethod, "exhaustive") 708s assert (a.ModelParameters.Distance, "euclidean") 708s assert ({a.Trained{1}.BucketSize}, {50}) 708s warning: One or more of the unique class values in the stratification variable is not present in one or more folds. 708s warning: called from 708s cvpartition at line 764 column 19 708s crossval at line 1701 column 9 708s fitcknn at line 354 column 7 708s __test__ at line 6 column 2 708s test at line 685 column 11 708s /tmp/tmp.scCa8Po4At at line 3598 column 2 708s 708s ***** error fitcknn () 708s ***** error fitcknn (ones (4,1)) 708s ***** error 708s fitcknn (ones (4,2), ones (4, 1), "K") 708s ***** error 708s fitcknn (ones (4,2), ones (3, 1)) 708s ***** error 708s fitcknn (ones (4,2), ones (3, 1), "K", 2) 708s ***** error 708s fitcknn (ones (4,2), ones (4, 1), "CrossVal", 2) 708s ***** error 708s fitcknn (ones (4,2), ones (4, 1), "CrossVal", 'a') 708s ***** error ... 708s fitcknn (ones (4,2), ones (4, 1), "KFold", 10, "Holdout", 0.3) 708s 29 tests, 29 passed, 0 known failure, 0 skipped 708s Checking C++ files ... 708s [src/editDistance.cc] 708s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/src/editDistance.cc 708s ***** error d = editDistance (1, 2, 3, 4); 708s ***** error ... 708s [C, IA, IC, I] = editDistance ({"AS","SD","AD"}, 1); 708s ***** error ... 708s [C, IA] = editDistance ({"AS","SD","AD"}); 708s ***** error ... 708s d = editDistance ({"AS","SD","AD"}, [1, 2]); 708s ***** error ... 708s d = editDistance ({"AS","SD","AD"}, -2); 708s ***** error ... 708s d = editDistance ({"AS","SD","AD"}, 1.25); 708s ***** error ... 708s d = editDistance ({"AS","SD","AD"}, {"AS","SD","AD"}, [1, 2]); 708s ***** error ... 708s d = editDistance ({"AS","SD","AD"}, {"AS","SD","AD"}, -2); 708s ***** error ... 708s d = editDistance ({"AS","SD","AD"}, {"AS","SD","AD"}, 1.25); 708s ***** error ... 708s d = editDistance ("string1", "string2", [1, 2]); 708s ***** error ... 708s d = editDistance ("string1", "string2", -2); 708s ***** error ... 708s d = editDistance ("string1", "string2", 1.25); 708s ***** error ... 708s d = editDistance ({{"string1", "string2"}, 2}); 708s ***** error ... 708s d = editDistance ({{"string1", "string2"}, 2}, 2); 708s ***** error ... 708s d = editDistance ([1, 2, 3]); 708s ***** error ... 708s d = editDistance (["AS","SD","AD","AS"]); 708s ***** error ... 708s d = editDistance (["AS","SD","AD"], 2); 708s ***** error ... 708s d = editDistance (logical ([1,2,3]), {"AS","AS","AD"}); 708s ***** error ... 708s d = editDistance ({"AS","SD","AD"}, logical ([1,2,3])); 708s ***** error ... 708s d = editDistance ([1,2,3], {"AS","AS","AD"}); 708s ***** error ... 708s d = editDistance ({1,2,3}, {"AS","SD","AD"}); 708s ***** error ... 708s d = editDistance ({"AS","SD","AD"}, {1,2,3}); 708s ***** error ... 708s d = editDistance ({"AS","SD","AD"}, {"AS", "AS"}); 708s ***** test 708s d = editDistance ({"AS","SD","AD"}); 708s assert (d, [2; 1; 1]); 708s assert (class (d), "double"); 708s ***** test 708s C = editDistance ({"AS","SD","AD"}, 1); 708s assert (iscellstr (C), true); 708s assert (C, {"AS";"SD"}); 708s ***** test 708s [C, IA] = editDistance ({"AS","SD","AD"}, 1); 708s assert (class (IA), "double"); 708s assert (IA, [1;2]); 708s ***** test 708s A = {"ASS"; "SDS"; "FDE"; "EDS"; "OPA"}; 708s [C, IA] = editDistance (A, 2, "OutputAllIndices", false); 708s assert (class (IA), "double"); 708s assert (A(IA), C); 708s ***** test 708s A = {"ASS"; "SDS"; "FDE"; "EDS"; "OPA"}; 708s [C, IA] = editDistance (A, 2, "OutputAllIndices", true); 708s assert (class (IA), "cell"); 708s assert (C, {"ASS"; "FDE"; "OPA"}); 708s assert (A(IA{1}), {"ASS"; "SDS"; "EDS"}); 708s assert (A(IA{2}), {"FDE"; "EDS"}); 708s assert (A(IA{3}), {"OPA"}); 708s ***** test 708s A = {"ASS"; "SDS"; "FDE"; "EDS"; "OPA"}; 708s [C, IA, IC] = editDistance (A, 2); 708s assert (class (IA), "double"); 708s assert (A(IA), C); 708s assert (IC, [1; 1; 3; 1; 5]); 708s ***** test 708s d = editDistance ({"AS","SD","AD"}, {"AS", "AD", "SE"}); 708s assert (d, [0; 1; 2]); 708s assert (class (d), "double"); 708s ***** test 708s d = editDistance ({"AS","SD","AD"}, {"AS"}); 708s assert (d, [0; 2; 1]); 708s assert (class (d), "double"); 708s ***** test 708s d = editDistance ({"AS"}, {"AS","SD","AD"}); 708s assert (d, [0; 2; 1]); 708s assert (class (d), "double"); 708s ***** test 708s b = editDistance ("Octave", "octave"); 708s assert (b, 1); 708s assert (class (b), "double"); 708s 33 tests, 33 passed, 0 known failure, 0 skipped 708s [src/fcnnpredict.cc] 708s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/src/fcnnpredict.cc 708s ***** shared X, Y, MODEL 708s load fisheriris 708s X = meas; 708s Y = grp2idx (species); 708s MODEL = fcnntrain (X, Y, 10, [1, 1], 1, 0.01, 0.025, 100, false); 708s ***** test 708s [Y_pred, Y_scores] = fcnnpredict (MODEL, X); 708s assert (numel (Y_pred), numel (Y)); 708s assert (isequal (size (Y_pred), size (Y)), true); 708s assert (columns (Y_scores), numel (unique (Y))); 708s assert (rows (Y_scores), numel (Y)); 708s ***** error ... 708s fcnnpredict (MODEL); 708s ***** error ... 708s [Q, W, E] = fcnnpredict (MODEL, X); 708s ***** error ... 708s fcnnpredict (1, X); 708s ***** error ... 708s fcnnpredict (struct ("L", {1, 2, 3}), X); 708s ***** error ... 708s fcnnpredict (struct ("L", 1), X); 708s ***** error ... 708s fcnnpredict (struct ("LayerWeights", 1), X); 708s ***** error ... 708s fcnnpredict (struct ("LayerWeights", {1}), X); 708s ***** error ... 708s fcnnpredict (struct ("LayerWeights", {{1; 2; 3}}), X); 708s ***** error ... 708s fcnnpredict (struct ("LayerWeights", {[{ones(3)},{ones(3)}]}, "R", 2), X); 708s ***** error ... 708s fcnnpredict (struct ("LayerWeights", {[{ones(3)},{ones(3)}]}, ... 708s "Activations", [2]), X); 708s ***** error ... 708s fcnnpredict (struct ("LayerWeights", {[{ones(3)},{ones(3)}]}, ... 708s "Activations", [2; 2]), X); 708s ***** error ... 708s fcnnpredict (struct ("LayerWeights", {[{ones(3)},{ones(3)}]}, ... 708s "Activations", {{2, 2}}), X); 708s ***** error ... 708s fcnnpredict (struct ("LayerWeights", {[{ones(3)},{ones(3)}]}, ... 708s "Activations", {{"sigmoid", "softmax"}}), X); 708s ***** error ... 708s fcnnpredict (struct ("LayerWeights", {[{ones(3)},{ones(3)}]}, ... 708s "Activations", "sigmoid"), X); 708s ***** error ... 708s fcnnpredict (MODEL, complex (X)); 708s ***** error ... 708s fcnnpredict (MODEL, {1, 2, 3, 4}); 708s ***** error ... 708s fcnnpredict (MODEL, "asd"); 708s ***** error ... 708s fcnnpredict (MODEL, []); 708s ***** error ... 708s fcnnpredict (MODEL, X(:,[1:3])); 708s 20 tests, 20 passed, 0 known failure, 0 skipped 708s [src/fcnntrain.cc] 708s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/src/fcnntrain.cc 708s ***** shared X, Y, MODEL 708s load fisheriris 708s X = meas; 708s Y = grp2idx (species); 708s ***** error ... 708s model = fcnntrain (X, Y); 708s ***** error ... 708s [Q, W] = fcnntrain (X, Y, 10, [1, 1], 1, 0.01, 0.025, 50, false); 708s ***** error ... 708s fcnntrain (complex (X), Y, 10, [1, 1], 1, 0.01, 0.025, 50, false); 708s ***** error ... 708s fcnntrain ({X}, Y, 10, [1, 1], 1, 0.01, 0.025, 50, false); 708s ***** error ... 708s fcnntrain ([], Y, 10, [1, 1], 1, 0.01, 0.025, 50, false); 708s ***** error ... 708s fcnntrain (X, complex (Y), 10, 1, 0.01, [1, 1], 0.025, 50, false); 708s ***** error ... 708s fcnntrain (X, {Y}, 10, [1, 1], 1, 0.01, 0.025, 50, false); 708s ***** error ... 708s fcnntrain (X, [], 10, [1, 1], 1, 0.01, 0.025, 50, false); 708s ***** error ... 708s fcnntrain (X, Y([1:50]), 10, [1, 1], 1, 0.01, 0.025, 50, false); 708s ***** error ... 708s fcnntrain (X, Y - 1, 10, [1, 1], 1, 0.01, 0.025, 50, false); 708s ***** error ... 708s fcnntrain (X, Y, [10; 5], [1, 1, 1], 1, 0.01, 0.025, 50, false); 708s ***** error ... 708s fcnntrain (X, Y, "10", [1, 1], 1, 0.01, 0.025, 50, false); 708s ***** error ... 708s fcnntrain (X, Y, {10}, [1, 1], 1, 0.01, 0.025, 50, false); 708s ***** error ... 708s fcnntrain (X, Y, complex (10), [1, 1], 1, 0.01, 0.025, 50, false); 708s ***** error ... 708s fcnntrain (X, Y, 10, [1; 1], 1, 0.01, 0.025, 50, false); 708s ***** error ... 708s fcnntrain (X, Y, 10, {1, 1}, 1, 0.01, 0.025, 50, false); 708s ***** error ... 708s fcnntrain (X, Y, 10, "1", 1, 0.01, 0.025, 50, false); 708s ***** error ... 708s fcnntrain (X, Y, 10, complex ([1, 1]), 1, 0.01, 0.025, 50, false); 708s ***** error ... 708s fcnntrain (X, Y, 10, [1, 1, 1], 1, 0.01, 0.025, 50, false); 708s ***** error ... 708s fcnntrain (X, Y, [10, 0, 5], [1, 1, 1, 1], 1, 0.01, 0.025, 50, false); 708s ***** error ... 708s fcnntrain (X, Y, 10, [-1, 1], 1, 0.01, 0.025, 50, false); 708s ***** error ... 708s fcnntrain (X, Y, 10, [8, 1], 1, 0.01, 0.025, 50, false); 708s ***** error ... 708s fcnntrain (X, Y, 10, [1, 1], 0, 0.01, 0.025, 50, false); 708s ***** error ... 708s fcnntrain (X, Y, 10, [1, 1], 1, -0.01, 0.025, 50, false); 708s ***** error ... 708s fcnntrain (X, Y, 10, [1, 1], 1, 0.01, -0.025, 50, false); 708s ***** error ... 708s fcnntrain (X, Y, 10, [1, 1], 1, 0.01, 0, 50, false); 708s ***** error ... 708s fcnntrain (X, Y, 10, [1, 1], 1, 0.01, [0.025, 0.001], 50, false); 708s ***** error ... 708s fcnntrain (X, Y, 10, [1, 1], 1, 0.01, {0.025}, 50, false); 708s ***** error ... 708s fcnntrain (X, Y, 10, [1, 1], 1, 0.01, 0.025, 0, false); 708s ***** error ... 708s fcnntrain (X, Y, 10, [1, 1], 1, 0.01, 0.025, [50, 25], false); 708s ***** error ... 708s fcnntrain (X, Y, 10, [1, 1], 1, 0.01, 0.025, 50, 0); 708s ***** error ... 708s fcnntrain (X, Y, 10, [1, 1], 1, 0.01, 0.025, 50, 1); 708s ***** error ... 708s fcnntrain (X, Y, 10, [1, 1], 1, 0.01, 0.025, 50, [false, false]); 708s 33 tests, 33 passed, 0 known failure, 0 skipped 708s [src/libsvmread.cc] 708s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/src/libsvmread.cc 708s ***** error [L, D] = libsvmread (24); 708s ***** error ... 708s D = libsvmread ("filename"); 708s ***** test 708s [L, D] = libsvmread (file_in_loadpath ("heart_scale.dat")); 708s assert (size (L), [270, 1]); 708s assert (size (D), [270, 13]); 708s ***** test 708s [L, D] = libsvmread (file_in_loadpath ("heart_scale.dat")); 708s assert (issparse (L), false); 708s assert (issparse (D), true); 708s 4 tests, 4 passed, 0 known failure, 0 skipped 708s [src/libsvmwrite.cc] 708s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/src/libsvmwrite.cc 708s ***** shared L, D 708s [L, D] = libsvmread (file_in_loadpath ("heart_scale.dat")); 708s ***** error libsvmwrite ("", L, D); 708s ***** error ... 708s libsvmwrite (tempname (), [L;L], D); 708s ***** error ... 708s OUT = libsvmwrite (tempname (), L, D); 708s ***** error ... 708s libsvmwrite (tempname (), single (L), D); 708s ***** error libsvmwrite (13412, L, D); 708s ***** error ... 708s libsvmwrite (tempname (), L, full (D)); 708s ***** error ... 708s libsvmwrite (tempname (), L, D, D); 708s 7 tests, 7 passed, 0 known failure, 0 skipped 708s [src/svmpredict.cc] 708s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/src/svmpredict.cc 708s ***** test 708s [L, D] = libsvmread (file_in_loadpath ("heart_scale.dat")); 708s model = svmtrain (L, D, '-c 1 -g 0.07'); 708s [predict_label, accuracy, dec_values] = svmpredict (L, D, model); 708s assert (size (predict_label), size (dec_values)); 708s assert (accuracy, [86.666, 0.533, 0.533]', [1e-3, 1e-3, 1e-3]'); 708s assert (dec_values(1), 1.225836001973273, 1e-14); 708s assert (dec_values(2), -0.3212992933043805, 1e-14); 708s assert (predict_label(1), 1); 708s ***** shared L, D, model 708s [L, D] = libsvmread (file_in_loadpath ("heart_scale.dat")); 708s model = svmtrain (L, D, '-c 1 -g 0.07'); 708s ***** error ... 708s [p, a] = svmpredict (L, D, model); 708s ***** error p = svmpredict (L, D); 708s ***** error ... 708s p = svmpredict (single (L), D, model); 708s ***** error p = svmpredict (L, D, 123); 708s 5 tests, 5 passed, 0 known failure, 0 skipped 708s [src/svmtrain.cc] 708s >>>>> /tmp/autopkgtest.RVoS4M/build.3Au/src/src/svmtrain.cc 708s ***** test 708s [L, D] = libsvmread (file_in_loadpath ("heart_scale.dat")); 708s model = svmtrain(L, D, '-c 1 -g 0.07'); 708s [predict_label, accuracy, dec_values] = svmpredict(L, D, model); 708s assert (isstruct (model), true); 708s assert (isfield (model, "Parameters"), true); 708s assert (model.totalSV, 130); 708s assert (model.nr_class, 2); 708s assert (size (model.Label), [2, 1]); 708s ***** shared L, D 708s [L, D] = libsvmread (file_in_loadpath ("heart_scale.dat")); 708s ***** error [L, D] = svmtrain (L, D); 708s ***** error ... 708s model = svmtrain (single (L), D); 708s ***** error ... 708s model = svmtrain (L, D, "", ""); 708s 4 tests, 4 passed, 0 known failure, 0 skipped 709s Done running the unit tests. 709s Summary: 11023 tests, 11021 passed, 1 known failures, 1 skipped 710s autopkgtest [07:24:44]: test command1: -----------------------] 715s command1 PASS 715s autopkgtest [07:24:49]: test command1: - - - - - - - - - - results - - - - - - - - - - 719s autopkgtest [07:24:53]: @@@@@@@@@@@@@@@@@@@@ summary 719s command1 PASS